PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Trouble with Comment Luv

s2Member Plugin. A Membership plugin for WordPress®.

Trouble with Comment Luv

Postby klaydetailing » May 22nd, 2011, 2:00 am

I'm not sure if you guys can help me or not, but I have Comment Luv set up and would love for the people that are logged in to be able to have their websites that they write into the registration for w2Member, I'm pretty sure that it's an easy fix, but I am very confused with how to do it, any help would be fantastic. Comment does work for any guests who post comments into my blog and put in their website, but it doesn't work for members who have put their website into the registration which has been created using w2Member.
User avatar
klaydetailing
Registered User
Registered User
 
Posts: 4
Joined: May 22, 2011

Re: Trouble with Comment Luv

Postby Cristián Lávaque » May 22nd, 2011, 11:19 am

You'd have to modify CommentLuv so it picks the website from the database.

To get a single s2Member custom field for the current user, use

Code: Select all
$user_website get_user_field('website'); 
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Trouble with Comment Luv

Postby klaydetailing » May 23rd, 2011, 8:48 am

I have been trying for a few hours trying to work out where abouts to insert this code, with no luck. I believe that it is meant to be going into this section of code
Code: Select all
if (is_user_logged_in ()) {
              // get options values and insert as hidden fields
              global $userdata;
              get_currentuserinfo ();
              $author = $userdata->display_name;
              $userid = $userdata->ID;
              $url = $userdata->user_url;   
              if(!stristr($url,"http://")){
                 $url = "http://".$url;
              }

I have even tried changing some of the code around to see if I can get it working still with no avail. This section of code was found in the commentluv.php file lines 362 - 371. I apologize for my ignorance with coding but everything that I have learnt so far has come from tutorials that I have managed to piece together online. I have had no formal training and have used mostly css and plugins to get my site up and running thus far. So elaboration is greatly appreciated. Thank you for your assistance.

Clayton
User avatar
klaydetailing
Registered User
Registered User
 
Posts: 4
Joined: May 22, 2011

Re: Trouble with Comment Luv

Postby Cristián Lávaque » May 23rd, 2011, 1:16 pm

Oh, in that example your s2Member Custom Registration Fields will already be available as an array in $userdata->wp_s2member_custom_fields. For example

Code: Select all
$user_website = $userdata->wp_s2member_custom_fields['website'];  
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Trouble with Comment Luv

Postby klaydetailing » May 24th, 2011, 6:52 am

KK all fixed, YAY I don't know how much playing around I just did with the author of comment luv, but managed to work it out

Code: Select all
$url = $userdata->wp_s2member_custom_fields['website'];

this has to be inserted underneith
Code: Select all
if (is_user_logged_in ()) {
              // get options values and insert as hidden fields
              global $userdata;
              get_currentuserinfo ();
              $author = $userdata->display_name;
              $userid = $userdata->ID;
              $url = $userdata->user_url;   
              if(!stristr($url,"http://")){
                 $url = "http://".$url;
              }

This then allows commentluv to pic up the user defined field of website as set in 'Editing Registration Field' 'Unique Field ID:' as you would know, if you set that unique field to anything other than website that line of code will not work.

Thank You so much for your help

Klay
User avatar
klaydetailing
Registered User
Registered User
 
Posts: 4
Joined: May 22, 2011

Re: Trouble with Comment Luv

Postby Cristián Lávaque » May 24th, 2011, 11:52 am

You're welcome, Klay. :)

Thanks for sharing that tip for other CommentLuv users.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Trouble with Comment Luv

Postby klaydetailing » May 24th, 2011, 11:20 pm

not a problem, and with the latest release of comment luv, it is now s2member friendly, you just have to make sure that when you are putting in your unique field to call it website, and then it'll run perfectly with it, so hopefully Adrian from comluv.com will have that available soon :-)
User avatar
klaydetailing
Registered User
Registered User
 
Posts: 4
Joined: May 22, 2011

Re: Trouble with Comment Luv

Postby Cristián Lávaque » May 25th, 2011, 12:13 am

Hey, that's great! Thanks for the udpate. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Trouble with Comment Luv

Postby Julien » October 6th, 2011, 10:19 am

Hi there !
I have the same kind of problem but exactly the opposite : only my members who are logged in can use commentluv fonctionnalities. As a guest, commentluv does not appear. And it is the same with the plugin "comment reply notification".
I would like both plugin to appear for my guests to make them posting more comments !

Thanks a lot if you can help me !

Best regards

Julien
User avatar
Julien
Registered User
Registered User
 
Posts: 3
Joined: October 6, 2011

Re: Trouble with Comment Luv

Postby Cristián Lávaque » October 7th, 2011, 12:28 am

Julien, if you deactivate s2Member, do you still have that problem with CommentLuv?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron