Dotclear


Ignore:
Files:
3 added
42 edited

Legend:

Unmodified
Added
Removed
  • .hgsubstate

    r1385 r1486  
    1 4288bdc1f21d00f93331bbe098485727b276c1fe inc/libs/clearbricks 
     1716e99c54652d08c2e4395d5179e817e0f98182d inc/libs/clearbricks 
  • CHANGELOG

    r1216 r1350  
     1Dotclear 2.5.2 - 2013-08-14 
     2=========================================================== 
     3* Security fix: Fixed potential XSS 
     4* Bugfix: l10n Clearbricks library 
     5* <tpl:LoopPosition> now works <tpl:Attachments> 
     6* Dotclear update check may now be forced (ignoring cache) 
     7* Enforce integration of daInstaller plugin 
     8* Tags link button is now available on page editor 
     9* Default cache age is now 1 week instead of 2 hours 
     10* Quick entry dashboard module is not activated by default on new installation 
     11* New template {{tpl:BlogParentThemeURL}} (return URL of parent theme of blog's theme if any, URL of blog's theme otherwise) 
     12* Fix post comments number on comments deletion 
     13* Fix order of backup files 
     14* Minor enhancements 
     15* Various bug fixes 
     16* Various cosmetic adjustments 
     17 
    118Dotclear 2.5.1 - 2013-07-20 
    219=========================================================== 
  • Makefile

    r1046 r1451  
    6969     find $(DC)/admin/js/jquery/*.js -exec ./build-tools/min-js.php \{\} \; 
    7070     find $(DC)/admin/js/jsToolBar/*.js -exec ./build-tools/min-js.php \{\} \; 
     71     find $(DC)/admin/js/jsUpload/*.js -exec ./build-tools/min-js.php \{\} \; 
    7172     find $(DC)/admin/js/tool-man/*.js -exec ./build-tools/min-js.php \{\} \; 
    7273     find $(DC)/plugins -name '*.js' -exec ./build-tools/min-js.php \{\} \; 
  • admin/blog.php

    r1399 r1482  
    7979     '<form action="blog.php" method="post" id="blog-form">'. 
    8080      
    81      $core->formNonce(). 
     81     '<div>'.$core->formNonce().'</div>'. 
    8282     '<p><label class="required" for="blog_id"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:').'</label> '. 
    8383     form::field('blog_id',30,32,html::escapeHTML($blog_id)).'</p>'. 
  • admin/blog_pref.php

    r1399 r1474  
    504504          (html::escapeHTML($blog_settings->system->media_img_default_size) != '' ? html::escapeHTML($blog_settings->system->media_img_default_size) : 'm')). 
    505505     '</p>'. 
    506      '<p><label for="media_img_default_alignment">'.__('Image alignment').'</label>'. 
     506     '<p><label for="media_img_default_alignment">'.__('Image alignment:').'</label>'. 
    507507     form::combo('media_img_default_alignment',$img_default_alignment_combo,html::escapeHTML($blog_settings->system->media_img_default_alignment)). 
    508508     '</p>'. 
     
    548548     } else { 
    549549          if ($blog_id == $core->blog->id) { 
    550                echo '<p class="message">'.__('The current blog cannot be deleted').'</p>'; 
     550               echo '<p class="message">'.__('The current blog cannot be deleted.').'</p>'; 
    551551          } else { 
    552                echo '<p class="message">'.__('Only superadmin can delete a blog').'</p>'; 
     552               echo '<p class="message">'.__('Only superadmin can delete a blog.').'</p>'; 
    553553          } 
    554554     } 
  • admin/categories.php

    r1399 r1468  
    3131          $mov_cat = $mov_cat ? $mov_cat : null; 
    3232          if ($mov_cat !== null) { 
    33                $c = $core->blog->getCategory((integer) $_POST['del_cat']); 
     33               $c = $core->blog->getCategory((integer) $_POST['mov_cat']); 
    3434               if ($c->isEmpty()) { 
    3535                    throw new Exception(__('This category does not exist.')); 
     
    144144echo '</div>'; 
    145145 
     146$categories_combo = array(); 
     147if (!$rs->isEmpty()) 
     148{ 
     149     while ($rs->fetch()) { 
     150          $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     151               str_repeat('&nbsp;&nbsp;',$rs->level-1).($rs->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($rs->cat_title), 
     152               $rs->cat_id 
     153          ); 
     154     } 
     155} 
     156 
    146157echo '<div class="col">'. 
    147158 
     
    149160'<h3>'.__('Add a new category').'</h3>'. 
    150161'<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 
    151 form::field('cat_title',30,255).'</p>'. 
     162form::field('cat_title',30,255,'','maximal').'</p>'. 
    152163'<p><label for="new_cat_parent">'.__('Parent:').'</label> '. 
    153 '<select id="new_cat_parent" name="new_cat_parent">'. 
    154 '<option value="0">'.__('Top level').'</option>'; 
    155 while ($rs->fetch()) { 
    156      echo '<option value="'.$rs->cat_id.'">'. 
    157           str_repeat('&nbsp;&nbsp;',$rs->level-1).($rs->level-1 == 0 ? '' : '&bull; '). 
    158           html::escapeHTML($rs->cat_title).'</option>'; 
    159 } 
    160 echo 
    161 '</select></p>'. 
     164form::combo('new_cat_parent',array_merge(array(__('(No cat)') => 0),$categories_combo),'','maximal'). 
     165'</p>'. 
    162166'<p><input type="submit" value="'.__('Create').'" />'. 
    163167$core->formNonce().'</p>'. 
     168 
    164169'</form>'; 
    165170 
    166171if (!$rs->isEmpty()) 
    167172{ 
    168      $cats = array(); 
    169      $dest = array('&nbsp;' => ''); 
    170      $l = $rs->level; 
    171      $full_name = array($rs->cat_title); 
    172      while ($rs->fetch()) 
    173      { 
    174           if ($rs->level < $l) { 
    175                $full_name = array(); 
    176           } elseif ($rs->level == $l) { 
    177                array_pop($full_name); 
    178           } 
    179           $full_name[] = html::escapeHTML($rs->cat_title); 
    180            
    181           $cats[implode(' / ',$full_name)] = $rs->cat_id; 
    182           $dest[implode(' / ',$full_name)] = $rs->cat_id; 
    183            
    184           $l = $rs->level; 
    185      } 
    186       
    187173     echo 
    188      '<form action="categories.php" method="post" id="delete-category" class="border-top">'. 
     174     '<form action="categories.php" method="post" id="delete-category">'. 
    189175     '<h3>'.__('Remove a category').'</h3>'. 
    190176     '<p><label for="del_cat">'.__('Choose a category to remove:').'</label> '. 
    191      form::combo('del_cat',$cats).'</p> '. 
     177     form::combo('del_cat',$categories_combo,'','maximal').'</p> '. 
    192178     '<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').'</label> '. 
    193      form::combo('mov_cat',$dest).'</p> '. 
     179     form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</p> '. 
    194180     '<p><input type="submit" value="'.__('Delete').'" class="delete" />'. 
    195181     $core->formNonce().'</p>'. 
     182 
    196183     '</form>'; 
    197184      
  • admin/comments.php

    r1424 r1480  
    3737$type_combo = array( 
    3838'-' => '', 
    39 __('comment') => 'co', 
    40 __('trackback') => 'tb' 
     39__('Comment') => 'co', 
     40__('Trackback') => 'tb' 
    4141); 
    4242 
     
    134134if ($core->auth->check('publish,contentadmin',$core->blog->id)) 
    135135{ 
    136      $combo_action[__('publish')] = 'publish'; 
    137      $combo_action[__('unpublish')] = 'unpublish'; 
    138      $combo_action[__('mark as pending')] = 'pending'; 
    139      $combo_action[__('mark as junk')] = 'junk'; 
     136     $combo_action[__('Publish')] = 'publish'; 
     137     $combo_action[__('Unpublish')] = 'unpublish'; 
     138     $combo_action[__('Mark as pending')] = 'pending'; 
     139     $combo_action[__('Mark as junk')] = 'junk'; 
    140140} 
    141141if ($core->auth->check('delete,contentadmin',$core->blog->id)) 
     
    261261      
    262262     '<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '. 
    263      form::combo('action',$combo_action,$default,'','','','title="'.__('action: ').'"'). 
     263     form::combo('action',$combo_action,$default,'','','','title="'.__('Actions').'"'). 
    264264     $core->formNonce(). 
    265265     '<input type="submit" value="'.__('ok').'" /></p>'. 
  • admin/comments_actions.php

    r1179 r1474  
    137137$core->callBehavior('adminCommentsActionsContent',$core,$action,$hidden_fields); 
    138138 
    139 echo '<p><a class="back" href="'.str_replace('&','&amp;',$redir).'">'.__('back').'</a></p>'; 
     139echo '<p><a class="back" href="'.str_replace('&','&amp;',$redir).'">'.__('Back to comments list').'</a></p>'; 
    140140 
    141141dcPage::close(); 
  • admin/js/_index.js

    r1140 r1418  
    6161               }); 
    6262          } 
     63          $('#new_cat').toggleWithLegend( 
     64               $('#new_cat').parent().children().not('#new_cat'), 
     65               {} // no cookie on new category as we don't use this every day 
     66          ); 
    6367     } 
    6468 
  • admin/js/_post.js

    r1490 r1492  
    115115               hide: $('#post_notes').val() == '' 
    116116          }); 
     117          $('#new_cat').toggleWithLegend( 
     118               $('#new_cat').parent().children().not('#new_cat'), 
     119               {} // no cookie on new category as we don't use this every day 
     120          ); 
    117121          $('#post_lang').parent().toggleWithLegend($('#post_lang'),{ 
    118122               cookie: 'dcx_post_lang' 
  • admin/js/_posts_actions.js

    r1035 r1419  
    66          matchContains: true 
    77     }); 
     8     $('#new_cat').toggleWithLegend( 
     9          $('#new_cat').parent().children().not('#new_cat'), 
     10          {} // no cookie on new category as we don't use this every day 
     11     ); 
    812}); 
  • admin/js/_users_actions.js

    r935 r1449  
    11jQuery.fn.updatePermissionsForm = function() { 
    22     return this.each(function() { 
     3           
    34          var perms = {}; 
    45          var re = /^perm\[(.+?)\]\[(.+?)\]$/; 
     
    1213                    continue; 
    1314               } 
     15               var prop; 
    1416               prop = e.name.match(re); 
    1517               if (!prop) { 
     
    2022               } 
    2123               perms[prop[1]][prop[2]] = e; 
     24                
     25               // select related permissions for admin 
     26               if (prop[2] == 'admin') { 
     27                    if (e.checked) { 
     28                         admin(e,perms,re); 
     29                    } 
     30                    $(e).click(function(){ 
     31                         admin(this,perms,re); 
     32                    }); 
     33               // select related permissions for content admin 
     34               } else if (prop[2] == 'contentadmin') { 
     35                    if (e.checked) { 
     36                         contentadmin(e,perms,re); 
     37                    } 
     38                    $(e).click(function(){ 
     39                         contentadmin(this,perms,re); 
     40                    }); 
     41               // select related permissions for media admin 
     42               } else if (prop[2] == 'media_admin') { 
     43                    if (e.checked) { 
     44                         mediaadmin(e,perms,re); 
     45                    } 
     46                    $(e).click(function(){ 
     47                         mediaadmin(this,perms,re); 
     48                    }); 
     49               } 
    2250          } 
    2351           
    24           // Update elements status 
    25           var E; 
    26           for (blog in perms) { 
    27                for (perm in perms[blog]) { 
    28                     E = perms[blog][perm]; 
    29                     E.onclick = function() {}; 
    30                      
    31                     if (perm == 'admin' && !E.disabled) { 
    32                          perms[blog]['usage'].disabled = E.checked; 
    33                          perms[blog]['publish'].disabled = E.checked; 
    34                          perms[blog]['delete'].disabled = E.checked; 
    35                          perms[blog]['contentadmin'].disabled = E.checked; 
    36                          perms[blog]['categories'].disabled = E.checked; 
    37                          perms[blog]['media'].disabled = E.checked; 
    38                          perms[blog]['media_admin'].disabled = E.checked; 
    39                          E.onclick = function() { $(this.form).updatePermissionsForm(); }; 
    40                     } else if (perm == 'contentadmin' && !E.disabled) { 
    41                          perms[blog]['usage'].checked = E.checked; 
    42                          perms[blog]['publish'].checked = E.checked; 
    43                          perms[blog]['delete'].checked = E.checked; 
    44                          perms[blog]['usage'].disabled = E.checked; 
    45                          perms[blog]['publish'].disabled = E.checked; 
    46                          perms[blog]['delete'].disabled = E.checked; 
    47                          E.onclick = function() { $(this.form).updatePermissionsForm(); }; 
    48                     } else if (perm == 'media_admin' && !E.disabled) { 
    49                          perms[blog]['media'].checked = E.checked; 
    50                          perms[blog]['media'].disabled = E.checked; 
    51                          E.onclick = function() { $(this.form).updatePermissionsForm(); }; 
    52                     } 
    53                } 
     52          function admin(E,perms,re) { 
     53                         P = E.name.match(re); 
     54                          
     55                         perms[P[1]]['usage'].checked = E.checked; 
     56                         perms[P[1]]['publish'].checked = E.checked; 
     57                         perms[P[1]]['delete'].checked = E.checked; 
     58                         perms[P[1]]['contentadmin'].checked = E.checked; 
     59                         perms[P[1]]['categories'].checked = E.checked; 
     60                         perms[P[1]]['media'].checked = E.checked; 
     61                         perms[P[1]]['media_admin'].checked = E.checked; 
     62                         perms[P[1]]['usage'].disabled = E.checked; 
     63                         perms[P[1]]['publish'].disabled = E.checked; 
     64                         perms[P[1]]['delete'].disabled = E.checked; 
     65                         perms[P[1]]['contentadmin'].disabled = E.checked; 
     66                         perms[P[1]]['categories'].disabled = E.checked; 
     67                         perms[P[1]]['media'].disabled = E.checked; 
     68                         perms[P[1]]['media_admin'].disabled = E.checked; 
    5469          } 
     70           
     71          function contentadmin(E,perms,re) { 
     72                         P = E.name.match(re); 
     73                          
     74                         perms[P[1]]['usage'].checked = E.checked; 
     75                         perms[P[1]]['publish'].checked = E.checked; 
     76                         perms[P[1]]['delete'].checked = E.checked; 
     77                         perms[P[1]]['usage'].disabled = E.checked; 
     78                         perms[P[1]]['publish'].disabled = E.checked; 
     79                         perms[P[1]]['delete'].disabled = E.checked; 
     80          } 
     81           
     82          function mediaadmin(E,perms,re) { 
     83                         P = E.name.match(re); 
     84                          
     85                         perms[P[1]]['media'].checked = E.checked; 
     86                         perms[P[1]]['media'].disabled = E.checked; 
     87          } 
     88           
     89           
    5590     }); 
    5691}; 
  • admin/plugins.php

    r1399 r1474  
    236236 
    237237if ($is_writable) { 
    238      echo __('To install or upgrade a plugin you generally just need to upload it '. 
     238     echo '<p>'.__('To install or upgrade a plugin you generally just need to upload it '. 
    239239     'in "Install or upgrade a plugin" section.'); 
    240240} else { 
    241      echo __('To install or upgrade a plugin you just need to extract it in your plugins directory.'); 
     241     echo '<p>'.__('To install or upgrade a plugin you just need to extract it in your plugins directory.'); 
    242242} 
    243243echo '</p>'; 
  • admin/posts_actions.php

    r1399 r1476  
    1717$params = array(); 
    1818 
     19/** 
     20* FieldsList - Compatibility class for hidden fields & entries[] fields 
     21* 
     22*/ 
     23class FieldsList { 
     24     /** @var array list of hidden fields */ 
     25     protected $hidden; 
     26     /** @var array list of selected entries */ 
     27     protected $entries; 
     28 
     29 
     30   /** 
     31     * Class constructor 
     32     */ 
     33     public function __construct() { 
     34          $this->hidden=array(); 
     35          $this->entries =array(); 
     36     } 
     37 
     38    /** 
     39     * addHidden - adds a hidden field 
     40     *  
     41     * @param string $name the field name. 
     42     * @param mixed $value the field value. 
     43     * 
     44     * @access public 
     45      * @return the FieldsList instance, enabling to chain requests 
     46     */    
     47      public function addHidden($name,$value) { 
     48          $this->hidden[] = form::hidden($name,$value); 
     49          return $this; 
     50     } 
     51 
     52    /** 
     53     * addEntry - adds a antry field 
     54     *  
     55     * @param string $id the entry id. 
     56     * @param mixed $title the entry title. 
     57     * 
     58     * @access public 
     59      * @return the FieldsList instance, enabling to chain requests 
     60     */    
     61      public function addEntry($id,$title) { 
     62          $this->entries[$id]=$title; 
     63          return $this; 
     64     } 
     65 
     66    /** 
     67     * getHidden - returns the list of hidden fields, html encoded 
     68     * 
     69     * @access public 
     70      * @return the list of hidden fields, html encoded 
     71     */ 
     72      public function getHidden() { 
     73          return join('',$this->hidden); 
     74     } 
     75      
     76    /** 
     77     * getEntries - returns the list of entry fields, html encoded 
     78     * 
     79      * @param boolean $hidden if set to true, returns entries as a list of hidden field 
     80      *                if set to false, returns html code displaying the list of entries 
     81      *                with a list of checkboxes to enable to select/deselect entries 
     82     * @access public 
     83      * @return the list of entry fields, html encoded 
     84     */ 
     85     public function getEntries ($hidden=false) { 
     86          $ret = ''; 
     87          if ($hidden) { 
     88               foreach ($this->entries as $id=> $e) { 
     89                    $ret .= form::hidden('entries[]',$id); 
     90               } 
     91          } else { 
     92               $ret =  
     93                    '<table class="posts-list"><tr>'. 
     94                    '<th colspan="2">'.__('Title').'</th>'. 
     95                    '</tr>'; 
     96               foreach ($this->entries as $id=>$title) { 
     97                    $ret .=  
     98                         '<tr><td>'. 
     99                         form::checkbox(array('entries[]'),$id,true,'','').'</td>'. 
     100                         '<td>'.   $title.'</td></tr>'; 
     101               } 
     102               $ret .= '</table>'; 
     103          } 
     104          return $ret; 
     105     } 
     106      
     107    /** 
     108     * getEntriesQS - returns the list of entry fields as query string 
     109     * 
     110     * @access public 
     111      * @return the list of entry fields, html encoded 
     112     */ 
     113     public function getEntriesQS() { 
     114          $ret=array(); 
     115          foreach ($this->entries as $id=>$title) { 
     116               $ret[] = 'entries[]='.$id; 
     117          } 
     118          return join('&',$ret); 
     119     } 
     120      
     121    /** 
     122     * __toString - magic method. -- DEPRECATED here 
     123      *              This method is only used to preserve compatibility with plugins  
     124      *                  relying on previous versions of adminPostsActionsContent behavior,  
     125      * 
     126     * @access public 
     127      * @return the list of hidden fields and entries (as hidden fields too), html encoded 
     128     */ 
     129     public function __toString() { 
     130          return join('',$this->hidden).$this->getEntries(true); 
     131     } 
     132} 
     133 
     134$fields = new FieldsList(); 
     135 
    19136/* Actions 
    20137-------------------------------------------------------- */ 
     
    62179     while ($posts->fetch())  { 
    63180          $posts_ids[] = $posts->post_id; 
    64      } 
     181          $fields->addEntry($posts->post_id,$posts->post_title); 
     182     } 
     183     // Redirection including selected entries 
     184     $redir_sel = $redir.'&'.$fields->getEntriesQS(); 
    65185      
    66186     # --BEHAVIOR-- adminPostsActions 
     
    80200               $core->blog->updPostsStatus($posts_ids,$status); 
    81201                
    82                http::redirect($redir); 
     202               http::redirect($redir_sel.'&upd=1'); 
    83203          } 
    84204          catch (Exception $e) 
     
    93213               $core->blog->updPostsSelected($posts_ids,$action == 'selected'); 
    94214                
    95                http::redirect($redir); 
     215               http::redirect($redir_sel."&upd=1"); 
    96216          } 
    97217          catch (Exception $e) 
     
    116236               $core->blog->delPosts($posts_ids); 
    117237                
    118                http::redirect($redir); 
     238               http::redirect($redir."&del=1"); 
    119239          } 
    120240          catch (Exception $e) 
     
    126246     elseif ($action == 'category' && isset($_POST['new_cat_id'])) 
    127247     { 
     248          $new_cat_id = $_POST['new_cat_id']; 
     249           
    128250          try 
    129251          { 
    130                $core->blog->updPostsCategory($posts_ids,$_POST['new_cat_id']); 
    131                 
    132                http::redirect($redir); 
     252               if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) 
     253               { 
     254                    $cur_cat = $core->con->openCursor($core->prefix.'category'); 
     255                    $cur_cat->cat_title = $_POST['new_cat_title']; 
     256                    $cur_cat->cat_url = ''; 
     257                     
     258                    $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 
     259                     
     260                    # --BEHAVIOR-- adminBeforeCategoryCreate 
     261                    $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
     262                     
     263                    $new_cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
     264                     
     265                    # --BEHAVIOR-- adminAfterCategoryCreate 
     266                    $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $new_cat_id); 
     267               } 
     268                
     269               $core->blog->updPostsCategory($posts_ids, $new_cat_id); 
     270                
     271               http::redirect($redir_sel."&upd=1"); 
    133272          } 
    134273          catch (Exception $e) 
     
    152291               $cur->update('WHERE post_id '.$core->con->in($posts_ids)); 
    153292                
    154                http::redirect($redir); 
     293               http::redirect($redir_sel."&upd=1"); 
    155294          } 
    156295          catch (Exception $e) 
     
    168307               $cur->update('WHERE post_id '.$core->con->in($posts_ids)); 
    169308                
    170                http::redirect($redir); 
     309               http::redirect($redir_sel."&upd=1"); 
    171310          } 
    172311          catch (Exception $e) 
     
    175314          } 
    176315     } 
    177 } 
    178  
     316} else { 
     317     if (empty($_POST['entries'])) { 
     318          $core->error->add(__('At least one entry should be selected')); 
     319     } else { 
     320          $core->error->add(__('No action specified.')); 
     321     } 
     322     dcPage::open( 
     323          __('Entries'),'',dcPage::breadcrumb( 
     324          array( 
     325               html::escapeHTML($core->blog->name) => '', 
     326               __('Entries') => 'posts.php', 
     327               '<span class="page-title">'.__('Entries actions').'</span>' => '' 
     328          )) 
     329     ); 
     330      
     331     echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 
     332 
     333     dcPage::close(); 
     334     exit; 
     335} 
    179336/* DISPLAY 
    180337-------------------------------------------------------- */ 
     
    211368} 
    212369 
    213 $hidden_fields = ''; 
    214 while ($posts->fetch()) { 
    215      $hidden_fields .= form::hidden(array('entries[]'),$posts->post_id); 
    216 } 
    217  
    218370if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false) 
    219371{ 
    220      $hidden_fields .= form::hidden(array('redir'),html::escapeURL($_POST['redir'])); 
     372     $fields->addHidden(array('redir'),html::escapeURL($_POST['redir'])); 
    221373} 
    222374else 
    223375{ 
    224      $hidden_fields .= 
    225      form::hidden(array('user_id'),$_POST['user_id']). 
    226      form::hidden(array('cat_id'),$_POST['cat_id']). 
    227      form::hidden(array('status'),$_POST['status']). 
    228      form::hidden(array('selected'),$_POST['selected']). 
    229      form::hidden(array('month'),$_POST['month']). 
    230      form::hidden(array('lang'),$_POST['lang']). 
    231      form::hidden(array('sortby'),$_POST['sortby']). 
    232      form::hidden(array('order'),$_POST['order']). 
    233      form::hidden(array('page'),$_POST['page']). 
    234      form::hidden(array('nb'),$_POST['nb']); 
     376     $fields 
     377          ->addHidden(array('user_id'),$_POST['user_id']) 
     378          ->addHidden(array('cat_id'),$_POST['cat_id']) 
     379          ->addHidden(array('status'),$_POST['status']) 
     380          ->addHidden(array('selected'),$_POST['selected']) 
     381          ->addHidden(array('month'),$_POST['month']) 
     382          ->addHidden(array('lang'),$_POST['lang']) 
     383          ->addHidden(array('sortby'),$_POST['sortby']) 
     384          ->addHidden(array('order'),$_POST['order']) 
     385          ->addHidden(array('page'),$_POST['page']) 
     386          ->addHidden(array('nb'),$_POST['nb']) 
     387     ; 
    235388} 
    236389 
    237390if (isset($_POST['post_type'])) { 
    238      $hidden_fields .= form::hidden(array('post_type'),$_POST['post_type']); 
     391     $fields->addHidden(array('post_type'),$_POST['post_type']); 
    239392} 
    240393 
    241394# --BEHAVIOR-- adminPostsActionsContent 
    242 $core->callBehavior('adminPostsActionsContent',$core,$action,$hidden_fields); 
     395$core->callBehavior('adminPostsActionsContent',$core,$action,$fields); 
    243396 
    244397if ($action == 'category') 
    245398{ 
    246      echo '<h2 class="page-title">'.__('Change category for entries').'</h2>'; 
    247       
     399     echo dcPage::breadcrumb( 
     400          array( 
     401               html::escapeHTML($core->blog->name) => '', 
     402               __('Entries') => 'posts.php', 
     403               __('Change category for entries') => '' 
     404     )); 
     405      
     406     echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 
     407 
    248408     # categories list 
    249409     # Getting categories 
    250      $categories_combo = array('&nbsp;' => ''); 
     410     $categories_combo = array(__('(No cat)') => ''); 
    251411     try { 
    252412          $categories = $core->blog->getCategories(array('post_type'=>'post')); 
     413          if (!$categories->isEmpty()) { 
    253414          while ($categories->fetch()) { 
    254                $categories_combo[] = new formSelectOption( 
    255                     str_repeat('&nbsp;&nbsp;',$categories->level-1). 
    256                     ($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     415                    $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     416                         str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    257417                    $categories->cat_id 
    258418               ); 
    259419          } 
     420          } 
    260421     } catch (Exception $e) { } 
    261422      
    262423     echo 
    263424     '<form action="posts_actions.php" method="post">'. 
     425     $fields->getEntries(). 
    264426     '<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '. 
    265427     form::combo('new_cat_id',$categories_combo,''); 
    266428      
     429     if ($core->auth->check('categories', $core->blog->id)) { 
     430          echo  
     431          '<div>'. 
     432          '<p id="new_cat">'.__('Add a new category').'</p>'. 
     433          '<p><label for="new_cat_title">'.__('Title:').' '. 
     434          form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     435          '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     436          form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     437          '</label></p>'. 
     438          '</div>'; 
     439     } 
     440      
    267441     echo 
    268      $hidden_fields. 
     442     $fields->getHidden(). 
    269443     $core->formNonce(). 
    270444     form::hidden(array('action'),'category'). 
     
    274448elseif ($action == 'lang') 
    275449{ 
    276      echo '<h2 class="page-title">'.__('Change language for entries').'</h2>'; 
    277       
     450     echo dcPage::breadcrumb( 
     451          array( 
     452               html::escapeHTML($core->blog->name) => '', 
     453               __('Entries') => 'posts.php', 
     454               '<span class="page-title">'.__('Change language for entries').'</span>' => '' 
     455     )); 
     456     echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 
     457 
    278458     # lang list 
    279459     # Languages combo 
     
    294474     echo 
    295475     '<form action="posts_actions.php" method="post">'. 
     476     $fields->getEntries(). 
     477      
    296478     '<p><label for="new_lang" class="classic">'.__('Entry lang:').'</label> '. 
    297479     form::combo('new_lang',$lang_combo,''); 
    298480      
    299481     echo 
    300      $hidden_fields. 
     482     $fields->getHidden(). 
    301483     $core->formNonce(). 
    302484     form::hidden(array('action'),'lang'). 
     
    307489elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id)) 
    308490{ 
    309      echo '<h2 class="page-title">'.__('Change author for entries').'</h2>'; 
    310       
     491     echo dcPage::breadcrumb( 
     492          array( 
     493               html::escapeHTML($core->blog->name) => '', 
     494               __('Entries') => 'posts.php', 
     495               '<span class="page-title">'.__('Change author for entries').'</span>' => '' 
     496     )); 
     497     echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 
     498 
    311499     echo 
    312500     '<form action="posts_actions.php" method="post">'. 
     501     $fields->getEntries(). 
    313502     '<p><label for="new_auth_id" class="classic">'.__('Author ID:').'</label> '. 
    314503     form::field('new_auth_id',20,255); 
    315504      
    316505     echo 
    317      $hidden_fields. 
     506     $fields->getHidden(). 
    318507     $core->formNonce(). 
    319508     form::hidden(array('action'),'author'). 
     
    322511} 
    323512 
    324 echo '<p><a class="back" href="'.html::escapeURL($redir).'">'.__('back').'</a></p>'; 
    325  
    326513dcPage::close(); 
    327514?> 
  • admin/preferences.php

    r1399 r1474  
    344344     ($user_acc_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')). 
    345345     dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     346     dcPage::jsLoad('js/jquery/jquery.pwstrength.js'). 
     347          '<script type="text/javascript">'."\n". 
     348          "//<![CDATA[\n". 
     349          "\$(function() {\n". 
     350          "    \$('#new_pwd').pwstrength({texts: ['". 
     351                    sprintf(__('Password strength: %s'),__('very weak'))."', '". 
     352                    sprintf(__('Password strength: %s'),__('weak'))."', '". 
     353                    sprintf(__('Password strength: %s'),__('mediocre'))."', '". 
     354                    sprintf(__('Password strength: %s'),__('strong'))."', '". 
     355                    sprintf(__('Password strength: %s'),__('very strong'))."']});\n". 
     356          "});\n". 
     357          "\n//]]>\n". 
     358          "</script>\n". 
    346359     dcPage::jsPageTabs($default_tab). 
    347360     dcPage::jsConfirmClose('user-form'). 
     
    411424'</div>'. 
    412425'</div>'. 
    413 '<br class="clear" />'. //Opera sucks 
    414426'</fieldset>'; 
    415427 
     
    420432     '<legend>'.__('Change your password').'</legend>'. 
    421433      
    422      '<p><label for="new_pwd">'.__('New password:').'</label>'. 
    423      form::password('new_pwd',20,255).'</p>'. 
     434     '<div class="pw-table">'. 
     435     '<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'. 
     436     form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'. 
     437     '<div id="pwindicator">'. 
     438     '    <div class="bar"></div>'. 
     439     '    <p class="label no-margin"></p>'. 
     440     '</div>'. 
     441     '</div>'. 
    424442      
    425      '<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'. 
     443     '<p><label for="new_pwd_c">'.__('Confirm new password:').'</label>'. 
    426444     form::password('new_pwd_c',20,255).'</p>'. 
    427445     '</fieldset>'. 
     
    481499     form::checkbox('user_ui_hide_std_favicon',1,$user_ui_hide_std_favicon).' '. 
    482500     __('Do not use standard favicon').'</label></p>'. 
    483      '<p class="clear form-note info">'.__('This will be applied for all users').'</p>'; 
     501     '<p class="clear form-note info">'.__('This will be applied for all users'). 
     502     '<br class="clear" /></p>';//Opera sucks; 
    484503} 
    485504 
    486505echo  
    487 '<br class="clear" />'. //Opera sucks 
    488506'</fieldset>'; 
    489507 
     
    511529'<p><label for="user_dm_quickentry" class="classic">'. 
    512530form::checkbox('user_dm_quickentry',1,$user_dm_quickentry).' '. 
    513 __('Display quick entry form').'</label></p>'. 
    514  
    515 '<br class="clear" />'. //Opera sucks 
     531__('Display quick entry form').'</label><br class="clear" />'. //Opera sucks 
     532'</p>'. 
     533 
    516534'</fieldset>'; 
    517535 
  • admin/style/default.css

    r1490 r1492  
    420420#login-screen { 
    421421     display: block; 
    422      width: 18em; 
     422     width: 20em; 
    423423     margin: 1.5em auto 0; 
    424424     font-size: 1.4rem; 
     
    431431     margin-left: 0; 
    432432} 
    433 #login-screen fieldset, #login-screen .fieldset { 
     433#login-screen .fieldset { 
    434434     border: 1px solid #A8DC26; 
    435435     padding: 1em 1em 0 1em; 
     
    437437     background: #fff; 
    438438} 
    439 #login-screen legend { 
    440      border: 1px solid #A8DC26; 
    441 } 
    442439#login-screen input[type=text], #login-screen input[type=password], #login-screen input[type=submit] { 
    443440     width: 100%; 
     
    448445} 
    449446#login-screen #issue strong {font-weight: normal;} 
    450  
    451447 
    452448/* ------------------------------------------------------------------ dashboard */ 
     
    481477#icons a img { 
    482478     padding: 2em; 
    483      background: #eee; 
    484      border-radius: 1.6rem; 
    485      box-shadow: 0 3px 3px 0 #ccc; 
    486      margin-bottom: .6rem; 
     479     margin-bottom: .3em; 
     480     -moz-box-shadow: 0px 1px 0px 0px #ffffff; 
     481     -webkit-box-shadow: 0px 1px 0px 0px #ffffff; 
     482     box-shadow: 0px 1px 0px 0px #ffffff; 
     483     background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) ); 
     484     background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% ); 
     485     filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9'); 
     486     background-color:#f9f9f9; 
     487     -moz-border-radius:1em; 
     488     -webkit-border-radius:1em; 
     489     border-radius:1em; 
     490     border:1px solid #dcdcdc; 
     491     display:inline-block; 
    487492} 
    488493#icons a img:hover, #icons a:focus img { 
    489      background-color: #BBDB58; 
     494     background: #BBDB58; 
    490495} 
    491496#icons a:focus span, #icons a:hover span { 
     
    501506#quick p.qinfo { 
    502507     margin: -.7em -1em 1em; 
    503      background: #eef url(info.png) no-repeat .2em .2em; 
     508     background: #f3f3ff url(info.png) no-repeat .2em .2em; 
    504509     border: 1px solid #99f; 
    505510     padding: .2em 1em .1em 24px; 
     
    541546} 
    542547 
     548#upg-notify { 
     549} 
     550#upg-notify ul { 
     551     padding-left: 15px; 
     552} 
     553#upg-notify li { 
     554     color: #fff; 
     555} 
    543556/* ------------------------------------------------------------------ post */ 
    544557#entry-wrapper { 
     
    12011214} 
    12021215table.settings th, table.prefs th { 
    1203      background: #eef; 
     1216     background: #f3f3ff; 
    12041217} 
    12051218table.settings th:first-child, table.prefs th:first-child { 
     
    13401353} 
    13411354p.form-note.info { 
    1342      background: #f5eaff url(info.png) no-repeat .3em .2em; 
     1355     background: #f5eaff url(info.png) no-repeat .3em .3em; 
    13431356     border: 1px solid #ddbaff; 
    13441357} 
     
    14151428a.submit { 
    14161429     display: inline-block; 
    1417      outline: none; 
    14181430     cursor: pointer; 
    14191431     text-align: center; 
    14201432     text-decoration: none; 
    14211433     padding: .1em .5em; 
    1422      text-shadow: 0 1px 1px rgba(0,0,0,.3); 
    14231434     border-radius: .2em; 
    14241435     margin-bottom: .1em; 
    1425 } 
     1436     font-size: 1.2rem; 
     1437 } 
    14261438h4 a.button {font-weight: normal;} 
    14271439 
     
    14311443a.submit { 
    14321444     color: #fff; 
    1433      border: 1px solid #2373A8; 
    1434      background: #2373A8; 
    1435      background: -webkit-gradient(linear, left top, left bottom, from(#2C8FD1), to(#2373A8)); 
    1436      background: -moz-linear-gradient(top,  #2C8FD1,  #2373A8); 
     1445     text-shadow: 0 -1px 1px #1A87B9; 
     1446     background:#25A6E1; 
     1447     background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%); 
     1448     background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0)); 
     1449     background:linear-gradient(top,#25A6E1 0%,#188BC0 100%); 
     1450     filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#188BC0',GradientType=0); 
     1451     border:1px solid #2C8FD1; 
     1452 
    14371453} 
    14381454input[type=submit]:hover, 
     
    14421458input[type=button]:focus, 
    14431459a.submit:focus { 
    1444      background: #2373A8; 
    1445      background: -webkit-gradient(linear, left top, left bottom, from(#2373A8), to(#2C8FD1)); 
    1446      background: -moz-linear-gradient(top,  #2373A8,  #2C8FD1); 
    1447      filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#2373A8', endColorstr='#2C8FD1'); 
    1448      border: 1px solid #2C8FD1; 
     1460     background:#188BC0; 
     1461     background:-moz-linear-gradient(top,#188BC0 0%,#25A6E1 100%); 
     1462     background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#188BC0),color-stop(100%,#25A6E1)); 
     1463     background:linear-gradient(top,#188BC0 0%,#25A6E1 100%); 
     1464     filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#25A6E1',GradientType=0); 
    14491465} 
    14501466/* suppression et reset */ 
     
    14571473     background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#dfdfdf)); 
    14581474     background: -moz-linear-gradient(top,  #f5f5f5,  #dfdfdf); 
    1459      text-shadow: none; 
     1475     text-shadow:1px 1px 0px #fff; 
    14601476     } 
    14611477a.button:hover, 
     
    14671483input[type=submit].reset:focus, 
    14681484input[type=submit].delete:focus { 
    1469      background: #dfdfdf; 
    1470      background: -webkit-gradient(linear, left top, left bottom, from(#dfdfdf), to(#f5f5f5)); 
    1471      background: -moz-linear-gradient(top,  #dfdfdf,  #f5f5f5); 
    1472      filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#e5e5e5', endColorstr='#f5f5f5'); 
     1485     background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9) ); 
     1486     background:-moz-linear-gradient( center top, #e9e9e9 5%, #f9f9f9 100% ); 
     1487     filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9'); 
     1488     background-color:#e9e9e9; 
    14731489     } 
    14741490a.delete, 
     
    15091525     font-size: 1.4rem; 
    15101526} 
    1511 .button.add:hover, .button.add:focus { 
     1527.button.add:hover, .button.add:active, .button.add:focus { 
    15121528     background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c) ); 
    15131529     background:-moz-linear-gradient( center top, #8cb82b 5%, #9dce2c 100% ); 
     
    16151631     border-color : #ccc; 
    16161632     background-color: #fff; 
     1633} 
     1634 
     1635/* --------------------------------------------------------------- password indcator */ 
     1636.pw-table { 
     1637     display: table; 
     1638     margin-bottom: 1em; 
     1639} 
     1640.pw-cell { 
     1641     display: table-cell; 
     1642     margin-bottom: 1em; 
     1643} 
     1644#pwindicator { 
     1645     display: table-cell; 
     1646     vertical-align: bottom; 
     1647     padding-left: 1.5em; 
     1648     height: 3.8em; 
     1649} 
     1650#pwindicator .bar { 
     1651     height: 6px; 
     1652     margin-bottom: 4px; 
     1653} 
     1654.pw-very-weak .bar { 
     1655     background: #900; 
     1656     width: 30px; 
     1657} 
     1658.pw-weak .bar { 
     1659     background: #c00; 
     1660     width: 60px; 
     1661} 
     1662.pw-mediocre .bar { 
     1663     background: #f60; 
     1664     width: 90px; 
     1665} 
     1666.pw-strong .bar { 
     1667     background: #060; 
     1668     width: 120px; 
     1669} 
     1670.pw-very-strong .bar { 
     1671     background: #0c0; 
     1672     width: 150px; 
    16171673} 
    16181674 
  • admin/style/jsToolBar/jsToolBar.css

    r1399 r1475  
    8282     display: block; 
    8383     list-style: none; 
    84      margin: 0 0 0 -5px; 
     84     margin: 0; 
    8585     padding: 0 0 5px 0; 
    8686     background: #dfdfdf; 
    8787     border-top: 1px solid #999; 
    88      font-size: 90%; 
    89      font-weight: bold; 
    9088} 
    9189.jstSwitcher li { 
    9290     display: inline; 
    9391     margin: 0 0 0 5px; 
    94      padding: 2px 4px; 
     92     padding: 2px 8px; 
    9593} 
    9694.jstSwitcher li.jstSwitcherCurrent { 
    9795     color: #fff; 
    98      background: #999; 
     96     background: #575859; 
    9997     border-radius: 0 0 2px 2px; 
    10098} 
  • admin/update.php

    r1358 r1474  
    2727 
    2828$updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 
    29 $new_v = $updater->check(DC_VERSION); 
     29$new_v = $updater->check(DC_VERSION, !empty($_GET['nocache'])); 
    3030$zip_file = $new_v ? DC_BACKUP_PATH.'/'.basename($updater->getFileURL()) : ''; 
    3131$version_info = $new_v ? $updater->getInfoURL() : ''; 
     
    168168-------------------------------------------------------- */ 
    169169dcPage::open(__('Dotclear update'), 
    170      (!$step ? dcPage::jsPageTabs($default_tab) : ''), 
     170     (!$step ?  
     171          dcPage::jsPageTabs($default_tab). 
     172          dcPage::jsLoad('js/_update.js') 
     173          : ''), 
    171174     dcPage::breadcrumb( 
    172175          array( 
     
    176179); 
    177180 
     181if (!$core->error->flag()) { 
     182     if (!empty($_GET['nocache'])) { 
     183          dcPage::message(__('Manual checking of update done successfully.')); 
     184     } 
     185} 
     186 
    178187if (!$step) 
    179188{ 
     
    181190     if (empty($new_v)) 
    182191     { 
    183           echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'; 
     192          echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'. 
     193          '<form action="'.$p_url.'" method="get">'. 
     194          '<p><input type="hidden" name="nocache" value="1" />'. 
     195          '<input type="submit" value="'.__('Force checking update Dotclear').'" /></p>'. 
     196          '</form>'; 
    184197     } 
    185198     else 
     
    187200          echo 
    188201               '<p class="static-msg">'.sprintf(__('Dotclear %s is available.'),$new_v). 
    189                     ($version_info ? ' <a href="'.$version_info.'">('.__('information about this version').')</a>' : ''). 
     202                    ($version_info ? ' <a href="'.$version_info.'">('.__('Information about this version').')</a>' : ''). 
    190203                    '</p>'. 
    191204           
     
    233246     '<p class="message">'. 
    234247     __("Congratulations, you're one click away from the end of the update."). 
    235      ' <strong><a href="index.php?logout=1">'.__('Finish the update.').'</a></strong>'. 
     248     ' <strong><a href="index.php?logout=1">'.__('Finish the update').'</a>.</strong>'. 
    236249     '</p>'; 
    237250} 
  • admin/user.php

    r1399 r1474  
    226226'<p><label for="user_firstname">'.__('First Name:').'</label> '. 
    227227form::field('user_firstname',20,255,html::escapeHTML($user_firstname)). 
    228 '</label></p>'. 
    229  
    230 '<p><label for="user_displayname">'.__('Display name:').' '. 
     228'</p>'. 
     229 
     230'<p><label for="user_displayname">'.__('Display name:').'</label> '. 
    231231form::field('user_displayname',20,255,html::escapeHTML($user_displayname)). 
    232232'</p>'. 
  • admin/users.php

    r1426 r1474  
    3939 
    4040 
    41 # Get users 
     41#?Get users 
    4242$page = !empty($_GET['page']) ? $_GET['page'] : 1; 
    4343$nb_per_page =  30; 
     
    134134     form::combo('order',$order_combo,$order).'</p>'. 
    135135     '<p><span class="label ib">'.__('Show').'</span> <label for="nb" class="classic">'.   
    136      form::field('nb',3,3,$nb_per_page).' '.__('users per page').'</p> '. 
     136     form::field('nb',3,3,$nb_per_page).' '.__('users per page').'</label></p> '. 
    137137     '</div>'. 
    138138     '</div>'. 
  • admin/users_actions.php

    r1399 r1477  
    255255      
    256256     echo  
    257      '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.__('Permissions').'</span></h2>'. 
    258257     '<p>'.sprintf( 
    259258          __('You are about to change permissions on the following blogs for users %s.'), 
  • inc/admin/lib.pager.php

    r1415 r1476  
    4242               $pager->html_next = $this->html_next; 
    4343               $pager->var_page = 'page'; 
    44                 
     44               $entries = array(); 
     45               if (isset($_REQUEST['entries'])) { 
     46                    foreach ($_REQUEST['entries'] as $v) { 
     47                         $entries[(integer)$v]=true; 
     48                    } 
     49               } 
    4550               $html_block = 
    4651               '<table class="clear"><tr>'. 
     
    6671               while ($this->rs->fetch()) 
    6772               { 
    68                     echo $this->postLine(); 
     73                    echo $this->postLine(isset($entries[$this->rs->post_id])); 
    6974               } 
    7075                
     
    7580     } 
    7681      
    77      private function postLine() 
     82     private function postLine($checked) 
    7883     { 
    7984          if ($this->core->auth->check('categories',$this->core->blog->id)) { 
     
    8792               html::escapeHTML($this->rs->cat_title)); 
    8893          } else { 
    89                $cat_title = __('None'); 
     94               $cat_title = __('(No cat)'); 
    9095          } 
    9196           
     
    128133          $res .= 
    129134          '<td class="nowrap">'. 
    130           form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).'</td>'. 
     135          form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable()).'</td>'. 
    131136          '<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 
    132137          html::escapeHTML($this->rs->post_title).'</a></td>'. 
  • inc/core/class.dc.blog.php

    r1491 r1492  
    634634     private function checkCategory($title,$url,$id=null) 
    635635     { 
    636           $strReq = 'SELECT cat_id '. 
    637                     'FROM '.$this->prefix.'category '. 
    638                     "WHERE cat_url = '".$this->con->escape($url)."' ". 
    639                     "AND blog_id = '".$this->con->escape($this->id)."' "; 
    640            
    641           if ($id !== null) { 
    642                $strReq .= 'AND cat_id <> '.(integer) $id.' '; 
    643           } 
     636          # Let's check if URL is taken... 
     637          $strReq =  
     638               'SELECT cat_url FROM '.$this->prefix.'category '. 
     639               "WHERE cat_url = '".$this->con->escape($url)."' ". 
     640               ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 
     641               "AND blog_id = '".$this->con->escape($this->id)."' ". 
     642               'ORDER BY cat_url DESC'; 
    644643           
    645644          $rs = $this->con->select($strReq); 
    646645           
    647           if (!$rs->isEmpty()) { 
    648                throw new Exception(__('Category URL must be unique.')); 
    649           } 
     646          if (!$rs->isEmpty()) 
     647          { 
     648               if ($this->con->driver() == 'mysql') { 
     649                    $clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'"; 
     650               } elseif ($this->con->driver() == 'pgsql') { 
     651                    $clause = "~ '^".$this->con->escape($url)."[0-9]+$'"; 
     652               } else { 
     653                    $clause = "LIKE '".$this->con->escape($url)."%'"; 
     654               } 
     655               $strReq =  
     656                    'SELECT cat_url FROM '.$this->prefix.'category '. 
     657                    "WHERE cat_url ".$clause.' '. 
     658                    ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 
     659                    "AND blog_id = '".$this->con->escape($this->id)."' ". 
     660                    'ORDER BY cat_url DESC '; 
     661                
     662               $rs = $this->con->select($strReq); 
     663               $a = array(); 
     664               while ($rs->fetch()) { 
     665                    $a[] = $rs->cat_url; 
     666               } 
     667                
     668               natsort($a); 
     669               $t_url = end($a); 
     670                
     671               if (preg_match('/(.*?)([0-9]+)$/',$t_url,$m)) { 
     672                    $i = (integer) $m[2]; 
     673                    $url = $m[1]; 
     674               } else { 
     675                    $i = 1; 
     676               } 
     677                
     678               return $url.($i+1); 
     679          } 
     680           
     681          # URL is empty? 
     682          if ($url == '') { 
     683               throw new Exception(__('Empty category URL')); 
     684          } 
     685           
     686          return $url; 
    650687     } 
    651688      
     
    669706           
    670707          # Check if title or url are unique 
    671           $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 
     708          $cur->cat_url = $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 
    672709           
    673710          if ($cur->cat_desc !== null) { 
  • inc/core/class.dc.media.php

    r1280 r1468  
    3030      
    3131     public $thumb_tp = '%s/.%s_%s.jpg';     ///< <b>string</b> Thumbnail file pattern 
     32     public $thumb_tp_alpha = '%s/.%s_%s.png'; ///< <b>string</b> Thumbnail file pattern (with alpha layer) 
    3233      
    3334     /** 
     
    298299               $f->media_thumb = array(); 
    299300               $p = path::info($f->relname); 
    300                $thumb = sprintf($this->thumb_tp,$this->root.'/'.$p['dirname'],$p['base'],'%s'); 
    301                $thumb_url = sprintf($this->thumb_tp,$this->root_url.$p['dirname'],$p['base'],'%s'); 
     301               $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     302               $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$this->root.'/'.$p['dirname'],$p['base'],'%s'); 
     303               $thumb_url = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$this->root_url.$p['dirname'],$p['base'],'%s'); 
    302304                
    303305               # Cleaner URLs 
     
    920922           
    921923          $p = path::info($file); 
    922           $thumb = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     924          $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     925          $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    923926           
    924927          try 
     
    939942                         $rate = ($s[0] < 100 ? 95 : ($s[0] < 600 ? 90 : 85)); 
    940943                         $img->resize($s[0],$s[0],$s[1]); 
    941                          $img->output('jpeg',$thumb_file,$rate); 
     944                         $img->output(($alpha ? 'png' : 'jpeg'),$thumb_file,$rate); 
    942945                         $img->loadImage($file); 
    943946                    } 
     
    958961          { 
    959962               $p = path::info($file->relname); 
    960                $thumb_old = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     963               $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     964               $thumb_old = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    961965                
    962966               $p = path::info($newFile->relname); 
    963                $thumb_new = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     967               $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     968               $thumb_new = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    964969                
    965970               foreach ($this->thumb_sizes as $suffix => $s) { 
     
    974979     { 
    975980          $p = path::info($f); 
    976           $thumb = sprintf($this->thumb_tp,'',$p['base'],'%s'); 
     981          $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     982          $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),'',$p['base'],'%s'); 
    977983           
    978984          foreach ($this->thumb_sizes as $suffix => $s) { 
  • locales/en/main.po

    r1425 r1468  
    21392139msgstr "" 
    21402140 
     2141msgid "Are you sure you want to delete this backup?" 
     2142msgstr "" 
     2143 
    21412144msgid "Zip file content" 
    21422145msgstr "" 
     
    27872790msgid "The following error was encountered while trying to read the database:" 
    27882791msgstr "" 
     2792 
     2793msgid "(No cat)" 
     2794msgstr "(none)" 
  • locales/fr/main.po

    r1454 r1484  
    9595 
    9696msgid "This mode allows you to login without activating any of your plugins. This may be useful to solve compatibility problems" 
    97 msgstr "\"Ce mode vous permet de vous connecter sans activer de plugins. Il peut être utile pour résoudre un problème de compatibilité" 
     97msgstr "Ce mode vous permet de vous connecter sans activer de plugins. Il peut être utile pour résoudre un problème de compatibilité" 
    9898 
    9999msgid "Disable or delete any plugin suspected to cause trouble, then log out and log back in normally." 
     
    10381038#, fuzzy, php-format 
    10391039msgid "Path <strong>%s</strong> is not writable." 
    1040 msgstr "Le répertoire de cache %s n'est pas accessible en écriture." 
     1040msgstr "Le répertoire de cache <strong>%s</strong> n'est pas accessible en écriture." 
    10411041 
    10421042#, fuzzy 
     
    11231123#, php-format 
    11241124msgid "You can change your user language in your <a href=\"%1$s\">preferences</a> or change your blog's main language in your <a href=\"%2$s\">blog settings</a>." 
    1125 msgstr "Vous pouvez changer votre langue d'utilisateur dans vos <a href=\"%1$s\">préférences</a> ou changer la langue principale de votre blog dans vos <a href=\"%2$s\">paramètres de blog</a>." 
     1125msgstr "Vous pouvez changer votre langue d'utilisateur dans vos <a href=\"%1$s\">préférences</a> ou changer la langue principale de votre blog dans vos <a href=\"%2$s\">paramètres du blog</a>." 
    11261126 
    11271127msgid "Installed languages" 
     
    11931193msgstr "Gestionnaire de médias" 
    11941194 
     1195msgid "Go to %s folder" 
     1196msgstr "Aller au dossier %s" 
     1197 
     1198msgid "Media details of %s" 
     1199msgstr "Détails du média %s" 
     1200 
    11951201msgid "confirm removal" 
    11961202msgstr "Confirmer la suppression" 
     
    17841790 
    17851791msgid "If you want to change your email or password you must provide your current password." 
    1786 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe." 
     1792msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe actuel." 
    17871793 
    17881794msgid "No favorite selected" 
     
    18201826 
    18211827msgid "If you have changed this user email or password you must provide your current password to save these modifications." 
    1822 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe." 
     1828msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe actuel pour enregistrer ces modifications." 
    18231829 
    18241830msgid "My options" 
     
    19942000msgstr "Les fichiers suivants de votre installation de Dotclear ne peuvent pas être écrits. Veuillez corriger la situation ou <a href=\"http://fr.dotclear.org/download\">mettre à jour manuellement</a>." 
    19952001 
     2002msgid "Manual checking of update done successfully." 
     2003msgstr "Vérification manuelle de mise à jour effectuée avec succès." 
     2004 
    19962005msgid "No newer Dotclear version available." 
    19972006msgstr "Aucune nouvelle version de Dotclear n'est disponible." 
    19982007 
     2008msgid "Force checking update Dotclear" 
     2009msgstr "Forcer la vérification de mise à jour de Dotclear" 
     2010 
    19992011#, php-format 
    20002012msgid "Dotclear %s is available." 
     
    21332145#, fuzzy 
    21342146msgid "Go to the content" 
    2135 msgstr "Voir ce billet sur le site" 
     2147msgstr "Aller au contenu" 
    21362148 
    21372149#, fuzzy 
    21382150msgid "Go to the menu" 
    2139 msgstr "Aller sur le site" 
     2151msgstr "Aller au menu" 
    21402152 
    21412153msgid "Go to site" 
     
    22012213 
    22022214msgid "Users with posts cannot be deleted." 
    2203 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être effacées." 
     2215msgstr "Les utilisateurs ayant écrit des billets ne peuvent être supprimés." 
    22042216 
    22052217#, php-format 
     
    22432255msgstr "Êtes-vous certain de vouloir supprimer le thème \"%s\" ?" 
    22442256 
     2257msgid "Are you sure you want to delete this backup?" 
     2258msgstr "Êtes-vous certain de vouloir supprimer cette sauvegarde ?" 
     2259 
    22452260msgid "Zip file content" 
    22462261msgstr "Contenu du fichier zip" 
     
    22582273msgstr "Vous avez des modifications non sauvegardées. Changer de format vous fera perdre ces modifications. Continuer ?" 
    22592274 
     2275msgid "Warning: post format change will not convert existing content. You will need to apply new format by yourself. Proceed anyway?" 
     2276msgstr "Attention : le changement de syntaxe ne transformera pas les balises des contenus déjà saisis. Pensez à les réadapter après cette opération. Confirmez-vous ce changement de syntaxe ?" 
     2277 
    22602278msgid "Loading enhanced uploader, please wait." 
    22612279msgstr "Chargement de l'interface avancée." 
     
    25062524#, fuzzy 
    25072525msgid "You are not allowed to reset categories order" 
    2508 msgstr "Vous n'êtes pas autorisé à supprimer des catégories" 
     2526msgstr "Vous n'êtes pas autorisé à réinitialiser l'ordre des catégories" 
    25092527 
    25102528msgid "Category URL must be unique." 
     
    30343052msgstr "Filtrer la liste des commentaires et rétroliens" 
    30353053 
     3054msgid "comments per page" 
     3055msgstr "commentaires par page" 
     3056 
    30363057msgid "Filter users list" 
    30373058msgstr "Filtrer la liste des utilisateurs" 
     
    30603081msgid "Add an introduction to the page." 
    30613082msgstr "Ajoute une introduction à la page." 
     3083 
     3084msgid "(No cat)" 
     3085msgstr "(aucune)" 
     3086 
     3087msgid "Password strength: %s" 
     3088msgstr "Force du mot de passe : %s" 
     3089 
     3090msgid "very weak" 
     3091msgstr "très faible" 
     3092 
     3093msgid "weak" 
     3094msgstr "faible" 
     3095 
     3096msgid "mediocre" 
     3097msgstr "moyen" 
     3098 
     3099msgid "strong" 
     3100msgstr "fort" 
     3101 
     3102msgid "very strong" 
     3103msgstr "très fort" 
     3104 
     3105msgid "Confirm new password:" 
     3106msgstr "Confirmez le nouveau mot de passe :" 
     3107 
     3108msgid "Not selected" 
     3109msgstr "Non sélectionné" 
     3110 
     3111msgid "Back to comments list" 
     3112msgstr "Retour à la liste des commentaires" 
     3113 
     3114msgid "The current blog cannot be deleted." 
     3115msgstr "Le blog courant ne peut être détruit." 
     3116 
     3117msgid "Only superadmin can delete a blog." 
     3118msgstr "Seul un superadministrateur peut supprimer un blog." 
     3119 
     3120msgid "Invalid publication date" 
     3121msgstr "Date de publication invalide." 
     3122 
     3123msgid "Image alignment:" 
     3124msgstr "Alignement de l'image :" 
     3125 
     3126msgid "Finish the update" 
     3127msgstr "Finir la mise à jour" 
     3128 
     3129msgid "Information about this version" 
     3130psgstr "Informations sur cette version" 
  • locales/fr/plugins.po

    r1396 r1483  
    4242 
    4343msgid "blog settings" 
    44 msgstr "Réglages du blog" 
     44msgstr "paramètres du blog" 
    4545 
    4646msgid "Value" 
     
    305305 
    306306msgid "No attachment." 
    307 msgstr "Pas de fichier attaché" 
     307msgstr "Pas de fichier attaché." 
    308308 
    309309msgid "Add files to this entry" 
     
    11661166msgstr "Pages" 
    11671167 
     1168msgid "My first page" 
     1169msgstr "Ma première page" 
     1170 
     1171msgid "This is your first page. When you\'re ready to blog, log in to edit or delete it." 
     1172msgstr "Ceci est votre première page. Quand vous serez prêt à bloguer, connectez-vous pour l'éditer ou la supprimer." 
     1173 
    11681174#, php-format 
    11691175msgid "%d page" 
     
    17501756 
    17511757msgid "Custom sidebar" 
    1752 msgstr "Bandeau supplémentaire" 
     1758msgstr "Volet supplémentaire" 
    17531759 
    17541760msgid "Update sidebars" 
    1755 msgstr "Mettre à jour les bandeaux" 
     1761msgstr "Mettre à jour les volets" 
    17561762 
    17571763msgid "Reset sidebars" 
    1758 msgstr "Réinitialiser les bandeaux" 
     1764msgstr "Réinitialiser les volets" 
    17591765 
    17601766msgid "Use of widgets" 
     
    19281934msgid "Edit theme files" 
    19291935msgstr "Modifier les fichiers du thème" 
     1936 
     1937msgid "Blog settings" 
     1938msgstr "Paramètres du blog" 
     1939 
     1940msgid "Move widgets from this list to one of the sidebars." 
     1941msgstr "Déplacez des widgets de cette liste vers l'un des volets." 
  • plugins/antispam/_admin.php

    r1207 r1474  
    5959          if ($ttl != null && $ttl >=0) { 
    6060               echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $ttl).' '. 
    61                sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog preferences').'</a>'). 
     61               sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog settings').'</a>'). 
    6262               '</p>'; 
    6363          } 
  • plugins/antispam/filters/class.dc.filter.iplookup.php

    r1454 r1468  
    4444          } 
    4545 
    46           $match = array(); 
    47  
    4846          $bls = $this->getServers(); 
    4947          $bls = preg_split('/\s*,\s*/',$bls); 
    5048 
    51           foreach ($bls as $bl) 
    52           { 
     49          foreach ($bls as $bl) { 
    5350               if ($this->dnsblLookup($ip,$bl)) { 
    54                     $match[] = $bl; 
     51                    // Pass by reference $status to contain matching DNSBL 
     52                    $status = $bl; 
     53                    return true; 
    5554               } 
    56           } 
    57  
    58           if (!empty($match)) { 
    59                $status = substr(implode(', ',$match),0,128); 
    60                return true; 
    6155          } 
    6256     } 
  • plugins/antispam/filters/class.dc.filter.linkslookup.php

    r1179 r1366  
    6464     private function getLinks($text) 
    6565     { 
    66           $res = array(); 
    67            
    68           # href attribute on "a" tags 
    69           if (preg_match_all('/<a ([^>]+)>/ms', $text, $match, PREG_SET_ORDER)) 
    70           { 
    71                for ($i = 0; $i<count($match); $i++) 
    72                { 
    73                     if (preg_match('/href="(http:\/\/[^"]+)"/ms', $match[$i][1], $matches)) { 
    74                          $res[] = $matches[1]; 
    75                     } 
    76                } 
    77           } 
    78            
    79           return $res; 
     66          // href attribute on "a" tags is second match 
     67          preg_match_all('|<a.*?href="(http.*?)"|', $text, $parts); 
     68 
     69          return $parts[1]; 
    8070     } 
    8171} 
  • plugins/antispam/index.php

    r1423 r1474  
    170170     if ($moderationTTL != null && $moderationTTL >=0) { 
    171171          echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL).' '. 
    172           sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog preferences').'</a>'). 
     172          sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog settings').'</a>'). 
    173173               '</p>'; 
    174174     } 
     
    212212          '<td class="nowrap">'.form::checkbox(array('filters_active[]'),$fid,$f->active, '', '', false, 'title="'.__('Active').'"').'</td>'. 
    213213          '<td class="nowrap">'.form::checkbox(array('filters_auto_del[]'),$fid,$f->auto_delete, '', '', false, 'title="'.__('Auto Del.').'"').'</td>'. 
    214           '<td class="nowrap" scope="raw">'.$f->name.'</td>'. 
     214          '<td class="nowrap" scope="row">'.$f->name.'</td>'. 
    215215          '<td class="maximal">'.$f->description.'</td>'. 
    216216          '<td class="status">'.$gui_link.'</td>'. 
  • plugins/attachments/_admin.php

    r1398 r1468  
    4141                    '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'. 
    4242                    '<ul>'. 
    43                     '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'"'. 
     43                    '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'" '. 
    4444                    'title="'.$f->basename.'">'.$ftitle.'</a></li>'. 
    4545                    '<li>'.$f->media_dtstr.'</li>'. 
  • plugins/pages/_define.php

    r1179 r1442  
    1616     /* Description*/    "Serve entries as simple web pages", 
    1717     /* Author */        "Olivier Meunier", 
    18      /* Version */       '1.2', 
     18     /* Version */       '1.3', 
    1919     array( 
    2020          'permissions' =>    'contentadmin,pages', 
     
    2222     ) 
    2323); 
    24 ?> 
  • plugins/pages/page.php

    r1454 r1480  
    455455      
    456456     echo 
    457      '<p><label for="post_status">'.__('Page status:').'</label> '. 
     457     '<p><label for="post_status" class="ib">'.__('Page status:').'</label> '. 
    458458     form::combo('post_status',$status_combo,$post_status,'','',!$can_publish). 
    459459     '</p>'. 
    460460      
    461      '<p><label for="post_dt">'.__('Published on:').'</label>'. 
     461     '<p><label for="post_dt" class="ib">'.__('Published on:').'</label>'. 
    462462     form::field('post_dt',16,16,$post_dt,($bad_dt ? 'invalid' : '')).'</p>'. 
    463463      
    464      '<p><label for="post_format">'.__('Text formating:').'</label>'. 
     464     '<p><label for="post_format" class="ib">'.__('Text formating:').'</label>'. 
    465465     form::combo('post_format',$formaters_combo,$post_format). 
    466466     ($post_id && $post_format != 'xhtml' ? '<a class="button" href="'.html::escapeURL($redir_url).'&amp;id='.$post_id.'&amp;xconv=1">'.__('Convert to XHTML').'</a>' : ''). 
     
    493493     '</p>'. 
    494494      
    495      '<p><label for="post_lang">'.__('Page lang:').'</label>'. 
     495     '<p><label for="post_lang" class="ib">'.__('Page lang:').'</label>'. 
    496496     form::combo('post_lang',$lang_combo,$post_lang).'</p>'. 
    497497      
    498      '<p><label for="post_password">'.__('Page password:').'</label>'. 
     498     '<p><label for="post_password" class="ib">'.__('Page password:').'</label>'. 
    499499     form::field('post_password',10,32,html::escapeHTML($post_password),'maximal'). 
    500500     '</p>'. 
    501501      
    502      '<div class="lockable">'. 
    503      '<p><label for="post_url">'.__('Basename:').'</label>'. 
     502     '<div class="lockable ib">'. 
     503     '<p><label for="post_url" class="ib">'.__('Basename:').'</label>'. 
    504504     form::field('post_url',10,255,html::escapeHTML($post_url),'maximal'). 
    505505     '</p>'. 
     
    512512     { 
    513513          echo 
    514           '<h3 class="clear">'.__('Attachments').'</h3>'; 
     514          '<h4 class="clear">'.__('Attachments').'</h4>'; 
    515515          foreach ($post_media as $f) 
    516516          { 
     
    541541           
    542542          if (empty($post_media)) { 
    543                echo '<p>'.__('No attachment.').'</p>'; 
     543               echo '<p class="form-note">'.__('No attachment.').'</p>'; 
    544544          } 
    545545          echo '<p><a class="button" href="media.php?post_id='.$post_id.'">'.__('Add files to this page').'</a></p>'; 
  • plugins/simpleMenu/index.php

    r1358 r1474  
    233233                     
    234234                         // All done successfully, return to menu items list 
    235                          http::redirect($p_url.'&added=1'); 
     235                         http::redirect($p_url.'&amp;added=1'); 
    236236                    } else { 
    237237                         throw new Exception(__('Label and URL of menu item are mandatory.')); 
     
    268268                     
    269269                    // All done successfully, return to menu items list 
    270                     http::redirect($p_url.'&removed=1'); 
     270                    http::redirect($p_url.'&amp;removed=1'); 
    271271               } else { 
    272272                    throw new Exception(__('No menu items selected.')); 
     
    302302 
    303303               // All done successfully, return to menu items list 
    304                http::redirect($p_url.'&updated=1'); 
     304               http::redirect($p_url.'&amp;updated=1'); 
    305305          } 
    306306          catch (Exception $e) { 
     
    339339 
    340340               // All done successfully, return to menu items list 
    341                http::redirect($p_url.'&neworder=1'); 
     341               http::redirect($p_url.'&amp;neworder=1'); 
    342342          }  
    343343          catch (Exception $e) { 
     
    402402          case 1: 
    403403               // Selection du type d'item 
    404                echo '<form id="additem" action="'.$p_url.'&add=2" method="post">'; 
     404               echo '<form id="additem" action="'.$p_url.'&amp;add=2" method="post">'; 
    405405               echo '<fieldset><legend>'.__('Select type').'</legend>'; 
    406406               echo '<p class="field"><label for="item_type" class="classic">'.__('Type of item menu:').'</label>'.form::combo('item_type',$items_combo,'').'</p>'; 
     
    412412               if ($items[$item_type][1]) { 
    413413                    // Choix à faire 
    414                     echo '<form id="additem" action="'.$p_url.'&add=3" method="post">'; 
     414                    echo '<form id="additem" action="'.$p_url.'&amp;add=3" method="post">'; 
    415415                    echo '<fieldset><legend>'.$item_type_label.'</legend>'; 
    416416                    switch ($item_type) { 
     
    449449          case 3: 
    450450               // Libellé et description 
    451                echo '<form id="additem" action="'.$p_url.'&add=4" method="post">'; 
     451               echo '<form id="additem" action="'.$p_url.'&amp;add=4" method="post">'; 
    452452               echo '<fieldset><legend>'.$item_type_label.($item_select_label != '' ? ' ('.$item_select_label.')' : '').'</legend>'; 
    453453               echo '<p class="field"><label for="item_label" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '. 
     
    467467// Liste des items 
    468468if (!$step) { 
    469      echo '<form id="menuitemsappend" action="'.$p_url.'&add=1" method="post">'; 
     469     echo '<form id="menuitemsappend" action="'.$p_url.'&amp;add=1" method="post">'; 
    470470     echo '<p class="top-add">'.$core->formNonce().'<input class="button add" type="submit" name="appendaction" value="'.__('Add an item').'" /></p>'; 
    471471     echo '</form>'; 
  • plugins/tags/_admin.php

    r1454 r1471  
    229229          if ($action == 'tags') 
    230230          { 
    231                echo 
    232                '<h2 class="page-title">'.__('Add tags to entries').'</h2>'. 
     231               echo dcPage::breadcrumb( 
     232                    array( 
     233                         html::escapeHTML($core->blog->name) => '', 
     234                         __('Entries') => 'posts.php', 
     235                         '<span class="page-title">'.__('Add tags to entries').'</span>' => '' 
     236               )). 
    233237               '<form action="'.$form_uri.'" method="post">'. 
     238               $hidden_fields->getEntries(). 
    234239               '<div><label for="new_tags" class="area">'.__('Tags to add:').'</label> '. 
    235240               form::textarea('new_tags',60,3). 
    236241               '</div>'. 
    237                $hidden_fields. 
     242               $hidden_fields->getHidden(). 
    238243               $core->formNonce(). 
    239244               form::hidden(array('action'),'tags'). 
     
    259264                    } 
    260265               } 
    261                 
    262                echo '<h2 class="page-title">'.__('Remove selected tags from entries').'</h2>'; 
     266               echo dcPage::breadcrumb( 
     267                    array( 
     268                         html::escapeHTML($core->blog->name) => '', 
     269                         __('Entries') => 'posts.php', 
     270                         '<span class="page-title">'.__('Remove selected tags from entries').'</span>' => '' 
     271               )); 
    263272                
    264273               if (empty($tags)) { 
  • plugins/tags/tag_posts.php

    r1358 r1480  
    130130     { 
    131131          echo 
     132          '<div class="fieldset">'. 
    132133          '<form action="'.$this_url.'" method="post">'. 
    133           '<div class="fieldset"><h3>'.__('Actions for this tag').'</h3>'. 
     134          '<h3>'.__('Actions for this tag').'</h3>'. 
    134135          '<p><label for="new_tag_id">'.__('Edit tag name:').'</label>'. 
    135136          form::field('new_tag_id',20,255,html::escapeHTML($tag)). 
     
    161162     '<p class="col right"><label for="action" class="classic">'.__('Selected entries action:').'</label> '. 
    162163     form::combo('action',$combo_action). 
    163      '<input type="submit" value="'.__('ok').'" /></p>'. 
     164     '<input type="submit" value="'.__('OK').'" /></p>'. 
    164165     form::hidden('post_type',''). 
    165166     form::hidden('redir',$p_url.'&amp;m=tag_posts&amp;tag='. 
  • plugins/userPref/index.php

    r1358 r1474  
    8282     return 
    8383     '<tr class="line">'. 
    84      '<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
     84     '<td scope="row"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
    8585     '<td>'.$field.'</td>'. 
    8686     '<td>'.$s['type'].'</td>'. 
  • plugins/widgets/class.widgets.php

    r1454 r1474  
    246246                         '<p><label for="'.$wfid.'">'.$s['title'].'</label> '. 
    247247                         form::textarea(array($iname,$wfid),30,5,html::escapeHTML($s['value']),'maximal'). 
    248                          '</label></p>'; 
     248                         '</p>'; 
    249249                         break; 
    250250                    case 'check': 
  • plugins/widgets/index.php

    r1454 r1483  
    197197echo 
    198198'<form id="listWidgets" action="'.$p_url.'" method="post"  class="widgets">'. 
    199 '<fieldset><legend>'.__('Available widgets').'</legend>'. 
     199'<h3>'.__('Available widgets').'</h3>'. 
     200__('Move widgets from this list to one of the sidebars.'). 
    200201'<div id="widgets">'; 
    201202 
     
    205206     '<div>'.form::hidden(array('w[void][0][id]'),html::escapeHTML($w->id())). 
    206207     '<p class="widget-name">'.form::field(array('w[void][0][order]'),2,3,0,'hideControl').' '. 
    207      $w->name().($w->desc() != '' ? ' <span class="form-note">('.__($w->desc()).')</span>' : '').'</p>'. 
     208     $w->name().($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : '').'</p>'. 
    208209     '<p class="js-remove"><label class="classic">'.__('Append to:').'</label> '. 
    209210     form::combo(array('addw['.$w->id().']'),$append_combo).'</p>'. 
     
    215216echo 
    216217'</div>'. 
    217 '</fieldset>'. 
    218218'<p><input type="submit" class="js-remove" name="append" value="'.__('Add widgets to sidebars').'" />'. 
    219219$core->formNonce().'</p>'. 
     
    223223# Nav sidebar 
    224224echo 
    225 '<div id="sidebarNav" class="widgets">'. 
     225'<div id="sidebarNav" class="widgets fieldset">'. 
    226226sidebarWidgets('dndnav',__('Navigation sidebar'),$widgets_nav,'nav',$__default_widgets['nav'],$j). 
    227227'</div>'; 
     
    229229# Extra sidebar 
    230230echo 
    231 '<div id="sidebarExtra" class="widgets">'. 
     231'<div id="sidebarExtra" class="widgets fieldset">'. 
    232232sidebarWidgets('dndextra',__('Extra sidebar'),$widgets_extra,'extra',$__default_widgets['extra'],$j). 
    233233'</div>'; 
     
    235235# Custom sidebar 
    236236echo 
    237 '<div id="sidebarCustom" class="widgets">'. 
     237'<div id="sidebarCustom" class="widgets fieldset">'. 
    238238sidebarWidgets('dndcustom',__('Custom sidebar'),$widgets_custom,'custom',$__default_widgets['custom'],$j). 
    239239'</div>'; 
     
    316316function sidebarWidgets($id,$title,$widgets,$pr,$default_widgets,&$j) 
    317317{ 
    318      $res = '<fieldset><legend>'.$title.'</legend><div id="'.$id.'">'; 
     318     $res = '<h3>'.$title.'</h3><div id="'.$id.'">'; 
    319319      
    320320     if (!($widgets instanceof dcWidgets)) 
     
    335335          '<div>'.form::hidden(array($iname.'[id]'),html::escapeHTML($w->id())). 
    336336          '<p class="widget-name">'.form::field(array($iname.'[order]'),2,3,(string) $i,'js-hide','',0,'title="'.__('order').'"').' '. 
    337           $w->name().($w->desc() != '' ? ' <span class="form-note">('.__($w->desc()).')</span>' : '').'</p>'. 
     337          $w->name().($w->desc() != '' ? ' <!-- <span class="form-note">'.__($w->desc()).'</span> -->' : '').'</p>'. 
    338338          '<p class="removeWidget js-remove"><label class="classic">'. 
    339339          form::checkbox(array($iname.'[_rem]'),'1',0).' '.__('Remove widget'). 
     
    346346     } 
    347347      
    348      $res .= '</div></fieldset>'; 
     348     $res .= '</div>'; 
    349349      
    350350     return $res; 
  • plugins/widgets/style.css

    r1301 r1483  
    11#listWidgets { 
    22     float: left; 
    3      width: 33%; 
     3     width: 45%; 
     4     background: #eee; 
     5     padding: 1.5em 1%;  
     6     border: 1px solid #ccc; 
     7     margin-left: 1.5em; 
     8} 
     9#widgets .widget-name { 
     10     background: #fff; 
     11     min-height: 3em; 
     12} 
     13#listWidgets h3 { 
     14     color: #333; 
    415} 
    516 
    617#sidebarsWidgets { 
    718     float: left; 
    8      width: 65%; 
    9      margin-left: 1%; 
     19     width: 45%; 
     20     margin-left: 3%; 
     21     padding: 0 1%; 
    1022} 
    11 #sidebarNav { 
    12      float: left; 
    13      width: 50%; 
    14      margin-left: 0%; 
    15 } 
    16 #sidebarExtra { 
    17      float: left; 
    18      width: 49%; 
    19      margin-left: 1%; 
    20 } 
    21 #sidebarCustom { 
    22      float: left; 
    23      width: 100%; 
    24 } 
    25  
    2623#sidebarsControl { 
    2724     clear: left; 
    2825} 
     26.widgets.fieldset { 
     27     margin-bottom: 2em; 
     28} 
    2929 
    30 #widgets, #dndnav, #dndextra { 
     30#widgets, #dndnav, #dndextra, #dndcustom { 
    3131     padding: 1em 0; 
    3232} 
    3333 
    34 .widgets fieldset { 
    35      border: 1px solid #999; 
    36 } 
    37 .widgets legend { 
    38      border: 1px solid #999; 
    39 } 
    40  
    41 .widgets p.widget-name { 
    42      background: #F0EFEA; 
     34.widget-name { 
     35     background: #eef; 
    4336     color: #000; 
    44      padding: 4px; 
     37     padding: 4px 6px; 
    4538     margin: 0.5em 0 0 0; 
    4639     border-width: 1px 1px 1px 1px; 
    4740     border-style: solid; 
    48      border-color: #bbb; 
     41     border-color: #999; 
    4942     font-weight: bold; 
    5043} 
    51 .widgets p.widget-name img { 
     44.widget-name span { 
     45     display: block; 
     46     font-style: normal; 
     47     font-size: 1.1rem; 
     48} 
     49.widget-name img { 
    5250     cursor: pointer; 
    5351     margin-bottom: -1px; 
     
    5856     border-style: solid; 
    5957     border-color: #666; 
    60      padding: 4px; 
    61      background: #E5E3DA; 
     58     padding: 4px 6px; 
     59     background: #f5f5f5; 
    6260} 
    6361 
Note: See TracChangeset for help on using the changeset viewer.

Sites map