
Please wait while we process your request.
Blogs

Please wait while we process your request

Please wait while we retrieve the user's information
Bio
Your bio is currently empty. Now is a great time to fill in your profile.
Rank
This profile is private.
This profile is only shared with friends.
This profile is under review.
We were unable to request friendship with this user.
We were unable to request friendship with this user. Are you logged in?
Your friendship request has been sent to this user.
We were unable to terminate friendship with this user.
We were unable to terminate friendship with this user. Are you logged in?
You are no longer friends with this user.
We were unable to ignore this user.
We were unable to ignore this user. Are you logged in?
This user is now ignored.
We were unable to stop ignoring this user.
We were unable to stop ignoring this user. Are you logged in?
This user is no longer ignored.
We encountered a problem recommending this user.
pluck_user_recommend_permission
You have recommended this user.

This blog post is hidden because you have chosen to ignore mike shelton. Show Details
This blog post is hidden because you have submitted an abuse report against it. Show Details
Note: I am sure there are other (perhaps even better) ways to get this to work, and I am open to your suggestions. Full php plugin file available here.
If you are one of the millions who use WordPress to power your site, you don’t have to sacrifice your Pluck comments. Using Pluck’s comments will keep your community interactions aggregated into one platform and surface in the users’ personas. You should avoid fragmenting your user generated content across multiple platforms.
Although Pluck does not have an official WP plugin, its not terribly hard to set up. For the sake of demonstration, I will call the plugin pluckplugin.
It is a good idea to save some settings so they can be changed later. The plugin stores the follwing data in the WordPress options table:
- Pluck Domain
- Shared Secret
- Cookie Name
- Whether or not to use Pluck’s comments
Implementation Steps:
- Get any saved options from the database.
$this->options = get_option("pluckplugin_settings");
- Inject the appropriate Pluck libraries into the header using “wp_head”.
add_action("wp_head", array($this,"pluckplugin_head_includes"));
function pluckplugin_head_includes(){
global $wpdb;
$PluckSavedData = array();
if (get_option ("pluckplugin_settings")){
$PluckSavedData = get_option("pluckplugin_settings");
}
}
- Drop the ‘at’ cookie when users login to WordPress (if desired) using “wp_login”.
add_action("wp_login", array($this,"pluckplugin_drop_at_cookie"), 10, 2);
function pluckplugin_drop_at_cookie($user_login, $user){
global $wpdb;
$PluckSavedData = array();
if (get_option ("pluckplugin_settings")){
$PluckSavedData = get_option("pluckplugin_settings");
if (isset($PluckSavedData['PluckDomain']) && isset($PluckSavedData['PluckSharedSecret'])){
$userId = $user- />data- />ID;
$userName = $user- />data- />user_nicename;
$userTime = "1";
$userEmail = $user- />data- />user_email;
$PwKey = $PluckSavedData['PluckSharedSecret'];
//Get Domain from PluckDomain
$DomainParts = explode(".",$PluckSavedData['PluckDomain']);
$CookieDomain = ".". $DomainParts[1] .".". $DomainParts[2] ."";
$Pieces = "$userId.$userName.$userTime.$userEmail.$PwKey";
$secret_hash = md5($Pieces);
$CookieString = "u=$userId&a=$userName&e=$userEmail&t=$userTime&h=$secret_hash";
//Check to see if using 'at' cookie name
$CookieName = "at";
if (isset($PluckSavedData['PluckCookieName'])){
$CookieName = $PluckSavedData['PluckCookieName'];
}
$expire=time()+60*60*24*30;
setcookie($CookieName, $CookieString, $expire, "/", $CookieDomain);
}
}
}
- Create the admin section using “admin_menu”.
add_action("admin_menu", array($this,"pluckplugin_admin_actions"));
- Once everything is in place, you need to call a function which checks to see if the comments are open, then checks to see if Pluck’s comments are on, then renders everything appropriately.
[... Comments widget JS code ...]
We're sorry, we were unable to record your recommendation at this time.
We're sorry. We are unable to delete this blog post at this time.
We're sorry. We are unable to block this blog post at this time.
We're sorry. We are unable to unblock this blog post at this time.

Please wait while we file your abuse report.
Report Abuse
We're sorry. We were unable to report abuse at this time.
We limit the number of reactions an individual user can submit over a given period for quality reasons. You have currently reached that limit. Please try resubmitting your abuse report again later.
Comment is too long. Enter 500 characters or less.
Send Cancel
Please wait while we send the email.
Email This
You may send this to 5 e-mail addresses. Please separate each address with a space.
Score
vote upvotes up
vote downvotes down

Delicious
Digg
Facebook
LinkedIn
Messenger Connect
MySpace
Reddit
Slashdot
StumbleUpon
Tumblr
Twitter
Yahoo! Buzz
