Like Cheese a WordPress plugin

 

 

 

It’s like cheese, but completely different” –

Like Cheese lets your site visitors ‘like’ your site images. Click the hearts to like an image!imaged_liked
hover over the number of likes to view who liked them.
demo http://peaceoftheocean.com/shesellsseashells

Feel free to change the filled icon and default icon, just change the images in the plugin image folder.  Be sure to keep the names of the images the same.

Here’s the default heart:

defaultLikeCheese is easy to install.  Just download the plugin ( from the WordPress Plugins page from your site), then activate it.

Next set your site to allow visitors to register. Go to main site settings. Check ‘Anyone can register’ and save.

register_allowed

Highly recommended to install Nextend Facebook Connect Plugin
It allows visitors to use Facebook to login. Super convenient. Plus you get info about your site visitors, that they approved.  when they register or try to like an image without being registered, they are directed to this:

 

fb_register

Instructions:

Highly recommended to get Nextend Facebook Connect:
Add new plugin
Nextend Facebook Connect

Installed

In your site’s WordPress Plugin page find, click Settings:

activate_nextend

Follow the nextend setup steps provided in their plugin:
follow_the_nextend_setup_steps

What to expect:
steps_to_set_up_nextend

create a menu item in your native WordPress menu tab
custom_menu_option

 

When you are done, you will have something like this:

register for guests

when they register or try to like an image without being registered, they are directed to this:

fb_register

Next comes the devy part:
FTP (download filezilla client…host is domain (example: www.rain.com), username and password (typically main site un & pw) click quickconnect (check youtube videos if needed more on ftp or gum)

navigate to
wpcontentfolder->plugins folder ->next-end-facebook-connect folder
nextend-facebook-connect.php

Change from this:
original
$secure_cookie = is_ssl();
$secure_cookie = apply_filters(‘secure_signon_cookie’, $secure_cookie, array());
global $auth_secure_cookie; // XXX ugly hack to pass this to wp_authenticate_cookie

$auth_secure_cookie = $secure_cookie;
wp_set_auth_cookie($ID, true, $secure_cookie);
$user_info = get_userdata($ID);
update_user_meta($ID, ‘fb_profile_picture’, ‘https://graph.facebook.com/’ . $user_profile[‘id’] . ‘/picture?type=large’);
do_action(‘wp_login’, $user_info->user_login, $user_info);
update_user_meta($ID, ‘fb_user_access_token’, $facebook->getAccessToken());
do_action(‘nextend_fb_user_logged_in’, $ID, $user_profile, $facebook);
}

to this:

$secure_cookie = is_ssl();
$secure_cookie = apply_filters(‘secure_signon_cookie’, $secure_cookie, array());
global $auth_secure_cookie; // XXX ugly hack to pass this to wp_authenticate_cookie

$auth_secure_cookie = $secure_cookie;
wp_set_auth_cookie($ID, true, $secure_cookie);
$user_info = get_userdata($ID);
update_user_meta($ID, ‘fb_username’, $user_profile[‘name’]);
update_user_meta($ID, ‘fb_usergender’, $user_profile[‘gender’]);
update_user_meta($ID, ‘fb_useremail’, $user_profile[’email’]);
update_user_meta($ID, ‘fb_userid’, $user_profile[‘id’]);
update_user_meta($ID, ‘fb_profile_picture’, ‘https://graph.facebook.com/’ . $user_profile[‘id’] . ‘/picture?type=large’);
do_action(‘wp_login’, $user_info->user_login, $user_info);
update_user_meta($ID, ‘fb_user_access_token’, $facebook->getAccessToken());
do_action(‘nextend_fb_user_logged_in’, $ID, $user_profile, $facebook);
}

We just added at about line 222, these four lines:
update_user_meta($ID, ‘fb_username’, $user_profile[‘name’]);
update_user_meta($ID, ‘fb_usergender’, $user_profile[‘gender’]);
update_user_meta($ID, ‘fb_useremail’, $user_profile[’email’]);
update_user_meta($ID, ‘fb_userid’, $user_profile[‘id’]);

adds good user data to wp native usermeta table that the user okayed.

Leave a Reply

Your email address will not be published. Required fields are marked *