Community Support Forums — WordPress® ( Users Helping Users ) — 2011-10-06T02:00:45-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=15425 2011-10-06T02:00:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44924#p44924 <![CDATA[Re: Embed a Login Form ?]]> Statistics: Posted by barefootango — October 6th, 2011, 2:00 am


]]>
2011-10-05T04:00:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44879#p44879 <![CDATA[Re: Embed a Login Form ?]]>
Sorry - i don't understand the question - if you're talking about the width of the membership login form in the page itself you can just surround it with a div using

"before_widget" => "<div class=\"member_login_widget\">",
"after_widget" => "</div>",

and either add styling to the div itself above OR add to your css specifications for your "member_login_widget" class

are you familiar with css?

i may be completely misunderstanding the issue?

beetle

Statistics: Posted by beetle — October 5th, 2011, 4:00 am


]]>
2011-10-05T03:20:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44877#p44877 <![CDATA[Re: Embed a Login Form ?]]>
Sort of in this case means that the form is up, but I had that working the first time around.

The problem was and still is that I can't modify the form, without affecting the widget on the same page!

(see attachment)

So I figured by importing the form to the page, and then surrounding it in a table statement would do the trick, it does, it just looks UGLY when I do that, because then it creates line artifacts where there was none before. So I backed off that, and now its adding more space to the form and adding double <BR> where there wasn't any before....lord knows what the hell is happening anymore....

Ok if that makes any sense to you folks, is there a solution where by I can reduce the size of this embedded form and put it smack dab in the center of this page, and it doesn't appear all ugly like it is now without any line artifacts ?

Miles.

PastedGraphic-4.png

Statistics: Posted by barefootango — October 5th, 2011, 3:20 am


]]>
2011-10-05T02:57:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44875#p44875 <![CDATA[Re: Embed a Login Form ?]]>
<?php
function ls_business_login_widget() {
$options = array(
"title" => "Member Login",
"signup_url" => "http://xxxxxxxxxxxxxx.com/wp-login.php?action=register"
);
$args = array (
"before_widget" => "<table width=\"300\"><tr><td>",
"after_widget" => "</td></tr></table>"
);
echo s2member_pro_login_widget($options, $args);
}

ls_business_login_widget();

?>

OR use the code itself you pasted:

<?php
$options = array(
"title" => "Member Login",
"signup_url" => "http://xxxxxxxxxxxxxx.com/wp-login.php?action=register"
);
$args = array (
"before_widget" => "<table width=\"300\"><tr><td>",
"after_widget" => "</td></tr></table>"
);
echo s2member_pro_login_widget($options, $args);

?>

what you are currently doing is just defining a function.... that is never called :)

beetle :)

Statistics: Posted by beetle — October 5th, 2011, 2:57 am


]]>
2011-10-05T02:55:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44874#p44874 <![CDATA[Re: Embed a Login Form ?]]>

<?php

$options = array(
"title" => "Membership Account Login",
"signup_url" => "/sign-up/",
"login_redirect" => "",
"profile_title" => "",
"display_gravatar" => "0",
"link_gravatar" => "0",
"display_name" => "1",
"logged_in_code" => "",
"logout_redirect" => "%%previous%%",
"my_account_url" => "%%automatic%%",
"my_profile_url" => "/my-membership-profile"
);
$args = array (
"before_widget" => "<div class=\"member_login_widget\">",
"after_widget" => "</div>",
"before_title" => "<h5>",
"after_title" => "</h5>"
);
echo s2member_pro_login_widget($options, $args);
?>

Statistics: Posted by beetle — October 5th, 2011, 2:55 am


]]>
2011-10-05T02:50:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44873#p44873 <![CDATA[Re: Embed a Login Form ?]]>
No I had that working just fine before, I had already surmised that I needed a plug-in to allow for me to dump it into the page, which is what I was describing in my earlier post of OOOPS!.

That said, this:

<?php
function ls_business_login_widget() {
$options = array(
"title" => "Member Login",
"signup_url" => "http://xxxxxxxxxxxxxx.com/wp-login.php?action=register"
);
$args = array (
"before_widget" => "<table width=\"300\"><tr><td>",
"after_widget" => "</td></tr></table>"
);
echo s2member_pro_login_widget($options, $args);
}
?>

IS NOT WORKING.

What am I doing wrong ???

Miles.

Statistics: Posted by barefootango — October 5th, 2011, 2:50 am


]]>
2011-10-05T02:41:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44872#p44872 <![CDATA[Re: Embed a Login Form ?]]>
once you've got it working - make sure you update the different options so they suit you - that code has pointers to my sign-up url etc... check out the s2member docs in wordpress dashboard here for what options do what!
s2Member -> API Scripting -> Pro Login Widget via PHP

beetle :)

Statistics: Posted by beetle — October 5th, 2011, 2:41 am


]]>
2011-10-05T02:38:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44871#p44871 <![CDATA[Re: Embed a Login Form ?]]>
you can embed that into any existing wp page - between text or where ever you want! wordpress will execute the php code as long as you've got a php-executing plugin enabled which I assumed you had??

if not add the plugin: PHP Execution

this will let you dump php straight into wp pages and it will execute fine... that might have been your problem all along then...

beetle :)

Statistics: Posted by beetle — October 5th, 2011, 2:38 am


]]>
2011-10-05T02:36:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44870#p44870 <![CDATA[Re: Embed a Login Form ?]]>
I wanted this to appear in a PAGE that already existed!

Im not looking to create a new login page, Im trying to embed a login form inside an existing wp page.

from the admin section of wordpress pages > add new > ... create a new page.

Now I want to embed a login form into THAT new page...not a php page.

Capice ?

Statistics: Posted by barefootango — October 5th, 2011, 2:36 am


]]>
2011-10-05T02:30:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44866#p44866 <![CDATA[Re: Embed a Login Form ?]]>
moving from private -> public messages in case this helps others... the way cristian suggests in the previous reply is how i suggest you do it instead.... and its how you were trying to do it i think originally...

the way i do it is - wordpress theme loads all my code (including function), created a login page that calls my function, function spits out the login form into page...

the way I suggest you do it is - create a new "Login" page and copy/paste this into it:
Code:
<?php

    $options 
= array(
        "title" => "Membership Account Login",         
    
"signup_url" => "/sign-up/",          
    
"login_redirect" => "",          
    
"profile_title" => "",  
    
"display_gravatar" => "0",                
    
"link_gravatar" => "0",                  
    
"display_name" => "1",                   
    
"logged_in_code" => "",                  
    
"logout_redirect" => "%%previous%%",         
    
"my_account_url" => "%%automatic%%",      
    
"my_profile_url" => "/my-membership-profile"      
    
);
    $args = array (
        "before_widget" => "<div class=\"member_login_widget\">",
        "after_widget" => "</div>",
        "before_title" => "<h5>",
        "after_title" => "</h5>"
    );
    echo s2member_pro_login_widget($options, $args);
?>


hope that works for you - if not cristian may have fixed your code above :)

beetle :)

Statistics: Posted by beetle — October 5th, 2011, 2:30 am


]]>
2011-10-05T02:25:18-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44864#p44864 <![CDATA[Re: Embed a Login Form ?]]>

barefootango wrote:
[php]
echo s2member_pro_login_widget(array("before_widget" => "echo '<table width=300><tr><td align=center'>", 'title' => 'Membership Login', 'signup_url' => 'http://xxxxxxxxxx.com/wp-login.php?action=register', "after_widget" => "echo '</tr></td></table>'"));
[/php]

The page runs without errors, but it also strangely enough IGNORES the HTML before AND after!


Try without the echo in the HTML strings.

Code:
echo s2member_pro_login_widget(array('before_widget' => '<table width=300><tr><td align=center>', 'title' => 'Membership Login', 'signup_url' => 'http://xxxxxxxxxx.com/wp-login.php?action=register', 'after_widget' => '</tr></td></table>')); 


I hope that helps.

Statistics: Posted by Cristián Lávaque — October 5th, 2011, 2:25 am


]]>
2011-10-05T01:40:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44851#p44851 <![CDATA[Re: Embed a Login Form ?]]> s2Member -> API Scripting -> Pro Login Widget via PHP

beetle :)

Statistics: Posted by beetle — October 5th, 2011, 1:40 am


]]>
2011-10-05T01:37:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44850#p44850 <![CDATA[Re: Embed a Login Form ?]]>
this works for me:

Code:
function ls_business_login_widget() {
    $options = array(
        "title" => "Business Account Login",         // Title when NOT logged in, or leave this blank if you'd prefer not to show a title.
    "signup_url" => "/business/sign-up/",          // Full Signup URL, or use %%automatic%% for the Membership Options Page. If you leave this blank, it will not be shown.
    "login_redirect" => "/my-account/",                   // Empty ( i.e. "" ) = Login Welcome Page, %%previous%% = Previous Page, %%home%% = Home Page, or use a full URL of your own.
    "logged_out_code" => "",                  // HTML/PHP code to display when logged out. May also contain WP Shortcodes if you like.
    "profile_title" => "",  // Title when a User is logged in. Or you can leave this blank if you'd prefer not to show a title.
    "display_gravatar" => "0",                // Display Gravatar image when logged in? 1 = yes, 0 = no. Gravatars are based on email address.
    "link_gravatar" => "0",                   // Link Gravatar image to Gravatar.com? 1 = yes, 0 = no. Allows Users to setup a Gravatar.
    "display_name" => "1",                    // Display the current User's WordPress® `Display Name` when logged in? 1 = yes, 0 = no.
    "logged_in_code" => "",                   // HTML/PHP code to display when logged in. May also contain WP Shortcodes if you like.
    "logout_redirect" => "%%previous%%",          // Empty ( i.e. "" ) = Login Screen, %%previous%% = Previous Page, %%home%% = Home Page, or use a full URL of your own.
    "my_account_url" => "%%automatic%%",      // Full URL of your own, or use %%automatic%% for the Login Welcome Page. Leave empty to not show this at all.
    "my_profile_url" => "/my-business-profile"      //  Full URL of your own, or use %%automatic%% for a JavaScript popup. Leave empty to not show this at all.
    );
    $args = array (
        "before_widget" => "<div class=\"bus_login_widget\">",
        "after_widget" => "</div>",
        "before_title" => "<h5>",
        "after_title" => "</h5>"
    );
    echo s2member_pro_login_widget($options, $args);
}
 


i'm pretty sure i grabbed the code from the s2member docs somewhere...

beetle :)

Statistics: Posted by beetle — October 5th, 2011, 1:37 am


]]>
2011-10-05T00:52:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44844#p44844 <![CDATA[Re: Embed a Login Form ?]]> http://bit.ly/nuGl2O)!

One such value: "before_widget" => "" allows you to post HTML directly before the widget runs.

So right now, my code looks like:

[php]
echo s2member_pro_login_widget(array("before_widget" => "echo '<table width=300><tr><td align=center'>", 'title' => 'Membership Login', 'signup_url' => 'http://xxxxxxxxxx.com/wp-login.php?action=register', "after_widget" => "echo '</tr></td></table>'"));
[/php]

The page runs without errors, but it also strangely enough IGNORES the HTML before AND after!

Anyone care to jump in here ????

Statistics: Posted by barefootango — October 5th, 2011, 12:52 am


]]>
2011-10-04T20:37:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15425&p=44838#p44838 <![CDATA[Embed a Login Form ?]]>
I know this has been asked before, but I have yet to find a suitable answer.

Im running WP 3.2.1 and the latest version of S2 Pro.

How would one embed a login form.

I have tried this, but this code throws an error in the middle of this insert:

<?php echo s2member_pro_login_widget(array('title' => 'Membership Login', 'signup_url' => 'http://barefootango.com/wp-login.php?action=register')); ?>

The error being that it sees everything after the first > sign as just text and doesn't enact the code on the line.

Anyone ????

Statistics: Posted by barefootango — October 4th, 2011, 8:37 pm


]]>