Jump to content
Sign in to follow this  
liverpoolfootballblog

How to add the buddypress sidebar login to platform pro.

Recommended Posts

liverpoolfootballblog

Hey guys, In /plugins/buddypress/themes/bp-default I was able to find the sidebar.php file which contains the default buddypress login. The only problem is that when I uploaded to Base it removes all of my other sidebars. Does anyone know how to stop this from happening so I get the login and the sidebars.

Share this post


Link to post
Share on other sites
Kate

Hey Andrew, Not sure this is the best option, but could you create a new sidebar.php and just copy the code from the BP sidebar.php and the sidebar.php file in PlatformPro. (Just a thought... haven't really looked if that will work...)

Share this post


Link to post
Share on other sites
liverpoolfootballblog

Hey Kate, Thanks. I did what you said but received this error message,

	Warning: require_once(/home/liverpoo/public_html/wp-content/themes/platformbase/sidebar.php) [function.require-once]: failed to open stream: No such file or directory in /home/liverpoo/public_html/wp-includes/theme.php on line 1112
	
	Fatal error: require_once() [function.require]: Failed opening required '/home/liverpoo/public_html/wp-content/themes/platformbase/sidebar.php' (include_path='.:/usr/lib/php') in /home/liverpoo/public_html/wp-includes/theme.php on line 1112

Any idea what to do from here?

Share this post


Link to post
Share on other sites
liverpoolfootballblog

By the way, those messages show up in the sidebar.

Share this post


Link to post
Share on other sites
liverpoolfootballblog

Ok. Just realized that I had another sidebar.php file in my platform base which I got rid of and now I have the sidebars displaying but no login. I'm going to try and add the login code inside the php brackets of the sidebar and see what happens. I'll let you know.

Share this post


Link to post
Share on other sites
liverpoolfootballblog

That didn't work. Here's the code that I entered: SIDEBAR (SIDEBAR WRAP) This file controls the sidebar wrap template; which depending on the mode container one or both sidebars from layout. (It is used by BuddyPress as well and should play nice with child themes.) This theme copyright © 2008-2010 PageLines

*/
	pagelines_register_hook('pagelines_before_sidebar_wrap'); // hook
	global $pagelines_layout;
	
	if($pagelines_layout->layout_mode != 'fullwidth'):?>
	
		<div id="sidebar-wrap" class="fix">
	<?php
				if(pagelines_option('sidebar_wrap_widgets') == 'top' || !pagelines_option('sidebar_wrap_widgets')){
					pagelines_template_area('pagelines_sidebar_wrap', 'sidebar_wrap'); // hook
				}
	
			if($pagelines_layout->layout_mode != 'two-sidebar-center'):?>
				<div id="sidebar1" class="scolumn fix" >
					<div class="scolumn-pad">
						<?php pagelines_template_area('pagelines_sidebar1', 'sidebar1'); // hook ?>
					</div>
				</div>
			<?php endif;
	
			if($pagelines_layout->num_columns == 3): ?>
				<div id="sidebar2" class="scolumn fix">
					<div class="scolumn-pad">
						<?php pagelines_template_area('pagelines_sidebar2', 'sidebar2'); // hook ?>
					</div>
				</div>
	<?php 	endif;
	
				if(pagelines_option('sidebar_wrap_widgets') == 'bottom'){
					pagelines_template_area('pagelines_sidebar_wrap', 'sidebar_wrap'); // hook
				}
	
			?>
		</div>
	<?php
	endif;
	
	<div class="buddypress_login"
	<?php do_action( 'bp_before_sidebar' ) ?>
	
	<div id="sidebar">
		<div class="padder">
	
		<?php do_action( 'bp_inside_before_sidebar' ) ?>
	
		<?php if ( is_user_logged_in() ) : ?>
	
			<?php do_action( 'bp_before_sidebar_me' ) ?>
	
			<div id="sidebar-me">
				">
					<?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
				
	
				<h4><?php echo bp_core_get_userlink( bp_loggedin_user_id() ); ?></h4>
				"><?php _e( 'Log Out', 'buddypress' ) ?>
	
				<?php do_action( 'bp_sidebar_me' ) ?>
			</div>
	
			<?php do_action( 'bp_after_sidebar_me' ) ?>
	
			<?php if ( function_exists( 'bp_message_get_notices' ) ) : ?>
				<?php bp_message_get_notices(); /* Site wide notices to all users */ ?>
			<?php endif; ?>
	
		<?php else : ?>
	
			<?php do_action( 'bp_before_sidebar_login_form' ) ?>
	
			<p id="login-text">
				<?php _e( 'To start connecting please log in first.', 'buddypress' ) ?>
				<?php if ( bp_get_signup_allowed() ) : ?>
					<?php printf( __( ' You can also create an account.', 'buddypress' ), site_url( BP_REGISTER_SLUG . '/' ) ) ?>
				<?php endif; ?>
			</p>
	
			<form name="login-form" id="sidebar-login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login_post' ) ?>" method="post">
				<label><?php _e( 'Username', 'buddypress' ) ?>
				<input type="text" name="log" id="sidebar-user-login" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" tabindex="97" /></label>
	
				<label><?php _e( 'Password', 'buddypress' ) ?>
				<input type="password" name="pwd" id="sidebar-user-pass" class="input" value="" tabindex="98" /></label>
	
				<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="sidebar-rememberme" value="forever" tabindex="99" /> <?php _e( 'Remember Me', 'buddypress' ) ?></label></p>
	
				<?php do_action( 'bp_sidebar_login_form' ) ?>
				<input type="submit" name="wp-submit" id="sidebar-wp-submit" value="<?php _e('Log In'); ?>" tabindex="100" />
				<input type="hidden" name="testcookie" value="1" />
			</form>
	
			<?php do_action( 'bp_after_sidebar_login_form' ) ?>
	
		<?php endif; ?>
	
		<?php /* Show forum tags on the forums directory */
		if ( BP_FORUMS_SLUG == bp_current_component() && bp_is_directory() ) : ?>
			<div id="forum-directory-tags" class="widget tags">
	
				<h3 class="widgettitle"><?php _e( 'Forum Topic Tags', 'buddypress' ) ?></h3>
				<?php if ( function_exists('bp_forums_tag_heat_map') ) : ?>
					<div id="tag-text"><?php bp_forums_tag_heat_map(); ?></div>
				<?php endif; ?>
			</div>
		<?php endif; ?>
	
		<?php dynamic_sidebar( 'sidebar' ) ?>
	
		<?php do_action( 'bp_inside_after_sidebar' ) ?>
	
		</div><!-- .padder -->
	</div><!-- #sidebar -->
	
	<?php do_action( 'bp_after_sidebar' ) ?>
	
	<?php
	</div>
	
	/*
	
	pagelines_register_hook('pagelines_after_sidebar_wrap'); // hook[/code]

The bp sidbar is in the div="buddypress_login" What am I doing wrong?

Share this post


Link to post
Share on other sites
catrina

What code inside the code you posted above is the one you added to the sidebar file?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
liverpoolfootballblog
<div class="buddypress_login"
	<?php do_action( 'bp_before_sidebar' ) ?>
	
	<div id="sidebar">
	<div class="padder">
	
	<?php do_action( 'bp_inside_before_sidebar' ) ?>
	
	<?php if ( is_user_logged_in() ) : ?>
	
	<?php do_action( 'bp_before_sidebar_me' ) ?>
	
	<div id="sidebar-me">
	">
	<?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
	
	<h4><?php echo bp_core_get_userlink( bp_loggedin_user_id() ); ?></h4>
	"><?php _e( 'Log Out', 'buddypress' ) ?>
	
	<?php do_action( 'bp_sidebar_me' ) ?>
	</div>
	
	<?php do_action( 'bp_after_sidebar_me' ) ?>
	
	<?php if ( function_exists( 'bp_message_get_notices' ) ) : ?>
	<?php bp_message_get_notices(); /* Site wide notices to all users */ ?>
	<?php endif; ?>
	
	<?php else : ?>
	
	<?php do_action( 'bp_before_sidebar_login_form' ) ?>
	
	<p id="login-text">
	<?php _e( 'To start connecting please log in first.', 'buddypress' ) ?>
	<?php if ( bp_get_signup_allowed() ) : ?>
	<?php printf( __( ' You can also create an account.', 'buddypress' ), site_url( BP_REGISTER_SLUG . '/' ) ) ?>
	<?php endif; ?>
	</p>
	
	<form name="login-form" id="sidebar-login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login_post' ) ?>" method="post">
	<label><?php _e( 'Username', 'buddypress' ) ?>
	<input type="text" name="log" id="sidebar-user-login" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" tabindex="97" /></label>
	
	<label><?php _e( 'Password', 'buddypress' ) ?>
	<input type="password" name="pwd" id="sidebar-user-pass" class="input" value="" tabindex="98" /></label>
	
	<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="sidebar-rememberme" value="forever" tabindex="99" /> <?php _e( 'Remember Me', 'buddypress' ) ?></label></p>
	
	<?php do_action( 'bp_sidebar_login_form' ) ?>
	<input type="submit" name="wp-submit" id="sidebar-wp-submit" value="<?php _e('Log In'); ?>" tabindex="100" />
	<input type="hidden" name="testcookie" value="1" />
	</form>
	
	<?php do_action( 'bp_after_sidebar_login_form' ) ?>
	
	<?php endif; ?>
	
	<?php /* Show forum tags on the forums directory */
	if ( BP_FORUMS_SLUG == bp_current_component() && bp_is_directory() ) : ?>
	<div id="forum-directory-tags" class="widget tags">
	
	<h3 class="widgettitle"><?php _e( 'Forum Topic Tags', 'buddypress' ) ?></h3>
	<?php if ( function_exists('bp_forums_tag_heat_map') ) : ?>
	<div id="tag-text"><?php bp_forums_tag_heat_map(); ?></div>
	<?php endif; ?>
	</div>
	<?php endif; ?>
	
	<?php dynamic_sidebar( 'sidebar' ) ?>
	
	<?php do_action( 'bp_inside_after_sidebar' ) ?>
	
	</div><!-- .padder -->
	</div><!-- #sidebar -->
	
	<?php do_action( 'bp_after_sidebar' ) ?>
	
	<?php
	</div>

That's it. Sorry...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×