Changeset 2049

Show
Ignore:
Timestamp:
07/23/10 23:46:08 (22 months ago)
Author:
nick_ramsay
Message:

[Branch 1.4] Comments 2.5 - Moved "comments_post_last_form" plugin hook so the Journal plugin can add a a open/close comment form link more easily.

Location:
branches/1.4/content/plugins/comments
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/1.4/content/plugins/comments/comments.php

    r2042 r2049  
    33 * name: Comments 
    44 * description: Enables logged-in users to comment on posts 
    5  * version: 2.4 
     5 * version: 2.5 
    66 * folder: comments 
    77 * class: Comments 
     
    361361                 
    362362                $this->checkCommentDetails($h); 
     363 
     364                if ($h->currentUser->getPermission('can_access_admin') == 'yes') { 
     365                        echo "<ul id='post_comments_admin'>"; 
     366                        if ($h->currentUser->getPermission('can_comment_manager_settings') == 'yes') { 
     367                                echo "<li id='comment_manager_link'><a href='" . $h->url(array('page'=>'plugin_settings', 'plugin'=>'comment_manager'), 'admin') . "'>" . $h->lang['comments_access_comment_manager'] . "</a></li>"; 
     368                        } 
     369         
     370                        $h->pluginHook('comments_post_last_form'); 
     371         
     372                        echo "</ul>"; 
     373                } 
    363374        } 
    364375         
     
    488499        $h->vars['subscribe'] = ($h->comment->subscribe) ? 'checked' : ''; 
    489500        $h->displayTemplate('comment_form', 'comments', false); 
    490          
    491         $h->pluginHook('comments_post_last_form'); 
    492          
    493         if ($h->currentUser->getPermission('can_comment_manager_settings') == 'yes') { 
    494             echo "<a id='comment_manager_link' href='" . $h->url(array('page'=>'plugin_settings', 'plugin'=>'comment_manager'), 'admin') . "'>"; 
    495             echo $h->lang['comments_access_comment_manager'] . "</a>"; 
    496         } 
    497501    } 
    498502     
  • branches/1.4/content/plugins/comments/css/comments.css

    r2039 r2049  
    5858} 
    5959 
    60 #comment_manager_link { 
     60#post_comments_admin { 
    6161        float: right; 
    62         text-align: right;       
     62        text-align: right; 
     63} 
     64 
     65#post_comments_admin li { 
     66        padding: 0; 
    6367} 
    6468 
  • branches/1.4/content/plugins/comments/readme.txt

    r2042 r2049  
    1515Changelog 
    1616--------- 
     17v.2.5 2010/07/24 - Nick - Moved "comments_post_last_form" plugin hook 
    1718v.2.4 2010/07/20 - Nick - Edits to CSS for comments 
    1819v.2.3 2010/07/15 - Nick - Reimplemented admin stats