Tips and Tricks HQ Support Portal › Forums › WP eMember › eMember – Compact Login link with Fancy Popup
Tagged: compact login, fancy lgin, login, loginout
- This topic has 4 replies, 3 voices, and was last updated 12 years, 1 month ago by nikcree.
-
AuthorPosts
-
October 23, 2012 at 4:15 am #7687nikcreeMember
I would like to display the ‘Login’ link only in the header of my site, and when clicked have the Fancy Login Form prop up, rather than redirecting the the login page. Are you able to give the code for this? Many thanks
October 23, 2012 at 6:44 am #50592adminKeymasterThe compact login should use the “Fancy Login” style you set in the eMember settings. Have you enabled the fancy login option in the settings? What version of eMember are you using?
What line of code are you using in the header to place this compact login widget?
October 23, 2012 at 8:00 pm #50593nikcreeMemberI am using Version v8.2.1, have enabled the Fancy Login Style 1.
Yes I could insert the Compact Login Shortcode but all I want is the word ‘Login’Logout’ – none of the other text the shortcode. I ended up using the following code in the header widget area but was concerned that the emember_fancy_login_link should change at every login or be part of the cookie process??:
<div class="eMember_compact_login"><a href="void(0);"><span class="btn">Login</span></a><fieldset id="emember_signin_menu">
<span class="emember_ui_close" id="emem_ui_close">X</span>
<form method="post" name="loginForm" class="wp_emember_loginForm" id="emember_fancy_login_form" action="">
<input type="hidden" value="8e250cc2bc" name="_ajax_nonce">
<input type="hidden" value="emember_ajax_login" name="action">
<p class="textbox">
<label class="eMember_label" for="login_user_name">Username</label>
<input type="text" id="login_user_name" name="login_user_name" value="" title="username" tabindex="4">
</p>
<p class="textbox">
<label class="eMember_label" for="login_pwd">Password</label>
<input type="password" id="login_pwd" name="login_pwd" value="" title="password" tabindex="5">
</p>
<p class="rememberme">
<input type="submit" id="doLogin" name="doLogin" class="emember_button" value="Sign in" tabindex="7">
<input type="checkbox" id="rememberme" name="rememberme" value="forever" tabindex="6">
<input type="hidden" name="testcookie" value="1">
<label for="remember">Remember me</label>
</p>
<span id="emember_fancy_log_msg"></span>
<p class="forgot">
<a href="http://1lifedoitnow.com/members/reset-password">Forgot Password?</a>
</p>
<p class="forgot-username">
<a href="http://1lifedoitnow.com/members/join-us" title="Join us">Join Us</a>
</p>
</form>
<div style="display: none;" id="marker"></div>
</fieldset></div>Does this look OK or is there a better way to achieve it?
October 24, 2012 at 3:58 am #50594nurMemberas long as you have included all the input fields in your form, its perfect except one thing. you cannot use fixed value for “_ajax_nonce”.
Do something like the following for that field:
Code:<input type=”hidden” value=”<?php echo wp_create_nonce(’emember-login-nonce’);?>” name=”_ajax_nonce”>October 24, 2012 at 7:28 am #50595 -
AuthorPosts
- You must be logged in to reply to this topic.