Page 1 of 1

Pro login widget hardcoding options

PostPosted: May 10th, 2011, 7:38 am
by jeffreygaudette
Hi all,

I am a pretty basic PHP noob. I need to hardcode the Pro login widget to my theme and change some options. I see the parameters in the APi scripting section, but I don't know how to implement them.

Do the options go into the functions.php or are they hardcoded with the call for the widget. Basically, can you give me an example of what the code would look like to change 3-4 of the options.

For example, how would I include the widget and change the following options:

"title" => "Membership Login"
"signup_url" => "%%automatic%%"
"login_redirect" => ""
"profile_title" => "My Profile Summary"

I apologize again for the very basic question, but I appreciate any help.

Thanks.

Re: Pro login widget hardcoding options

PostPosted: May 10th, 2011, 1:11 pm
by Cristián Lávaque
Hi Jeffrey. :)

Those go in the options parameter (an array) when you call the function. E.g.

Code: Select all
$options = array (
    "title" => "Membership Login",
    "signup_url" => "%%automatic%%",
    "login_redirect" => "",
    "profile_title" => "My Profile Summary",
);
echo s2member_pro_login_widget($options); 


I hope that helps.

Re: Pro login widget hardcoding options

PostPosted: May 10th, 2011, 1:43 pm
by jeffreygaudette
Argh, I was so close :)

Thank you so much, Cristian! I've never tried to call an array before and I was putting them after the call to the form, not before.

I appreciate your help :)

Jeff

Re: Pro login widget hardcoding options

PostPosted: May 10th, 2011, 2:12 pm
by Cristián Lávaque
:)