Tags

STEP 3 of the BuddyPress Template Pack plugin compatibility process.

Updated: 2/17/2013

Based on the HTML structure of your theme, you need to change 17 template files within the 6 BP folders transferred to your continuum theme folder in server during the compatibility process.

If you’ve previously changed any of the BP template files in your continuum theme folder in server, replace all of them for a clean slate by deleting the 6 BP folders – /activity, /blogs, /forums, /groups, /members, and /registration – then re-run Appearance > BP Compatibility.

Download the 6 clean BP folders to your computer hard drive.

A. At the top of each of those 17 template files I linked to above, replace

<?php get_header( 'buddypress' ); ?>
<?php do_action( '//DIFFERENT HOOKS' ); ?>
<div id="content">
<div class="padder">

with the following:

<?php //get theme options
global $con_front, $con_layout, $con_feed, $con_reviews, $con_ads, $con_misc;
$con_front = get_option( 'con_front', $con_front );
$con_layout = get_option( 'con_layout', $con_layout );
$con_feed = get_option( 'con_feed', $con_feed );
$con_reviews = get_option( 'con_reviews', $con_reviews );
$con_ads = get_option( 'con_ads', $con_ads );
$con_misc = get_option( 'con_misc', $con_misc ); ?>

<?php //set theme options
$con_page_latest_show = $con_layout['page_latest_show'];
$con_page_feed_show = $con_layout['page_feed_show'];
$con_page_unique_sidebar = $con_layout['page_unique_sidebar'];
$con_breadcrumb_show = $con_layout['page_breadcrumb_show'];
$con_featuredimage_size = $con_layout['featuredimage_size'];
$con_page_ad_post_show = $con_ads['page_ad_post_show'];
$con_page_ad_feed_show = $con_ads['page_ad_feed_show'];
$con_page_ad_post = $con_ads['page_ad_post'];
$con_page_ad_feed = $con_ads['page_ad_feed'];
?>
<?php // use variables from page custom fields instead of continuum options page (if they exist)
$override = get_post_meta($post->ID, "Show Latest Panel", $single = true);
if($override!="") {
	$con_page_latest_show=$override;
	if($con_page_latest_show=="false") {
		$con_page_latest_show=false;	
	} else {
		$con_page_latest_show=true;
	}
}
$override = get_post_meta($post->ID, "Show Feed", $single = true);
if($override!="") {
	$con_page_feed_show=$override;
	if($con_page_feed_show=="false") {
		$con_page_feed_show=false;	
	} else {
		$con_page_feed_show=true;
	}
}
$override = get_post_meta($post->ID, "Featured Image Size", $single = true);
if($override!="") $con_featuredimage_size=$override;
$override = get_post_meta($post->ID, "Show Ad Below Post", $single = true);
if($override!="") {
	$con_page_ad_post_show=$override;
	if($con_page_ad_post_show=="false") {
		$con_page_ad_post_show=false;	
	} else {
		$con_page_ad_post_show=true;
	}
}
$override = get_post_meta($post->ID, "Show Ad Below Feed", $single = true);
if($override!="") {
	$con_page_ad_feed_show=$override;
	if($con_page_ad_feed_show=="false") {
		$con_page_ad_feed_show=false;	
	} else {
		$con_page_ad_feed_show=true;
	}
}
?>
<?php 
$sidebar="Sidebar Default";
if($con_page_unique_sidebar) $sidebar="Sidebar Page"; ?>
<?php get_header(); // show header ?>
<div id="page-content">
    <div class="left-panel">
        <div class="content">
		<div class="post-content">

Then, in each of 17 files, you’d like to change the BP Templates’ page title’s header tag from

<h2>...</h2> or <h3>..</h3>

to

<h2 class="title adelle"> // Respective Page Titles // </h2>

where applicable, then move this to above

<div class="post-content">

Just watch out when you do this in the /activity/index.php page.

Save files.

B. At the bottom of the same 17 files, replace:

</div><!-- .padder -->
</div><!-- #content -->
<?php do_action( '//DIFFERENT HOOKS' ); ?>
<?php get_sidebar( 'buddypress' ); ?>
<?php get_footer( 'buddypress' ); ?>

with the following (except for registration/register.php):

					
                </div>
	<br class="clearer" />
	</div>
</div>
	<div class="right-panel sidebar">
 	<div class="inner"> 
	<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar($sidebar) ) : else : ?>
                <div id="tabbed-posts">
                    <ul class="tabnav">
                    <li><a href="#tabs-popular">Popular</a></li>
                    <li><a href="#tabs-recent">Recent</a></li>
                    <li><a href="#tabs-comments">Comments</a></li>
                    <li><a href="#tabs-tags">Tags</a></li>
                    </ul>
			<div class="tabdiv-wrapper">
                        <div id="tabs-popular" class="tabdiv">
                            <ul>
				<?php // create popular query
                                $postcount=0;
				$args='order=DESC&orderby=comment_count&posts_per_page=10'; 
                                $pop_loop = new WP_Query($args);
                                if ($pop_loop->have_posts()) : while ($pop_loop->have_posts()) : $pop_loop->the_post(); $postcount++; ?>
                                    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
                                <?php endwhile; 
                                endif; ?> 
                                <li class="last gentesque tooltip" title="View all articles sorted by comment count"><a href="<?php echo home_url(); ?>/<?php con_get_feed_link('comment_count') ?>">More</a></li>
                            </ul>
                        </div>
                        <div id="tabs-recent" class="tabdiv">
                        	<ul>
                            <?php // create recent query
                                $postcount=0;
				$args='order=DESC&orderby=date&posts_per_page=10'; 
                                $pop_loop = new WP_Query($args);
                                if ($pop_loop->have_posts()) : while ($pop_loop->have_posts()) : $pop_loop->the_post(); $postcount++; ?>
                                    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
                                <?php endwhile; 
                                endif; ?> 
                                <li class="last gentesque tooltip" title="View all articles sorted by date"><a href="<?php echo home_url(); ?>/<?php con_get_feed_link('date') ?>">More</a></li>
                            </ul>
                        </div>
                         <div id="tabs-comments" class="tabdiv">
                            <ul>
                            <?php //get recent comments
							$args = array(
								'status' => 'approve',
								'number' => 10
							);	
							$comments = get_comments($args);
							foreach($comments as $comment) :								
								$commentcontent = strip_tags($comment->comment_content);			
								if (strlen($commentcontent)>110) {
									$commentcontent = substr($commentcontent, 0, 107) . "...";
								}
								$commentauthor = $comment->comment_author;
								if (strlen($commentauthor)>50) {
									$commentauthor = substr($commentauthor, 0, 47) . "...";			
								}
								$commentid = $comment->comment_ID;
								$commenturl = get_comment_link($commentid); ?>
								<li><a href="<?php echo $commenturl; ?>">"<?php echo $commentcontent; ?>"<span> -&nbsp;<?php echo $commentauthor; ?></span></a></li>
							<?php endforeach; ?>
                            </ul>
                        </div> 
                        <div id="tabs-tags" class="tabdiv">
                            <?php wp_tag_cloud('smallest=8&largest=22&number=20&orderby=name'); ?>
                        </div>
                    </div>
                </div>
                <div class="widget">
                     <div class="header-left">&nbsp;</div>
                    <div class="header-middle">
                        <h2 class="gentesque"><?php _e(' About Continuum ', 'continuum' ); ?></h2>
                    </div>
                    <div class="header-right">&nbsp;</div>
                    <br class="clearer" />
                    <div class="content-wrapper">
                        <div class="content">
                            <p>
                            	<?php _e( "This is a custom sidebar. Continuum gives you lots of custom sidebar possibilities. You can use the Continuum Theme Options page to specify which pages have a unique sidebar. Or, you can use the same sidebar for all of your pages using the Sidebar Default widget panel. If you do specify that you want a unique sidebar for an area of your site, such as the Search page, you can use the corresponding built-in Sidebar Search widget panel.", 'continuum' ); ?>
                            </p>
                            <p>
                            	<?php _e( "In fact, Continuum comes standard with 19 unique sidebars. Wow, we're starting to sound like a car commercial, so we'll add that you don't have to use all of them if you don't want. Continuum harnesses the power of absolute customization while at the same time having a quality of meekness: you can forget about all the settings and get yourself up and running in no time flat.", 'continuum' ); ?>								
                            </p>
                        </div>
                   </div>
                </div>
           <?php endif; ?>
        </div>
    </div>
    <br class="clearer" />
</div>
<?php if($con_page_ad_post_show) { ?>
    <div class="full-width-ad">    
        <?php echo $con_page_ad_post; // ad ?>        
    </div>
<?php } ?>
<?php if($con_page_feed_show) { // show Feed ?>
	<?php con_get_feed(); ?>    
<?php } ?>
<?php if($con_page_ad_feed_show) { ?>
    <div class="full-width-ad">    
        <?php echo $con_page_ad_feed; // ad ?>        
    </div>
<?php } ?>
<?php if($con_page_latest_show) { // show The Latest panel ?>
	<?php con_get_latest(); ?>
<?php } ?>
<?php get_footer(); // show footer ?>

with the following for registration/register.php:

                </div>
	<br class="clearer" />
	</div>
</div>
        <script type="text/javascript">
                jQuery(document).ready( function() {
                        if ( jQuery('div#blog-details').length && !jQuery('div#blog-details').hasClass('show') )
                                jQuery('div#blog-details').toggle();
                        jQuery( 'input#signup_with_blog' ).click( function() {
                                jQuery('div#blog-details').fadeOut().toggle();
                        });
                });
        </script>
	<div class="right-panel sidebar">
 	<div class="inner"> 
	<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar($sidebar) ) : else : ?>
                <div id="tabbed-posts">
                    <ul class="tabnav">
                    <li><a href="#tabs-popular">Popular</a></li>
                    <li><a href="#tabs-recent">Recent</a></li>
                    <li><a href="#tabs-comments">Comments</a></li>
                    <li><a href="#tabs-tags">Tags</a></li>
                    </ul>
			<div class="tabdiv-wrapper">
                        <div id="tabs-popular" class="tabdiv">
                            <ul>
				<?php // create popular query
                                $postcount=0;
				$args='order=DESC&orderby=comment_count&posts_per_page=10'; 
                                $pop_loop = new WP_Query($args);
                                if ($pop_loop->have_posts()) : while ($pop_loop->have_posts()) : $pop_loop->the_post(); $postcount++; ?>
                                    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
                                <?php endwhile; 
                                endif; ?> 
                                <li class="last gentesque tooltip" title="View all articles sorted by comment count"><a href="<?php echo home_url(); ?>/<?php con_get_feed_link('comment_count') ?>">More</a></li>
                            </ul>
                        </div>
                        <div id="tabs-recent" class="tabdiv">
                        	<ul>
                            <?php // create recent query
                                $postcount=0;
				$args='order=DESC&orderby=date&posts_per_page=10'; 
                                $pop_loop = new WP_Query($args);
                                if ($pop_loop->have_posts()) : while ($pop_loop->have_posts()) : $pop_loop->the_post(); $postcount++; ?>
                                    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
                                <?php endwhile; 
                                endif; ?> 
                                <li class="last gentesque tooltip" title="View all articles sorted by date"><a href="<?php echo home_url(); ?>/<?php con_get_feed_link('date') ?>">More</a></li>
                            </ul>
                        </div>
                         <div id="tabs-comments" class="tabdiv">
                            <ul>
                            <?php //get recent comments
							$args = array(
								'status' => 'approve',
								'number' => 10
							);	
							$comments = get_comments($args);
							foreach($comments as $comment) :								
								$commentcontent = strip_tags($comment->comment_content);			
								if (strlen($commentcontent)>110) {
									$commentcontent = substr($commentcontent, 0, 107) . "...";
								}
								$commentauthor = $comment->comment_author;
								if (strlen($commentauthor)>50) {
									$commentauthor = substr($commentauthor, 0, 47) . "...";			
								}
								$commentid = $comment->comment_ID;
								$commenturl = get_comment_link($commentid); ?>
								<li><a href="<?php echo $commenturl; ?>">"<?php echo $commentcontent; ?>"<span> -&nbsp;<?php echo $commentauthor; ?></span></a></li>
							<?php endforeach; ?>
                            </ul>
                        </div> 
                        <div id="tabs-tags" class="tabdiv">
                            <?php wp_tag_cloud('smallest=8&largest=22&number=20&orderby=name'); ?>
                        </div>
                    </div>
                </div>
                <div class="widget">
                     <div class="header-left">&nbsp;</div>
                    <div class="header-middle">
                        <h2 class="gentesque"><?php _e(' About Continuum ', 'continuum' ); ?></h2>
                    </div>
                    <div class="header-right">&nbsp;</div>
                    <br class="clearer" />
                    <div class="content-wrapper">
                        <div class="content">
                            <p>
                            	<?php _e( "This is a custom sidebar. Continuum gives you lots of custom sidebar possibilities. You can use the Continuum Theme Options page to specify which pages have a unique sidebar. Or, you can use the same sidebar for all of your pages using the Sidebar Default widget panel. If you do specify that you want a unique sidebar for an area of your site, such as the Search page, you can use the corresponding built-in Sidebar Search widget panel.", 'continuum' ); ?>
                            </p>
                            <p>
                            	<?php _e( "In fact, Continuum comes standard with 19 unique sidebars. Wow, we're starting to sound like a car commercial, so we'll add that you don't have to use all of them if you don't want. Continuum harnesses the power of absolute customization while at the same time having a quality of meekness: you can forget about all the settings and get yourself up and running in no time flat.", 'continuum' ); ?>								
                            </p>
                        </div>
                   </div>
                </div>
           <?php endif; ?>
        </div>
    </div>
    <br class="clearer" />
</div>
<?php if($con_page_ad_post_show) { ?>
    <div class="full-width-ad">    
        <?php echo $con_page_ad_post; // ad ?>        
    </div>
<?php } ?>
<?php if($con_page_feed_show) { // show Feed ?>
	<?php con_get_feed(); ?>    
<?php } ?>
<?php if($con_page_ad_feed_show) { ?>
    <div class="full-width-ad">    
        <?php echo $con_page_ad_feed; // ad ?>        
    </div>
<?php } ?>
<?php if($con_page_latest_show) { // show The Latest panel ?>
	<?php con_get_latest(); ?>
<?php } ?>
<?php get_footer(); // show footer ?>

Save files.

C. Upload the 6 BP folders containing the 17 files you’ve just revised to your server wp-content/themes/continuum/

D. Copy the style modifications made in BP Twenty Ten to bottom of your theme’s stylesheet http://codex.buddypress.org/legacy/theme-dev-bp-template-pack-walkthrough-twenty-ten-bp-1-5/3/ Adjust to taste.

About these ads