ThemeShaper Forums » Thematic

Thematic and Intense Debate

(10 posts)
  • Started 2 years ago by giofilo
  • Latest reply from giofilo
  • This topic is resolved
  1. Hi,

    I installed Intense Debate on my WP blog.

    I have a problem: Intense Debate requires the function comments_popup_link() to work properly.
    How can I add this function to my thematic theme?
    I think I have to look into the file "content-extensions.php", but I don't know what to do...

    Any help is appreciated!

    Thanks,
    Giovanni

    Posted 2 years ago #
  2. Hi giofilo-

    I might be getting this wrong but... I think that you need that function because the plugin filters it to show the true number of comments since it is handling comments for WordPress.

    This is difficult because comments_popup_link() echoes and can't be returned as a variable. If the results could be stored instead of echoed I think filtering thematic_postfooter or thematic_postcomments would be the way to go.

    Also an added problem with using this plugin in conjunction with thematic 0.9.5.1 It allows for the comments of password protected posts to show in the clear.

    Im not really sure how to suggest you proceed. Where exactly do you want your comment meta to appear in the post entry area of the loop?

    -Gene

    Posted 2 years ago #
  3. Hi Gene and thank you for your reply!

    I think that you need that function because the plugin filters it to show the true number of comments since it is handling comments for WordPress.

    Yes, this is exactly the reason why I have to use the commments_popup_link().

    Unfortunatly, if I don't use this function, the number of comments at the end of my posts is always incorrect.

    If you say that there is not a way to use this function... well, I will uninstall IntenseDebate plugin :-)

    Giovanni

    Posted 2 years ago #
  4. Giovanni-

    Yes, you can use that plugin and that function with thematic.... As long as you don't mind the comments showing for password protected posts. I'm hopeful that issue will get addressed in a future Thematic release.

    Using that function with Thematic could be a bit tricky but it's within the realm of possibility. The problem is since it echoes the comment meta data, when you call it from within a filter function the meta data is echoed before the markup is returned.

    Show me a link to the site in question, describe where you want the comment meta data and I'll see what I can come up with.

    -Gene

    Posted 2 years ago #
  5. Hi Gene,

    This is my site: http://www.giofilo.it/
    And I want to put the comments_popup_link() function here: http://img267.imageshack.us/img267/6232/commenti.jpg (I highlighted the italian text with comments number at the end of each post).

    Thank you very much for your help and sorry for my bad english.

    Giovanni

    Posted 2 years ago #
  6. Hi-

    As far as the password protected post comments Intense Debate doesnt support that currently. So it's an issue that can be resolved by thematic.
    ref: http://getsatisfaction.com/intensedebate/topics/how_to_hide_comments_in_private_posts_wordpress
    and also beware the comment threading does not import and export between WordPress 2.7 and up with Intense Debate
    ref: http://www.intensedebate.com/faq#li638

    We'll avoid the filter function and instead use add_action to deal with the commments_popup_link() This is a messy fix but here goes:

    function my_post_footer() {
    
    global $id, $post;
    
        if ($post->post_type == 'page' && current_user_can('edit_posts')) { /* For logged-in "page" search results */
            $postfooter = '<div class="entry-utility">' . '<span class="edit">' . thematic_postfooter_posteditlink() . '</span>';
            $postfooter .= "</div><!-- .entry-utility -->\n";
        } elseif ($post->post_type == 'page') { /* For logged-out "page" search results */
            $postfooter = '';
        } else {
            if (is_single()) {
                $postfooter = '<div class="entry-utility">' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() . ' | ';
            } else {
                $postfooter = '<div class="entry-utility">' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() . '  ';
            }
        }
         echo $postfooter;
    
    }
    add_action('thematic_postfooter', 'my_post_footer', 1);
    
    function my_comments_popup_link() {
         comments_popup_link();
           if (current_user_can('edit_posts')) {
               $postfooter = ' <span class="meta-sep meta-sep-edit">|</span> ' . thematic_postfooter_posteditlink();
           }
        $postfooterclose = "</div><!-- .entry-utility -->\n";
    
        echo $postfooter, $postfooterclose;
    }
    add_action('thematic_postfooter', 'my_comments_popup_link', 2);

    -Gene

    Posted 2 years ago #
  7. Thank You Gene,

    I put your code in functions.php, but I get this error:

    Fatal error: Call to undefined function thematic_postfooter_postcategory() in /home/mhd-01/www.giofilo.it/htdocs/wp-content/themes/giofilo/functions.php on line 16

    Posted 2 years ago #
  8. Hi,

    you need to use the latest SVN revision of Thematic.

    Chris

    Posted 2 years ago #
  9. @giofilo - Ack! Sorry for not mentioning that you needed to use the svn version of thematic with this function

    @Chris - thanks

    Posted 2 years ago #
  10. Thank you guys, now it works! ;-)

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.