Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

using wp_facebookconnect with Atahualpa


  #1  
Old Oct 21, 2009, 08:11 PM
nycgadgetgirl's Avatar
nycgadgetgirl
 
24 posts · Sep 2009
NYC
The website: http://jennaandsnickers.com
WP version 2.8.5
Atahualpa version 3.3.2

The plugin: http://wordpress.org/extend/plugins/wp-facebookconnect/

I've been following the steps in this tutorial: http://projectheresy.com/public/begi...uide_fb_wp.pdf

I've activated the plugin, created a facebook application, entered my API and Secret into the settings. I'm at the point where I need to customize the theme files (page 20 in the tutorial).

Tried a few things without success. Want to save me from pulling out my hair and help me out with some code and directions of where to put it? I'd be super grateful!
  #2  
Old Oct 22, 2009, 01:42 PM
nycgadgetgirl's Avatar
nycgadgetgirl
 
24 posts · Sep 2009
NYC
If Flynn isn't around to help with code (I don't see a forum post from Flynn for the past week and a half), I'd happily take any advice anyone has on where to find help or another way to integrate facebook connect that may work with Atahualpa out of the box.
  #3  
Old Oct 22, 2009, 03:52 PM
bushtool's Avatar
bushtool
 
93 posts · May 2009
I have tried to get this working without success. Not sure if it is atahualpa or the plugin or facebook that is the problem. Actually had to remove the plugin from the plugin directory in order to be able to login normally. After logging in I had to refresh the page to see that I was logged in. And then when I logged out, I remained logged in until I removed the plugin entirely from the plugin directory. So I gave up.
  #4  
Old Oct 22, 2009, 04:00 PM
nycgadgetgirl's Avatar
nycgadgetgirl
 
24 posts · Sep 2009
NYC
I wonder if you and I could combine our experiences to make it work. So far, the plug in isn't screwing up anything on my site, but I haven't added the Facebook Connect button to my comment section yet. How did you go about doing that? (In a regular theme, it would be a cinch, but I'm never quite sure how/where to make changes like these to the Atahualpa theme!)
  #5  
Old Oct 23, 2009, 10:25 AM
bushtool's Avatar
bushtool
 
93 posts · May 2009
I would put it above this - <?php // Display Quicktags or allowed XHTML Tags

Last edited by bushtool; Oct 23, 2009 at 10:27 AM.
  #6  
Old Oct 23, 2009, 03:53 PM
nycgadgetgirl's Avatar
nycgadgetgirl
 
24 posts · Sep 2009
NYC
Quote:
Originally Posted by bushtool
I would put it above this - <?php // Display Quicktags or allowed XHTML Tags
So, in the comments.php file just like in a regular theme? I tried making changes there and nothing happened. I thought maybe it needed to be somewhere else or I needed to add some custom functions. Maybe I'll play around with it some more tonight since I haven't heard from Flynn yet. I'd really like to get this pending post published.
  #7  
Old Oct 23, 2009, 04:55 PM
nycgadgetgirl's Avatar
nycgadgetgirl
 
24 posts · Sep 2009
NYC
Nope, that doesn't work. There is more required than just adding the facebook connect button to the comments.php or comments-paged.php file. Unfortunately, I'm not well versed enough in how Atahualpa is constructed to be able to figure it out.

I think something similar to what is in the tutorial needs to be added to the theme functions (functions.php) file first. I've tried doing it myself, but I just keep breaking the site and getting syntax errors.

So. Need. Help.
  #8  
Old Oct 23, 2009, 05:49 PM
bushtool's Avatar
bushtool
 
93 posts · May 2009
I put it there today and it did not show up either. I have forgotten what I did previously to get it to show up. I've already spent hours wrestling with this and another similar plugin to no avail. When that happens I usually give up for a while and sometimes someone puts out a step by step tutorial that actually works.

Hopefully others on this forum may have succeeded in getting this working and will share there wisdom.
  #9  
Old Oct 23, 2009, 06:50 PM
nycgadgetgirl's Avatar
nycgadgetgirl
 
24 posts · Sep 2009
NYC
I GOT IT TO WORK!!!!!

So far it is working in Chrome. About to test in Firefox and IE. If it works, I'll post the steps.
  #10  
Old Oct 23, 2009, 07:45 PM
nycgadgetgirl's Avatar
nycgadgetgirl
 
24 posts · Sep 2009
NYC
Solution

OK, to use Facebook Connect

1) install and activate the wp_facebookconnect plugin
2) create a Facebook application (the tutorial mentioned above explains the steps if you need help)
3) put the following code in your theme functions file (replacing your-API-key and http://www.yoursite.com/ of course)
Code:
<?php

function add_fb_xml_ns($content) {
  return ' xmlns:fb="http://www.facebook.com/2008/fbml" ' . $content;
}

function fb_comment_box() {
  if (is_single()) {
  ?>
<a name="fb_comments"></a>
<p class="fb-comments">Comments:</p>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<fb:comments></fb:comments>
<script type="text/javascript"> FB.init("your-API-key", "http://www.jyoursite.com/xd_receiver.html"); </script>
  <?php
 }
}

function fb_comment_plug() {
  if (!is_single() && !is_page()) {
?>
<p class="fb-comments"><a href="<?php echo get_permalink(); ?>#fb_comments">Add a comment</a></p>
<?
 }
}

if ( is_admin() ) {
    global $current_user;
    get_currentuserinfo();
    $user_info = get_userdata($current_user->ID);
    if ( !is_null($user_info->fbuid) ) die( 'No access to WP-Admin for Facebook users!' );
}

?>
4) Add the following to your comments.php file
Code:
<?php if ( is_user_logged_in() ) { fbc_display_login_state(); } else {  fbc_display_login_button(); } ?>
That's it!

Last edited by nycgadgetgirl; Oct 23, 2009 at 10:16 PM. Reason: adding some code
  #11  
Old Dec 10, 2009, 08:05 PM
SupraTT's Avatar
SupraTT
 
78 posts · May 2009
Hi NYCGadgetGirl or anyone that can help,

I followed the guide and your steps... but I am getting an error when I copy the code to functions.php:

Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/domains/mydomain.com/public_html/wp-content/themes/atahualpa344/functions.php:36) in /home/XXXX/domains/mydomain.com/public_html/wp-includes/pluggable.php on line 865

Where in functions.php do I need the put the code into?

Thank you,

SupraTT

Update: I did find an error on the above code, missing "php" after <? on 1 line... but still getting the error when I try to logout now.

Last edited by SupraTT; Dec 10, 2009 at 08:22 PM.
  #12  
Old Dec 10, 2009, 08:13 PM
nycgadgetgirl's Avatar
nycgadgetgirl
 
24 posts · Sep 2009
NYC
I just dropped it at the end when I did it. Make sure you didn't miss any brackets, etc. when you copy/pasted.
  #13  
Old Dec 10, 2009, 08:43 PM
SupraTT's Avatar
SupraTT
 
78 posts · May 2009
Hi NYC Gadget Girl,

Thanks for the quick reply... I tried pasting it in the bottom of the functions.php and still getting errors... is the code you posted a straight copy/paste from your functions.php?

Thank you,

SupraTT
  #14  
Old Dec 10, 2009, 09:32 PM
nycgadgetgirl's Avatar
nycgadgetgirl
 
24 posts · Sep 2009
NYC
Yes, that's exactly the same code I put in mine, except for the domain name and API key of course.
  #15  
Old Dec 17, 2009, 05:18 PM
SupraTT's Avatar
SupraTT
 
78 posts · May 2009
Hi NYC Gadget Girl,

Thank for the help. It seems to be wrking fine now. I just had to fix the missing "php" in your code and paste the code directly at the end of functions.php.

SupraTT
  #16  
Old Dec 19, 2009, 12:20 AM
SupraTT's Avatar
SupraTT
 
78 posts · May 2009
Hi NYCGadgetGirl or anyone else using Facebook Connect,

I got the facebook connect to work, but when I login using facebook connect, I just get the WP comments box. How can I get the FB comment box to appear?

NYCGadgetGirl, the tutorial you posted shows the FB comment box when the user logins using facebook connect.

Thank you

SupraTT

Bookmarks

Tags
facebook, facebook connect




All times are GMT -6. The time now is 05:13 AM.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.