Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

[SOLVED] Register / Login / Lost password forms in sidebar, conflict with other widge


  #1  
Old Apr 23, 2011, 02:21 PM
crashley1784
 
81 posts · May 2009
[SOLVED] Register / Login / Lost password forms in sidebar, conflict with other widge

So after much research and several failed attempts, I finally succeeded in placing the register / login / password recovery forms in the sidebar in a nice tabbed format, as per the instructions here.

Essentially, this tutorial instructs WP users how to pull the code for the login / register / password recovery forms out of WP-Login.php and place it in the theme. It also includes JQuery to make the tabs switch between the three forms, as well as custom css.

Everything is working well, EXCEPT for the fact that the widgets in the sidebar are acting funky with the forms. Here is a screenshot of the issue:

This shot shows the logged in user panel. You can see how the Pages widget is acting weird underneath the form code. Here is a screenshot of the problem when a user is not logged in:


Here is the code as it exists in my header.php file. I placed it before the left sidebar area, as Flynn suggested in this post:

PHP Code:

    <!-- Main Body -->    
    <tr id="bodyrow">

        <?php if ( $left_col == "on" ) { ?>
        <!-- Left Sidebar -->
        <td id="left">
<div id="login-register-password">

    <?php global $user_ID$user_identityget_currentuserinfo(); if (!$user_ID) { ?>

    <ul class="tabs_login">
        <li class="active_login"><a href="#tab1_login">Login</a></li>
        <li><a href="#tab2_login">Register</a></li>
        <li><a href="#tab3_login">Forgot?</a></li>
    </ul>
    <div class="tab_container_login">
        <div id="tab1_login" class="tab_content_login">

            <?php $register $_GET['register']; $reset $_GET['reset']; if ($register == true) { ?>

            <h3>Success!</h3>
            <p>Check your email for the password and then return to log in.</p>

            <?php } elseif ($reset == true) { ?>

            <h3>Success!</h3>
            <p>Check your email to reset your password.</p>

            <?php } else { ?>

            <h3>Have an account?</h3>
            <p>Log in or sign up! It&rsquo;s fast &amp; <em>free!</em></p>

            <?php ?>

            <form method="post" action="<?php bloginfo('url'?>/wp-login.php" class="wp-user-form">
                <div class="username">
                    <label for="user_login"><?php _e('Username'); ?>: </label>
                    <input type="text" name="log" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" id="user_login" tabindex="11" />
                </div>
                <div class="password">
                    <label for="user_pass"><?php _e('Password'); ?>: </label>
                    <input type="password" name="pwd" value="" size="20" id="user_pass" tabindex="12" />
                </div>
                <div class="login_fields">
                    <div class="rememberme">
                        <label for="rememberme">
                            <input type="checkbox" name="rememberme" value="forever" checked="checked" id="rememberme" tabindex="13" /> Remember me
                        </label>
                    </div>
                    <?php do_action('login_form'); ?>
                    <input type="submit" name="user-submit" value="<?php _e('Login'); ?>" tabindex="14" class="user-submit" />
                    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
                    <input type="hidden" name="user-cookie" value="1" />
                </div>
            </form>
        </div>
        <div id="tab2_login" class="tab_content_login" style="display:none;">
            <h3>Register for this site!</h3>
            <p>Sign up now for the good stuff.</p>
            <form method="post" action="<?php echo site_url('wp-login.php?action=register''login_post'?>" class="wp-user-form">
                <div class="username">
                    <label for="user_login"><?php _e('Username'); ?>: </label>
                    <input type="text" name="user_login" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" id="user_login" tabindex="101" />
                </div>
                <div class="password">
                    <label for="user_email"><?php _e('Your Email'); ?>: </label>
                    <input type="text" name="user_email" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" id="user_email" tabindex="102" />
                </div>
                <div class="login_fields">
                    <?php do_action('register_form'); ?>
                    <input type="submit" name="user-submit" value="<?php _e('Sign up!'); ?>" class="user-submit" tabindex="103" />
                    <?php $register $_GET['register']; if($register == true) { echo '<p>Check your email for the password!</p>'; } ?>
                    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>?register=true" />
                    <input type="hidden" name="user-cookie" value="1" />
                </div>
            </form>
        </div>
        <div id="tab3_login" class="tab_content_login" style="display:none;">
            <h3>Lose something?</h3>
            <p>Enter your username or email to reset your password.</p>
            <form method="post" action="<?php echo site_url('wp-login.php?action=lostpassword''login_post'?>" class="wp-user-form">
                <div class="username">
                    <label for="user_login" class="hide"><?php _e('Username or Email'); ?>: </label>
                    <input type="text" name="user_login" value="" size="20" id="user_login" tabindex="1001" />
                </div>
                <div class="login_fields">
                    <?php do_action('login_form''resetpass'); ?>
                    <input type="submit" name="user-submit" value="<?php _e('Reset my password'); ?>" class="user-submit" tabindex="1002" />
                    <?php $reset $_GET['reset']; if($reset == true) { echo '<p>A message will be sent to your email address.</p>'; } ?>
                    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>?reset=true" />
                    <input type="hidden" name="user-cookie" value="1" />
                </div>
            </form>
        </div>
    </div>

    <?php } else { // is logged in ?>

    <div class="sidebox">
        <h3>Welcome, <?php echo $user_identity?></h3>
        <div class="usericon">
            <?php global $userdataget_currentuserinfo(); echo get_avatar($userdata->ID60); ?>

        </div>
        <div class="userinfo">
            <p>You&rsquo;re logged in as <strong><?php echo $user_identity?></strong></p>
            <p>
                <a href="<?php echo wp_logout_url('index.php'); ?>">Log out</a> | 
                <?php if (current_user_can('manage_options')) { 
                    echo 
'<a href="' admin_url() . '">' __('Admin') . '</a>'; } else { 
                    echo 
'<a href="' admin_url() . 'profile.php">' __('Profile') . '</a>'; } ?>

            </p>
        </div>
    </div>

    <?php ?>

</div>

            <?php // Widgetize the Left Sidebar 
            
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) : ?>
Any ideas? Link to site: http://www.laurenacooper.com/lostpets
I am using the most current version of WP and Ata 3.6.4

Last edited by crashley1784; Apr 23, 2011 at 02:23 PM. Reason: Forgot to include link to site and WP / Ata info
  #2  
Old Apr 23, 2011, 03:11 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
All looks fine for me on FF IE9 and Chrome
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Apr 24, 2011, 11:15 AM
crashley1784
 
81 posts · May 2009
Yeah... *smiles sheepishly* After I wrote this post I kept fiddling with it and deleting the call for the gravatar fixed everything. Who would have known?
Thanks

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to customize Login, Registration and Lost Password with wp-customized-lo fromtheranks Plugins & Atahualpa 15 Apr 24, 2012 03:24 PM
[SOLVED] Lost the border on right sidebar widgets (again) jkgourmet Sidebars & Widgets 3 Nov 12, 2010 05:06 PM
How do I find my Login name and password? bsarkis New Versions, & Updating 1 Mar 7, 2010 04:17 AM
"lost" the atahualpa login/register widget. can I get it back easy? manyleaves Sidebars & Widgets 3 Jan 17, 2010 08:40 AM
Lost my 'site admin' login on the right sidebar thotlady Header configuration & styling 1 Sep 1, 2009 02:18 PM


All times are GMT -6. The time now is 05:47 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.