• Resolved arro08

    (@arro08)


    I got wpbook to import comments from Facebook alright, but now I want to eliminate the possibility to leave comments directly on the WordPress blog. No one should be able to post comments without being my friend on Facebook. What I want is a link below the comments (instead of the wp-comment field) that lead to the post in created my feed on Facebook.

    Visitors can read comments on both my blog and on facebook, but only comment on facebook. Ideally, I would want the visitors to be able to post from my blog and have the comment show up both there and in my stream, but this doesn’t seem to be possible. Any ideas?

    http://wordpress.org/extend/plugins/wpbook/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor B.

    (@bandonrandon)

    Just remove the comment form from your theme’s comments.php see http://codex.wordpress.org/Function_Reference/comment_form If that dosen’t work depending on your theme you should see a simple html form that you can remove.

    Thread Starter arro08

    (@arro08)

    Sorry for making this so unclear. Removing the form is not the problem, but how do I add a link to the excerpt automatically posted in my FB-profile by WPBook? Is there a way to retrieve that URL and link back to the excerpt?

    Hmm… after removing the comment form in the comments.php, it still shows up under the blog posts. Nothing I do in comments.php has any effect. I replaced the whole thing with <?php echo "Stupid"; ?> and everything still shows up as usual.

    The single.php calls like this <?php comments_template('comments.php'); // Get wp-comments.php template ?>

    What happened here? This is the theme I’m using: http://wordpress.org/extend/themes/clear

    Plugin Contributor B.

    (@bandonrandon)

    I don’t think that your fb wall post have accessable unique permalinks. From what I can tell only a link to the app that posted the content and then it links back to the parent site.

    If you want to link to post inside your app you can add these function into functions.php

    [Code moderated as per the Forum Rules. Please use the pastebin]

    and then where you want the link to show:
    <?php echo get_external_post_url(get_permalink()); ?>

    If you get an error “cannont redefine function get_external_post_url” then you can skip all the functions.php junk and just call the function inside comments.php

    Regarding the comment form problem. You should be able to modify everything inside comments.php as comments_template() is just calling the template. You could also create a custom comment template and call that instead. See: http://codex.wordpress.org/Function_Reference/comments_template

    Thread Starter arro08

    (@arro08)

    > I don’t think that your fb wall post have accessable unique permalinks.
    Yes they do. You can find them if you go to your notifications page. If someone has commented on a post, there will be a link directly to that post. I assume WPBook has to know the id of a certain post since it retrieves comments from it?

    I solved the comment form problem by changing comments_template('comments.php') to comments_template(). Now I just need to get the link to the FB-post to work.

    I don’t allow comments inside the FB-application, so a link to the post inside the app is not an option.

    Thread Starter arro08

    (@arro08)

    Ok, I had to turn on comments inside Facebook to get avatars to work, so linking there to comment is alright. Thanks for the help!

    Plugin Contributor B.

    (@bandonrandon)

    How to get the post ID of a particular post is more a John question. you could try the graph api http://developers.facebook.com/docs/api it would probably help.

    You could also probably rework the code to have comments off in the app view and still have gravatar support.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WPBook] Replace comment field with Facebook link’ is closed to new replies.