Dotclear


Ignore:
Files:
3 added
75 edited

Legend:

Unmodified
Added
Removed
  • .hgsubstate

    r1258 r1485  
    1 4a0351ee5d566a83ff06ca8bc9fffeb99885f545 inc/libs/clearbricks 
     1716e99c54652d08c2e4395d5179e817e0f98182d inc/libs/clearbricks 
  • .hgtags

    r1219 r1351  
    1313514d5121a12586b7ff320924d44028b677a01020 2.4.4 
    1414baf879af43beea9764d920c2facd7226e90c5cf3 2.5.1 
     15cfad9f2a9f6ec03206ff5db91985208e833a7528 2.5.2 
  • 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

    r1179 r1277  
    7474     '<form action="blog.php" method="post" id="blog-form" class="fieldset">'. 
    7575      
    76      $core->formNonce(). 
    7776     '<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:').' '. 
    7877     form::field('blog_id',30,32,html::escapeHTML($blog_id)).'</label></p>'. 
     
    8988     form::textarea('blog_desc',60,5,html::escapeHTML($blog_desc)).'</p>'. 
    9089      
    91      '<p><input type="submit" accesskey="s" value="'.__('Create').'" /></p>'. 
     90     '<p><input type="submit" accesskey="s" value="'.__('Create').'" />'. 
     91     $core->formNonce(). 
     92     '</p>'. 
    9293     '</form>'; 
    9394 
  • admin/blog_del.php

    r1179 r1288  
    4949} 
    5050 
    51 dcPage::open('Delete a blog'); 
     51dcPage::open(__('Delete a blog')); 
    5252 
    5353if (!$core->error->flag()) 
  • admin/blog_pref.php

    r1179 r1537  
    111111# Image default size combo 
    112112$img_default_size_combo = array(); 
    113 $media = new dcMedia($core); 
    114 $img_default_size_combo[__('original')] = 'o'; 
    115 foreach ($media->thumb_sizes as $code => $size) { 
    116      $img_default_size_combo[__($size[2])] = $code; 
     113try { 
     114     $media = new dcMedia($core); 
     115     $img_default_size_combo[__('original')] = 'o'; 
     116     foreach ($media->thumb_sizes as $code => $size) { 
     117          $img_default_size_combo[__($size[2])] = $code; 
     118     } 
     119} catch (Exception $e) { 
     120     $core->error->add($e->getMessage()); 
    117121} 
    118122 
  • admin/blog_theme.php

    r1179 r1263  
    332332     echo 
    333333     '<h2>'.html::escapeHTML($core->blog->name). 
    334      ' &rsaquo; <a href="blog_theme.php">'.__('Blog appearance').'</a> &rsaquo; <span class="page-title">'.__('Theme configuration').'<span class="page-title"></h2>'. 
     334     ' &rsaquo; <a href="blog_theme.php">'.__('Blog appearance').'</a> &rsaquo; <span class="page-title">'.__('Theme configuration').'</span></h2>'. 
    335335     '<p><a class="back" href="blog_theme.php">'.__('back').'</a></p>'; 
    336336      
  • admin/categories.php

    r1179 r1421  
    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.')); 
     
    141141echo '</div>'; 
    142142 
     143$categories_combo = array(); 
     144if (!$rs->isEmpty()) 
     145{ 
     146     while ($rs->fetch()) { 
     147          $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     148               str_repeat('&nbsp;&nbsp;',$rs->level-1).($rs->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($rs->cat_title), 
     149               $rs->cat_id 
     150          ); 
     151     } 
     152} 
     153 
    143154echo '<div class="col">'. 
    144155 
     
    146157'<fieldset><legend>'.__('Add a new category').'</legend>'. 
    147158'<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').' '. 
    148 form::field('cat_title',30,255).'</label></p>'. 
     159form::field('cat_title',30,255,'','maximal').'</label></p>'. 
    149160'<p><label for="new_cat_parent">'.__('Parent:').' '. 
    150 '<select id="new_cat_parent" name="new_cat_parent">'. 
    151 '<option value="0">'.__('Top level').'</option>'; 
    152 while ($rs->fetch()) { 
    153      echo '<option value="'.$rs->cat_id.'">'. 
    154           str_repeat('&nbsp;&nbsp;',$rs->level-1).($rs->level-1 == 0 ? '' : '&bull; '). 
    155           html::escapeHTML($rs->cat_title).'</option>'; 
    156 } 
    157 echo 
    158 '</select></label></p>'. 
     161form::combo('new_cat_parent',array_merge(array(__('(No cat)') => 0),$categories_combo),'','maximal'). 
     162'</label></p>'. 
    159163'<p><input type="submit" value="'.__('Create').'" /></p>'. 
    160164$core->formNonce(). 
     
    164168if (!$rs->isEmpty()) 
    165169{ 
    166      $cats = array(); 
    167      $dest = array('&nbsp;' => ''); 
    168      $l = $rs->level; 
    169      $full_name = array($rs->cat_title); 
    170      while ($rs->fetch()) 
    171      { 
    172           if ($rs->level < $l) { 
    173                $full_name = array(); 
    174           } elseif ($rs->level == $l) { 
    175                array_pop($full_name); 
    176           } 
    177           $full_name[] = html::escapeHTML($rs->cat_title); 
    178            
    179           $cats[implode(' / ',$full_name)] = $rs->cat_id; 
    180           $dest[implode(' / ',$full_name)] = $rs->cat_id; 
    181            
    182           $l = $rs->level; 
    183      } 
    184       
    185170     echo 
    186171     '<form action="categories.php" method="post" id="delete-category">'. 
    187172     '<fieldset><legend>'.__('Remove a category').'</legend>'. 
    188173     '<p><label for="del_cat">'.__('Choose a category to remove:').' '. 
    189      form::combo('del_cat',$cats).'</label></p> '. 
     174     form::combo('del_cat',$categories_combo,'','maximal').'</label></p> '. 
    190175     '<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').' '. 
    191      form::combo('mov_cat',$dest).'</label></p> '. 
     176     form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</label></p> '. 
    192177     '<p><input type="submit" value="'.__('Delete').'" class="delete" /></p>'. 
    193178     $core->formNonce(). 
  • admin/index.php

    r1247 r1536  
    225225} 
    226226 
     227$err = array(); 
     228 
     229# Check cache directory 
     230if (!is_dir(DC_TPL_CACHE)) { 
     231     $err[] = '<p>'.sprintf(__('Cache directory %s does not exist.'),DC_TPL_CACHE).'</p>'; 
     232} else if (!is_writable(DC_TPL_CACHE)) { 
     233     $err[] = '<p>'.sprintf(__('Cache directory %s is not writable.'),DC_TPL_CACHE).'</p>'; 
     234} 
     235 
     236# Check public directory 
     237if (!is_dir($core->blog->public_path)) { 
     238     $err[] = '<p>'.sprintf(__('Directory %s does not exist.'),$core->blog->public_path).'</p>'; 
     239} else if (!is_writable($core->blog->public_path)) { 
     240     $err[] = '<p>'.sprintf(__('Directory %s is not writable.'),$core->blog->public_path).'</p>'; 
     241} 
     242 
     243# Error list 
     244if (count($err) > 0) { 
     245     echo '<div class="error"><p><strong>Erreur&nbsp;:</strong></p>'. 
     246     '<ul><li>'.implode("</li><li>",$err).'</li></ul></div>'; 
     247} 
     248 
    227249# Plugins install messages 
    228250if (!empty($plugins_install['success'])) 
     
    304326     if ($core->auth->check('usage,contentadmin',$core->blog->id)) 
    305327     { 
    306           $categories_combo = array('&nbsp;' => ''); 
     328          # Getting categories 
     329          $categories_combo = array(__('(No cat)') => ''); 
    307330          try { 
    308331               $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    309                while ($categories->fetch()) { 
    310                     $categories_combo[] = new formSelectOption( 
    311                          str_repeat('&nbsp;&nbsp;',$categories->level-1). 
    312                          ($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    313                          $categories->cat_id 
    314                     ); 
     332               if (!$categories->isEmpty()) { 
     333                    while ($categories->fetch()) { 
     334                         $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     335                              str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     336                              $categories->cat_id 
     337                         ); 
     338                    } 
    315339               } 
    316340          } catch (Exception $e) { } 
    317       
     341           
    318342          echo 
    319343          '<div id="quick">'. 
     
    330354          '<p><label for="cat_id" class="classic">'.__('Category:').' '. 
    331355          form::combo('cat_id',$categories_combo).'</label></p>'. 
     356          ($core->auth->check('categories', $core->blog->id) 
     357               ? '<div>'. 
     358               '<p id="new_cat">'.__('Add a new category').'</p>'. 
     359               '<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'. 
     360               '<p><label for="new_cat_title">'.__('Title:').' '. 
     361               form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     362               '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     363               form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     364               '</label></p>'. 
     365               '</div>' 
     366               : ''). 
    332367          '<p><input type="submit" value="'.__('Save').'" name="save" /> '. 
    333368          ($core->auth->check('publish',$core->blog->id) 
  • admin/install/index.php

    r1247 r1535  
    299299'<div id="main">'; 
    300300 
    301 if (!is_writable(DC_TPL_CACHE)) { 
    302      echo '<div class="error"><p>'.sprintf(__('Cache directory %s is not writable.'),DC_TPL_CACHE).'</p></div>'; 
    303 } 
    304  
    305301if ($can_install && !empty($err)) { 
    306302     echo '<div class="error"><p><strong>'.__('Errors:').'</strong></p>'.$err.'</div>'; 
  • admin/js/_index.js

    r1140 r1500  
    3333                    post_status: status, 
    3434                    post_format: $('#post_format',f).val(), 
    35                     post_lang: $('#post_lang',f).val() 
     35                    post_lang: $('#post_lang',f).val(), 
     36                    new_cat_title: $('#new_cat_title',f).val(), 
     37                    new_cat_parent: $('#new_cat_parent',f).val() 
    3638               } 
    3739 
     
    5658                              contentTb.syncContents('textarea'); 
    5759                         } 
     60                         $('#cat_id',f).val('0'); 
     61                         $('#new_cat_title',f).val(''); 
     62                         $('#new_cat_parent',f).val('0'); 
    5863                    } 
    5964 
     
    6166               }); 
    6267          } 
     68          $('#new_cat').toggleWithLegend( 
     69               $('#new_cat').parent().children().not('#new_cat'), 
     70               {} // no cookie on new category as we don't use this every day 
     71          ); 
    6372     } 
    6473 
  • admin/js/_post.js

    r1256 r1515  
    123123               hide: $('#post_notes').val() == '' 
    124124          }); 
     125          $('#new_cat').toggleWithLegend( 
     126               $('#new_cat').parent().children().not('#new_cat'), 
     127               {} // no cookie on new category as we don't use this every day 
     128          ); 
    125129          $('#post_lang').parent().toggleWithLegend($('#post_lang'),{ 
    126130               cookie: 'dcx_post_lang' 
     
    133137          // We load toolbar on excerpt only when it's ready 
    134138          $('#excerpt-area label').toggleWithLegend($('#excerpt-area').children().not('label'),{ 
    135                fn: function() { excerptTb.switchMode(formatField.value); }, 
    136139               cookie: 'dcx_post_excerpt', 
    137140               hide: $('#post_excerpt').val() == '' 
     
    140143          // Load toolbars 
    141144          contentTb.switchMode(formatField.value); 
     145          excerptTb.switchMode(formatField.value); 
    142146           
    143147          // Replace attachment remove links by a POST form submit 
  • 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

    r1238 r1271  
    233233          '<a href="plugin.php?p=daInstaller">'.__('DotAddict.org Installer').'</a>')); 
    234234 
     235echo '<p>'; 
    235236if ($is_writable) { 
    236237     echo __('To install or upgrade a plugin you generally just need to upload it '. 
  • admin/post.php

    r1215 r1537  
    4949     $post_status = -2; 
    5050} 
    51  
    52 # Getting categories 
    53 $categories_combo = array('&nbsp;' => ''); 
    54 try { 
    55      $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    56      while ($categories->fetch()) { 
    57           $categories_combo[] = new formSelectOption( 
    58                str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    59                $categories->cat_id 
    60           ); 
    61      } 
    62 } catch (Exception $e) { } 
    6351 
    6452# Status combo 
     
    147135          try { 
    148136               $core->media = new dcMedia($core); 
    149           } catch (Exception $e) {} 
     137          } catch (Exception $e) { 
     138               $core->error->add($e->getMessage()); 
     139          } 
    150140     } 
    151141} 
     
    218208if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post && !$bad_dt) 
    219209{ 
     210     # Create category 
     211     if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) { 
     212      
     213          $cur_cat = $core->con->openCursor($core->prefix.'category'); 
     214          $cur_cat->cat_title = $_POST['new_cat_title']; 
     215          $cur_cat->cat_url = ''; 
     216           
     217          $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 
     218           
     219          # --BEHAVIOR-- adminBeforeCategoryCreate 
     220          $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
     221           
     222          $cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
     223           
     224          # --BEHAVIOR-- adminAfterCategoryCreate 
     225          $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $cat_id); 
     226     } 
     227      
    220228     $cur = $core->con->openCursor($core->prefix.'post'); 
    221229      
     
    284292} 
    285293 
     294# Getting categories 
     295$categories_combo = array(__('(No cat)') => ''); 
     296try { 
     297     $categories = $core->blog->getCategories(array('post_type'=>'post')); 
     298     if (!$categories->isEmpty()) { 
     299          while ($categories->fetch()) { 
     300               $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     301                    str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     302                    $categories->cat_id 
     303               ); 
     304          } 
     305     } 
     306} catch (Exception $e) { } 
     307 
    286308/* DISPLAY 
    287309-------------------------------------------------------- */ 
     
    334356} 
    335357 
    336 echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.'<a href="posts.php">'.__('Entries').'</a> &rsaquo; <span class="page-title">'.$page_title; 
     358echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.'<a href="posts.php">'.__('Entries').'</a> &rsaquo; <span class="page-title">'; 
    337359if ($post_id) { 
    338360     switch ($post_status) { 
     
    352374               $img_status = ''; 
    353375     } 
    354      echo ' &ldquo;'.$post_title.'&rdquo;'.' '.$img_status; 
     376     $edit_entry_str = __('Edit entry &ldquo;%s&rdquo;'); 
     377     echo sprintf($edit_entry_str, html::escapeHTML($post_title)).' '.$img_status; 
     378} else { 
     379     echo $page_title; 
    355380} 
    356381echo '</span></h2>'; 
     
    440465     '</label></p>'. 
    441466      
     467     ($core->auth->check('categories', $core->blog->id) ? 
     468          '<div>'. 
     469          '<p id="new_cat">'.__('Add a new category').'</p>'. 
     470          '<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'. 
     471          '<p><label for="new_cat_title">'.__('Title:').' '. 
     472          form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     473          '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     474          form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     475          '</label></p>'. 
     476          '</div>' 
     477     : ''). 
     478      
    442479     '<p><label for="post_status">'.__('Entry status:'). 
    443480     form::combo('post_status',$status_combo,$post_status,'','',!$can_publish). 
  • admin/post_media.php

    r1179 r1537  
    2626} 
    2727 
    28 if ($post_id && $media_id && !empty($_POST['attach'])) 
    29 { 
    30      $core->media = new dcMedia($core); 
    31      $core->media->addPostMedia($post_id,$media_id); 
    32      http::redirect($core->getPostAdminURL($rs->post_type,$post_id,false)); 
    33 } 
     28try { 
     29     if ($post_id && $media_id && !empty($_POST['attach'])) 
     30     { 
     31          $core->media = new dcMedia($core); 
     32          $core->media->addPostMedia($post_id,$media_id); 
     33          http::redirect($core->getPostAdminURL($rs->post_type,$post_id,false)); 
     34     } 
    3435 
    35 try { 
    3636     $core->media = new dcMedia($core); 
    3737     $f = $core->media->getPostMedia($post_id,$media_id); 
  • admin/posts_actions.php

    r1179 r1421  
    1616 
    1717$params = array(); 
     18$action = ''; 
    1819 
    1920/* Actions 
     
    126127     elseif ($action == 'category' && isset($_POST['new_cat_id'])) 
    127128     { 
    128           try 
    129           { 
    130                $core->blog->updPostsCategory($posts_ids,$_POST['new_cat_id']); 
     129          $new_cat_id = $_POST['new_cat_id']; 
     130           
     131          try 
     132          { 
     133               if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) 
     134               { 
     135                    $cur_cat = $core->con->openCursor($core->prefix.'category'); 
     136                    $cur_cat->cat_title = $_POST['new_cat_title']; 
     137                    $cur_cat->cat_url = ''; 
     138                     
     139                    $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 
     140                     
     141                    # --BEHAVIOR-- adminBeforeCategoryCreate 
     142                    $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
     143                     
     144                    $new_cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
     145                     
     146                    # --BEHAVIOR-- adminAfterCategoryCreate 
     147                    $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $new_cat_id); 
     148               } 
     149                
     150               $core->blog->updPostsCategory($posts_ids, $new_cat_id); 
    131151                
    132152               http::redirect($redir); 
     
    246266     echo '<h2 class="page-title">'.__('Change category for entries').'</h2>'; 
    247267      
    248      # categories list 
    249268     # Getting categories 
    250      $categories_combo = array('&nbsp;' => ''); 
     269     $categories_combo = array(__('(No cat)') => ''); 
    251270     try { 
    252271          $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    253           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), 
    257                     $categories->cat_id 
    258                ); 
     272          if (!$categories->isEmpty()) { 
     273               while ($categories->fetch()) { 
     274                    $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     275                         str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     276                         $categories->cat_id 
     277                    ); 
     278               } 
    259279          } 
    260280     } catch (Exception $e) { } 
     
    265285     form::combo('new_cat_id',$categories_combo,''). 
    266286     '</label> '; 
     287      
     288     if ($core->auth->check('categories', $core->blog->id)) { 
     289          echo  
     290          '<div>'. 
     291          '<p id="new_cat">'.__('Add a new category').'</p>'. 
     292          '<p><label for="new_cat_title">'.__('Title:').' '. 
     293          form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     294          '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     295          form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     296          '</label></p>'. 
     297          '</div>'; 
     298     } 
    267299      
    268300     echo 
  • admin/preferences.php

    r1179 r1375  
    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'). 
     
    416429     '<legend>'.__('Change your password').'</legend>'. 
    417430      
    418      '<p><label for="new_pwd">'.__('New password:'). 
    419      form::password('new_pwd',20,255).'</label></p>'. 
     431     '<div class="pw-table">'. 
     432     '<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'. 
     433     form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'. 
     434    '<div id="pwindicator">'. 
     435    '    <div class="bar"></div>'. 
     436    '    <p class="label no-margin"></p>'. 
     437    '</div>'. 
     438    '</div>'. 
    420439      
    421      '<p><label for="new_pwd_c">'.__('Confirm password:'). 
    422      form::password('new_pwd_c',20,255).'</label></p>'. 
     440     '<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'. 
     441     form::password('new_pwd_c',20,255).'</p>'. 
    423442     '</fieldset>'. 
    424443      
    425444     '<p>'.__('If you have changed this user email or password you must provide your current password to save these modifications.').'</p>'. 
    426      '<p><label for="cur_pwd">'.__('Your password:'). 
    427      form::password('cur_pwd',20,255).'</label></p>'; 
     445     '<p><label for="cur_pwd">'.__('Your password:').'</label>'. 
     446     form::password('cur_pwd',20,255).'</p>'; 
    428447} 
    429448 
  • admin/search.php

    r1179 r1276  
    7979'<p><label for="qtype1" class="classic">'.form::radio(array('qtype','qtype1'),'p',$qtype == 'p').' '.__('Search entries').'</label> '. 
    8080'<label for="qtype2" class="classic">'.form::radio(array('qtype','qtype2'),'c',$qtype == 'c').' '.__('Search comments').'</label></p>'. 
    81 '</p><input type="submit" value="'.__('Search').'" /></p>'. 
     81'<p><input type="submit" value="'.__('Search').'" /></p>'. 
    8282'</div>'. 
    8383'</form>'; 
  • admin/services.php

    r1179 r1538  
    141141     public static function quickPost($core,$get,$post) 
    142142     { 
     143          # Create category 
     144          if (!empty($post['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) { 
     145           
     146               $cur_cat = $core->con->openCursor($core->prefix.'category'); 
     147               $cur_cat->cat_title = $post['new_cat_title']; 
     148               $cur_cat->cat_url = ''; 
     149                
     150               $parent_cat = !empty($post['new_cat_parent']) ? $post['new_cat_parent'] : ''; 
     151                
     152               # --BEHAVIOR-- adminBeforeCategoryCreate 
     153               $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
     154                
     155               $post['cat_id'] = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
     156                
     157               # --BEHAVIOR-- adminAfterCategoryCreate 
     158               $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $post['cat_id']); 
     159          } 
     160           
    143161          $cur = $core->con->openCursor($core->prefix.'post'); 
    144162           
     
    220238          } 
    221239           
    222           $core->media = new dcMedia($core); 
    223           $file = $core->media->getFile($id); 
     240          try { 
     241               $core->media = new dcMedia($core); 
     242               $file = $core->media->getFile($id); 
     243          } catch (Exception $e) {} 
    224244           
    225245          if ($file === null || $file->type != 'application/zip' || !$file->editable) { 
  • admin/style/default.css

    r1179 r1375  
    901901     margin: 0; 
    902902} 
    903  
    904903/* paragraphe pour bouton Nouveau bidule */ 
    905904p.top-add { 
     
    13841383     color: white; 
    13851384} 
     1385 
     1386/* --------------------------------------------------------------- password indcator */ 
     1387.pw-table { 
     1388     display: table; 
     1389     margin-bottom: 1em; 
     1390} 
     1391.pw-cell { 
     1392     display: table-cell; 
     1393     margin-bottom: 1em; 
     1394} 
     1395#pwindicator { 
     1396     display: table-cell; 
     1397     vertical-align: bottom; 
     1398     padding-left: 1.5em; 
     1399     height: 3.8em; 
     1400} 
     1401#pwindicator .bar { 
     1402     height: 6px; 
     1403     margin-bottom: 4px; 
     1404} 
     1405.pw-very-weak .bar { 
     1406     background: #900; 
     1407     width: 30px; 
     1408} 
     1409.pw-weak .bar { 
     1410     background: #c00; 
     1411     width: 60px; 
     1412} 
     1413.pw-mediocre .bar { 
     1414     background: #f60; 
     1415     width: 90px; 
     1416} 
     1417.pw-strong .bar { 
     1418     background: #060; 
     1419     width: 120px; 
     1420} 
     1421.pw-very-strong .bar { 
     1422     background: #0c0; 
     1423     width: 150px; 
     1424} 
  • admin/update.php

    r1231 r1479  
    5454} 
    5555if (!empty($archives)) { 
    56      $archives = array_reverse($archives); 
     56     usort($archives,"version_compare"); 
    5757} else { 
    5858     $default_tab = 'update'; 
     
    106106                         throw new Exception( 
    107107                              sprintf(__('Downloaded Dotclear archive seems to be corrupted. '. 
    108                               'Try <a %s>download it</a> again.'),'href="'.$p_url.'?step=download"') 
     108                              'Try <a %s>download it</a> again.'),'href="'.$p_url.'?step=download"'). 
     109                              ' '. 
     110                              __('If this problem persists try to '. 
     111                              '<a href="http://dotclear.org/download">update manually</a>.') 
    109112                         ); 
    110113                    } 
     
    168171-------------------------------------------------------- */ 
    169172dcPage::open(__('Dotclear update'), 
    170      (!$step ? dcPage::jsPageTabs($default_tab) : '') 
     173     (!$step ?  
     174          dcPage::jsPageTabs($default_tab). 
     175          dcPage::jsLoad('js/_update.js') 
     176     : '') 
    171177); 
    172178 
     
    216222           
    217223          echo '<form action="'.$p_url.'" method="post">'; 
    218            
    219224          foreach ($archives as $v) { 
    220225               echo 
  • inc/admin/lib.dc.page.php

    r1256 r1462  
    160160          if ($core->error->flag()) { 
    161161               echo 
    162                '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</p></strong>'. 
     162               '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong></p>'. 
    163163               $core->error->toHTML(). 
    164164               '</div>'; 
     
    466466          self::jsVar('dotclear.msg.confirm_delete_theme', 
    467467               __('Are you sure you want to delete "%s" theme?')). 
     468          self::jsVar('dotclear.msg.confirm_delete_backup', 
     469               __('Are you sure you want to delete this backup?')). 
    468470          self::jsVar('dotclear.msg.zip_file_content', 
    469471               __('Zip file content')). 
  • inc/admin/lib.pager.php

    r1179 r1364  
    8787               html::escapeHTML($this->rs->cat_title)); 
    8888          } else { 
    89                $cat_title = __('None'); 
     89               $cat_title = __('(No cat)'); 
    9090          } 
    9191           
  • inc/config.php.in

    r1179 r1535  
    5050 
    5151// Template cache directory 
    52 define('DC_TPL_CACHE',dirname(__FILE__).'/../cache'); 
     52define('DC_TPL_CACHE',path::real(dirname(__FILE__).'/..').'/cache'); 
    5353 
    5454 
  • inc/core/class.dc.blog.php

    r1544 r1545  
    645645     private function checkCategory($title,$url,$id=null) 
    646646     { 
    647           $strReq = 'SELECT cat_id '. 
    648                     'FROM '.$this->prefix.'category '. 
    649                     "WHERE cat_url = '".$this->con->escape($url)."' ". 
    650                     "AND blog_id = '".$this->con->escape($this->id)."' "; 
    651            
    652           if ($id !== null) { 
    653                $strReq .= 'AND cat_id <> '.(integer) $id.' '; 
    654           } 
     647          # Let's check if URL is taken... 
     648          $strReq =  
     649               'SELECT cat_url FROM '.$this->prefix.'category '. 
     650               "WHERE cat_url = '".$this->con->escape($url)."' ". 
     651               ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 
     652               "AND blog_id = '".$this->con->escape($this->id)."' ". 
     653               'ORDER BY cat_url DESC'; 
    655654           
    656655          $rs = $this->con->select($strReq); 
    657656           
    658           if (!$rs->isEmpty()) { 
    659                throw new Exception(__('Category URL must be unique.')); 
    660           } 
     657          if (!$rs->isEmpty()) 
     658          { 
     659               if ($this->con->driver() == 'mysql') { 
     660                    $clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'"; 
     661               } elseif ($this->con->driver() == 'pgsql') { 
     662                    $clause = "~ '^".$this->con->escape($url)."[0-9]+$'"; 
     663               } else { 
     664                    $clause = "LIKE '".$this->con->escape($url)."%'"; 
     665               } 
     666               $strReq =  
     667                    'SELECT cat_url FROM '.$this->prefix.'category '. 
     668                    "WHERE cat_url ".$clause.' '. 
     669                    ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 
     670                    "AND blog_id = '".$this->con->escape($this->id)."' ". 
     671                    'ORDER BY cat_url DESC '; 
     672                
     673               $rs = $this->con->select($strReq); 
     674               $a = array(); 
     675               while ($rs->fetch()) { 
     676                    $a[] = $rs->cat_url; 
     677               } 
     678                
     679               natsort($a); 
     680               $t_url = end($a); 
     681                
     682               if (preg_match('/(.*?)([0-9]+)$/',$t_url,$m)) { 
     683                    $i = (integer) $m[2]; 
     684                    $url = $m[1]; 
     685               } else { 
     686                    $i = 1; 
     687               } 
     688                
     689               return $url.($i+1); 
     690          } 
     691           
     692          # URL is empty? 
     693          if ($url == '') { 
     694               throw new Exception(__('Empty category URL')); 
     695          } 
     696           
     697          return $url; 
    661698     } 
    662699      
     
    680717           
    681718          # Check if title or url are unique 
    682           $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 
     719          $cur->cat_url = $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 
    683720           
    684721          if ($cur->cat_desc !== null) { 
  • inc/core/class.dc.media.php

    r1220 r1381  
    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 
     
    497499     @param    post_id   <b>integer</b>      Post ID 
    498500     @param    media_id  <b>integer</b>      Optionnal media ID 
    499      @return   <b>array</b> Array of fileItems 
    500      */ 
    501      public function getPostMedia($post_id,$media_id=null) 
     501     @param    return_rs <b>boolean</b>      Whether to return a resultset (true) or an array (false, default value). 
     502     @return   <b>array</b> Array or ResultSet of fileItems 
     503     */ 
     504     public function getPostMedia($post_id,$media_id=null,$return_rs=false) 
    502505     { 
    503506          $params = array( 
     
    515518               $f = $this->fileRecord($rs); 
    516519               if ($f !== null) { 
    517                     $res[] = new ArrayObject($f); 
    518                } 
    519           } 
    520            
    521           return $res; 
     520                    $res[] = $return_rs ? new ArrayObject($f) : $f; 
     521               } 
     522          } 
     523           
     524          return $return_rs ? staticRecord::newFromArray($res) : $res; 
    522525     } 
    523526      
     
    920923           
    921924          $p = path::info($file); 
    922           $thumb = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     925          $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     926          $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    923927           
    924928          try 
     
    939943                         $rate = ($s[0] < 100 ? 95 : ($s[0] < 600 ? 90 : 85)); 
    940944                         $img->resize($s[0],$s[0],$s[1]); 
    941                          $img->output('jpeg',$thumb_file,$rate); 
     945                         $img->output(($alpha ? 'png' : 'jpeg'),$thumb_file,$rate); 
    942946                         $img->loadImage($file); 
    943947                    } 
     
    958962          { 
    959963               $p = path::info($file->relname); 
    960                $thumb_old = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     964               $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     965               $thumb_old = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    961966                
    962967               $p = path::info($newFile->relname); 
    963                $thumb_new = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     968               $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     969               $thumb_new = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    964970                
    965971               foreach ($this->thumb_sizes as $suffix => $s) { 
     
    974980     { 
    975981          $p = path::info($f); 
    976           $thumb = sprintf($this->thumb_tp,'',$p['base'],'%s'); 
     982          $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     983          $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),'',$p['base'],'%s'); 
    977984           
    978985          foreach ($this->thumb_sizes as $suffix => $s) { 
  • inc/prepend.php

    r1233 r1352  
    123123# Constants 
    124124define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 
    125 define('DC_VERSION','2.5.2-dev'); 
     125define('DC_VERSION','2.5.3-dev'); 
    126126define('DC_DIGESTS',dirname(__FILE__).'/digests'); 
    127127define('DC_L10N_ROOT',dirname(__FILE__).'/../locales'); 
  • inc/public/lib.tpl.context.php

    r1179 r1537  
    416416          global $core, $_ctx; 
    417417           
    418           $media = new dcMedia($core); 
    419           $sizes = implode('|',array_keys($media->thumb_sizes)).'|o'; 
    420           if (!preg_match('/^'.$sizes.'$/',$size)) { 
    421                $size = 's'; 
    422           } 
    423           $p_url = $core->blog->settings->system->public_url; 
    424           $p_site = preg_replace('#^(.+?//.+?)/(.*)$#','$1',$core->blog->url); 
    425           $p_root = $core->blog->public_path; 
    426            
    427           $pattern = '(?:'.preg_quote($p_site,'/').')?'.preg_quote($p_url,'/'); 
    428           $pattern = sprintf('/<img.+?src="%s(.*?\.(?:jpg|jpeg|gif|png))"[^>]+/msui',$pattern); 
    429            
    430           $src = ''; 
    431           $alt = ''; 
    432            
    433           # We first look in post content 
    434           if (!$cat_only && $_ctx->posts) 
    435           { 
    436                $subject = ($content_only ? '' : $_ctx->posts->post_excerpt_xhtml).$_ctx->posts->post_content_xhtml; 
    437                if (preg_match_all($pattern,$subject,$m) > 0) 
     418          try { 
     419               $media = new dcMedia($core); 
     420               $sizes = implode('|',array_keys($media->thumb_sizes)).'|o'; 
     421               if (!preg_match('/^'.$sizes.'$/',$size)) { 
     422                    $size = 's'; 
     423               } 
     424               $p_url = $core->blog->settings->system->public_url; 
     425               $p_site = preg_replace('#^(.+?//.+?)/(.*)$#','$1',$core->blog->url); 
     426               $p_root = $core->blog->public_path; 
     427                
     428               $pattern = '(?:'.preg_quote($p_site,'/').')?'.preg_quote($p_url,'/'); 
     429               $pattern = sprintf('/<img.+?src="%s(.*?\.(?:jpg|jpeg|gif|png))"[^>]+/msui',$pattern); 
     430                
     431               $src = ''; 
     432               $alt = ''; 
     433                
     434               # We first look in post content 
     435               if (!$cat_only && $_ctx->posts) 
    438436               { 
    439                     foreach ($m[1] as $i => $img) { 
    440                          if (($src = self::ContentFirstImageLookup($p_root,$img,$size)) !== false) { 
    441                               $dirname = str_replace('\\', '/', dirname($img));  
    442                               $src = $p_url.($dirname != '/' ? $dirname : '').'/'.$src; 
    443                               if (preg_match('/alt="([^"]+)"/',$m[0][$i],$malt)) { 
    444                                    $alt = $malt[1]; 
     437                    $subject = ($content_only ? '' : $_ctx->posts->post_excerpt_xhtml).$_ctx->posts->post_content_xhtml; 
     438                    if (preg_match_all($pattern,$subject,$m) > 0) 
     439                    { 
     440                         foreach ($m[1] as $i => $img) { 
     441                              if (($src = self::ContentFirstImageLookup($p_root,$img,$size)) !== false) { 
     442                                   $dirname = str_replace('\\', '/', dirname($img));  
     443                                   $src = $p_url.($dirname != '/' ? $dirname : '').'/'.$src; 
     444                                   if (preg_match('/alt="([^"]+)"/',$m[0][$i],$malt)) { 
     445                                        $alt = $malt[1]; 
     446                                   } 
     447                                   break; 
    445448                              } 
    446                               break; 
    447449                         } 
    448450                    } 
    449451               } 
    450           } 
    451            
    452           # No src, look in category description if available 
    453         if (!$src && $with_category && $_ctx->posts->cat_desc) 
    454         { 
    455                if (preg_match_all($pattern,$_ctx->posts->cat_desc,$m) > 0) 
    456                { 
    457                     foreach ($m[1] as $i => $img) { 
    458                          if (($src = self::ContentFirstImageLookup($p_root,$img,$size)) !== false) { 
    459                               $dirname = str_replace('\\', '/', dirname($img));  
    460                               $src = $p_url.($dirname != '/' ? $dirname : '').'/'.$src; 
    461                               if (preg_match('/alt="([^"]+)"/',$m[0][$i],$malt)) { 
    462                                    $alt = $malt[1]; 
     452                
     453               # No src, look in category description if available 
     454             if (!$src && $with_category && $_ctx->posts->cat_desc) 
     455             { 
     456                    if (preg_match_all($pattern,$_ctx->posts->cat_desc,$m) > 0) 
     457                    { 
     458                         foreach ($m[1] as $i => $img) { 
     459                              if (($src = self::ContentFirstImageLookup($p_root,$img,$size)) !== false) { 
     460                                   $dirname = str_replace('\\', '/', dirname($img));  
     461                                   $src = $p_url.($dirname != '/' ? $dirname : '').'/'.$src; 
     462                                   if (preg_match('/alt="([^"]+)"/',$m[0][$i],$malt)) { 
     463                                        $alt = $malt[1]; 
     464                                   } 
     465                                   break; 
    463466                              } 
    464                               break; 
    465467                         } 
    466                     } 
    467                }; 
    468           } 
    469            
    470           if ($src) { 
    471                if ($no_tag) { 
    472                     return $src; 
    473                } else { 
    474                     return '<img alt="'.$alt.'" src="'.$src.'" class="'.$class.'" />'; 
    475                } 
     468                    }; 
     469               } 
     470                
     471               if ($src) { 
     472                    if ($no_tag) { 
     473                         return $src; 
     474                    } else { 
     475                         return '<img alt="'.$alt.'" src="'.$src.'" class="'.$class.'" />'; 
     476                    } 
     477               } 
     478                
     479          } catch (Exception $e) { 
     480               $core->error->add($e->getMessage()); 
    476481          } 
    477482     } 
     
    485490          $base = $info['base']; 
    486491           
    487           $media = new dcMedia($core); 
    488           $sizes = implode('|',array_keys($media->thumb_sizes)); 
    489           if (preg_match('/^\.(.+)_('.$sizes.')$/',$base,$m)) { 
    490                $base = $m[1]; 
    491           } 
    492            
    493           $res = false; 
    494           if ($size != 'o' && file_exists($root.'/'.$info['dirname'].'/.'.$base.'_'.$size.'.jpg')) 
    495           { 
    496                $res = '.'.$base.'_'.$size.'.jpg'; 
    497           } 
    498           else 
    499           { 
    500                $f = $root.'/'.$info['dirname'].'/'.$base; 
    501                if (file_exists($f.'.'.$info['extension'])) { 
    502                     $res = $base.'.'.$info['extension']; 
    503                } elseif (file_exists($f.'.jpg')) { 
    504                     $res = $base.'.jpg'; 
    505                } elseif (file_exists($f.'.jpeg')) { 
    506                     $res = $base.'.jpeg'; 
    507                } elseif (file_exists($f.'.png')) { 
    508                     $res = $base.'.png'; 
    509                } elseif (file_exists($f.'.gif')) { 
    510                     $res = $base.'.gif'; 
    511                } elseif (file_exists($f.'.JPG')) { 
    512                     $res = $base.'.JPG'; 
    513                } elseif (file_exists($f.'.JPEG')) { 
    514                     $res = $base.'.JPEG'; 
    515                } elseif (file_exists($f.'.PNG')) { 
    516                     $res = $base.'.PNG'; 
    517                } elseif (file_exists($f.'.GIF')) { 
    518                     $res = $base.'.GIF'; 
    519                } 
     492          try { 
     493               $media = new dcMedia($core); 
     494               $sizes = implode('|',array_keys($media->thumb_sizes)); 
     495               if (preg_match('/^\.(.+)_('.$sizes.')$/',$base,$m)) { 
     496                    $base = $m[1]; 
     497               } 
     498                
     499               $res = false; 
     500               if ($size != 'o' && file_exists($root.'/'.$info['dirname'].'/.'.$base.'_'.$size.'.jpg')) 
     501               { 
     502                    $res = '.'.$base.'_'.$size.'.jpg'; 
     503               } 
     504               else 
     505               { 
     506                    $f = $root.'/'.$info['dirname'].'/'.$base; 
     507                    if (file_exists($f.'.'.$info['extension'])) { 
     508                         $res = $base.'.'.$info['extension']; 
     509                    } elseif (file_exists($f.'.jpg')) { 
     510                         $res = $base.'.jpg'; 
     511                    } elseif (file_exists($f.'.jpeg')) { 
     512                         $res = $base.'.jpeg'; 
     513                    } elseif (file_exists($f.'.png')) { 
     514                         $res = $base.'.png'; 
     515                    } elseif (file_exists($f.'.gif')) { 
     516                         $res = $base.'.gif'; 
     517                    } elseif (file_exists($f.'.JPG')) { 
     518                         $res = $base.'.JPG'; 
     519                    } elseif (file_exists($f.'.JPEG')) { 
     520                         $res = $base.'.JPEG'; 
     521                    } elseif (file_exists($f.'.PNG')) { 
     522                         $res = $base.'.PNG'; 
     523                    } elseif (file_exists($f.'.GIF')) { 
     524                         $res = $base.'.GIF'; 
     525                    } 
     526               } 
     527          } catch (Exception $e) { 
     528               $core->error->add($e->getMessage()); 
    520529          } 
    521530           
  • locales/bn/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/ca/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/cs/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/da/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/de/help/blowupConfig.html

    r175 r1264  
    3535<p>Du kannst ein Bild Deiner Wahl statt des Standardbildes einsetzen.</p> 
    3636 
    37 <p>Wenn Du  "Benutzerdefiniert..." in der Bilderliste ausw&auml;hlst, dann hast Du die M&ouml;glichkeit, Dein eigenes Bild upzuloaden. <strong>Das Dateiformat muss entweder JPG der PNG sein und es muss 800px breit sein.</strong> 
     37<p>Wenn Du  "Benutzerdefiniert..." in der Bilderliste ausw&auml;hlst, dann hast Du die M&ouml;glichkeit, Dein eigenes Bild upzuloaden. <strong>Das Dateiformat muss entweder JPG der PNG sein und es muss 800px breit sein.</strong></p> 
    3838 
    3939<p>Wenn Du ein JPG-Bild uploadest, dann wird automatisch ein Rahmen um das Bild gesetzt. Dies geschieht nicht bei der Verwendung eines PNG-Bildes und die Transparenz wird ebenfalls beibehalten.</p> 
  • locales/en/help/user_pref.html

    r243 r1487  
    88<h3>My profile</h3> 
    99<dl> 
    10   <dt>Name, First name</dt> 
     10  <dt>Last name, First name</dt> 
    1111  <dd>If the display name is empty, the author's name will be displayed 
    1212  as his Firstname and Name as set here.</dd> 
     
    3737<dl>   
    3838  <dt>Preferred format</dt> 
    39   <dd>To choose the prefered post syntax. Wiki is a simplified syntax 
     39  <dd>To choose the preferred post syntax. Wiki is a simplified syntax 
    4040  and will be converted to valid xhtml&nbsp;; Unless you have a perfect 
    4141  understanding of html, we advise you to choose the wiki syntax.</dd> 
     
    5959   
    6060  <dt>Activate enhanced uploader in media manager</dt> 
    61   <dd>This option allows you to upload several files at the same time on your server. 
    62   Needs the presence of Flash plugin in your browser.</dd> 
     61  <dd>This option allows you to upload several files at the same time on your server.</dd> 
    6362   
    6463  <dt>Dashboard modules</dt> 
  • locales/en/main.po

    r1256 r1479  
    19171917msgstr "" 
    19181918 
     1919msgid "If this problem persists try to <a href="http://dotclear.org/download">update manually</a>." 
     1920msgstr "" 
     1921 
    19191922msgid "The following files of your Dotclear installation have been modified so we won't try to update your installation. Please try to <a href=\"http://dotclear.org/download\">update manually</a>." 
    19201923msgstr "" 
     
    21392142msgstr "" 
    21402143 
     2144msgid "Are you sure you want to delete this backup?" 
     2145msgstr "" 
     2146 
    21412147msgid "Zip file content" 
    21422148msgstr "" 
     
    27902796msgid "The following error was encountered while trying to read the database:" 
    27912797msgstr "" 
     2798 
     2799msgid "(No cat)" 
     2800msgstr "(none)" 
  • locales/eo/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/es-ar/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/es/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/eu/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/fr/help/blowupConfig.html

    r0 r1264  
    4444<p>En choisissant "Personnalisé..." parmi la liste d'images, vous pourrez 
    4545déposer votre propre image. <strong>Celle-ci doit être au format JPG ou PNG et 
    46 avoir une largeur exacte de 800 pixels.</strong> 
     46avoir une largeur exacte de 800 pixels.</strong></p> 
    4747 
    4848<p>Si vous déposez une image au format JPG, un cadre sera ajouté autours de 
  • locales/fr/main.po

    r1256 r1488  
    15791579msgstr "Modifier le billet" 
    15801580 
     1581msgid "Edit entry &ldquo;%s&rdquo;" 
     1582msgstr "Modifier le billet &ldquo;%s&rdquo;" 
     1583 
    15811584msgid "next entry" 
    15821585msgstr "billet suivant" 
     
    19871990msgstr "L'archive de Dotclear téléchargée semble être corrompue. Essayer de la <a %s>télécharger</a> à nouveau." 
    19881991 
     1992msgid "If this problem persists try to <a href="http://dotclear.org/download">update manually</a>." 
     1993msgstr "Si le problème persiste essayer de <a href="http://dotclear.org/download">mettre à jour manuellement</a>." 
     1994 
    19891995msgid "The following files of your Dotclear installation have been modified so we won't try to update your installation. Please try to <a href=\"http://dotclear.org/download\">update manually</a>." 
    19901996msgstr "Comme les fichiers suivants de votre installation de Dotclear ont été modifiés, votre installation ne peut être mise à jour. Merci de <a href=\"http://fr.dotclear.org/download\">mettre à jour manuellement</a>." 
     
    22072213 
    22082214msgid "Users with posts cannot be deleted." 
    2209 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être effacées." 
     2215msgstr "Les utilisateurs ayant écrit des billets ne peuvent être supprimés." 
    22102216 
    22112217#, php-format 
     
    22482254msgid "Are you sure you want to delete \"%s\" theme?" 
    22492255msgstr "Êtes-vous certain de vouloir supprimer le thème \"%s\" ?" 
     2256 
     2257msgid "Are you sure you want to delete this backup?" 
     2258msgstr "Êtes-vous certain de vouloir supprimer cette sauvegarde ?" 
    22502259 
    22512260msgid "Zip file content" 
     
    29372946msgid "Invalid publication date" 
    29382947msgstr "Date de publication invalide" 
     2948 
     2949msgid "(No cat)" 
     2950msgstr "(aucune)" 
     2951 
     2952msgid "Password strength: %s" 
     2953msgstr "Force du mot de passe : %s" 
     2954 
     2955msgid "very weak" 
     2956msgstr "très faible" 
     2957 
     2958msgid "weak" 
     2959msgstr "faible" 
     2960 
     2961msgid "mediocre" 
     2962msgstr "moyen" 
     2963 
     2964msgid "strong" 
     2965msgstr "fort" 
     2966 
     2967msgid "very strong" 
     2968msgstr "très fort" 
     2969 
     2970msgid "This category will be created when you will save your post." 
     2971msgstr "Cette catégorie sera créée lorsque vous enregistrerez votre billet." 
  • locales/fr/plugins.po

    r1226 r1445  
    10171017"différente. Vous pouvez assigner plusieurs catégories à un seul poste dans " 
    10181018"WordPress. Dans le monde Dotclear, nous le voyons davantage comme « une " 
    1019 "catégorie, plusieurs mot-clés ». Par conséquent Dotclear peut seulement " 
     1019"catégorie, plusieurs mots-clés ». Par conséquent Dotclear peut seulement " 
    10201020"importer une catégorie par billet et il choisira celui de plus petit numéro. " 
    10211021"Si vous voulez conserver une trace de chaque catégorie, vous pouvez les " 
    1022 "importer sous forme de mot-clés, avec un préfixe optionnel." 
     1022"importer sous forme de mots-clés, avec un préfixe optionnel." 
    10231023 
    10241024msgid "" 
     
    10311031"D'autre part, dans WordPress, un billet ne peut pas être sans catégorie, et " 
    10321032"une installation par défaut possède systématiquement une première catégorie " 
    1033 "nommée <i>« sans catégorie »</ i>. Si vous n'avez pas changé cette " 
     1033"nommée <i>« sans catégorie »</i>. Si vous n'avez pas changé cette " 
    10341034"catégorie, vous pouvez simplement l'ignorer lors de l'importation sur votre " 
    10351035"blog, puisque Dotclear vous permet réellement de conserver votre message " 
     
    10431043 
    10441044msgid "Import all categories as tags:" 
    1045 msgstr "Importer toutes les catégories comme des mot-clés :" 
     1045msgstr "Importer toutes les catégories comme des mots-clés :" 
    10461046 
    10471047msgid "Prefix such tags with:" 
    1048 msgstr "Préfixer les mot-clés avec :" 
     1048msgstr "Préfixer les mots-clés avec :" 
    10491049 
    10501050msgid "Content filters" 
     
    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" 
     
    13251331 
    13261332msgid "All tags" 
    1327 msgstr "Tous les mot-clés" 
     1333msgstr "Tous les mots-clés" 
    13281334 
    13291335msgid "Home" 
     
    13371343 
    13381344msgid "Tags" 
    1339 msgstr "Mot-clés" 
     1345msgstr "Mots-clés" 
    13401346 
    13411347msgid "User defined" 
     
    14451451 
    14461452msgid "Tags:" 
    1447 msgstr "Mot-clés :" 
     1453msgstr "Mots-clés :" 
    14481454 
    14491455#, php-format 
     
    14741480 
    14751481msgid "Enter tags separated by coma" 
    1476 msgstr "Entrez les mot-clés séparés par des virgules" 
     1482msgstr "Entrez les mots-clés séparés par des virgules" 
    14771483 
    14781484msgid "Add tags" 
    1479 msgstr "Ajouter des mot-clés" 
     1485msgstr "Ajouter des mots-clés" 
    14801486 
    14811487msgid "Remove tags" 
    1482 msgstr "Retirer des mot-clés" 
     1488msgstr "Retirer des mots-clés" 
    14831489 
    14841490msgid "Add tags to entries" 
    1485 msgstr "Ajouter des mot-clés à des billets" 
     1491msgstr "Ajouter des mots-clés à des billets" 
    14861492 
    14871493msgid "Tags to add:" 
    1488 msgstr "Mot-clés à ajouter :" 
     1494msgstr "Mots-clés à ajouter :" 
    14891495 
    14901496msgid "Remove selected tags from entries" 
    1491 msgstr "Retirer les mot-clés sélectionnés des billets" 
     1497msgstr "Retirer les mots-clés sélectionnés des billets" 
    14921498 
    14931499msgid "No tags for selected entries" 
     
    14951501 
    14961502msgid "Following tags have been found in selected entries:" 
    1497 msgstr "Les mot-clés suivants ont été trouvés pour les billets sélectionnés :" 
     1503msgstr "Les mots-clés suivants ont été trouvés pour les billets sélectionnés :" 
    14981504 
    14991505msgid "short" 
     
    15041510 
    15051511msgid "Tags list format:" 
    1506 msgstr "Format de la liste des mot-clés :" 
     1512msgstr "Format de la liste des mots-clés :" 
    15071513 
    15081514msgid "Tags for posts" 
     
    15251531 
    15261532msgid "Link to all tags:" 
    1527 msgstr "Lien vers tous les mot-clés :" 
     1533msgstr "Lien vers tous les mots-clés :" 
    15281534 
    15291535msgid "Edit tag" 
     
    15341540 
    15351541msgid "Back to tags list" 
    1536 msgstr "Retour à la liste des mot-clés" 
     1542msgstr "Retour à la liste des mots-clés" 
    15371543 
    15381544msgid "Actions for this tag" 
  • locales/hu/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/it/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/ja/help/blowupConfig.html

    r0 r1264  
    3535<p>デフォルトで指定されているものの代わりに、リストからヘッダ画像を選ぶことができます。</p> 
    3636 
    37 <p>画像リストで「カスタム...」を選んだ場合、独自の画像をアップロードすることができます。 <strong>画像ファイルは JPG または PNG フォーマットで、横幅が正確に800ピクセルである必要があります。</strong> 
     37<p>画像リストで「カスタム...」を選んだ場合、独自の画像をアップロードすることができます。 <strong>画像ファイルは JPG または PNG フォーマットで、横幅が正確に800ピクセルである必要があります。</strong></p> 
    3838 
    3939<p>JPG画像がアップロードされた場合、画像に境界線が付加されます。 PNG画像の場合には付加されず、透過性も維持されます。</p> 
  • locales/ko/help/blowupConfig.html

    r0 r1264  
    3434<p>기본이미지 대신, 목록에 있는 머리글 이미지를 쓰실 수 있습니다.</p> 
    3535 
    36 <p>이미지 목록에서 "개성에 맞게..."를 선택하시면, 당신 자신이 보유한 이미지를 올릴 수 있습니다. <strong>이미지 파일은 JPG나 PNG 포맷이어야하고 폭은 정확히 800px 이어야 합니다.</strong> 
     36<p>이미지 목록에서 "개성에 맞게..."를 선택하시면, 당신 자신이 보유한 이미지를 올릴 수 있습니다. <strong>이미지 파일은 JPG나 PNG 포맷이어야하고 폭은 정확히 800px 이어야 합니다.</strong></p> 
    3737 
    3838<p>JPG 이미지를 올리실 때는, 윤곽선이 추가됩니다. PNG 이미지의 경우는 해당되지 않습니다. (PNG 이미지의 투명도도 또한 유지됩니다.)</p> 
  • locales/lt/help/blowupConfig.html

    r813 r1264  
    3535<p>Du kannst ein Bild Deiner Wahl statt des Standardbildes einsetzen.</p> 
    3636 
    37 <p>Wenn Du  "Benutzerdefiniert..." in der Bilderliste ausw&auml;hlst, dann hast Du die M&ouml;glichkeit, Dein eigenes Bild upzuloaden. <strong>Das Dateiformat muss entweder JPG der PNG sein und es muss 800px breit sein.</strong> 
     37<p>Wenn Du  "Benutzerdefiniert..." in der Bilderliste ausw&auml;hlst, dann hast Du die M&ouml;glichkeit, Dein eigenes Bild upzuloaden. <strong>Das Dateiformat muss entweder JPG der PNG sein und es muss 800px breit sein.</strong></p> 
    3838 
    3939<p>Wenn Du ein JPG-Bild uploadest, dann wird automatisch ein Rahmen um das Bild gesetzt. Dies geschieht nicht bei der Verwendung eines PNG-Bildes und die Transparenz wird ebenfalls beibehalten.</p> 
  • locales/nl/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/oc/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/pl/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/pt-br/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/pt/help/blowupConfig.html

    r0 r1264  
    5151<br /> 
    5252 
    53 <em>NOTA: Uma bordura aparecera a volta da imagem o formato JPG, isto não acontece com as imagem em PNG -é a transparência dos PNGs fica efectiva-</em> 
     53<em>NOTA: Uma bordura aparecera a volta da imagem o formato JPG, isto não acontece com as imagem em PNG -é a transparência dos PNGs fica efectiva-</em></p> 
    5454 
    5555<h4>Estilos pré-definidos</h4> 
  • locales/ro/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/sr/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/sv/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/te/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/tr/help/blowupConfig.html

    r0 r1264  
    3535<p>You can choose a header image among the list to use in place of the default one.</p> 
    3636 
    37 <p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong> 
     37<p>When you choose "Custom..." in the image list, you will be able to upload your own image. <strong>The image file must be in JPG or PNG format and must be precisely 800px wide.</strong></p> 
    3838 
    3939<p>If you upload a JPG image, a border will be added to the image, which is not the case with PNG images (the transparency of which will also be kept).</p> 
  • locales/zh-cn/help/blowupConfig.html

    r253 r1264  
    3535<p>您可以从列表中选择一个头部图片来取代默认的。</p> 
    3636 
    37 <p>当您在图片列表中选择“定制...”,您将可以上传自己的图片。<strong>图片必须是 JPG 或者 PNG 格式并且必须精确等于 800 像素宽。</strong> 
     37<p>当您在图片列表中选择“定制...”,您将可以上传自己的图片。<strong>图片必须是 JPG 或者 PNG 格式并且必须精确等于 800 像素宽。</strong></p> 
    3838 
    3939<p>如果您上传一个 JPG 图片,一个边框将会被添加。而 PNG 图片不会如此(透明特性也会被保留)。</p> 
  • plugins/aboutConfig/index.php

    r1179 r1274  
    8686     return 
    8787     '<tr>'. 
    88      '<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
     88     '<td scope="row"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
    8989     '<td>'.$field.'</td>'. 
    9090     '<td>'.$s['type'].'</td>'. 
  • plugins/antispam/filters/class.dc.filter.iplookup.php

    r1179 r1361  
    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/inc/lib.dc.antispam.php

    r1179 r1478  
    7575          if (($count = self::countSpam($core)) > 0) { 
    7676               $str = ($count > 1) ? __('(including %d spam comments)') : __('(including %d spam comment)'); 
    77                $icons['comments'][0] .= '</a> <br /><a href="comments.php?status=-2"><span>'.sprintf($str,$count).'</span>'; 
     77               $icons['comments'][0] .= '</span></a> <br /><a href="comments.php?status=-2"><span>'.sprintf($str,$count); 
    7878          } 
    7979     } 
     
    8383          if (($count = self::countSpam($core)) > 0) { 
    8484               $str = ($count > 1) ? __('(including %d spam comments)') : __('(including %d spam comment)'); 
    85                return '</a> <br /><a href="comments.php?status=-2"><span>'.sprintf($str,$count).'</span>'; 
     85               return '</span></a> <br /><a href="comments.php?status=-2"><span>'.sprintf($str,$count); 
    8686          } else { 
    8787               return ''; 
  • plugins/antispam/index.php

    r1207 r1274  
    204204          '<td class="nowrap">'.form::checkbox(array('filters_active[]'),$fid,$f->active, '', '', false, 'title="'.__('Active').'"').'</td>'. 
    205205          '<td class="nowrap">'.form::checkbox(array('filters_auto_del[]'),$fid,$f->auto_delete, '', '', false, 'title="'.__('Auto Del.').'"').'</td>'. 
    206           '<td class="nowrap" scope="raw">'.$f->name.'</td>'. 
     206          '<td class="nowrap" scope="row">'.$f->name.'</td>'. 
    207207          '<td class="maximal">'.$f->description.'</td>'. 
    208208          '<td class="status">'.$gui_link.'</td>'. 
  • plugins/attachments/_admin.php

    r1179 r1537  
    2222          { 
    2323               $core =& $GLOBALS['core']; 
    24                $post_media = $core->media->getPostMedia($post->post_id); 
    25                echo 
    26                '<h3 class="clear">'.__('Attachments').'</h3>'; 
    27                foreach ($post_media as $f) 
    28                { 
    29                     $ftitle = $f->media_title; 
    30                     if (strlen($ftitle) > 18) { 
    31                          $ftitle = substr($ftitle,0,16).'...'; 
     24               if ( isset($core->media) ) { 
     25                    $post_media = $core->media->getPostMedia($post->post_id); 
     26                    echo 
     27                    '<h3 class="clear">'.__('Attachments').'</h3>'; 
     28                    foreach ($post_media as $f) 
     29                    { 
     30                         $ftitle = $f->media_title; 
     31                         if (strlen($ftitle) > 18) { 
     32                              $ftitle = substr($ftitle,0,16).'...'; 
     33                         } 
     34                         echo 
     35                         '<div class="media-item">'. 
     36                         '<a class="media-icon" href="media_item.php?id='.$f->media_id.'">'. 
     37                         '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'. 
     38                         '<ul>'. 
     39                         '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'" '. 
     40                         'title="'.$f->basename.'">'.$ftitle.'</a></li>'. 
     41                         '<li>'.$f->media_dtstr.'</li>'. 
     42                         '<li>'.files::size($f->size).' - '. 
     43                         '<a href="'.$f->file_url.'">'.__('open').'</a>'.'</li>'. 
     44                          
     45                         '<li class="media-action"><a class="attachment-remove" id="attachment-'.$f->media_id.'" '. 
     46                         'href="post_media.php?post_id='.$post->post_id.'&amp;media_id='.$f->media_id.'&amp;remove=1">'. 
     47                         '<img src="images/check-off.png" alt="'.__('remove').'" /></a>'. 
     48                         '</li>'. 
     49                          
     50                         '</ul>'. 
     51                         '</div>'; 
    3252                    } 
    33                     echo 
    34                     '<div class="media-item">'. 
    35                     '<a class="media-icon" href="media_item.php?id='.$f->media_id.'">'. 
    36                     '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'. 
    37                     '<ul>'. 
    38                     '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'"'. 
    39                     'title="'.$f->basename.'">'.$ftitle.'</a></li>'. 
    40                     '<li>'.$f->media_dtstr.'</li>'. 
    41                     '<li>'.files::size($f->size).' - '. 
    42                     '<a href="'.$f->file_url.'">'.__('open').'</a>'.'</li>'. 
    43                      
    44                     '<li class="media-action"><a class="attachment-remove" id="attachment-'.$f->media_id.'" '. 
    45                     'href="post_media.php?post_id='.$post->post_id.'&amp;media_id='.$f->media_id.'&amp;remove=1">'. 
    46                     '<img src="images/check-off.png" alt="'.__('remove').'" /></a>'. 
    47                     '</li>'. 
    48                      
    49                     '</ul>'. 
    50                     '</div>'; 
     53                    unset($f); 
    5154               } 
    52                unset($f); 
    5355                
    5456               if (empty($post_media)) { 
  • plugins/attachments/_public.php

    r1221 r1266  
    4040          "<?php\n". 
    4141          'if ($_ctx->posts !== null && $core->media) {'."\n". 
    42           '$_ctx->attachments = staticRecord::newFromArray($core->media->getPostMedia($_ctx->posts->post_id));'."\n". 
     42          '$_ctx->attachments = $core->media->getPostMedia($_ctx->posts->post_id, null, true);'."\n". 
    4343          "?>\n". 
    4444           
     
    4646          '<?php while ($_ctx->attachments->fetch()) : ?>'. 
    4747           
    48           '<?php $GLOBALS[\'attach_i\'] = $attach_i; $attach_f = $_ctx->attachments->row(); $GLOBALS[\'attach_f\'] = $attach_f;'. // LEGACY 
     48          '<?php $GLOBALS[\'attach_i\'] = $attach_i; $attach_f = $_ctx->attachments; $GLOBALS[\'attach_f\'] = $attach_f;'. // LEGACY 
    4949          '$_ctx->file_url = $attach_f->file_url; ?>'. // LEGACY 
    5050          $content. 
  • plugins/blogroll/index.php

    r1179 r1504  
    202202 
    203203<div class="multi-part" title="<?php echo __('Blogroll'); ?>"> 
     204 
     205<?php if (!$rs->isEmpty()) { ?> 
     206 
    204207<form action="plugin.php" method="post" id="links-form"> 
    205208<table class="maximal dragable"> 
     
    245248</tbody> 
    246249</table> 
    247 <?php 
    248      if (!$rs->isEmpty()) { 
    249           echo 
    250           '<div class="two-cols">'. 
    251           '<p class="col">'.form::hidden('links_order',''). 
    252           form::hidden(array('p'),'blogroll'). 
    253           $core->formNonce(). 
    254           '<input type="submit" name="saveorder" value="'.__('Save order').'" /></p>'. 
    255            
    256           '<p class="col right"><input type="submit" class="delete" name="removeaction"'. 
    257           ' value="'.__('Delete selected links').'" '. 
    258           'onclick="return window.confirm(\''.html::escapeJS( 
    259                __('Are you sure you want to delete selected links?')).'\');" /></p>'. 
    260           '</div>'; 
    261      } else { 
    262           echo 
    263           '<div><p>'.__('The link list is empty.').'</p></div>'; 
    264      } 
    265 ?> 
     250 
     251<div class="two-cols"> 
     252<p class="col"> 
     253<?php 
     254     echo  
     255     form::hidden('links_order',''). 
     256     form::hidden(array('p'),'blogroll'). 
     257     $core->formNonce(); 
     258?> 
     259<input type="submit" name="saveorder" value="<?php echo __('Save order'); ?>" /></p> 
     260<p class="col right"><input type="submit" class="delete" name="removeaction" 
     261      value="<?php echo __('Delete selected links'); ?>"  
     262      onclick="return window.confirm(' 
     263      <?php echo html::escapeJS(__('Are you sure you want to delete selected links?')); ?>');" /></p> 
     264</div> 
    266265</form> 
     266 
     267<?php 
     268} else { 
     269     echo '<div><p>'.__('The link list is empty.').'</p></div>'; 
     270} 
     271?> 
     272 
    267273</div> 
    268274 
  • plugins/maintenance/locales/fr/help/maintenance.html

    r207 r1272  
    1010<dl> 
    1111  <dt>Optimiser l'espace de la base de données</dt> 
    12   <dd>Au fur at à mesure des suppressions ou modifications dans vos billets, les tables de la  
     12  <dd>Au fur et à mesure des suppressions ou modifications dans vos billets, les tables de la  
    1313  base de données se fragmentent. L'opération d'optimisation permet de compacter celles-ci.<br /> 
    1414  Cette opération n'a aucun impact sur l'intégrité de vos données.<br /> 
    15   Il est fortement conseillé d'optimiser la base de données avant tout export de blog</dd> 
     15  Il est fortement conseillé d'optimiser la base de données avant tout export de blog.</dd> 
    1616   
    1717  <dt>Compteurs</dt> 
  • 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

    r1239 r1537  
    139139               $core->media = new dcMedia($core); 
    140140               $post_media = $core->media->getPostMedia($post_id); 
    141           } catch (Exception $e) {} 
     141          } catch (Exception $e) { 
     142               $core->error->add($e->getMessage()); 
     143          } 
    142144     } 
    143145} 
  • plugins/simpleMenu/index.php

    r1179 r1273  
    389389          case 1: 
    390390               // Selection du type d'item 
    391                echo '<form id="additem" action="'.$p_url.'&add=2" method="post">'; 
     391               echo '<form id="additem" action="'.$p_url.'&amp;add=2" method="post">'; 
    392392               echo '<fieldset><legend>'.__('Select type').'</legend>'; 
    393393               echo '<p class="field"><label for="item_type" class="classic">'.__('Type of item menu:').'</label>'.form::combo('item_type',$items_combo,'').'</p>'; 
     
    399399               if ($items[$item_type][1]) { 
    400400                    // Choix à faire 
    401                     echo '<form id="additem" action="'.$p_url.'&add=3" method="post">'; 
     401                    echo '<form id="additem" action="'.$p_url.'&amp;add=3" method="post">'; 
    402402                    echo '<fieldset><legend>'.$item_type_label.'</legend>'; 
    403403                    switch ($item_type) { 
     
    436436          case 3: 
    437437               // Libellé et description 
    438                echo '<form id="additem" action="'.$p_url.'&add=4" method="post">'; 
     438               echo '<form id="additem" action="'.$p_url.'&amp;add=4" method="post">'; 
    439439               echo '<fieldset><legend>'.$item_type_label.($item_select_label != '' ? ' ('.$item_select_label.')' : '').'</legend>'; 
    440440               echo '<p class="field"><label for="item_label" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '. 
     
    458458 
    459459if (!$step) { 
    460      echo '<form id="menuitemsappend" action="'.$p_url.'&add=1" method="post">'; 
     460     echo '<form id="menuitemsappend" action="'.$p_url.'&amp;add=1" method="post">'; 
    461461     echo '<p>'.$core->formNonce().'<input class="add" type="submit" name="appendaction" value="'.__('Add an item').'" /></p>'; 
    462462     echo '</form>'; 
  • plugins/tags/tag_posts.php

    r1179 r1288  
    130130          '<input type="submit" value="'.__('Rename').'" />'. 
    131131          $core->formNonce(). 
    132           '</form>'; 
     132          '</p></form>'; 
    133133          # Remove tag 
    134134          if (!$posts->isEmpty() && $core->auth->check('contentadmin',$core->blog->id)) { 
    135135               echo 
    136136               '<form id="tag_delete" action="'.$this_url.'" method="post">'. 
    137                '<p class="no-margin">'.__('Delete this tag:').'</p>'. 
    138                '<input type="submit" class="delete" name="delete" value="'.__('Delete').'" />'. 
     137               '<p class="no-margin">'.__('Delete this tag:'). 
     138               '</p><p><input type="submit" class="delete" name="delete" value="'.__('Delete').'" />'. 
    139139               $core->formNonce(). 
    140                '</form>'; 
     140               '</p></form>'; 
    141141          } 
    142           echo '</p></div>'; 
     142          echo '</div>'; 
    143143     } 
    144144      
  • plugins/userPref/index.php

    r1179 r1274  
    8282     return 
    8383     '<tr>'. 
    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>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map