Posted by Simon Goodchild at January 20th, 2012
With the basis of the page done in previous tutorials, post will now just cover additional methods added to the various classes, or how to achieve particular results.Please read part 1 onwards first.
I am sorry that I probably won’t have enough hours in the day to offer guaranteed support, but there is a dedicated forum area where I will participate as often as possible.
This tutorial requires WPS version 12.11. Please refer to the wps_profile_page_6.php file when following below.
If you have the WP Symposium Facebook Connect plugin, you can now automatically insert this element into your profile page. It’s format is as follows:
$wps_ui->facebook_connect(user_id, post_text, connect_text, cancel_text);
The only mandatory parameter is user_id, which should be the id of the user whose page is being viewed. wps_profile_page_6.php shows how this element is only shown if the logged in user is seeing their own page.
So for example, if you wanted to show the Facebook Connect for the currently logged in user, changing the default text, your would do so like this;
global $current_user; $wps_ui->facebook_connect($current_user->ID, "Send to Facebook", "Send to Facebook too?", "Stop posting to Facebook");