Dotclear

Changeset 1620:542c321dc040 for admin


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

Location:
admin
Files:
15 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 
  • admin/index.php

    r1591 r1620  
    121121$__dashboard_items = new ArrayObject(array(new ArrayObject,new ArrayObject)); 
    122122 
    123 # Documentation links 
    124123$dashboardItem = 0; 
    125 if ($core->auth->user_prefs->dashboard->doclinks) { 
    126      if (!empty($__resources['doc'])) 
    127      { 
    128           $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>'; 
    129       
    130           foreach ($__resources['doc'] as $k => $v) { 
    131                $doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>'; 
    132           } 
    133       
    134           $doc_links .= '</ul>'; 
    135           $__dashboard_items[$dashboardItem][] = $doc_links; 
    136           $dashboardItem++; 
    137      } 
    138 } 
    139124 
    140125if ($core->auth->user_prefs->dashboard->dcnews) { 
     
    180165} 
    181166 
     167# Documentation links 
     168if ($core->auth->user_prefs->dashboard->doclinks) { 
     169     if (!empty($__resources['doc'])) 
     170     { 
     171          $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>'; 
     172      
     173          foreach ($__resources['doc'] as $k => $v) { 
     174               $doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>'; 
     175          } 
     176      
     177          $doc_links .= '</ul>'; 
     178          $__dashboard_items[$dashboardItem][] = $doc_links; 
     179          $dashboardItem++; 
     180     } 
     181} 
     182 
    182183$core->callBehavior('adminDashboardItems', $core, $__dashboard_items); 
    183184 
     
    193194     dcPage::jsLoad('js/_index.js'). 
    194195     # --BEHAVIOR-- adminDashboardHeaders 
    195      $core->callBehavior('adminDashboardHeaders') 
     196     $core->callBehavior('adminDashboardHeaders'), 
     197     dcPage::breadcrumb( 
     198          array( 
     199          '<span class="page-title">'.__('Dashboard').' : '.html::escapeHTML($core->blog->name).'</span>' => '' 
     200          ), 
     201          false) 
    196202); 
    197203 
    198 echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Dashboard').'</span></h2>'; 
     204# Dotclear updates notifications 
     205if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) 
     206{ 
     207     $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 
     208     $new_v = $updater->check(DC_VERSION); 
     209     $version_info = $new_v ? $updater->getInfoURL() : ''; 
     210 
     211     if ($updater->getNotify() && $new_v) { 
     212          $message = 
     213          '<div><p>'.sprintf(__('Dotclear %s is available!'),$new_v).'</p> '. 
     214          '<ul><li><strong><a href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a></strong>'. 
     215          '</li><li><a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. 
     216          ($version_info ? ' </li><li><a href="'.$version_info.'">'.__('information about this version').'</a>' : ''). 
     217          '</li></ul></div>'; 
     218          dcPage::message($message,false,true); 
     219     } 
     220} 
    199221 
    200222if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) { 
     
    204226 
    205227if ($core->blog->status == 0) { 
    206      echo '<p class="static-msg">'.__('This blog is offline').'</p>'; 
     228     echo '<p class="static-msg">'.__('This blog is offline').'.</p>'; 
    207229} elseif ($core->blog->status == -1) { 
    208      echo '<p class="static-msg">'.__('This blog is removed').'</p>'; 
     230     echo '<p class="static-msg">'.__('This blog is removed').'.</p>'; 
    209231} 
    210232 
     
    305327     if ($i->count() > 0) 
    306328     { 
    307           $dashboardItems .= '<div>'; 
     329          $dashboardItems .= '<div class="db-item">'; 
    308330          foreach ($i as $v) { 
    309331               $dashboardItems .= $v; 
     
    339361               } 
    340362          } catch (Exception $e) { } 
    341            
     363      
    342364          echo 
    343365          '<div id="quick">'. 
    344366          '<h3>'.__('Quick entry').'</h3>'. 
    345           '<form id="quick-entry" action="post.php" method="post">'. 
    346           '<fieldset><legend>'.__('New entry').'</legend>'. 
    347           '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:'). 
     367          '<form id="quick-entry" action="post.php" method="post" class="fieldset">'. 
     368          '<h4>'.__('New entry').'</h4>'. 
     369          '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. 
    348370          form::field('post_title',20,255,'','maximal'). 
    349           '</label></p>'. 
     371          '</p>'. 
    350372          '<p class="area"><label class="required" '. 
    351373          'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 
    352374          form::textarea('post_content',50,7). 
    353375          '</p>'. 
    354           '<p><label for="cat_id" class="classic">'.__('Category:').' '. 
    355           form::combo('cat_id',$categories_combo).'</label></p>'. 
     376          '<p><label for="cat_id" class="classic">'.__('Category:').'</label> '. 
     377          form::combo('cat_id',$categories_combo).'</p>'. 
    356378          ($core->auth->check('categories', $core->blog->id) 
    357379               ? '<div>'. 
    358                '<p id="new_cat">'.__('Add a new category').'</p>'. 
     380               '<p id="new_cat" class="q-cat">'.__('Add a new category').'</p>'. 
     381               '<p class="q-cat"><label for="new_cat_title">'.__('Title:').'</label> '. 
     382               form::field('new_cat_title',30,255,'','').'</p>'. 
     383               '<p class="q-cat"><label for="new_cat_parent">'.__('Parent:').'</label> '. 
     384               form::combo('new_cat_parent',$categories_combo,'',''). 
     385               '</p>'. 
    359386               '<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>'. 
    365387               '</div>' 
    366388               : ''). 
     
    376398          form::hidden('post_notes',''). 
    377399          '</p>'. 
    378           '</fieldset>'. 
    379400          '</form>'. 
    380401          '</div>'; 
  • admin/index.php

    r1558 r1620  
    247247} 
    248248 
     249$err = array(); 
     250 
     251# Check cache directory 
     252if (!is_dir(DC_TPL_CACHE)) { 
     253     $err[] = '<p>'.sprintf(__('Cache directory %s does not exist.'),DC_TPL_CACHE).'</p>'; 
     254} else if (!is_writable(DC_TPL_CACHE)) { 
     255     $err[] = '<p>'.sprintf(__('Cache directory %s is not writable.'),DC_TPL_CACHE).'</p>'; 
     256} 
     257 
     258# Check public directory 
     259if (!is_dir($core->blog->public_path)) { 
     260     $err[] = '<p>'.sprintf(__('Directory %s does not exist.'),$core->blog->public_path).'</p>'; 
     261} else if (!is_writable($core->blog->public_path)) { 
     262     $err[] = '<p>'.sprintf(__('Directory %s is not writable.'),$core->blog->public_path).'</p>'; 
     263} 
     264 
     265# Error list 
     266if (count($err) > 0) { 
     267     echo '<div class="error"><p><strong>Erreur&nbsp;:</strong></p>'. 
     268     '<ul><li>'.implode("</li><li>",$err).'</li></ul></div>'; 
     269} 
     270 
    249271# Plugins install messages 
    250272if (!empty($plugins_install['success'])) 
     
    267289# Dashboard columns (processed first, as we need to know the result before displaying the icons.) 
    268290$dashboardItems = ''; 
     291 
     292# Dotclear updates notifications 
     293if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) 
     294{ 
     295     $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 
     296     $new_v = $updater->check(DC_VERSION); 
     297     $version_info = $new_v ? $updater->getInfoURL() : ''; 
     298      
     299     if ($updater->getNotify() && $new_v) { 
     300          $dashboardItems .= 
     301          '<div id="upg-notify" class="static-msg"><p>'.sprintf(__('Dotclear %s is available!'),$new_v).'</p> '. 
     302          '<ul><li><strong><a href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a></strong>'. 
     303          '</li><li><a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. 
     304          ($version_info ? ' </li><li>'.sprintf(__('<a href=\"%s\">Information about this version</a>.'),$version_info) : ''). 
     305          '</li></ul></div>'; 
     306     } 
     307} 
    269308 
    270309# Errors modules notifications 
  • admin/install/index.php

    r1583 r1620  
    190190          $core->auth->user_prefs->dashboard->put('doclinks',true,'boolean','',null,true); 
    191191          $core->auth->user_prefs->dashboard->put('dcnews',true,'boolean','',null,true); 
    192           $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean','',null,true); 
     192          $core->auth->user_prefs->dashboard->put('quickentry',true,'boolean','',null,true); 
    193193 
    194194          # Add accessibility options 
     
    307307'<div id="main">'; 
    308308 
     309if (!is_writable(DC_TPL_CACHE)) { 
     310     echo '<div class="error"><p>'.sprintf(__('Cache directory %s is not writable.'),DC_TPL_CACHE).'</p></div>'; 
     311} 
     312 
    309313if ($can_install && !empty($err)) { 
    310314     echo '<div class="error"><p><strong>'.__('Errors:').'</strong></p>'.$err.'</div>'; 
     
    312316 
    313317if (!empty($_GET['wiz'])) { 
    314      echo '<p class="message">'.__('Configuration file has been successfully created.').'</p>'; 
     318     echo '<p class="success">'.__('Configuration file has been successfully created.').'</p>'; 
    315319} 
    316320 
     
    324328     '<form action="index.php" method="post">'. 
    325329     '<fieldset><legend>'.__('User information').'</legend>'. 
    326      '<p><label for="u_firstname">'.__('First Name:').' '. 
    327      form::field('u_firstname',30,255,html::escapeHTML($u_firstname)).'</label></p>'. 
    328      '<p><label for="u_name">'.__('Last Name:').' '. 
    329      form::field('u_name',30,255,html::escapeHTML($u_name)).'</label></p>'. 
    330      '<p><label for="u_email">'.__('Email:').' '. 
    331      form::field('u_email',30,255,html::escapeHTML($u_email)).'</label></p>'. 
     330     '<p><label for="u_firstname">'.__('First Name:').'</label> '. 
     331     form::field('u_firstname',30,255,html::escapeHTML($u_firstname)).'</p>'. 
     332     '<p><label for="u_name">'.__('Last Name:').'</label> '. 
     333     form::field('u_name',30,255,html::escapeHTML($u_name)).'</p>'. 
     334     '<p><label for="u_email">'.__('Email:').'</label> '. 
     335     form::field('u_email',30,255,html::escapeHTML($u_email)).'</p>'. 
    332336     '</fieldset>'. 
    333337      
     
    378382     $plugins_install_result. 
    379383      
    380      '<p>'.__('Dotclear has been successfully installed. Here is some useful information you should keep.').'</p>'. 
     384     '<p class="success">'.__('Dotclear has been successfully installed. Here is some useful information you should keep.').'</p>'. 
    381385      
    382386     '<h3>'.__('Your account').'</h3>'. 
  • admin/install/index.php

    r1553 r1620  
    267267 
    268268  <script type="text/javascript" src="../js/jquery/jquery.js"></script> 
     269  <?php echo dcPage::jsLoad('../js/jquery/jquery.pwstrength.js'); ?> 
    269270  <script type="text/javascript"> 
    270271  //<![CDATA[ 
     
    278279      $(this).val(this.value.replace(login_re,'')); 
    279280    }); 
     281     
     282     <?php echo "\$('#u_pwd').pwstrength({texts: ['". 
     283                    sprintf(__('Password strength: %s'),__('very weak'))."', '". 
     284                    sprintf(__('Password strength: %s'),__('weak'))."', '". 
     285                    sprintf(__('Password strength: %s'),__('mediocre'))."', '". 
     286                    sprintf(__('Password strength: %s'),__('strong'))."', '". 
     287                    sprintf(__('Password strength: %s'),__('very strong'))."']});\n"; ?> 
    280288     
    281289    $('#u_login').parent().after($('<input type="hidden" name="u_date" value="' + Date().toLocaleString() + '" />')); 
     
    329337      
    330338     '<fieldset><legend>'.__('Username and password').'</legend>'. 
    331      '<p><label for="u_login" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Username:').'</label> '. 
    332      form::field('u_login',30,32,html::escapeHTML($u_login)).'</p>'. 
    333      '<p><label for="u_pwd" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Password:').'</label> '. 
    334      form::password('u_pwd',30,255).'</p>'. 
    335      '<p><label for="u_pwd2" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Confirm password:').'</label> '. 
    336      form::password('u_pwd2',30,255).'</p>'. 
     339     '<p><label for="u_login" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Username:').' '. 
     340     form::field('u_login',30,32,html::escapeHTML($u_login)).'</label></p>'. 
     341     '<div class="pw-table">'. 
     342          '<p class="pw-cell">'. 
     343               '<label for="u_pwd" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('New password:').'</label>'. 
     344               form::password('u_pwd',30,255,'','','',false,' data-indicator="pwindicator" '). 
     345          '</p>'. 
     346          '<div id="pwindicator">'. 
     347          '    <div class="bar"></div>'. 
     348          '    <p class="label no-margin"></p>'. 
     349          '</div>'. 
     350     '</div>'. 
     351     '<p><label for="u_pwd2" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Confirm password:').' '. 
     352     form::password('u_pwd2',30,255).'</label></p>'. 
    337353     '</fieldset>'. 
    338354      
  • admin/post.php

    r1537 r1620  
    5050} 
    5151 
     52# Getting categories 
     53$categories_combo = array('&nbsp;' => ''); 
     54try { 
     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) { } 
     63 
    5264# Status combo 
    5365foreach ($core->blog->getAllPostStatus() as $k => $v) { 
     
    8294if (!empty($_REQUEST['id'])) 
    8395{ 
     96     $page_title = __('Edit entry'); 
     97      
    8498     $params['post_id'] = $_REQUEST['id']; 
    8599      
     
    111125          $post_open_tb = (boolean) $post->post_open_tb; 
    112126           
    113           $page_title = __('Edit entry'); 
    114            
    115127          $can_edit_post = $post->isEditable(); 
    116128          $can_delete= $post->isDeletable(); 
     
    121133          if ($next_rs !== null) { 
    122134               $next_link = sprintf($post_link,$next_rs->post_id, 
    123                     html::escapeHTML($next_rs->post_title),__('next entry').'&nbsp;&#187;'); 
     135                    html::escapeHTML($next_rs->post_title),__('Next entry').'&nbsp;&#187;'); 
    124136               $next_headlink = sprintf($post_headlink,'next', 
    125137                    html::escapeHTML($next_rs->post_title),$next_rs->post_id); 
     
    128140          if ($prev_rs !== null) { 
    129141               $prev_link = sprintf($post_link,$prev_rs->post_id, 
    130                     html::escapeHTML($prev_rs->post_title),'&#171;&nbsp;'.__('previous entry')); 
     142                    html::escapeHTML($prev_rs->post_title),'&#171;&nbsp;'.__('Previous entry')); 
    131143               $prev_headlink = sprintf($post_headlink,'previous', 
    132144                    html::escapeHTML($prev_rs->post_title),$prev_rs->post_id); 
     
    316328} 
    317329 
     330if ($post_id) { 
     331     switch ($post_status) { 
     332          case 1: 
     333               $img_status = sprintf($img_status_pattern,__('Published'),'check-on.png'); 
     334               break; 
     335          case 0: 
     336               $img_status = sprintf($img_status_pattern,__('Unpublished'),'check-off.png'); 
     337               break; 
     338          case -1: 
     339               $img_status = sprintf($img_status_pattern,__('Scheduled'),'scheduled.png'); 
     340               break; 
     341          case -2: 
     342               $img_status = sprintf($img_status_pattern,__('Pending'),'check-wrn.png'); 
     343               break; 
     344          default: 
     345               $img_status = ''; 
     346     } 
     347     $edit_entry_str = __('&ldquo;%s&rdquo;'); 
     348     $page_title_edit = sprintf($edit_entry_str, html::escapeHTML($post_title)).' '.$img_status; 
     349} else { 
     350     $img_status = ''; 
     351} 
     352 
     353 
    318354dcPage::open($page_title.' - '.__('Entries'), 
    319355     dcPage::jsDatePicker(). 
     
    326362     $core->callBehavior('adminPostHeaders'). 
    327363     dcPage::jsPageTabs($default_tab). 
    328      $next_headlink."\n".$prev_headlink 
     364     $next_headlink."\n".$prev_headlink, 
     365     dcPage::breadcrumb( 
     366          array( 
     367               html::escapeHTML($core->blog->name) => '', 
     368               __('Entries') => 'posts.php', 
     369               '<span class="page-title">'.($post_id ? $page_title_edit : $page_title).'</span>' => '' 
     370          )) 
    329371); 
    330372 
    331373if (!empty($_GET['upd'])) { 
    332      dcPage::message(__('Entry has been successfully updated.')); 
     374     dcPage::success(__('Entry has been successfully updated.')); 
    333375} 
    334376elseif (!empty($_GET['crea'])) { 
    335      dcPage::message(__('Entry has been successfully created.')); 
     377     dcPage::success(__('Entry has been successfully created.')); 
    336378} 
    337379elseif (!empty($_GET['attached'])) { 
    338      dcPage::message(__('File has been successfully attached.')); 
     380     dcPage::success(__('File has been successfully attached.')); 
    339381} 
    340382elseif (!empty($_GET['rmattach'])) { 
    341      dcPage::message(__('Attachment has been successfully removed.')); 
     383     dcPage::success(__('Attachment has been successfully removed.')); 
    342384} 
    343385 
    344386if (!empty($_GET['creaco'])) { 
    345      dcPage::message(__('Comment has been successfully created.')); 
     387     dcPage::success(__('Comment has been successfully created.')); 
    346388} 
    347389 
     
    356398} 
    357399 
    358 echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.'<a href="posts.php">'.__('Entries').'</a> &rsaquo; <span class="page-title">'; 
    359 if ($post_id) { 
    360      switch ($post_status) { 
    361           case 1: 
    362                $img_status = sprintf($img_status_pattern,__('published'),'check-on.png'); 
    363                break; 
    364           case 0: 
    365                $img_status = sprintf($img_status_pattern,__('unpublished'),'check-off.png'); 
    366                break; 
    367           case -1: 
    368                $img_status = sprintf($img_status_pattern,__('scheduled'),'scheduled.png'); 
    369                break; 
    370           case -2: 
    371                $img_status = sprintf($img_status_pattern,__('pending'),'check-wrn.png'); 
    372                break; 
    373           default: 
    374                $img_status = ''; 
    375      } 
    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; 
    380 } 
    381 echo '</span></h2>'; 
    382  
    383400if ($post_id && $post->post_status == 1) { 
    384      echo '<p><a href="'.$post->getURL().'" onclick="window.open(this.href);return false;" title="'.$post_title.' ('.__('new window').')'.'">'.__('Go to this entry on the site').' <img src="images/outgoing-blue.png" alt="" /></a></p>'; 
     401     echo '<p><a class="onblog_link" href="'.$post->getURL().'" onclick="window.open(this.href);return false;" title="'.$post_title.' ('.__('new window').')'.'">'.__('Go to this entry on the site').' <img src="images/outgoing-blue.png" alt="" /></a></p>'; 
    385402} 
    386403if ($post_id) 
    387404{ 
    388      echo '<p>'; 
     405     echo '<p class="nav_prevnext">'; 
    389406     if ($prev_link) { echo $prev_link; } 
    390      if ($next_link && $prev_link) { echo ' - '; } 
     407     if ($next_link && $prev_link) { echo ' | '; } 
    391408     if ($next_link) { echo $next_link; } 
    392409      
     
    403420     exit; 
    404421} 
    405  
    406422/* Post form if we can edit post 
    407423-------------------------------------------------------- */ 
    408424if ($can_edit_post) 
    409425{ 
    410      echo '<div class="multi-part" title="'.__('Edit entry').'" id="edit-entry">'; 
     426     $sidebar_items = new ArrayObject(array( 
     427          'status-box' => array( 
     428               'title' => __('Status'), 
     429               'items' => array( 
     430                    'post_status' =>  
     431                         '<p class="entry-status"><label for="post_status" class="ib">'.__('Entry status').' '.$img_status.'</label>'. 
     432                         form::combo('post_status',$status_combo,$post_status,'maximal','',!$can_publish). 
     433                         '</p>', 
     434                    'post_dt' =>  
     435                         '<p><label for="post_dt" class="ib">'.__('Publication date and hour').'</label>'. 
     436                         form::field('post_dt',16,16,$post_dt,($bad_dt ? 'invalid' : '')). 
     437                         '</p>', 
     438                    'post_lang' => 
     439                         '<p><label for="post_lang" class="ib">'.__('Entry lang').'</label>'. 
     440                         form::combo('post_lang',$lang_combo,$post_lang). 
     441                         '</p>', 
     442                    'post_format' => 
     443                         '<div>'. 
     444                         '<h5 id="label_format"><label for="post_format" class="ib">'.__('Text formating').'</label></h5>'. 
     445                         '<p>'.form::combo('post_format',$formaters_combo,$post_format,'maximal'). 
     446                         '</p>'. 
     447                         '<p>'.($post_id && $post_format != 'xhtml' ?  
     448                         '<a id="convert-xhtml" class="button maximal" href="post.php?id='.$post_id.'&amp;xconv=1">'. 
     449                         __('Convert to XHTML').'</a>' : '').'</p></div>')), 
     450          'metas-box' => array( 
     451               'title' => __('Ordering'), 
     452               'items' => array( 
     453                    'post_selected' =>  
     454                         '<p><label for="post_selected" class="classic">'. 
     455                         form::checkbox('post_selected',1,$post_selected).' '. 
     456                         __('Selected entry').'</label></p>', 
     457                    'cat_id' => 
     458                         '<p><label for="cat_id" class="ib">'.__('Category').'</label>'. 
     459                         form::combo('cat_id',$categories_combo,$cat_id,'maximal'). 
     460                         '</p>'. 
     461                         ($core->auth->check('categories', $core->blog->id) ? 
     462                              '<div>'. 
     463                              '<h5 id="create_cat">'.__('Add a new category').'</h5>'. 
     464                              '<p><label for="new_cat_title">'.__('Title:').' '. 
     465                              form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     466                              '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     467                              form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     468                              '</label></p>'. 
     469                              '</div>' 
     470                         : ''))), 
     471          'options-box' => array( 
     472               'title' => __('Options'), 
     473               'items' => array( 
     474                    'post_open_comment' => 
     475                         '<p><label for="post_open_comment" class="classic">'. 
     476                         form::checkbox('post_open_comment',1,$post_open_comment).' '. 
     477                         __('Accept comments').'</label></p>'. 
     478                         ($core->blog->settings->system->allow_comments ?  
     479                              (isContributionAllowed($post_id,strtotime($post_dt),true) ?  
     480                                   '' : 
     481                                   '<p class="form-note warn">'. 
     482                                   __('Warning: Comments are not more accepted for this entry.').'</p>') :  
     483                              '<p class="form-note warn">'. 
     484                              __('Warning: Comments are not accepted on this blog.').'</p>'), 
     485                    'post_open_tb' => 
     486                         '<p><label for="post_open_tb" class="classic">'. 
     487                         form::checkbox('post_open_tb',1,$post_open_tb).' '. 
     488                         __('Accept trackbacks').'</label></p>'. 
     489                         ($core->blog->settings->system->allow_trackbacks ?  
     490                              (isContributionAllowed($post_id,strtotime($post_dt),false) ?  
     491                                   '' : 
     492                                   '<p class="form-note warn">'. 
     493                                   __('Warning: Trackbacks are not more accepted for this entry.').'</p>') :  
     494                              '<p class="form-note warn">'.__('Warning: Trackbacks are not accepted on this blog.').'</p>'), 
     495                    'post_password' => 
     496                         '<p><label for="post_password" class="ib">'.__('Password').'</label>'. 
     497                         form::field('post_password',10,32,html::escapeHTML($post_password),'maximal'). 
     498                         '</p>', 
     499                    'post_url' => 
     500                         '<div class="lockable">'. 
     501                         '<p><label for="post_url" class="ib">'.__('Edit basename').'</label>'. 
     502                         form::field('post_url',10,255,html::escapeHTML($post_url),'maximal'). 
     503                         '</p>'. 
     504                         '<p class="form-note warn">'. 
     505                         __('Warning: If you set the URL manually, it may conflict with another entry.'). 
     506                         '</p></div>' 
     507     )))); 
     508 
     509     $main_items = new ArrayObject(array( 
     510          "post_title" => 
     511               '<p class="col">'. 
     512               '<label class="required no-margin"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. 
     513               form::field('post_title',20,255,html::escapeHTML($post_title),'maximal'). 
     514               '</p>', 
     515           
     516          "post_excerpt" => 
     517               '<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'<span class="form-note">'. 
     518               __('Add an introduction to the post.').'</span></label> '. 
     519               form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt)). 
     520               '</p>', 
     521           
     522          "post_content" => 
     523               '<p class="area"><label class="required" '. 
     524               'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 
     525               form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)). 
     526               '</p>', 
     527           
     528          "post_notes" => 
     529               '<p class="area" id="notes-area"><label for="post_notes">'.__('Personal notes:').'<span class="form-note">'. 
     530               __('Add unpublished notes.').'</span></label>'. 
     531               form::textarea('post_notes',50,5,html::escapeHTML($post_notes)). 
     532               '</p>' 
     533          ) 
     534     ); 
     535      
     536     # --BEHAVIOR-- adminPostFormItems 
     537     $core->callBehavior('adminPostFormItems',$main_items,$sidebar_items, isset($post) ? $post : null); 
     538 
     539     echo '<div class="multi-part" title="'.($post_id ? __('Edit entry') : __('New entry')).'" id="edit-entry">'; 
    411540     echo '<form action="post.php" method="post" id="entry-form">'; 
    412541     echo '<div id="entry-wrapper">'; 
    413542     echo '<div id="entry-content"><div class="constrained">'; 
     543 
     544     echo '<h3 class="hidden">'.__('Edit post').'</h3>'; 
     545      
     546     foreach ($main_items as $id => $item) { 
     547          echo $item; 
     548     } 
     549 
     550     # --BEHAVIOR-- adminPostForm (may be deprecated) 
     551     $core->callBehavior('adminPostForm',isset($post) ? $post : null); 
    414552      
    415553     echo 
    416      '<p class="col"><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:'). 
    417      form::field('post_title',20,255,html::escapeHTML($post_title),'maximal'). 
    418      '</label></p>'. 
    419       
    420      '<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'</label> '. 
    421      form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt)). 
    422      '</p>'. 
    423       
    424      '<p class="area"><label class="required" '. 
    425      'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 
    426      form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)). 
    427      '</p>'. 
    428       
    429      '<p class="area" id="notes-area"><label for="post_notes">'.__('Notes:').'</label>'. 
    430      form::textarea('post_notes',50,5,html::escapeHTML($post_notes)). 
    431      '</p>'; 
    432       
    433      # --BEHAVIOR-- adminPostForm 
    434      $core->callBehavior('adminPostForm',isset($post) ? $post : null); 
    435       
    436      echo 
    437      '<p>'. 
     554     '<p class="border-top">'. 
    438555     ($post_id ? form::hidden('id',$post_id) : ''). 
    439556     '<input type="submit" value="'.__('Save').' (s)" '. 
     
    460577     echo '<div id="entry-sidebar">'; 
    461578      
    462      echo 
    463      '<p><label for="cat_id">'.__('Category:'). 
    464      form::combo('cat_id',$categories_combo,$cat_id,'maximal'). 
    465      '</label></p>'. 
    466       
    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       
    479      '<p><label for="post_status">'.__('Entry status:'). 
    480      form::combo('post_status',$status_combo,$post_status,'','',!$can_publish). 
    481      '</label></p>'. 
    482       
    483      '<p><label for="post_dt">'.__('Published on:'). 
    484      form::field('post_dt',16,16,$post_dt,($bad_dt ? 'invalid' : '')). 
    485      '</label></p>'. 
    486       
    487      '<p><label for="post_format">'.__('Text formating:'). 
    488      form::combo('post_format',$formaters_combo,$post_format). 
    489      '</label>'. 
    490      '</p>'. 
    491      '<p>'.($post_id && $post_format != 'xhtml' ? '<a id="convert-xhtml" class="button" href="post.php?id='.$post_id.'&amp;xconv=1">'.__('Convert to XHTML').'</a>' : '').'</p>'. 
    492       
    493      '<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '. 
    494      __('Accept comments').'</label></p>'. 
    495      ($core->blog->settings->system->allow_comments ?  
    496           (isContributionAllowed($post_id,strtotime($post_dt),true) ?  
    497                '' : 
    498                '<p class="form-note warn">'.__('Warning: Comments are not more accepted for this entry.').'</p>') :  
    499           '<p class="form-note warn">'.__('Warning: Comments are not accepted on this blog.').'</p>'). 
    500  
    501      '<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '. 
    502      __('Accept trackbacks').'</label></p>'. 
    503      ($core->blog->settings->system->allow_trackbacks ?  
    504           (isContributionAllowed($post_id,strtotime($post_dt),false) ?  
    505                '' : 
    506                '<p class="form-note warn">'.__('Warning: Trackbacks are not more accepted for this entry.').'</p>') :  
    507           '<p class="form-note warn">'.__('Warning: Trackbacks are not accepted on this blog.').'</p>'). 
    508  
    509      '<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '. 
    510      __('Selected entry').'</label></p>'. 
    511       
    512      '<p><label for="post_lang">'.__('Entry lang:'). 
    513      form::combo('post_lang',$lang_combo,$post_lang). 
    514      '</label></p>'. 
    515       
    516      '<p><label for="post_password">'.__('Entry password:'). 
    517      form::field('post_password',10,32,html::escapeHTML($post_password),'maximal'). 
    518      '</label></p>'. 
    519       
    520      '<div class="lockable">'. 
    521      '<p><label for="post_url">'.__('Basename:'). 
    522      form::field('post_url',10,255,html::escapeHTML($post_url),'maximal'). 
    523      '</label></p>'. 
    524      '<p class="form-note warn">'. 
    525      __('Warning: If you set the URL manually, it may conflict with another entry.'). 
    526      '</p>'. 
    527      '</div>'; 
    528       
    529      # --BEHAVIOR-- adminPostFormSidebar 
     579     foreach ($sidebar_items as $id => $c) { 
     580          echo '<div id="'.$id.'" class="box">'. 
     581               '<h4>'.$c['title'].'</h4>'; 
     582          foreach ($c['items'] as $e_name=>$e_content) { 
     583               echo $e_content; 
     584          } 
     585          echo '</div>'; 
     586     } 
     587      
     588      
     589     # --BEHAVIOR-- adminPostFormSidebar (may be deprecated) 
    530590     $core->callBehavior('adminPostFormSidebar',isset($post) ? $post : null); 
    531       
    532591     echo '</div>';      // End #entry-sidebar 
    533592 
     
    560619     if ($can_edit_post && $core->auth->check('publish,contentadmin',$core->blog->id)) 
    561620     { 
    562           $combo_action[__('publish')] = 'publish'; 
    563           $combo_action[__('unpublish')] = 'unpublish'; 
    564           $combo_action[__('mark as pending')] = 'pending'; 
    565           $combo_action[__('mark as junk')] = 'junk'; 
     621          $combo_action[__('Publish')] = 'publish'; 
     622          $combo_action[__('Unpublish')] = 'unpublish'; 
     623          $combo_action[__('Mark as pending')] = 'pending'; 
     624          $combo_action[__('Mark as junk')] = 'junk'; 
    566625     } 
    567626      
     
    571630     } 
    572631      
     632     echo 
     633     '<div id="comments" class="multi-part" title="'.__('Comments').'">'; 
     634           
    573635     # --BEHAVIOR-- adminCommentsActionsCombo 
    574636     $core->callBehavior('adminCommentsActionsCombo',array(&$combo_action)); 
    575637      
    576638     $has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty()); 
    577       
    578      echo 
    579      '<div id="comments" class="multi-part" title="'.__('Comments').'">'; 
     639     echo  
     640     '<p class="top-add"><a class="button add onblog_link" href="#comment-form">'.__('Add a comment').'</a></p>'; 
    580641      
    581642     if ($has_action) { 
    582           echo '<form action="comments_actions.php" id="form-comments" method="post">'; 
    583      } 
    584       
    585      echo '<h3>'.__('Trackbacks').'</h3>'; 
     643          echo '<form action="comments_actions.php" id="form-comments" method="post" class="clear">'; 
     644     } 
     645      
     646     echo '<h3 class="clear">'.__('Trackbacks').'</h3>'; 
    586647      
    587648     if (!$trackbacks->isEmpty()) { 
     
    611672          '</form>'; 
    612673     } 
    613       
    614      echo '</div>'; 
    615 } 
    616  
    617 /* Add a comment 
    618 -------------------------------------------------------- */ 
    619 if ($post_id) 
    620 { 
     674     /* Add a comment 
     675     -------------------------------------------------------- */ 
     676 
    621677     echo 
    622      '<div class="multi-part" id="add-comment" title="'.__('Add a comment').'">'. 
     678     '<div class="fieldset clear">'. 
    623679     '<h3>'.__('Add a comment').'</h3>'. 
    624680      
    625681     '<form action="comment.php" method="post" id="comment-form">'. 
    626682     '<div class="constrained">'. 
    627      '<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:'). 
     683     '<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').'</label>'. 
    628684     form::field('comment_author',30,255,html::escapeHTML($core->auth->getInfo('user_cn'))). 
    629      '</label></p>'. 
    630       
    631      '<p><label for="comment_email">'.__('Email:'). 
     685     '</p>'. 
     686      
     687     '<p><label for="comment_email">'.__('Email:').'</label>'. 
    632688     form::field('comment_email',30,255,html::escapeHTML($core->auth->getInfo('user_email'))). 
    633      '</label></p>'. 
    634       
    635      '<p><label for="comment_site">'.__('Web site:'). 
     689     '</p>'. 
     690      
     691     '<p><label for="comment_site">'.__('Web site:').'</label>'. 
    636692     form::field('comment_site',30,255,html::escapeHTML($core->auth->getInfo('user_url'))). 
    637      '</label></p>'. 
     693     '</p>'. 
    638694      
    639695     '<p class="area"><label for="comment_content" class="required"><abbr title="'.__('Required field').'">*</abbr> '. 
     
    645701     $core->formNonce(). 
    646702     '<input type="submit" name="add" value="'.__('Save').'" /></p>'. 
    647      '</div>'. 
     703     '</div>'. #constrained 
     704 
    648705     '</form>'. 
    649      '</div>'; 
     706     '</div>'. #add comment 
     707     '</div>'; #comments 
    650708} 
    651709 
     
    677735     echo 
    678736     '<table class="comments-list"><tr>'. 
    679      '<th colspan="2">'.__('Author').'</th>'. 
     737     '<th colspan="2" class="first">'.__('Author').'</th>'. 
    680738     '<th>'.__('Date').'</th>'. 
    681739     '<th class="nowrap">'.__('IP address').'</th>'. 
    682740     '<th>'.__('Status').'</th>'. 
    683      '<th>&nbsp;</th>'. 
     741     '<th>'.__('Edit').'</th>'. 
    684742     '</tr>'; 
    685743      
     
    691749          switch ($rs->comment_status) { 
    692750               case 1: 
    693                     $img_status = sprintf($img,__('published'),'check-on.png'); 
     751                    $img_status = sprintf($img,__('Published'),'check-on.png'); 
    694752                    break; 
    695753               case 0: 
    696                     $img_status = sprintf($img,__('unpublished'),'check-off.png'); 
     754                    $img_status = sprintf($img,__('Unpublished'),'check-off.png'); 
    697755                    break; 
    698756               case -1: 
    699                     $img_status = sprintf($img,__('pending'),'check-wrn.png'); 
     757                    $img_status = sprintf($img,__('Pending'),'check-wrn.png'); 
    700758                    break; 
    701759               case -2: 
    702                     $img_status = sprintf($img,__('junk'),'junk.png'); 
     760                    $img_status = sprintf($img,__('Junk'),'junk.png'); 
    703761                    break; 
    704762          } 
     
    715773          '<td class="nowrap status">'.$img_status.'</td>'. 
    716774          '<td class="nowrap status"><a href="'.$comment_url.'">'. 
    717           '<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /></a></td>'. 
     775          '<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /> '.__('Edit').'</a></td>'. 
    718776           
    719777          '</tr>'; 
     
    723781} 
    724782 
    725 dcPage::helpBlock('core_post','core_wiki'); 
     783dcPage::helpBlock('core_post','core_trackbacks','core_wiki'); 
    726784dcPage::close(); 
    727785?> 
  • admin/post.php

    r1619 r1620  
    147147          try { 
    148148               $core->media = new dcMedia($core); 
    149           } catch (Exception $e) {} 
     149          } catch (Exception $e) { 
     150               $core->error->add($e->getMessage()); 
     151          } 
    150152     } 
    151153} 
  • admin/style/install.css

    r1583 r1620  
    66     Please see http://dotclear.net/ for more details. 
    77*/ 
     8html { 
     9     font-size: 62.5%; 
     10} 
    811body.install { 
    9      font: 0.875em Helvetica,Arial,sans-serif; 
    10      color: #000; 
    11      background-color: #fff; 
    12      line-height: 1.5em; 
     12     font: 1.2rem/1.5 Arial,Helvetica,sans-serif; 
     13     color: #333; 
     14     background: #fff; 
     15     margin: 0; 
     16     padding: 0; 
    1317} 
    1418body.install #content { 
     
    2226} 
    2327body.install h1,h2 { 
    24      font-family: Helvetica,arial,sans-serif; 
     28     font-family: arial,Helvetica,sans-serif; 
    2529} 
    2630body.install h1 { 
  • admin/style/install.css

    r1330 r1620  
    158158     border: 1px solid #2C8FD1; 
    159159} 
     160 
     161 
     162/* --------------------------------------------------------------- password indcator */ 
     163.pw-table { 
     164     display: table; 
     165     margin-bottom: 1em; 
     166} 
     167.pw-cell { 
     168     display: table-cell; 
     169     margin-bottom: 1em; 
     170} 
     171#pwindicator { 
     172     display: table-cell; 
     173     vertical-align: bottom; 
     174     padding-left: 1.5em; 
     175     height: 3.8em; 
     176} 
     177#pwindicator .bar { 
     178     height: 6px; 
     179     margin-bottom: 4px; 
     180} 
     181.pw-very-weak .bar { 
     182     background: #900; 
     183     width: 30px; 
     184} 
     185.pw-weak .bar { 
     186     background: #c00; 
     187     width: 60px; 
     188} 
     189.pw-mediocre .bar { 
     190     background: #f60; 
     191     width: 90px; 
     192} 
     193.pw-strong .bar { 
     194     background: #060; 
     195     width: 120px; 
     196} 
     197.pw-very-strong .bar { 
     198     background: #0c0; 
     199     width: 150px; 
     200} 
  • admin/update.php

    r1591 r1620  
    174174          dcPage::jsPageTabs($default_tab). 
    175175          dcPage::jsLoad('js/_update.js') 
    176      : '') 
     176          : ''), 
     177     dcPage::breadcrumb( 
     178          array( 
     179               __('System') => '', 
     180               '<span class="page-title">'.__('Dotclear update').'</span>' => '' 
     181          )) 
    177182); 
    178183 
    179184if (!$core->error->flag()) { 
    180      echo '<h2>'.__('Dotclear update').'</h2>'; 
    181       
    182185     if (!empty($_GET['nocache'])) { 
    183           dcPage::message(__('Manual checking of update done successfully.')); 
     186          dcPage::success(__('Manual checking of update done successfully.')); 
    184187     } 
    185188} 
     
    200203          echo 
    201204               '<p class="static-msg">'.sprintf(__('Dotclear %s is available.'),$new_v). 
    202                     ($version_info ? ' ('.sprintf(__('<a href=\"%s\">Information about this version</a>.'),$version_info).')' : ''). 
     205                    ($version_info ? ' <a href="'.$version_info.'">('.__('Information about this version').')</a>' : ''). 
    203206                    '</p>'. 
    204207           
  • admin/update.php

    r1553 r1620  
    249249     '<p class="message">'. 
    250250     __("Congratulations, you're one click away from the end of the update."). 
    251      ' <strong><a href="index.php?logout=1">'.__('Finish the update').'</a>.</strong>'. 
     251     ' <strong><a href="index.php?logout=1">'.__('Finish the update.').'</a></strong>'. 
    252252     '</p>'; 
    253253} 
  • admin/user.php

    r1583 r1620  
    1515dcPage::checkSuper(); 
    1616 
    17 $page_title = __('new user'); 
     17$page_title = __('New user'); 
    1818 
    1919$user_id = ''; 
     
    187187      
    188188     # --BEHAVIOR-- adminUserHeaders 
    189      $core->callBehavior('adminUserHeaders') 
     189     $core->callBehavior('adminUserHeaders'), 
     190 
     191     dcPage::breadcrumb( 
     192          array( 
     193               __('System') => '', 
     194               __('Users') => 'users.php', 
     195               '<span class="page-title">'.$page_title.'</span>' => '' 
     196          )) 
    190197); 
    191198 
    192199if (!empty($_GET['upd'])) { 
    193      dcPage::message(__('User has been successfully updated.')); 
     200     dcPage::success(__('User has been successfully updated.')); 
    194201} 
    195202 
    196203if (!empty($_GET['add'])) { 
    197      dcPage::message(__('User has been successfully created.')); 
    198 } 
    199  
    200 echo '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.$page_title.'</span></h2>'; 
     204     dcPage::success(__('User has been successfully created.')); 
     205} 
     206 
     207echo 
     208'<form action="user.php" method="post" id="user-form" class="fieldset">'. 
     209'<div class="two-cols">'. 
     210 
     211'<div class="col">'. 
     212'<h3>'.__('User profile').'</h3>'. 
     213 
     214'<p><label for="user_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('User ID:').'</label> '. 
     215form::field('user_id',20,255,html::escapeHTML($user_id)). 
     216'</p>'. 
     217'<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p>'; 
    201218 
    202219if ($user_id == $core->auth->userID()) { 
     
    231248 
    232249'<p><label for="new_pwd_c" '.($user_id != '' ? '' : 'class="required"').'>'. 
    233 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Confirm password:').' '. 
     250($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Confirm password:').'</label> '. 
    234251form::password('new_pwd_c',20,255). 
    235 '</label></p>'. 
    236  
    237 '<p><label for="user_name">'.__('Last Name:').' '. 
    238 form::field('user_name',20,255,html::escapeHTML($user_name)). 
    239 '</label></p>'. 
    240  
    241 '<p><label for="user_firstname">'.__('First Name:').' '. 
    242 form::field('user_firstname',20,255,html::escapeHTML($user_firstname)). 
    243 '</label></p>'. 
    244  
    245 '<p><label for="user_displayname">'.__('Display name:').' '. 
    246 form::field('user_displayname',20,255,html::escapeHTML($user_displayname)). 
    247 '</label></p>'. 
    248  
    249 '<p><label for="user_email">'.__('Email:').' '. 
    250 form::field('user_email',20,255,html::escapeHTML($user_email)). 
    251 '</label></p>'. 
    252 '<p class="form-note">'.__('Mandatory for password recovering procedure.').'</p>'. 
    253 '</div>'. 
    254  
    255 '<div class="col">'. 
    256 '<p><label for="user_url">'.__('URL:').' '. 
    257 form::field('user_url',30,255,html::escapeHTML($user_url)). 
    258 '</label></p>'. 
    259 '<p><label for="user_post_format">'.__('Preferred format:').' '. 
    260 form::combo('user_post_format',$formaters_combo,$user_options['post_format']). 
    261 '</label></p>'. 
    262  
    263 '<p><label for="user_post_status">'.__('Default entry status:').' '. 
    264 form::combo('user_post_status',$status_combo,$user_post_status). 
    265 '</label></p>'. 
    266  
    267 '<p><label for="user_edit_size">'.__('Entry edit field height:').' '. 
    268 form::field('user_edit_size',5,4,(integer) $user_options['edit_size']). 
    269 '</label></p>'. 
    270  
    271 '<p><label for="user_lang">'.__('User language:').' '. 
    272 form::combo('user_lang',$lang_combo,$user_lang,'l10n'). 
    273 '</label></p>'. 
    274  
    275 '<p><label for="user_tz">'.__('User timezone:').' '. 
    276 form::combo('user_tz',dt::getZones(true,true),$user_tz). 
    277 '</label></p>'; 
     252'</p>'; 
    278253 
    279254if ($core->auth->allowPassChange()) { 
     
    285260 
    286261$super_disabled = $user_super && $user_id == $core->auth->userID(); 
    287  
    288262echo 
    289263'<p><label for="user_super" class="classic">'.form::checkbox('user_super','1',$user_super,'','',$super_disabled).' '. 
    290264__('Super administrator').'</label></p>'. 
     265 
     266'<p><label for="user_name">'.__('Last Name:').'</label> '. 
     267form::field('user_name',20,255,html::escapeHTML($user_name)). 
     268'</p>'. 
     269 
     270'<p><label for="user_firstname">'.__('First Name:').'</label> '. 
     271form::field('user_firstname',20,255,html::escapeHTML($user_firstname)). 
     272'</p>'. 
     273 
     274'<p><label for="user_displayname">'.__('Display name:').'</label> '. 
     275form::field('user_displayname',20,255,html::escapeHTML($user_displayname)). 
     276'</p>'. 
     277 
     278'<p><label for="user_email">'.__('Email:').'</label> '. 
     279form::field('user_email',20,255,html::escapeHTML($user_email)). 
     280'</p>'. 
     281'<p class="form-note">'.__('Mandatory for password recovering procedure.').'</p>'. 
     282 
     283'<p><label for="user_url">'.__('URL:').'</label> '. 
     284form::field('user_url',30,255,html::escapeHTML($user_url)). 
     285'</p>'. 
    291286'</div>'. 
    292 '</div>'. 
    293 '</fieldset>'; 
     287 
     288'<div class="col">'. 
     289'<h3>'.__('Options').'</h3>'. 
     290'<h4>'.__('Interface').'</h4>'. 
     291'<p><label for="user_lang">'.__('Language:').'</label> '. 
     292form::combo('user_lang',$lang_combo,$user_lang,'l10n'). 
     293'</p>'. 
     294 
     295'<p><label for="user_tz">'.__('Timezone:').'</label> '. 
     296form::combo('user_tz',dt::getZones(true,true),$user_tz). 
     297'</p>'. 
     298 
     299'<h4>'.__('Edition').'</h4>'. 
     300'<p><label for="user_post_format">'.__('Preferred format:').'</label> '. 
     301form::combo('user_post_format',$formaters_combo,$user_options['post_format']). 
     302'</p>'. 
     303 
     304'<p><label for="user_post_status">'.__('Default entry status:').'</label> '. 
     305form::combo('user_post_status',$status_combo,$user_post_status). 
     306'</p>'. 
     307 
     308'<p><label for="user_edit_size">'.__('Entry edit field height:').'</label> '. 
     309form::field('user_edit_size',5,4,(integer) $user_options['edit_size']). 
     310'</p>'; 
    294311 
    295312# --BEHAVIOR-- adminUserForm 
    296313$core->callBehavior('adminUserForm',isset($rs) ? $rs : null); 
    297314 
     315echo  
     316'</div>'. 
     317'</div>'; 
     318 
     319 
    298320echo 
    299 '<p><label for="your_pwd" '.($user_id != '' ? '' : 'class="required"').'>'. 
    300 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Your password:'). 
    301 form::password('your_pwd',20,255).'</label></p>'. 
     321'<p class="clear border-top"><label for="your_pwd" class="required">'. 
     322'<abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').'</label>'. 
     323form::password('your_pwd',20,255).'</p>'. 
    302324'<p class="clear"><input type="submit" name="save" accesskey="s" value="'.__('Save').'" />'. 
    303325($user_id != '' ? '' : ' <input type="submit" name="saveplus" value="'.__('Save and create another').'" />'). 
     
    310332if ($user_id) 
    311333{ 
    312      echo '<div class="clear fieldset"><h3>'.__('Permissions').'</h3>'. 
    313      '<form action="users_actions.php" method="post">'. 
    314      '<p><input type="submit" value="'.__('Add new permissions').'" />'. 
    315      form::hidden(array('redir'),'user.php?id='.$user_id). 
    316      form::hidden(array('action'),'blogs'). 
    317      form::hidden(array('users[]'),$user_id). 
    318      $core->formNonce(). 
    319      '</p>'. 
    320      '</form>'; 
    321       
    322      $permissions = $core->getUserPermissions($user_id); 
    323      $perm_types = $core->auth->getPermissionsTypes(); 
    324       
    325      if (count($permissions) == 0) 
     334     echo '<div class="clear fieldset">'. 
     335     '<h3>'.__('Permissions').'</h3>'; 
     336 
     337     if (!$user_super) 
    326338     { 
    327           echo '<p>'.__('No permissions.').'</p>'; 
    328      } 
    329      else 
    330      { 
    331           foreach ($permissions as $k => $v) 
     339          echo 
     340          '<form action="users_actions.php" method="post">'. 
     341          '<p><input type="submit" value="'.__('Add new permissions').'" />'. 
     342          form::hidden(array('redir'),'user.php?id='.$user_id). 
     343          form::hidden(array('action'),'blogs'). 
     344          form::hidden(array('users[]'),$user_id). 
     345          $core->formNonce(). 
     346          '</p>'. 
     347          '</form>'; 
     348           
     349          $permissions = $core->getUserPermissions($user_id); 
     350          $perm_types = $core->auth->getPermissionsTypes(); 
     351           
     352          if (count($permissions) == 0) 
    332353          { 
    333                if (count($v['p']) > 0) 
     354               echo '<p>'.__('No permissions so far.').'</p>'; 
     355          } 
     356          else 
     357          { 
     358               foreach ($permissions as $k => $v) 
    334359               { 
    335                     echo  
    336                     '<form action="users_actions.php" method="post">'. 
    337                     '<h4><a href="blog.php?id='.html::escapeHTML($k).'">'. 
    338                     html::escapeHTML($v['name']).'</a> ('.html::escapeHTML($k).')</h4>'; 
    339                      
    340                     echo '<ul>'; 
    341                     foreach ($v['p'] as $p => $V) { 
    342                          if (isset($perm_types[$p])) { 
    343                               echo '<li>'.__($perm_types[$p]).'</li>'; 
     360                    if (count($v['p']) > 0) 
     361                    { 
     362                         echo  
     363                         '<form action="users_actions.php" method="post">'. 
     364                         '<p class="blog-perm">'.__('Blog:').' <a href="blog.php?id='.html::escapeHTML($k).'">'. 
     365                         html::escapeHTML($v['name']).'</a> ('.html::escapeHTML($k).')</p>'; 
     366                          
     367                         echo '<ul class="ul-perm">'; 
     368                         foreach ($v['p'] as $p => $V) { 
     369                              if (isset($perm_types[$p])) { 
     370                                   echo '<li>'.__($perm_types[$p]).'</li>'; 
     371                              } 
    344372                         } 
     373                         echo 
     374                         '</ul>'. 
     375                         '<p class="add-perm"><input type="submit" class="reset" value="'.__('Change permissions').'" />'. 
     376                         form::hidden(array('redir'),'user.php?id='.$user_id). 
     377                         form::hidden(array('action'),'perms'). 
     378                         form::hidden(array('users[]'),$user_id). 
     379                         form::hidden(array('blogs[]'),$k). 
     380                         $core->formNonce(). 
     381                         '</p>'. 
     382                         '</form>'; 
    345383                    } 
    346                     echo '</ul>'. 
    347                     '<p><input type="submit" value="'.__('Change permissions').'" />'. 
    348                     form::hidden(array('redir'),'user.php?id='.$user_id). 
    349                     form::hidden(array('action'),'perms'). 
    350                     form::hidden(array('users[]'),$user_id). 
    351                     form::hidden(array('blogs[]'),$k). 
    352                     $core->formNonce(). 
    353                     '</p>'. 
    354                     '</form>'; 
    355                } 
    356           } 
    357      } 
    358       
     384               } 
     385          }     
     386 
     387     }  
     388     else { 
     389          echo '<p>'.sprintf(__('User %s is super admin.'),$user_id).'</p>'; 
     390     }     
    359391     echo '</div>'; 
    360392} 
  • admin/user.php

    r1609 r1620  
    172172dcPage::open($page_title, 
    173173     dcPage::jsConfirmClose('user-form'). 
     174     dcPage::jsLoad('js/jquery/jquery.pwstrength.js'). 
     175          '<script type="text/javascript">'."\n". 
     176          "//<![CDATA[\n". 
     177          "\$(function() {\n". 
     178          "    \$('#new_pwd').pwstrength({texts: ['". 
     179                    sprintf(__('Password strength: %s'),__('very weak'))."', '". 
     180                    sprintf(__('Password strength: %s'),__('weak'))."', '". 
     181                    sprintf(__('Password strength: %s'),__('mediocre'))."', '". 
     182                    sprintf(__('Password strength: %s'),__('strong'))."', '". 
     183                    sprintf(__('Password strength: %s'),__('very strong'))."']});\n". 
     184          "});\n". 
     185          "\n//]]>\n". 
     186          "</script>\n". 
    174187      
    175188     # --BEHAVIOR-- adminUserHeaders 
     
    211224 
    212225echo 
    213 '<p><label for="new_pwd" '.($user_id != '' ? '' : 'class="required"').'>'. 
    214 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> '). 
    215 ($user_id != '' ? __('New password:') : __('Password:')).'</label> '. 
    216 form::password('new_pwd',20,255). 
    217 '</p>'. 
     226'<form action="user.php" method="post" id="user-form">'. 
     227'<fieldset><legend>'.__('User information').'</legend>'. 
     228'<div class="two-cols">'. 
     229'<div class="col">'. 
     230'<p><label for="user_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Username:').' '. 
     231form::field('user_id',20,255,html::escapeHTML($user_id)). 
     232'</label></p>'. 
     233'<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p>'. 
     234 
     235'<div class="pw-table">'. 
     236     '<p class="pw-cell">'. 
     237          '<label for="new_pwd" '.($user_id != '' ? '' : 'class="required"').'>'. 
     238          ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> '). 
     239          ($user_id != '' ? __('New password:') : __('Password:')).'</label>'. 
     240          form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" '). 
     241     '</p>'. 
     242     '<div id="pwindicator">'. 
     243     '    <div class="bar"></div>'. 
     244    '    <p class="label no-margin"></p>'. 
     245    '</div>'. 
     246'</div>'. 
    218247'<p class="form-note">'.__('Password must contain at least 6 characters.').'</p>'. 
    219248 
  • admin/users_actions.php

    r1555 r1620  
    131131/* DISPLAY 
    132132-------------------------------------------------------- */ 
     133if (!empty($users) && empty($blogs) && $action == 'blogs') { 
     134     $breadcrumb = dcPage::breadcrumb( 
     135          array( 
     136               __('System') => '', 
     137               __('Users') => 'users.php', 
     138               '<span class="page-title">'.__('Permissions').'</span>' => '' 
     139          )); 
     140} else { 
     141     $breadcrumb = dcPage::breadcrumb( 
     142          array( 
     143               __('System') => '', 
     144               __('Users') => 'users.php', 
     145               '<span class="page-title">'.__('Actions').'</span>' => '' 
     146          )); 
     147} 
     148 
    133149dcPage::open( 
    134150     __('Users'), 
    135151     dcPage::jsLoad('js/_users_actions.js'). 
    136152     # --BEHAVIOR-- adminUsersActionsHeaders 
    137      $core->callBehavior('adminUsersActionsHeaders') 
     153     $core->callBehavior('adminUsersActionsHeaders'), 
     154     $breadcrumb 
    138155); 
    139156 
     
    162179} 
    163180 
     181echo '<p><a class="back" href="'.html::escapeURL($redir).'">'.__('Back to user profile').'</a></p>'; 
     182 
    164183# --BEHAVIOR-- adminUsersActionsContent 
    165184$core->callBehavior('adminUsersActionsContent',$core,$action,$hidden_fields); 
     
    177196     } 
    178197      
    179      echo  
    180      '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.__('Permissions').'</span></h2>'. 
     198     echo 
    181199     '<p>'.sprintf( 
    182200          __('Choose one or more blogs to which you want to give permissions to users %s.'), 
     
    239257      
    240258     echo  
    241      '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.__('Permissions').'</span></h2>'. 
    242259     '<p>'.sprintf( 
    243260          __('You are about to change permissions on the following blogs for users %s.'), 
     
    248265     foreach ($blogs as $b) 
    249266     { 
    250           echo '<h3><a href="blog.php?id='.html::escapeHTML($b).'">'.html::escapeHTML($b).'</a>'. 
     267          echo '<h3>'.('Blog:').' <a href="blog.php?id='.html::escapeHTML($b).'">'.html::escapeHTML($b).'</a>'. 
    251268          form::hidden(array('blogs[]'),$b).'</h3>'; 
    252269           
     
    268285      
    269286     echo 
    270      '<fieldset><legend>'.__('Validate permissions').'</legend>'. 
    271      '<p><label for="your_pwd" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:'). 
    272      form::password('your_pwd',20,255).'</label></p>'. 
    273      '</fieldset>'. 
     287     '<div class="fieldset">'. 
     288     '<h3>'.__('Validate permissions').'</h3>'. 
     289     '<p><label for="your_pwd">'.__('Your password:').'</label>'. 
     290     form::password('your_pwd',20,255).'</p>'. 
    274291     '<p><input type="submit" accesskey="s" value="'.__('Save').'" />'. 
    275292     $hidden_fields. 
    276293     form::hidden(array('action'),'updateperm'). 
    277294     $core->formNonce().'</p>'. 
     295     '</div>'. 
    278296     '</form>'; 
    279297} 
    280  
    281 echo '<p><a class="back" href="'.html::escapeURL($redir).'">'.__('back').'</a></p>'; 
    282298 
    283299dcPage::close(); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map