Dotclear


Ignore:
Timestamp:
08/30/13 10:37:08 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Parents:
1619:5d925866b5b3 (diff), 1593:0c884219a872 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge 2.5 into default

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/blog_pref.php

    r1537 r1620  
    174174                
    175175               if ($rs) { 
    176                     throw new Exception(__('That blog Id is already in use.')); 
     176                    throw new Exception(__('This blog ID is already used.')); 
    177177               } 
    178178          } 
     
    256256} 
    257257 
     258if ($standalone) { 
     259     $breadcrumb = dcPage::breadcrumb( 
     260          array( 
     261               html::escapeHTML($blog_name) => '', 
     262               '<span class="page-title">'.__('Blog settings').'</span>' => '' 
     263          )); 
     264} else { 
     265     $breadcrumb = dcPage::breadcrumb( 
     266          array( 
     267               __('System') => '', 
     268               __('Blogs') => 'blogs.php', 
     269               '<span class="page-title">'.__('Blog settings').' : '.html::escapeHTML($blog_name).'</span>' => '' 
     270          )); 
     271} 
     272 
    258273dcPage::open(__('Blog settings'), 
    259274     '<script type="text/javascript">'."\n". 
     
    272287     $core->callBehavior('adminBlogPreferencesHeaders'). 
    273288      
    274      dcPage::jsPageTabs() 
     289     dcPage::jsPageTabs(), 
     290     $breadcrumb 
    275291); 
    276292 
    277293if ($blog_id) 
    278294{ 
    279      echo '<h2>'.(!$standalone ? '<a href="blogs.php">'.__('Blogs').'</a> &rsaquo; ' : ''). 
    280      html::escapeHTML($blog_name).' &rsaquo; <span class="page-title">'. 
    281      __('Blog settings').'</span></h2>'; 
    282       
    283295     if (!empty($_GET['add'])) { 
    284           dcPage::message(__('Blog has been successfully created.')); 
     296          dcPage::success(__('Blog has been successfully created.')); 
    285297     } 
    286298      
    287299     if (!empty($_GET['upd'])) { 
    288           dcPage::message(__('Blog has been successfully updated.')); 
     300          dcPage::success(__('Blog has been successfully updated.')); 
    289301     } 
    290302      
     
    295307      
    296308     echo 
    297      '<fieldset><legend>'.__('Blog details').'</legend>'. 
     309     '<div class="fieldset"><h4>'.__('Blog details').'</h4>'. 
    298310     $core->formNonce(); 
    299311      
     
    301313     { 
    302314          echo 
    303           '<p><label for="blog_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:'). 
    304           form::field('blog_id',30,32,html::escapeHTML($blog_id)).'</label></p>'. 
     315          '<p><label for="blog_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:').'</label>'. 
     316          form::field('blog_id',30,32,html::escapeHTML($blog_id)).'</p>'. 
    305317          '<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p> '. 
    306318          '<p class="form-note warn">'.__('Please note that changing your blog ID may require changes in your public index.php file.').'</p>'; 
     
    308320      
    309321     echo 
    310      '<p><label for="blog_name" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog name:'). 
    311      form::field('blog_name',30,255,html::escapeHTML($blog_name)).'</label></p>'; 
     322     '<p><label for="blog_name" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog name:').'</label>'. 
     323     form::field('blog_name',30,255,html::escapeHTML($blog_name)).'</p>'; 
    312324      
    313325     if ($core->auth->isSuperAdmin()) 
    314326     { 
    315327          echo 
    316           '<p><label for="blog_url" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog URL:'). 
    317           form::field('blog_url',30,255,html::escapeHTML($blog_url)).'</label></p>'. 
    318            
    319           '<p><label for="url_scan">'.__('URL scan method:'). 
    320           form::combo('url_scan',$url_scan_combo,$blog_settings->system->url_scan).'</label></p>'. 
    321            
    322           '<p><label for="blog_status">'.__('Blog status:'). 
    323           form::combo('blog_status',$status_combo,$blog_status).'</label></p>'; 
     328          '<p><label for="blog_url" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog URL:').'</label>'. 
     329          form::field('blog_url',30,255,html::escapeHTML($blog_url)).'</p>'. 
     330           
     331          '<p><label for="url_scan">'.__('URL scan method:').'</label>'. 
     332          form::combo('url_scan',$url_scan_combo,$blog_settings->system->url_scan).'</p>'. 
     333           
     334          '<p><label for="blog_status">'.__('Blog status:').'</label>'. 
     335          form::combo('blog_status',$status_combo,$blog_status).'</p>'; 
    324336     } 
    325337      
     
    327339     '<p class="area"><label for="blog_desc">'.__('Blog description:').'</label>'. 
    328340     form::textarea('blog_desc',60,5,html::escapeHTML($blog_desc)).'</p>'. 
    329      '</fieldset>'; 
    330       
    331       
    332      echo 
    333      '<fieldset><legend>'.__('Blog configuration').'</legend>'. 
     341     '</div>'; 
     342      
     343      
     344     echo 
     345     '<div class="fieldset"><h4>'.__('Blog configuration').'</h4>'. 
    334346     '<div class="two-cols">'. 
    335347     '<div class="col">'. 
    336      '<p><label for="editor">'.__('Blog editor name:'). 
     348     '<p><label for="editor">'.__('Blog editor name:').'</label>'. 
    337349     form::field('editor',30,255,html::escapeHTML($blog_settings->system->editor)). 
    338      '</label></p>'. 
    339       
    340      '<p><label for="lang">'.__('Default language:'). 
     350     '</p>'. 
     351      
     352     '<p><label for="lang">'.__('Default language:').'</label>'. 
    341353     form::combo('lang',$lang_combo,$blog_settings->system->lang,'l10n'). 
    342      '</label></p>'. 
    343       
    344      '<p><label for="blog_timezone">'.__('Blog timezone:'). 
     354     '</p>'. 
     355      
     356     '<p><label for="blog_timezone">'.__('Blog timezone:').'</label>'. 
    345357     form::combo('blog_timezone',dt::getZones(true,true),html::escapeHTML($blog_settings->system->blog_timezone)). 
    346      '</label></p>'. 
    347  
    348      '<p><label for="copyright_notice">'.__('Copyright notice:'). 
     358     '</p>'. 
     359 
     360     '<p><label for="copyright_notice">'.__('Copyright notice:').'</label>'. 
    349361     form::field('copyright_notice',30,255,html::escapeHTML($blog_settings->system->copyright_notice)). 
    350      '</label></p>'. 
    351      '</div>'. 
    352       
    353      '<div class="col">'. 
    354      '<p><label for="post_url_format">'.__('New post URL format:'). 
     362     '</p>'. 
     363     '</div>'. 
     364      
     365     '<div class="col">'. 
     366     '<p><label for="post_url_format">'.__('New post URL format:').'</label>'. 
    355367     form::combo('post_url_format',$post_url_combo,html::escapeHTML($blog_settings->system->post_url_format)). 
    356      '</label></p>'. 
    357  
    358      '<p><label for="note_title_tag">'.__('Note title HTML tag:'). 
     368     '</p>'. 
     369 
     370     '<p><label for="note_title_tag">'.__('Note title HTML tag:').'</label>'. 
    359371     form::combo('note_title_tag',$note_title_tag_combo,$blog_settings->system->note_title_tag). 
    360      '</label></p>'. 
    361            
    362      '<p><label for="enable_xmlrpc" class="classic">'. 
     372     '</p>'. 
     373           
     374     '<p><label for="enable_xmlrpc" class="classic">'.'</label>'. 
    363375     form::checkbox('enable_xmlrpc','1',$blog_settings->system->enable_xmlrpc). 
    364      __('Enable XML/RPC interface').'</label></p>'; 
     376     __('Enable XML/RPC interface').'</p>'; 
    365377 
    366378     echo 
     
    385397     '</div>'. 
    386398     '<br class="clear" />'. //Opera sucks 
    387      '</fieldset>'; 
    388       
    389      echo 
    390      '<fieldset><legend>'.__('Comments and trackbacks').'</legend>'. 
     399     '</div>'; 
     400      
     401     echo 
     402     '<div class="fieldset"><h4>'.__('Comments and trackbacks').'</h4>'. 
     403 
    391404     '<div class="two-cols">'. 
     405 
    392406     '<div class="col">'. 
    393407     '<p><label for="allow_comments" class="classic">'. 
    394408     form::checkbox('allow_comments','1',$blog_settings->system->allow_comments). 
    395      __('Accept comments').'</label></p>'. 
    396       
     409     __('Accept comments').'</label></p>'.    
    397410     '<p><label for="comments_pub" class="classic">'. 
    398411     form::checkbox('comments_pub','1',!$blog_settings->system->comments_pub). 
    399      __('Moderate comments').'</label></p>'. 
    400       
     412     __('Moderate comments').'</label></p>'.  
    401413     '<p><label for="comments_ttl" class="classic">'.sprintf(__('Leave comments open for %s days'), 
    402414     form::field('comments_ttl',2,3,$blog_settings->system->comments_ttl)). 
    403415     '</label></p>'. 
    404      '<p class="form-note">'.__('Leave blank to disable this feature.').'</p>'. 
    405       
     416     '<p class="form-note">'.__('Leave blank to disable this feature.').'</p>'.  
    406417     '<p><label for="wiki_comments" class="classic">'. 
    407418     form::checkbox('wiki_comments','1',$blog_settings->system->wiki_comments). 
     
    412423     '<p><label for="allow_trackbacks" class="classic">'. 
    413424     form::checkbox('allow_trackbacks','1',$blog_settings->system->allow_trackbacks). 
    414      __('Accept trackbacks').'</label></p>'. 
    415       
     425     __('Accept trackbacks').'</label></p>'.  
    416426     '<p><label for="trackbacks_pub" class="classic">'. 
    417427     form::checkbox('trackbacks_pub','1',!$blog_settings->system->trackbacks_pub). 
    418      __('Moderate trackbacks').'</label></p>'. 
    419       
     428     __('Moderate trackbacks').'</label></p>'.     
    420429     '<p><label for="trackbacks_ttl" class="classic">'.sprintf(__('Leave trackbacks open for %s days'), 
    421430     form::field('trackbacks_ttl',2,3,$blog_settings->system->trackbacks_ttl)).'</label></p>'. 
    422      '<p class="form-note">'.__('Leave blank to disable this feature.').'</p>'. 
    423       
     431     '<p class="form-note">'.__('Leave blank to disable this feature.').'</p>'.  
    424432     '<p><label for="comments_nofollow" class="classic">'. 
    425433     form::checkbox('comments_nofollow','1',$blog_settings->system->comments_nofollow). 
    426434     __('Add "nofollow" relation on comments and trackbacks links').'</label></p>'. 
    427435     '</div>'. 
    428      '</div>'. 
    429436     '<br class="clear" />'. //Opera sucks 
    430      '</fieldset>'; 
    431       
    432      echo 
    433      '<fieldset><legend>'.__('Blog presentation').'</legend>'. 
     437 
     438     '</div>'. 
     439     '<br class="clear" />'. //Opera sucks 
     440     '</div>'; 
     441      
     442     echo 
     443     '<div class="fieldset"><h4>'.__('Blog presentation').'</h4>'. 
    434444     '<div class="two-cols">'. 
    435445     '<div class="col">'. 
    436      '<p><label for="date_format">'.__('Date format:'). 
     446     '<p><label for="date_format">'.__('Date format:').'</label>'. 
    437447     form::field('date_format',30,255,html::escapeHTML($blog_settings->system->date_format)). 
    438      '</label></p>'. 
    439       
    440      '<p><label for="time_format">'.__('Time format:'). 
     448     '</p>'. 
     449      
     450     '<p><label for="time_format">'.__('Time format:').'</label>'. 
    441451     form::field('time_format',30,255,html::escapeHTML($blog_settings->system->time_format)). 
    442      '</label></p>'. 
     452     '</p>'. 
    443453      
    444454     '<p><label for="use_smilies" class="classic">'. 
     
    466476    '</div>'. 
    467477     '<br class="clear" />'. //Opera sucks 
    468      '</fieldset>'; 
    469       
    470      echo 
    471      '<fieldset><legend>'.__('Media and images').'</legend>'. 
     478     '</div>'; 
     479      
     480     echo 
     481     '<div class="fieldset"><h4>'.__('Media and images').'</h4>'. 
    472482     '<div class="two-cols">'. 
    473483     '<div class="col">'. 
    474      '<h4>'.__('Generated image sizes (in pixels)').'</h4>'. 
     484     '<h5>'.__('Generated image sizes (in pixels)').'</h5>'. 
    475485     '<p class="field"><label for="media_img_t_size">'.__('Thumbnails:').' '. 
    476486     form::field('media_img_t_size',3,3,$blog_settings->system->media_img_t_size).'</label></p>'. 
     
    484494      
    485495     '<div class="col">'. 
    486      '<h4><label for="media_img_title_pattern">'.__('Inserted image title').'</label></h4>'. 
     496     '<h5><label for="media_img_title_pattern">'.__('Inserted image title').'</label></h5>'. 
    487497     '<p>'.__('This defines image tag title when you insert it in a post from the media manager. It is retrieved from the picture\'s metadata.').'</p>'. 
    488498     '<p>'.form::combo('media_img_title_pattern',$img_title_combo,html::escapeHTML($blog_settings->system->media_img_title_pattern)).'</p>'. 
     
    491501     __('Use original media date if possible').'</label></p>'. 
    492502 
    493      '<h4>'.__('Default image insertion attributes').'</h4>'. 
    494      '<p><label for="media_img_default_size">'.__('Image size:'). 
     503     '<h5>'.__('Default image insertion attributes').'</h5>'. 
     504     '<p><label for="media_img_default_size">'.__('Image size:').'</label>'. 
    495505     form::combo('media_img_default_size',$img_default_size_combo, 
    496506          (html::escapeHTML($blog_settings->system->media_img_default_size) != '' ? html::escapeHTML($blog_settings->system->media_img_default_size) : 'm')). 
    497      '</label></p>'. 
    498      '<p><label for="media_img_default_alignment">'.__('Image alignment'). 
     507     '</p>'. 
     508     '<p><label for="media_img_default_alignment">'.__('Image alignment:').'</label>'. 
    499509     form::combo('media_img_default_alignment',$img_default_alignment_combo,html::escapeHTML($blog_settings->system->media_img_default_alignment)). 
    500      '</label></p>'. 
     510     '</p>'. 
    501511     '<p><label for="media_img_default_link" class="classic">'. 
    502512     form::checkbox('media_img_default_link','1',$blog_settings->system->media_img_default_link). 
     
    504514     '</div>'. 
    505515     '</div>'. 
    506  
    507      '</fieldset>'; 
    508       
    509      echo 
    510      '<fieldset><legend>'.__('Search engines robots policy').'</legend>'; 
     516     '<br class="clear" />'. //Opera sucks 
     517 
     518     '</div>'; 
     519      
     520     echo 
     521     '<div class="fieldset"><h4>'.__('Search engines robots policy').'</h4>'; 
    511522      
    512523     $i = 0; 
     
    518529     } 
    519530      
    520      echo '</fieldset>'; 
     531     echo '</div>'; 
    521532      
    522533      
     
    540551     } else { 
    541552          if ($blog_id == $core->blog->id) { 
    542                echo '<p class="message">'.__('The current blog cannot be deleted').'</p>'; 
     553               echo '<p class="message">'.__('The current blog cannot be deleted.').'</p>'; 
    543554          } else { 
    544                echo '<p class="message">'.__('Only superadmin can delete a blog').'</p>'; 
     555               echo '<p class="message">'.__('Only superadmin can delete a blog.').'</p>'; 
    545556          } 
    546557     } 
  • admin/blog_pref.php

    r1615 r1620  
    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 
Note: See TracChangeset for help on using the changeset viewer.

Sites map