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

Sites map