WordPress.org

Ready to get started?Download WordPress

Forums

BP Group Hierarchy
[resolved] Possible theme conflict (9 posts)

  1. stickFinger
    Member
    Posted 1 year ago #

    Hi all

    On my test site ( BP 1.6.5 + WP 3.5.1) i´m using this NICE plugin with the Frisco for buddy press theme and i´ve noticed a layout issue when viewing the

    mydomain.com/groups page.

    Please have a look at Image 1

    I could not find any especific css to manage this :-(

    The forums and subgroups pages look fine:

    Foruns

    Subgroups

    Changing to BP default theme everything looks good again and disabling the plugin no more issues with Frisco theme, so I´m a bit stucked.

    I´ll also post on Frisco support forum aswell trying to find any light on this.

    Thank you

    http://wordpress.org/extend/plugins/bp-group-hierarchy/

  2. stickFinger
    Member
    Posted 1 year ago #

    Here follows the bp group hierarchy templates/index.php just for investigation and possible suggestion:

    <?php
    
    /**
     * BP Group Hierarchy - Group Tree
     *
     */
    
    ?>
    
    <?php get_header( 'buddypress' ); ?>
    
    	<?php do_action( 'bp_before_directory_groups_page' ); ?>
    
    	<div id="content">
    		<div class="padder">
    
    		<?php do_action( 'bp_before_directory_groups' ); ?>
    
    		<form action="" method="post" id="groups-directory-form" class="dir-form">
    
    			<h3><?php bp_group_hierarchy_group_tree_name(); ?><?php if ( is_user_logged_in()  && bp_user_can_create_groups() ) : ?> &nbsp;<a class="button" href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create' ); ?>"><?php _e( 'Create a Group', 'buddypress' ) ?></a><?php endif; ?></h3>
    
    			<?php do_action( 'bp_before_directory_groups_content' ); ?>
    
    			<div id="group-dir-search" class="dir-search" role="search">
    
    				<?php bp_directory_groups_search_form() ?>
    
    			</div><!-- #group-dir-search -->
    
    			<?php do_action( 'template_notices' ); ?>
    
    			<div class="item-list-tabs" role="navigation">
    				<ul>
    					<li class="selected" id="tree-all"><a href="<?php echo bp_get_root_domain() . '/' . bp_get_groups_root_slug() ?>"><?php bp_group_hierarchy_group_tree_name(); ?></a></li>
    
    					<?php if ( is_user_logged_in() && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
    
    						<li id="groups-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_groups_root_slug() . '/my-groups' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
    
    					<?php endif; ?>
    
    					<?php do_action( 'bp_groups_directory_group_filter' ); ?>
    
    				</ul>
    			</div><!-- .item-list-tabs -->
    
    			<div class="item-list-tabs" id="subnav" role="navigation">
    				<ul>
    
    					<?php do_action( 'bp_groups_directory_group_types' ); ?>
    
    					<li id="groups-order-select" class="last filter">
    
    						<label for="groups-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
    						<select id="groups-order-by">
    							<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
    							<option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option>
    							<option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option>
    							<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
    
    							<?php do_action( 'bp_groups_directory_order_options' ); ?>
    						</select>
    					</li>
    				</ul>
    			</div><!-- .item-list-tabs -->
    
    			<div id="groups-dir-list" class="groups dir-list">
    			<?php
    				$loop_template = apply_filters('bp_located_template',locate_template( array( "tree/tree-loop.php" ), false ), "tree/tree-loop.php" );
    				load_template($loop_template);
    			?>
    			</div><!-- #groups-dir-list -->
    
    			<?php do_action( 'bp_directory_groups_content' ); ?>
    
    			<?php wp_nonce_field( 'directory_groups', '_wpnonce-groups-filter' ); ?>
    
    			<?php do_action( 'bp_after_directory_groups_content' ); ?>
    
    		</form><!-- #groups-directory-form -->
    
    		<?php do_action( 'bp_after_directory_groups' ); ?>
    
    		</div><!-- .padder -->
    	</div><!-- #content -->
    
    	<?php do_action( 'bp_after_directory_groups_page' ); ?>
    
    <?php get_sidebar( 'buddypress' ); ?>
    <?php get_footer( 'buddypress' ); ?>
  3. David Dean
    Member
    Plugin Author

    Posted 1 year ago #

    Hi stickFinger -

    If you hide the flat groups list (which it looks like you've done), the plugin uses the templates/tree/index.php and templates/tree/tree-loop.php files to render the group tree.

    If you choose to show the group tree but DO NOT hide the flat group list, the plugin will load just the tree-loop.php file into your theme's normal page. Can you check whether the layout issue remains when you use those settings?

    Unfortunately, those two files are modified copies of the ones from the bp-default theme, so they are only sure to look right with that theme. You may need to modify them to match your selected theme.

    If you do need to modify them, you should copy the entire tree folder into your theme's directory. This plugin will look for the template files there before using its own copies. If the layout looks fine when you have the flat group list enabled, you'll be able to get away with just copying/editing the index.php file.

    I know that was a lot of text. Please let me know if you have any questions about this!

    - David

  4. stickFinger
    Member
    Posted 1 year ago #

    Thanks a bunch for your update on this, David.

    What i´ve done so far:

    1. Moved the entire "tree" folder to frisco theme
    No effect

    2.Moved the entire "tree" folder to Frisco´s "group" folder
    No effect

    3.Moved the "tree" folder´s files to the directories above
    No effect

    4.Moved the "tree" folder to buddypress/bp-themes/bp-default
    No effect

    5.Moved the "tree" folder to buddypress/bp-themes/bp-default/groups
    No effect

    I did 4 and 5 above thinking about that Frisco is a so called bp-default´s child theme.

    It seems that bp-group-hierarchy overrides all

    I´ll be back with some additional info :-)

    Thank you

  5. zvdh
    Member
    Posted 1 year ago #

    I've had the same problem, with Frisco-for-buddypress and BP Group Hierarchy, but found that it could be fixed with only one adjusted file.

    It is indeed correct that BP Group Hierarchy overrides the theme completely, as this is necessary to display the child-groups.

    If you look for /wp-content/plugins/bp-group-hierarchy/templates/tree/index.php and replace the code with the one in this pastebin, it should be fixed completely.

    It worked for me, feel free to give additional feedback!

  6. stickFinger
    Member
    Posted 1 year ago #

    Great news.

    Thank you so much for this.
    bp-group-hierarchy and frisco are perfect.

    Now i´ll try the new index.php with some more themes.

    Thank you so much for your code and time.

  7. zvdh
    Member
    Posted 1 year ago #

    Not a problem!
    Just remember to update this specific file should you install an update of BP Group Hierarchy, as this probably overwrites this file again.

  8. David Dean
    Member
    Plugin Author

    Posted 1 year ago #

    Hi guys -

    I just tested this and confirmed that you can load these template files from your theme's directory. You had me worried! You should definitely apply these changes in the theme directory so you don't have to keep overwriting the file after plugin updates.

    In this case, the entire tree folder should be copied to the root of your theme's directory. So the result would look like:

    /wp-content/themes/frisco-for-buddypress/tree/index.php

  9. zvdh
    Member
    Posted 1 year ago #

    I hadn't even thought of this - thanks David!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic