Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Comments 2.7

  1. #1
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,914
    Blog Entries
    88
    Thanks
    519
    Thanked 845 Times in 550 Posts

    Default Comments 2.7

    Comments
    Version: 2.7
    Author: Nick Ramsay
    Created: 2009/07
    Last Updated:
    2013/06/16
    Tested on: Hotaru 1.5.2
    Plugins Required: Users
    Plug & Play: Yes
    Supported: Yes

    Description
    Enable your registered users to comment on each post. Supports avatars (e.g. Gravatar plugin), replies, unlimited nesting, editing, HTML tags (chosen by the Admin) and comment subscription. Note: You can't vote on comments yet, maybe in a later version or through a separate plugin.

    Instructions
    1. Upload the "comments" folder to your plugins folder.
    2. Install it from Plugin Management in Admin.
    3. Edit options from the plugin settings page.

    Revision History
    v.2.7 2013/06/16 - shibuya246 - query updates
    v.2.6 2010/08/12 - petsagouris - Updated rss function for Hotaru 1.4.1
    - Nick - Ensured nothing from this plugin shows on Submit step 3
    - Nick - Moved some core "addComment" code into a "preAddComment" function.
    v.2.5 2010/07/24 - Nick - Moved "comments_post_last_form" plugin hook
    v.2.4 2010/07/20 - Nick - Edits to CSS for comments
    v.2.3 2010/07/15 - Nick - Reimplemented admin stats
    v.2.2 2010/07/07 - Nick - Fix for page load continuing after displaying the RSS feed
    v.2.1 2010/05/23 - Nick - Removed the requirement to have SB Base installed.
    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
    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
    v.1.8 2010/03/18 - Nick - Fix for not sending comment subscriptions when using SMTP email authentication.
    v.1.7 2010/03/11 - Nick - Fix for a previous change that broke the set pending and delete links within comments.
    v.1.6 2010/02/26 - Nick - Adds link to profile navigation; Email changed to go through Hotaru's "email" function
    v.1.5 2009/02/23 - Nick - Shows messages for moderated comments: "Awaiting approval", "Exceeded Daily Limit", etc.
    v.1.4 2010/02/20 - Nick - Option to hide comments after X down votes, plus pagination code changes
    v.1.3 2009/01/17 - Nick - Added option for avatar size
    v.1.2 2009/12/30 - Nick - Updates for compatibility with Hotaru 1.0
    v.1.1 2009/11/25 - Nick - Bug fix for comment form closing when a post is edited by a non-admin user (requires Submit 1.5)
    v.1.0 2009/11/01 - Nick - Added "All comments" page, comments RSS, pagination, comments per page, comment order
    v.0.9 2009/10/24 - Nick - Added ability to open/close the comment thread on individual posts.
    v.0.8 2009/10/23 - Nick - Fix for Akismet overriding the status of comments from "undermod" users
    v.0.7 2009/10/21 - Nick - Adds "status" field and option for setting new comments as "pending"
    v.0.6 2009/10/18 - Nick - Added functions for deleting comments when a post or user is deleted
    v.0.5 2009/10/15 - Nick - Changed CSS "comments_comments_link" to simply "comment_link" & added a new plugin hook
    v.0.4 2009/10/07 - Nick - Updates for compatibility with Hotaru 0.7
    v.0.3 2009/10/01 - Nick - Updates for compatibility with Hotaru 0.6
    v.0.2 2009/08/30 - Nick - Fixed Reply/Edit bug, newline bug, save settings bug and added email address option
    v.0.1 2009/08/29 - Nick - Released first version

    Please click "Rate Thread" and give this plugin a rating. Thank you.
    Attached Thumbnails Attached Thumbnails hotaru_comments_2009_08_29.png   comments.png  
    Attached Files Attached Files
    Last edited by carlo75; 02-06-2010 at 02:18 PM.

  2. Thanked by:


  3. #2
    Member
    Join Date
    Sep 2009
    Posts
    66
    Thanks
    53
    Thanked 6 Times in 6 Posts

    Default

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

  4. #3
    Admin & Design JonH's Avatar
    Join Date
    Jun 2009
    Location
    New Braunfels, Texas
    Posts
    248
    Thanks
    57
    Thanked 49 Times in 30 Posts

    Default

    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.

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

  5. #4
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,914
    Blog Entries
    88
    Thanks
    519
    Thanked 845 Times in 550 Posts

    Default

    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 Code:
         /**
         * 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 Code:
    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.

  6. #5
    Admin & Design JonH's Avatar
    Join Date
    Jun 2009
    Location
    New Braunfels, Texas
    Posts
    248
    Thanks
    57
    Thanked 49 Times in 30 Posts

    Default

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

  7. #6
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,914
    Blog Entries
    88
    Thanks
    519
    Thanked 845 Times in 550 Posts

    Default

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

  8. #7
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,914
    Blog Entries
    88
    Thanks
    519
    Thanked 845 Times in 550 Posts

    Default

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

  9. #8
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,914
    Blog Entries
    88
    Thanks
    519
    Thanked 845 Times in 550 Posts

    Default

    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.

  10. #9
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,914
    Blog Entries
    88
    Thanks
    519
    Thanked 845 Times in 550 Posts

    Default

    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).

  11. #10
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,914
    Blog Entries
    88
    Thanks
    519
    Thanked 845 Times in 550 Posts

    Default

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •