ThemeShaper Forums » Thematic

[closed]

Replacing comments with Facebook comments

(5 posts)
  • Started 1 year ago by initialsbr
  • Latest reply from initialsbr
  • This topic is not resolved
  1. initialsbr
    Member

    I'm trying to replace the comments section with Facebook comments a la...

    http://wp.tutsplus.com/tutorials/add-facebook-comments-to-your-wordpress-theme/

    In my functions.php I appear to have all the components working with this code...

    //Facebook Comments

    function remove_comments(){
    if (is_page()){
    remove_action('thematic_comments_template','thematic_include_comments',5);
    }
    }
    add_action('template_redirect','remove_comments');

    function fbheader () { ?>
    <meta property='fb:app_id' content='128410070627168' />
    <?php
    }
    add_action('thematic_header', 'fbheader');

    function fbcomments() { ?>
    <div id="fbcomments"><div id="fb-root"></div>
    <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
    <fb:comments href="<?php the_permalink(); ?>" width="640"></fb:comments></div>
    <?php
    }
    add_action('thematic_abovecomments', 'fbcomments');

    function fbcount () { ?>
    <iframe src="http://www.facebook.com/plugins/comments.php?href=<?php the_permalink(); ?>&permalink=1" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:130px; height:16px;" allowTransparency="true"></iframe>
    <?php
    }
    add_action('thematic_postfooter', 'fbcount');

    Two concerns...

    1.) To remove the normal comments section, in my CSS, I have

    #comments {
    display:none;
    }

    Should I be using some kind of remove_action filter?

    2.) function fbcount replaces the whole postfooter and adds the Facebook-ey graphic there. I just want to either add the Facebook-ey comment count at the end of the postfooter in the same line after the tags or just make the normal comment count reference the Facebook comment count. Any suggestions?

    Posted 1 year ago #
  2. initialsbr
    Member

    Anybody got any insight here?

    Posted 1 year ago #
  3. Thematic moved. Try here; http://thematictheme.com/

    Posted 1 year ago #
  4. thematic did move! whooo. but as for the facebook comments questions.... i use the awd facebook plugin for just about everything, but i think i did need to make some tweaks to get the comments to show.

    so i create a small plugin that does this in the most brain dead simple way. i hacked someone else's plugin and replaced the code with the iframe versions from fb and put in a small filter to switch out the comments template. should work right out of the box.
    https://github.com/helgatheviking/KIA-Facebook-Social-Plugins

    but you won't have the same functionality (comments counts, etc).

    Posted 1 year ago #
  5. initialsbr
    Member

    Whoa! It did move. Sorry! Haven't been on here in too long I guess! Sorry. I'll check out your solution, helgatheviking and if it doesn't quite do the trick, I'll move this to the new forum.

    Posted 1 year ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.