Sarah's Buddypress Sliding login panel

i was wondering if someone could take a look at this code and tell me why when a new member signs up and gets the email activation link and clicks it .... it says activated but if they use the slide login panel to login it says there was something wrong with the activation key and asks to try again and enter the activation key. but it seems as tho you are logged in as a member.

<?php

require( dirname(__FILE__) . '/update-content.php' );
load_plugin_textdomain('iRLogin','wp-content/plugins/buddypress-sliding-login-panel/');

function string_limit_words($string, $word_limit)
{
$words = explode(' ', $string, ($word_limit + 1));
if(count($words) > $word_limit) {
array_pop($words);
echo implode(' ', $words)."..."; } else {
echo implode(' ', $words); }
}

function scriptInstall()
{?>
<link rel="stylesheet" href="<?php echo (bloginfo("wpurl").'/'.PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/style.css" type="text/css" media="screen" />'."\n"); ?>
<?php }

add_action('wp_head','scriptInstall');
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-form');
wp_enqueue_script('slide', "/".PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/js/slide.js', array('jquery', 'jquery-form'));

function bp_slide_login_panel() {
updateHeader();
}
add_action( 'bp_before_header', 'bp_slide_login_panel' );

?>

i think that is all the code for the log in part?

thanks in advance!
gina

  • gina

    or this actually...

    <?php
    function updateHeader()
    {
    global $user_ID, $current_user;
    get_currentuserinfo();
    ?>
    <div id="iRToppanel">
    <?php
    global $user_identity, $user_ID;
    // If user is logged in or registered, show dashboard links in panel
    if (is_user_logged_in()) {
    ?>
    <div id="iRPanel">
    <div class="content clearfix">

    <div class="left border">
    <img src="<?php bloginfo('wpurl') ?>/wp-content/plugins/buddypress-sliding-login-panel/images/logo.png" alt="Logo" />
    <h2>Welcome back, <?php echo ucwords($user_identity) ?>!</h2>
    <h2 style="border-top:1px dotted #fff;">My Messages</h2>
    <div class="msgs">
    <?php if ( bp_has_message_threads('per_page=2') ) : ?>
    <ul id="message-threads">
    <?php while ( bp_message_threads() ) : bp_message_thread(); ?>

    <li<?php if ( bp_message_thread_has_unread() ) : ?> class="unread"<?php else: ?> class="read"<?php endif; ?>>

    <div class="message-subject">
    <?php bp_message_thread_avatar('type=full&width=35&height=35') ?>
    <?php bp_message_thread_subject() ?>
    </div>

    <div class="message-meta">
    <p>">View Message /#send-reply">Reply</p>
    </div>

    <?php endwhile; ?>

    <?php else: ?>
    <div>
    <p class="msg"><img src="<?php bloginfo('wpurl') ?>/wp-content/plugins/buddypress-sliding-login-panel/images/msg.png" alt="messages" class="msg" /> You have 0 new messages.</p>

    </div>
    <?php endif;?>
    </div>

    </div>

    <div class="left narrow">
    <h2>My Avatar</h2>
    profile">
    <?php bp_loggedin_user_avatar('width=117&height=117') ?>

    </div>

    <div class="left narrow">
    <h2>Profile</h2>

    <h2>Activity</h2>

    </div>

    <div class="left narrow">
    <h2>Mentions</h2>

    " title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ) ?>"><?php printf( __( '@%s Mentions', 'buddypress' ), bp_get_loggedin_user_username() ) ?>

    <h2>Groups</h2>

    </div>

    <div class="left narrow">

    <h2>Friends</h2>

    <h2>Friend Requests</h2>
    <?php if ( bp_has_members( 'include=' . bp_get_friendship_requests() . '&per_page=1' ) ) : ?>

    <ul id="friend-list" class="item-list">
    <?php while ( bp_members() ) : bp_the_member(); ?>

    <div>
    <p>"><?php bp_member_name() ?></p>
    <p> "><?php bp_member_avatar() ?></p>
    </div>

    <?php do_action( 'bp_friend_requests_item' ) ?>

    <div class="action" style="float: right; padding: 4px;">
    "><?php _e( 'Accept', 'buddypress' ); ?>
    "><?php _e( 'Reject', 'buddypress' ); ?>

    <?php do_action( 'bp_friend_requests_item_action' ) ?>
    <p>/requests">More → </p>
    </div>

    <?php endwhile; ?>

    <?php do_action( 'bp_friend_requests_content' ) ?>

    <?php else: ?>

    <div>
    <p><?php _e( 'You have no pending friendship requests.', 'buddypress' ); ?></p>
    </div>

    <?php endif;?>

    </div>

    </div>

    </div> <!-- /login -->

    <!-- The tab on top -->
    <div class="tab">
    <ul class="login" style="margin-right:-10%;">
    <li class="left"> 
    <!-- Logout -->

  • " rel="nofollow" title="<?php _e('Log out'); ?>"><?php _e('Log out'); ?>
  • <li class="sep">|
    <li id="toggle">
    My Account
    Close Panel

    <li class="right"> 

    </div> <!-- / top -->

    <?php
    // Else if user is not logged in, show login and register forms
    } else {
    ?>
    <div id="iRPanel">
    <div class="content clearfix">

    <div class="left border" style="width:250px;">
    <img src="<?php bloginfo('wpurl') ?>/wp-content/plugins/buddypress-sliding-login-panel/images/logo.png" alt="espy'd" />
    <h2>Welcome to <? bloginfo('name'); ?></h2>
    <p>Login or Signup to meet new friends, find out what's going on, and connect with others on the site. </p>

    </div>

    <div class="left" style="width:195px;">
    <?php if (get_option('users_can_register')) : ?>
    <!-- Register Form -->
    <form name="registerform" id="registerform" action="<?php echo site_url('register', 'login_post') ?>" method="post">
    <h2>Sign Up Now</h2>
    Registering for this site is easy. Just fill in the fields on the registration page and we'll get a new account set up for you in no time.
    <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e('Register'); ?>" class="bt_register" />
    </form>
    <?php else : ?>
    <h1>Registration is closed</h1>
    <p>Sorry, you are not allowed to register by yourself on this site!</p>
    <p>You must either be invited by one of our team member or request an invitation by email.</b>.</p>

    <!-- Admin, delete text below later when you are done with configuring this panel -->
    <p style="border-top:1px solid #333;border-bottom:1px solid #333;padding:10px 0;margin-top:10px;color:white">Note: If you are the admin and want to display the register form here, log in to your dashboard, and go to <b>Settings</b> > <b>General</b> and click "Anyone can register".</p>
    <?php endif ?>
    </div>
    <div class="left right" style="width:195px;">
    <form class="clearfix" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" method="post">
    <h2>Forgot Your Password?</h2>
    <label class="grey" for="user_login">Username or E-mail:</label>
    <input class="field" type="text" name="user_login" id="user_login_FP" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="23" />
    <div class="clear"></div>
    <p>A new password will be e-mailed to you.</p>
    <input type="submit" name="submit" value="Retrieve" class="bt_register" />
    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
    </form>
    </div>

    <div class="left right" style="width:195px;">
    <!-- Login Form -->
    <form class="clearfix" action="<?php bloginfo('wpurl') ?>/wp-login.php" method="post">
    <h2>Member Login</h2>
    <label class="grey" for="log">Username:</label>
    <input class="field" type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="23" />
    <label class="grey" for="pwd">Password:</label>
    <input class="field" type="password" name="pwd" id="pwd" size="23" />
    <label><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label>
    <div class="clear"></div>
    <input type="submit" name="submit" value="Login" class="bt_login" />
    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
    </form>
    </div>
    </div>
    </div> <!-- /login -->

    <!-- The tab on top -->
    <div class="tab">
    <ul class="login" style="margin-right:-10%;">
    <li class="left"> 
    <!-- Login / Register -->
    <li id="toggle">
    Log In
    Close Panel

    <li class="right"> 

    </div> <!-- / top -->

    <?php } ?>

    </div> <!--END panel -->

    <!-- End of login page -->

    <?php
    }
    ?>

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.