1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Comments 2.9

Enable your registered users to comment on each post.

  1. Nick

    Nick Well-Known Member

    shibuya246 submitted a new resource:

    Comments - Enable your registered users to comment on each post.

    Read more about this resource...
     

    Attached Files:

    Last edited by a moderator: Feb 6, 2010
    z3r082, richrf, skorpyo and 1 other person like this.
  2. davidshq

    davidshq Member

    Awesome!!! The gravatar support is a killer feature.
    Dave.
     
  3. JonH

    JonH Admin & Design

    Hey Nick,

    I'm trying to place the story's link to the comment section in another spot (underneath the title) but I couldn't find it in the comments plugin templates. The 'submit_show_post_extra_fields' plugin hook in the 'submit' plugin looks like it's used for both comments and tags plugins but the template I'm trying to clone has them in separate spots.

    Also, the story comment link in list.php of the submit plugin links to the story page which works fine but kinda useless on post.php (single story page) since it's the same page. Sooo for post.php change to something like:

    Code:
    <a href="#comments"> 3 comments </a>
    Or something similar to the sidebar comment links e.g. #c1

    A small HTML change in the template but can't find a comment only hook that will show the count. :D

    Update: I think this is it in comments.php:
    Code:
    echo "<h2>" . $this->hotaru->comment->countComments(false) . "</h2>\n";
     
  4. Nick

    Nick Well-Known Member

    All right! (rubs hands together)

    Two problems there. Let's take them backwards. First, the link that displays the comment count is hard coded into comments.php:

    PHP:
         /**
         * Link to comments
         */
        
    public function submit_show_post_extra_fields()
        {
            echo 
    '<li><a class="comment_link" href="' $this->hotaru->url(array('page'=>$this->hotaru->post->id)) . '">' $this->hotaru->comment->countComments() . '</a></li>' "\n";
        }
    So you're trying to skip that and directly pull in the comments. What you posted *should* work, but change your code to this:
    PHP:
    echo "<h2>" $hotaru->comment->countComments(false) . "</h2>\n";
    The golden rule here is that templates are outside of the plugin class so they can't use $this. So use $hotaru in templates.

    That should get you your comment count.

    The bigger problem is how to split plugin hooks, and the answer to that is here. :cool:
     
  5. JonH

    JonH Admin & Design

    Thanks, will try. Ahh yes documentation! :) . I feel like such a hypocrite since I gripe about people who don't search :eek:
     
  6. Nick

    Nick Well-Known Member

    Updated: v.1.5 2009/02/23 - Nick - Shows messages for moderated comments: "Awaiting approval", "Exceeded Daily Limit", etc. (requires Hotaru 1.1.1)
     
  7. Nick

    Nick Well-Known Member

    Updated: v.1.6 2010/02/26 - Nick - Adds link to profile navigation; Email changed to go through Hotaru's "email" function.
     
  8. Nick

    Nick Well-Known Member

    Updated: v.1.7 2010/03/11 - Nick - Fix for a previous change that broke the set pending and delete links within comments. No template/language/css edits necessary.
     
  9. Nick

    Nick Well-Known Member

    Updated: v.1.8 2010/03/18 - Nick - Fix for not sending comment subscriptions when using SMTP email authentication (no template or css changes necessary).
     
  10. Nick

    Nick Well-Known Member

    Updated:
    v.1.9 2010/03/26 - shibuya246 - Fix for duplicate comments posted when double clicking "Submit"
    v.1.9 2010/03/26 - Ties - New JavaScript urldecode function that works with Japanese characters
    v.1.9 2010/03/26 - Nick - Change to countComments() function call

    Requires Hotaru 1.1.4.

    There's one template change. See here.
     
  11. ties

    ties Theme & Plugin Development

    nice, teamwork ftw!
     
  12. Nick

    Nick Well-Known Member

    Imaginary high fives! ;)
     
  13. ties

    ties Theme & Plugin Development

    up top, down low, too slow! :D
     
  14. Nick

    Nick Well-Known Member

    Updated for Hotaru 1.2

    v.2.0 2010/05/02
    - Nick - Function changes for earier extending, and changed "comments_wrapper" from an id to a class.
    - Nick - Uses new function in Hotaru 1.2 to convert text urls into clickable links
     
  15. seekyt

    seekyt Donor Donor

    Hi Nick,

    There is a strange issue with Comments 2.6 on my end. My hosting won't allow more than 500 emails to be sent per hour, so I went in and disabled sending email to admins after a new comment a few weeks ago, but I'm still getting emails. Is there a way to unsubscribe the admin from all comments?

    Also, I set comments to "automatically approve all," but for some reason, any comments that I, the admin, make are held for moderation under the "pending" status. It only seems to affect me a few select members for some reason. I don't see any bugs in the error log related to the comment plugin, so I'm not sure what the problem is. Any ideas or suggestions?
     
  16. Nick

    Nick Well-Known Member

    Regarding your first point about emails, there are two kinds: notification of new comments, and the actual comments themselves. You can disable notification, but you can't disable the sending of comments. On the Comments settings page there is a field where you specify where comments should be sent, e.g. comments@example.com. All comments (whether you're subscribed or not) are sent to that address and then BCC'd to the individual subscribers. This is done to avoid revealing each subscriber's email address if sent directly to all subscribers. You'd have to edit the code to change if you want to change that behavior, but a 500 email limit by your host severely limits your ability to grow your site.

    As for the second point, are you using Akismet? If so, try disabling it.
     
  17. seekyt

    seekyt Donor Donor

    Thanks Nick. I totally forgot about akismet, and I'm sure that's what the deal must be.

    I hate the 500 limit.. it's supposed to be an "unlimited" package, so I'll see what I can do. I have been getting 20-30 emails an hour on comments and DM from the site, and have already had to switch to an external email provider (mail chimp) to send emails out, which gets expensive.

    I have left the "send comments to" field blank, but I get a copy of all comments sent to me anyway. I'll try to find and comment-out that setting in the comments plugin.

    Thanks for the help!
     
  18. alimrb

    alimrb New Member

    cms ver: 1.4.2
    comments ver:2.6

    after comment for a post, a white page appears without redirect to the post page.
     
  19. Graeme

    Graeme Member

    can users delete their own comments anywhere?
     
  20. Nick

    Nick Well-Known Member

    There's a permission, "can delete comments". By default it's set to yes for admins and supermods, but no for everybody else. You can change this for individual users in their profile pages, or for entire usergroups in User Manager.
     
    Graeme and shibuya246 like this.

Share This Page