Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 201 through 225 (of 838 total)
  • Author
    Search Results
  • #262699
    luisa227
    Participant

    Simple. I want to make functional code

    My actual code is:

    function bpfr_custom_profile_sub_nav() {
    	global $bp;
    	$parent_slug = 'activity';
    		
    	//Add subnav item 	 
    	bp_core_new_subnav_item( array( 
    	'name'            => __( 'Swap' ), 
    	'slug'            => 'swap', 
    	
    	'parent_url'      => $bp->displayed_user->domain . $parent_slug.'/', 
    
    	
    	'parent_slug'     => $parent_slug, 
    	
    	'screen_function' => 'swapluisa',
    	'position'        => 1,
    	
    	) );
    }
    add_action( 'bp_setup_nav', 'bpfr_custom_profile_sub_nav' );
    
    					
    	
    		
    
    function swapluisa() {
    	
    	add_action( 'bp_template_title', 'my_groups_page_function_to_show_screen_title' );
    	add_action( 'bp_template_content', 'my_groups_page_function_to_show_screen_content' );
    }
    
    add_action( 'bp_setup_nav', 'my_bp_nav_adder', 50 );
    function my_groups_page_function_to_show_screen_content() {
    	
    	return bp_get_template_part('members/single/swap');
    // (OR THIS???) return bp_get_template_part('wp-content/themes/betheme-child/buddypress/members/single');
    }
    
    function my_groups_page_function_to_show_screen_title() {
    	echo 'My new Page Title';
    }
    
    function luisa_register_template_location() {
       return 'members/single/';
    // (OR THIS????) return 'members/single/';wp-content/themes/betheme-child/buddypress/members/single'
    }
    
    function luisa_template_start() {
    
        if( function_exists( 'bp_register_template_stack' ) )
           bp_register_template_stack( 'luisa_register_template_location' );
    
    }
    add_action( 'bp_init', 'luisa_template_start' );
    

    but dont’work!

    I repeat, surely accidentally pointing to the folder, I can not figure out the exact solution. when i write “OR THIS??” i try but don’t work.

    where am I wrong? thanks

    #262676
    luisa227
    Participant

    sorry πŸ™ i don’t know!!!
    I seem to do correctly, but does not work.
    I also for testing entered my files everywhere, but does not find it anywhere !!!

    In my web-site the URL is http://mysite.it/membri/testmember1/activity/swap/ but it says “We are sorry, but the page you are looking for does not exist.”

    I have my swap.php (into there’s only a echo command)’s file in wp-content/themes/child-theme/buddypress/members/single/
    and in bp-custom.php (that is in my plugin folder) I write

    
    
    function my_groups_page_function_to_show_screen_content() {
    	bp_get_template_part('members/single/swap');
    }
    function luisa_register_template_location() {
       return 'wp-content/themes/betheme-child/buddypress/members/single';
    }

    I try also to put the swap.php file into wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single but nothing is happen.

    where am I wrong? thanks

    #262639
    djsteveb
    Participant

    disclaimer, I am not a bp dev, just a long time user, and my knowledge is far from complete.

    1 -each Profile / Member offered a separate gallery or media library?
    This was a problem from the very beginning, and perhaps the biggest problem for bp aside from lousy filter options for the activity stream. Initially it was handled by the ‘bp-album’ plugin – which was later abandoned amidst some drama – rtmedia is kind of the standard for handling this now – but it’s bloated, important functions have gotten expensive, and it’s not well supported in core or themes – it’s terrible at keeping things separated like comments on media and galleries –
    There is a new bp media like experimental thing that looks promising, and some attempts at making placeholders for bp media have been made in the past year, new hooks for bp attachment, etc. Some code has appeared on github showing a great start at possible core bp media handling – but not enough devs on that.

    if you must have media with bp I suggest getting the premium “press permit core” and ask for support in limiting what other users can see in the media library. God forbid you have a problem with users trolling other users – and you have media – as you can purchase the buddyblock plugin which will prevent most abuse user to user, but it does not hook into the separate commenting system that rt-media creates. I strongly encourage you to try the other media plugin and hope that works for what you need before getting stuck with rtmedia and no way to export it’s data to something else.

    2 a cap on how many Mb’s a user is allowed to upload for the total amount of media space
    Wordpress has a setting for this when using multi-site setup – but I think it affects only what gets posted to the user blogs aka sites. I think rtmedia has an optional purchase-able plugin for this if you use their system to allow for the media uploads – not sure if the other competing system has such functionality.

    This is a problem, and a solution should include a way for admins to look at users who have uploaded media, not just by user and space taken up, but also by date. There should be more control for deleting content with various parameters as well. I pity you if you find one day a user has uploaded 100s of photos that violate… terms.. and you have to delete each one at a time. If you find a way to handle this better with rtmedia I’d love for you to share it.

    Currently I have tons of photos and videos that users have uploaded and no good way to look at or remove, aside from going profile to profile and manually checking what shows up there. A better way may exist, I have not found it yet.

    3 – Why do all members have to be Authors in order to be able to Post because this was the only method that worked for me.
    When you say post, that sounds like posting a post to a blog – either their own multi-site blog, or perhaps to a group blog. This is how worpdress is and is great for controlling things with blogs. If you mean a user needs to be an author in order to add to thier “activity stream” aka wall or profile or whatever, I do not think they need to be a blog author in order to do so… “What’s new” activity posts work fine without being a blog author.

    4 – BuddyPress and BB Press how should I set up my .htaccess file – this should be documented somewhere around here. Wish I could tell you, I don’t have any bb press running with any buddypress installs any longer.

    If you don’t want robots to crawl your site, search for forums for making buddypress private – you’ll want to lock down your site with a password required to view anything – if you really want to block bots.. if it’s just the nicer bots you are referring to, like googlebot, yahoo and bigbots – then you can setup a robots.txt with something like

    robots *
    disallow /
    allow index.php

    but I don’t think having the main engines index your index.php is really helpful with most WP themes.. you’d probably be better with “allow /about-us/” for example.. as most wp sites I’ve worked with dont have a good ol’ index.html

    your experiences may vary..

    With BP you eaither have lots of time to code, or you take everything as is for the most part. Auttomatic has not funded bp well since the first dev Andy left – it’s basically abandoned like unwanted bastard child that gets (almost) no support – and has been for years. Instead depending mainly on volunteer contributors that obviously have to do other things like earn a living and pay bills.

    Some great people do amazing things making bp better – I appreciate those that are making the documentation better and fighting the good fight of dealing with all the wp core changes and how they affect bp when it updates – and other work to make it better. However what is seemingly most important to many webmasters and end users may not be on the roadmap for future releases – and finding developers to mod up BP is not as easy as one may hope either.

    custom fixes today may well be broken with future updates, and no one has thought about the laws in Europe for privacy and users being able to export data you have them.. all kinds of things..

    consider bp a huge mix of free code that is very experimental, and in my humble opinion should be removed from the wp plugin repo if automattic is not going to fund it properly – it certainly should not be on the first page view of plugins – anyone installing it likely has no idea what can of worms they are getting into.

    If you are thinking of the future and how you may need to moderate user’s uploads and such, I strongly encourage you to test out the mediapress alternative – but realize in order to get core functionality with bp right now you will have to add on a walled garden from one place or another.. without any import / export options – before you invest too much of your time and your user’s pictures and videos into silos you may never escape, you right as well look into and test out peepso (https://www.peepso.com )- as they seem to have more skin in the game and have made at least some import / export things if I remember correctly.

    again, I am not a bp dev. also I have not used mediapress yet – although I would with a fresh install – rtmedia has not met my expectations, although not a total fail, it is only 60% of what it should be. I have not used peepso yet either. Just a guy that’s been running a few bp installs for a few years, and my knowledge is fuzzy at best. surely @ma.tt, others thoughts, and your mileage may vary.

    #262558

    Topic: New Theme for Free

    in forum Showcase
    buddycore
    Participant

    I’ve been developing a new theme called Centro which supports the core functionality of WordPress & BuddyPress.

    It’s currently still in development but has been released and is available on GitHub.

    You can view a demo on buddycore or here also and a download is available via GitHub.

    Issues will be answered and resolved via GitHub.

    Enjoy! Happy New Year!

    **********************
    Some Features
    **********************
    Colour customizations in wp-admin.
    Support for posts and pages
    Archive pages for search and taxonomies
    Post thumbnails and post formats
    Post comments

    Activity streams
    Member profiles
    – xProfile
    – Settings
    – Friends
    – PMs
    – Notifications
    – Multisite

    Registration
    – Basic member
    — With blog creation

    Responsive
    HTML5
    Cross Browser (IE10+)

    *************************
    Group support will definitely be added in the next updates
    Plan to add support for BBPress and possibly WooCommerce

    All of this depends on how many people are using the theme and feature requests from users.

    BexxBl
    Participant

    The problem:

    I want to display different types of names on the updates in the activity stream like:

    – first name + last name for updates which the user posts on their stream
    – username/display name when there are updates in groups

    i have written the following code:

    /**
     * Get the fullname of the current member in the loop.
     *
     * Full name is, by default, pulled from xprofile's Full Name field.
     * When this field is empty, we try to get an alternative name from the
     * WP users table, in the following order of preference: display_name,
     * user_nicename, user_login.
     *
     * @return string The user's fullname for display.
     */
    function bp_get_member_name_custom() {
    	global $members_template, $bp;
    	// print_r($members_template->member->id);
    	$firstname= bp_get_profile_field_data('field=vorname&user_id='.$members_template->member->id);
    	$lastname= bp_get_profile_field_data('field=nachname&user_id='.$members_template->member->id);		
    	if(!empty($firstname) || !empty($firstname)){
    		$fullname = $firstname.' '.$lastname ;
    		return apply_filters( 'bp_get_member_name_custom',$fullname );
    	}else{
    		$name_stack = array(
    			'display_name',
    			'user_nicename',
    			'user_login'
    		);
    
    		foreach ( $name_stack as $source ) {
    			if ( !empty( $members_template->member->{$source} ) ) {
    				// When a value is found, set it as fullname and be done with it.
    				$members_template->member->fullname = $members_template->member->{$source};
    				break;
    			}
    		}
    		return apply_filters( 'bp_get_member_name_custom', $members_template->member->fullname );
    	}
    	/**
    	 * Filters the display name of current member in the loop.
    	 *
    	 * @since 1.2.0
    	 *
    	 * @param string $fullname Display name for current member.
    	 */		
    }
    
    add_filter( 'bp_get_member_name_custom', 'wp_filter_kses' );
    add_filter( 'bp_get_member_name_custom', 'stripslashes'   );
    add_filter( 'bp_get_member_name_custom', 'strip_tags'     );
    add_filter( 'bp_get_member_name_custom', 'esc_html'       );
    
    // full name to all memebr list
    add_filter('bp_get_member_name','bp_get_member_name_custom');
    	
    	
    // Fullname in group memeber list
    function bp_get_group_member_link_custom() {
    	global $members_template, $bp;
    	
    	$firstname= bp_get_profile_field_data('field=vorname&user_id='.$members_template->member->id);
    	$lastname= bp_get_profile_field_data('field=nachname&user_id='.$members_template->member->id);		
    	if(!empty($firstname) || !empty($firstname)){
    		$fullname = $firstname.' '.$lastname ;
    		return apply_filters( 'bp_get_group_member_link_custom', '<a href="' . bp_core_get_user_domain( $members_template->member->user_id, $members_template->member->user_nicename, $members_template->member->user_login ) . '">' . $fullname . '</a>' );
    	}else{
    		$name_stack = array(
    			'display_name',
    			'user_nicename',
    			'user_login'
    		);
    
    		foreach ( $name_stack as $source ) {
    			if ( !empty( $members_template->member->{$source} ) ) {
    				// When a value is found, set it as fullname and be done with it.
    				$members_template->member->fullname = $members_template->member->{$source};
    				break;
    			}
    		}
    		return apply_filters( 'bp_get_group_member_link_custom', '<a href="' . bp_core_get_user_domain( $members_template->member->user_id, $members_template->member->user_nicename, $members_template->member->user_login ) . '">' . $members_template->member->display_name . '</a>' );
    	}
    	 
    }
    add_filter('bp_get_group_member_link','bp_get_group_member_link_custom');
    
    /**
     * Fetch the display fullname for a user.
     *
     * @param int|string|bool $user_id_or_username User ID or username.
     * @return string|bool The display name for the user in question, or false if
     *                     user not found.
     */
    function bp_core_get_user_displayname_custom( $user_id_or_username ) {
    	if ( empty( $user_id_or_username ) ) {
    		return false;
    	}
    	// return $user_id_or_username;
    	if ( ! is_numeric( $user_id_or_username ) ) {
    		$user_id = bp_core_get_userid( $user_id_or_username );
    	} else {
    		$user_id = $user_id_or_username;
    	}
    	
    	if ( empty( $user_id ) ) {
    		return false;
    	}
    	
    	global $bp;
    	$firstname= bp_get_profile_field_data('field=vorname&user_id='.$user_id);
    	$lastname= bp_get_profile_field_data('field=nachname&user_id='.$user_id);	
    	// return $user_id;
    	if(!empty($firstname) || !empty($firstname)){
    		$fullname = $firstname.' '.$lastname ;
    		return apply_filters( 'bp_core_get_user_displayname_custom', $fullname, $user_id );
    	}else{
    	
    		$display_names = bp_core_get_user_displaynames( array( $user_id ) );
    
    		if ( ! isset( $display_names[ $user_id ] ) ) {
    			$fullname = false;
    		} else {
    			$fullname = $display_names[ $user_id ];
    		}
    		return apply_filters( 'bp_core_get_user_displayname_custom', $fullname, $user_id );
    	}
    	
    }
    add_filter( 'bp_core_get_user_displayname_custom', 'strip_tags', 1 );
    add_filter('bp_core_get_user_displayname_custom');
    add_filter('bp_core_get_user_displayname','bp_core_get_user_displayname_custom');
    
    // Fullname on profile page on other member
    add_filter('bp_displayed_user_fullname','bp_core_get_user_displayname_custom');	
    

    which is creating the following output on my site:

    It was working before updating to WordPress 4.7.

    Can anyone help since i can’t find a solution or error?
    Or am i thinking to complicated?

    i’m currently working on:
    Wordpress Version 4.7.
    Buddypress Version 2.7.4
    BP Xprofile Member Type Field Version 1.0.2

    #262538
    luisa227
    Participant

    Hello, sorry for my bad english but I’m Italian. I want to create a sub-menu under the menu Activity (and this is ok) and view a template’s page when I click on the sub-menu. I can not do this last step: associate the template. If I make an item (not sub) it’s work but if I make the sub-item don’t work.
    I think that the error is on this line:
    bp_core_load_template( apply_filters( 'bp_core_template_plugin','members/single/swap' ) );
    And where do I put the file swap.php? in which folder? Thank you
    This is my code:

    
    function bpfr_custom_profile_sub_nav() {
    	global $bp;
    	$parent_slug = 'activity';
    		
    	//Add subnav item 	 
    	bp_core_new_subnav_item( array( 
    	'name'            => __( 'Swap' ), 
    	'slug'            => 'swap', 
    	
    	'parent_url'      => $bp->displayed_user->domain . $parent_slug.'/', 
    
    	
    	'parent_slug'     => $parent_slug, 
    	//'parent_slug'         => $bp->slug
    	'screen_function' => 'swapluisa',
    	'position'        => 1,
    	
    	) );
    }
    add_action( 'bp_setup_nav', 'bpfr_custom_profile_sub_nav' );
    	
    
    function swapluisa() {
    	//add title and content here - last is to call the members plugin.php template
    	add_action( 'bp_template_title', 'my_groups_page_function_to_show_screen_title' );
    	add_action( 'bp_template_content', 'my_groups_page_function_to_show_screen_content' );
    	 bp_core_load_template( apply_filters( 'bp_core_template_plugin','members/single/swap' ) );
    	
    }
    
    add_action( 'bp_setup_nav', 'my_bp_nav_adder', 50 );
    function my_groups_page_function_to_show_screen_title() {
    	echo 'My new Page Title';
    }
    
    function my_groups_page_function_to_show_screen_content() {
    	echo 'My Tab content here';
    
    }
    #262478
    Andrew
    Participant

    This code allows you to sort activity from most favorited activity to least favorited activity.

    class BP_Loop_Filters {
    	// Constructor
    	public function __construct() {
    		$this->setup_filters();
    	}
    
    	// Filters
    	private function setup_filters() {
    		add_filter( 'bp_activity_get_user_join_filter', array( $this, 'order_by_most_favorited' ),     10, 6 );
    		add_filter( 'bp_activity_paged_activities_sql', array( $this, 'order_by_most_favorited'),      10, 2 );
    		// Maybe Fool Heartbeat Activities!
    		//add_filter( 'bp_before_activity_latest_args_parse_args', array( $this, 'maybe_fool_heartbeat' ), 10, 1 );
    	}
    	
    	/**
    	 * Ninja Warrior trick to reorder the Activity Loop
    	 * orders by most likes highest to least
    	 */	 
    	public function order_by_most_favorited( $sql = '', $select_sql = '', $from_sql = '', $where_sql = '', $sort = '', $pag_sql = '' ) {
    		$r = $select_sql;
    		if ( empty( $r['meta_query'] ) || ! is_array( $r['meta_query'] ) ) {
    			return $sql;
    		} else {
    			$meta_query_keys = wp_list_pluck( $r['meta_query'], 'key' );
    			if ( ! in_array( 'favorite_count', $meta_query_keys ) ) {
    				return $sql;
    			}
    			preg_match( '/\'favorite_count\' AND CAST\((.*) AS/', $sql, $match );
    			if ( ! empty( $match[1] ) ) {
    				$sql = str_replace( 'ORDER BY a.date_recorded', 'ORDER BY '. $match[1] .' + 0', $sql );
    			}
    		}
    
    		return $sql;
    	}
    }
    
    // 1, 2, 3 go !
    function bp_loop_filters() {
    	return new BP_Loop_Filters();
    }
    add_action( 'init', 'bp_loop_filters' );

    with query args like this:

    	// order activity by favorited. 
    	$query_args = array(
    		'meta_query' 	=> 	array(
    			array(
    				'key'     => 'favorite_count',
    				'value'   => 1,
    				'type'    => 'numeric',
    				'compare' => '>='
    			),
    		),
    	);

    Does anyone know how to add a new parameter argument for this? instead of favorite_count, I would like something like orderby_favorite_count.

    The reason is, I’ve got custom pages where I like to manipulate the activity loop in a variety of ways, and if I don’t use that class BP_Loop_Filters, then this query args code:

    	$query_args = array(
    		'meta_query' 	=> 	array(
    			array(
    				'key'     => 'favorite_count',
    				'value'   => 1,
    				'type'    => 'numeric',
    				'compare' => '>='
    			),
    		),
    	);

    will get activities that have been favorited at least x amount of times, but ordered by date_recorded.

    So I would like to be able to
    1. order activities from most favorited, to least favorited, and
    2. order activities by date with activities that has been favorited at least x amount of times.

    At the moment I can only do one or the other.

    Any help appreciated.

    #261851
    vidalpaulo
    Participant

    Hey guys. I’m building a social media focusing on educational matters but I’m having some problems (as I’m not a dev and have never tried to build anything so complex):

    1) How can I change labes like “following”, “followers”, “follow”, “friends”, etc. sitewide?

    2) How can I make the BuddyPress Login widget for non-logged users I’m using in redirect to a page other than wp-login? (And the same with the Activity widget for logged users)

    3) How can I customize the tabs on the Activity page? (I want to hide some options)

    Thank you very much!

    #261682
    sweeneytodd94
    Participant

    (Latest version of WP/BP; non-bundled custom theme, using child theme.)

    When adding a custom index & members-loop to /members/ in my child-theme, to make some adjustments to the members directory layout, individual profile pages break completely, I think defaulting to the pages.php but loaded without any content.

    childtheme/members/members-loop.php

    <?php 
    //global $members_template;
    //$reset_members_template = $members_template;
    
    do_action( 'bp_before_members_loop' ); ?>
    
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&per_page=21&type=alphabetical' ) ) : ?>
    
    	<div id="pag-top" class="pagination">
    		<div class="pag-count" id="member-dir-count-top"><?php bp_members_pagination_count(); ?></div>
    		<div class="pagination-links" id="member-dir-pag-top"><?php bp_members_pagination_links(); ?></div>
    	</div>
    
    	<?php do_action( 'bp_before_directory_members_list' ); ?>
    
    	<ul id="members-list" class="item-list" role="main">
    
    	<?php while ( bp_members() ) : bp_the_member(); ?>
    
    		<li>
    			<div class="item-avatar">
    				<a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar('type=full&width=80&height=80'); ?></a>
    			</div>
    			<div class="item">
    				<div class="item-title"><a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a></div>
    				<div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div>
    				<?php do_action( 'bp_directory_members_item' ); ?>
    			</div>
    			<div class="action">
    				<?php do_action( 'bp_directory_members_actions' ); ?>
    			</div>
    			<div class="clear"></div>
    		</li>
    
    	<?php endwhile; ?>
    
    	</ul>
    
    	<?php do_action( 'bp_after_directory_members_list' ); ?>
    
    	<?php bp_member_hidden_fields(); ?>
    
    	<div id="pag-bottom" class="pagination">
    		<div class="pag-count" id="member-dir-count-bottom"><?php bp_members_pagination_count(); ?></div>
    		<div class="pagination-links" id="member-dir-pag-bottom"><?php bp_members_pagination_links(); ?></div>
    	</div>
    
    <?php else: ?>
    	<div id="message" class="info"><p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p></div>
    <?php endif; 
    
    //$members_template = $reset_members_template;
    ?>
    
    <?php do_action( 'bp_after_members_loop' ); ?>

    childtheme/members/index.php

    <?php
    
    /**
     * BuddyPress - Members Directory
     *
     * @package BuddyPress
     * @subpackage bp-default - SSSMG
     */
    
    get_header( 'buddypress' ); ?>
    
    	<?php do_action( 'bp_before_directory_members_page' ); ?>
    
    <div class="container">
    <div class="row">
    <div id="primary" class="col-md-10">
    
    	<div id="content" role="main" class="<?php do_action( 'content_class' ); ?>">
    		<div class="padder">
    		<div class="buddypress">
    
    		<?php do_action( 'bp_before_directory_members' ); ?>
    		
    	<form action="" method="post" id="members-directory-form" class="dir-form">
    	
    	<?php do_action( 'bp_before_directory_members_content' ); ?>
    
    	<div id="members-dir-search" class="dir-search" role="search">
    		<?php bp_directory_members_search_form(); ?>
    	</div><!-- #members-dir-search -->
    
    	<?php do_action( 'bp_before_directory_members_tabs' ); ?>
    
    		<div class="item-list-tabs" role="navigation">
    			<ul>
    				<li class="selected" id="members-all"><a href="<?php bp_members_directory_permalink(); ?>"><?php printf( __( 'All Members %s', 'buddypress' ), '<span>' . bp_core_get_total_member_count() . '</span>' ); ?></a></li>
    
    				<?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
    					<li id="members-personal"><a href="<?php echo bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/'; ?>"><?php printf( __( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' ); ?></a></li>
    				<?php endif; ?>
    
    				<?php do_action( 'bp_members_directory_member_types' ); ?>
    
    			</ul>
    		</div><!-- .item-list-tabs -->
    
    		<div id="members-dir-list" class="members dir-list">
    			<?php //bp_get_template_part( 'members/members-loop' );
    				locate_template( array( 'members/members-loop.php' ), true );
    			?>
    		</div><!-- #members-dir-list -->
    
    		<?php do_action( 'bp_directory_members_content' ); ?>
    
    		<?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?>
    
    		<?php do_action( 'bp_after_directory_members_content' ); ?>
    
    	</form><!-- #members-directory-form -->
    
    	<?php do_action( 'bp_after_directory_members' ); ?>
    
    </div><!-- #buddypress -->
    </div><!-- .padder -->
    	</div><!-- #content -->
    
    </div><!-- primary -->
    <?php get_sidebar( 'buddypress' ); ?>
    </div><!-- row -->
    </div><!-- container -->
    
    	<?php do_action( 'bp_after_directory_members_page' ); ?>
    
    <?php get_footer( 'buddypress' ); ?>

    bp-custom.php

    <?php
    // bp-custom.php - BP hacks and mods will go here
    /**
     * Include bbPress 'topic' custom post type in WordPress' search results */
     
    function ntwb_bbp_topic_cpt_search( $topic_search ) {
    	$topic_search['exclude_from_search'] = false;
    	return $topic_search;
    }
    add_filter( 'bbp_register_topic_post_type', 'ntwb_bbp_topic_cpt_search' );
    
    /**
     * Include bbPress 'forum' custom post type in WordPress' search results */
    
    function ntwb_bbp_forum_cpt_search( $forum_search ) {
    	$forum_search['exclude_from_search'] = false;
    	return $forum_search;
    }
    add_filter( 'bbp_register_forum_post_type', 'ntwb_bbp_forum_cpt_search' );
    
    /**
     * Include bbPress 'reply' custom post type in WordPress' search results  */
    
    function ntwb_bbp_reply_cpt_search( $reply_search ) {
    	$reply_search['exclude_from_search'] = false;
    	return $reply_search;
    }
    add_filter( 'bbp_register_reply_post_type', 'ntwb_bbp_reply_cpt_search' );
    
    /**
     * Ensure that multiselect boxes have trailing brackets in their 'id' and 'name' attributes.
     *
     * These brackets are required for an array of values to be sent in the POST
     * request. Previously, bp_get_the_profile_field_input_name() contained the
     * necessary logic, but since BP 2.0 that logic has been moved into
     * BP_XProfile_Field_Type_Multiselectbox. Since bp-default does not use the
     * BP_XProfile_Field_Type classes to build its markup, it did not inherit
     * the brackets from their new location. Thus this workaround.
     */
    function bp_dtheme_add_brackets_to_multiselectbox_attributes( $name ) {
    	global $field;
    
    	if ( 'multiselectbox' === $field->type ) {
    		$name .= '[]';
    	}
    
    	return $name;
    }
    add_filter( 'bp_get_the_profile_field_input_name', 'bp_dtheme_add_brackets_to_multiselectbox_attributes' );
    
    // add the custom column headers to BP manage signups
    function philopress_modify_user_columns($column_headers) {
            $column_headers['extended'] = 'Extended';
            return $column_headers;
    }
    add_action('manage_users_page_bp-signups_columns','philopress_modify_user_columns');
    
    // dump all the pending user's meta data in the custom column
    function philopress_signup_custom_column( $str, $column_name, $signup_object ) {
    	if ( $column_name == 'extended' ) 
                 return print_r( $signup_object->meta, true );
            return $str;
    }
    add_filter( 'bp_members_signup_custom_column', 'philopress_signup_custom_column', 1, 3 );
    
    //* Redirect WordPress Logout to Home Page
    add_action('wp_logout',create_function('','wp_redirect(home_url());exit();'));
    
    //add @mentions to bbpress forum
    function custom_bbpress_maybe_load_mentions_scripts( $retval = false ) {
    	if ( function_exists( 'bbpress' ) && is_bbpress() ) {
    		$retval = true;
    	}
    	return $retval;
    }
    add_filter( 'bp_activity_maybe_load_mentions_scripts', 'custom_bbpress_maybe_load_mentions_scripts' );
    
    function bphelp_dpioml(){
    	$bphelp_my_profile_field_1='Profession';
    	$bphelp_my_profile_field_2='Primary Institution';
           if( is_user_logged_in() && bp_is_members_component() ) { ?>
            <div class="bph_xprofile_fields">
                              <?php if(bphelp_my_profile_field_1<>"") echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_1 );  ?><br />
    						  <?php if(bphelp_my_profile_field_2<>"") echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_2 );  ?><br />
                    </div><?php
           }
    }
    add_action('bp_directory_members_item', 'bphelp_dpioml');
    
    ?>

    I’ve tried all sorts of different combinations but whatever I do, the only way to get both the profile pages and the members directory to display is to remove the index and members-loop customizations. Then everything works fine, but without the adjustments to the members directory that I want (removing recent updates, for instance). Any pointers would be brilliant!

    #261369

    In reply to: Facebook plugin

    Venutius
    Moderator

    I’m not sure about integrating fb into the activity feed but you can display the FB page activity in a widget with Custom Facebook Feed, also there are a couple of Social Login plugins to allow FB users to log in to your site using their fb credentials.

    #261262
    wuteng
    Participant

    Hello!
    I have searched for such similar solution and tried to figure out how this would be possible, but could not come up with anything usefull.

    The point is:
    1. I have two CPT.
    2. Both look like profile page.
    3. I want on both of them the default activity form (extended with rtMedia and some geolocation).
    4. I want to be able to add with this form activities that will say i.e. “John posted a link in [cpt title].
    5. All activities posted to that CPT should be listed under it.

    What would be the best way to do this? I have thought about filtering activity by some custom variable – ok, I could do this in the activity loop BUT hot to assign the form and make it post/save the activity as an actual activity of given CPT?
    Something like comments but preserving activity abilities.

    I know it may be hard to do or even not possible but any feedback that could even partially help me accomplish this is great!

    P.E.A. Lutz
    Participant

    I’m developing a plugin that adds a custom group home page (groups/single/front.php. The page will display the latest activity for each component that as active for the group. In the template, I’m checking with bp_is_active( {component} ).

    The problem is that some of the components return false even though they are active, a tab is displayed for them.

    Only xprofile, activity, docs and members return true.

    global $bp; returns

    
    ["loaded_components"]=>
     ["loaded_components"]=>
      array(8) {
        ["forums"]=>
        string(6) "forums"
        ["members"]=>
        string(7) "members"
        ["profile"]=>
        string(8) "xprofile"
        ["activity"]=>
        string(8) "activity"
        ["groups"]=>
        string(6) "groups"
        ["settings"]=>
        string(8) "settings"
        ["events"]=>
        string(4) "bpeo"
        ["docs"]=>
        string(7) "bp_docs"
      }
    
    
    
    ["active_components"]=>
      array(6) {
        ["xprofile"]=>
        string(1) "1"
        ["settings"]=>
        string(1) "1"
        ["activity"]=>
        string(1) "1"
        ["groups"]=>
        string(1) "1"
        ["members"]=>
        string(1) "1"
        ["bp_docs"]=>
        string(1) "1"
      }
    
    

    In the template:

    
    <?php if ( bp_is_active( 'xprofile' ) ) : ?>
        <div class="buddypress-module xprofile intro">Intro</div>
    <?php endif; ?>
    <?php if ( bp_is_active( 'activity' ) ) : ?>
        <div class="buddypress-module activity">Activity</div>
    <?php endif; ?>
    <?php if ( bp_is_active( 'forums' ) ) : ?>
        <div class="buddypress-module forums replies">Replies</div>
        <div class="buddypress-module forums topics">Topics</div>
    <?php endif; ?>
    <?php if ( bp_is_active( 'blogs' ) ) : ?>
        <div class="buddypress-module blogs">Blogs</div>
    <?php endif; ?>
    <?php if ( bp_is_active( 'events' ) ) : ?>
        <div class="buddypress-module events">Events</div>
    <?php endif; ?>
    <?php if ( bp_is_active( 'bp_docs' ) ) : ?>
        <div class="buddypress-module docs">Docs</div>
    <?php endif; ?>
    <?php if ( bp_is_active( 'members' ) ) : ?>
        <div class="buddypress-module members">Members</div>
    <?php endif; ?>`
    
    

    Confirmed with twentysixteen
    WordPress 4.6.1
    BuddyPress 2.7.2

    arnezami
    Participant

    Hi everyone!

    We are using on our website Buddypress and want to make more SEO frendly profile url’s

    example.com/{City}/{Instrument}/{Firstname-Lastname}
    example.com/{City}/{Style}/{Band-Or-Ensemble name}

    it posible with standart post types with hierarchical categories, but I didn’t found posibility to add taxonomy to activity and groups.

    ust small clarification:

    I have url’s:
    example.com/members/{user}
    I want them to be more SEO friendly such as:
    example.com/{City}/{Instrument}/{Firstname-Lastname}
    example.com/{City}/{Style}/{Band-Or-Ensemble name}

    I have found the way, how to update url’s structure:
    in functions.php

    add_filter( 'bp_get_member_permalink', 'custom_bp_get_member_permalink' );
    
    function custom_bp_get_member_permalink(){
    	global $members_template;
    
    	$url = get_site_url();
    	$city = xprofile_get_field_data('City', $members_template->member->id);
    	$instrument = xprofile_get_field_data('Instrument', $members_template->member->id);
    	$full_name = $members_template->member->fullname;	
    	return $url.'/members/'.convert_to_url_ready($city).'/'.convert_to_url_ready($instrument).'/'.convert_to_url_ready($full_name);
    }

    but I need to rewrite url’s to get user’s pages.
    Wating for any ideas. Thanks in advance.

    #260968
    danbp
    Participant

    @masoud1111,

    You’re talking about 2 different things: profile and groups. Let me explain you a little…

    On the buddy nav bar, navigation looks similar but doesn’t work the same way on profile and on group page. While profile navigation use nav and sub-nav, the group navigation use only sub-nav.

    Also, as documented on codex, define('BP_DEFAULT_COMPONENT', '...' ); is a constant related to a component, not a sub-nav tab. It let you define the default landing component, but not the one or other sub-nav tab. For example on profiles, the component Activity has 4 sub-nav attached to it: personnal, mentions, favorites, friends, groups

    To get one of them, you need to specify a new default tab, not another component. πŸ™‚

    Buddybar main nav items on profile page
    Activity Profile Friends Groups Forums (if you use group forums)

    Default tab is Activity/personnal. To change it for “Friends” you use the constant:
    define('BP_DEFAULT_COMPONENT', 'friends' );

    To change the default landing tab from (Component/sub-tab). For example Activity/personnal to Activity/mentions, you define a new nav default tab with a function like this one:

    function bpex_set_member_default_nav() {
     
        bp_core_new_nav_default (
            array(
                'parent_slug'       => buddypress()->activity->id,
    	   // other "activity" sub_nav slugs : personal favorites friends groups
                'subnav_slug'       => 'mentions',
                'screen_function'   => 'bp_activity_screen_mentions'
            )
        );
    }
    add_action( 'bp_setup_nav', 'bpex_set_member_default_nav', 20 );

    For groups, it’s a similar technique, but a different syntax. The following example is a bit sophisticated, as it let you change the landing tab differently for each defined group.
    Depending each group activity or target, you can choose a different default tab.
    In this example, the kill bill group has Forum as landing tab, while Leon’s group use the group member directory.

    function bpex_custom_group_default_tab( $default_tab ){
    	/**
    	 * class_exists() is recommanded to avoid problems during updates 
    	 * or when Groups Component is deactivated
    	 */
    	if ( class_exists( 'BP_Group_Extension' ) ) : 
    	
    	$group = groups_get_current_group();//get the current group
    	
    	if( empty( $group ) ) {
    	 return $default_tab;
    	}
    		switch($group->slug){
    			
    			case 'kill-bill': // group name (use slug format)
    			$default_tab='forum';
    			break;
    			
    			case 'leon':
    			$default_tab='members';
    			break;
    			
    			default:		
    			$default_tab='home';// the default landing tab
    			break;
    			
    		}
    	
    	return $default_tab;
    	
    	endif; // end if ( class_exists( 'BP_Group_Extension' ) )
    }
    add_filter('bp_groups_default_extension','bpex_custom_group_default_tab');

    All this tested and working with BP 2.7.2 / Twenty Sixteen

    #260962
    Masoud
    Participant

    hi @danbp
    and many thanks for your answer.

    i’ve read the docs already. but i read them again as you said.

    according to the docs, you can

    //Change the default tab opened when looking at a group (default is home):
    define( 'BP_GROUPS_DEFAULT_EXTENSION', 'members' );

    but i want to Change the default tab opened when looking at a Activity (default is Personal):

    so i put some codes (in bp-custom), to override :

    —-
    i’ve tried this (in bp-custom):
    <?php define( 'BP_ACTIVITY_DEFAULT_EXTENSION', 'mentions' ); ?>
    but i got 500 internal error.
    —-
    i’ve also tried this one (in bp-custom):

    <?php
     if ( !defined( 'BP_DEFAULT_COMPONENT' ) ) {
     if ( bp_is_active( 'activity' ) && isset( $bp->pages->activity ) )
     $bp->default_component = 'mentions' ;
    }
    ?>

    but i got error 500 internal again.
    —-
    and i’ve tried this one too (in bp-custom):

    function change_activity_default_tab()
    {
    global $bp;
    set[$bp->activity(current_action)]->mentions
    }
    

    and 500 internal error again.
    —-

    as i’ve read in the docs before, and i realized that it might be possible to change the Activity default extension too. (activity default tab is Personal (when you browse the prof , or click on switch from another tab to activity tab (when you click on activity tab) ) )

    so i came here for detail and get more help to solve it.

    i’d be grateful if you help me with this one too.

    thanks for your time and help.

    #260892
    Masoud
    Participant

    hi.
    i am using latest versions of both wordpress and buddypress.and working on a food website.
    in this website , i wanted to allow only authors to post activity updates .
    (because it will be much easier for users to track their favorite chef recipes in the activity page.)
    so i’ve hide the ” personal ” submenu of activity tab : Activity > Personal (where people can post updates)
    with the help of following code in bp-custom.php :

    function bpfr_hide_tabs() {
    global $bp;
    if ( bp_is_user() && ( !current_user_can(author) || !current_user_can(administrator) ) ) {		
     bp_core_remove_subnav_item($bp->activity->slug, 'just-me');	}
    }
    add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );

    but now when i go to my profile (as a subscriber)
    i will see a 404 page.
    i’ve searched a lot and i noticed that , now that i’ve removed the default activity stream tab , i have to point it to another tab. so when a user profile is loading (or if a user clicks on activity tab),
    instead of default activity> personal . it load activity > mentions / OR / favorites / OR / … (some other submenu than personal )

    so my question is:

    how can i change the default activity stream tab
    from
    Activity > Personal
    To
    Activity > Mentions – Or to – Activity > Favorites – …

    thanks a lot for any help.

    #260732
    MatrixMedia
    Participant

    sorry, I have not explained well, the second point, I Repeat:

    I also tried to customize the Post Types default β€˜post’, following this guide: https://codex.buddypress.org/plugindev/post-types-activities/

    this is my function:

    add_post_type_support( 'post', 'buddypress-activity' );
    function customize_page_tracking_args() {
        // Check if the Activity component is active before using it.
        if ( ! bp_is_active( 'activity' ) ) {
            return;
        }
        bp_activity_set_post_type_tracking_args( 'post', array(
            'component_id'             => buddypress()->blogs->id,
            'action_id'                => 'new_blog_post', // or 'new_post'
            'bp_activity_admin_filter' => __( 'Published a new post', 'emt-buddypress' ),
            'bp_activity_front_filter' => __( 'Posts', 'emt-buddypress' ),
            'contexts'                 => array( 'activity', 'member' ),
            'activity_comment'         => true,
            'bp_activity_new_post'     => __( '%1$s shared a new <a href="%2$s">post</a>', 'emt-textbuddypress' ),
            'bp_activity_new_post_ms'  => __( '%1$s sahred a new <a href="%2$s">post</a>, on the site %3$s', 'emt-textbuddypress' ),
            'position'                 => 100,
        ) );
    }
    add_action( 'bp_init', 'customize_page_tracking_args' );

    but when I publish a post on activity stream, is not displayed. If I remove the function or use a new custom_post_type, in this function, it works.

    MatrixMedia
    Participant

    Hello
    I would exclude automatically, some categories of the blog post, in the activity stream. It’s possible?

    I saw that the same problem was seen here: https://buddypress.org/support/topic/possible-to-exclude-post-categories-in-activity-stream-and-make-a-user-profile-private-like-with-pri/

    But applying the same function with the latest version of BuddyPress, it does not work. is possilibe?

    I also tried to customize the Post Types default ‘post’, following this guide: https://codex.buddypress.org/plugindev/post-types-activities/

    changing fields as well:

    add_post_type_support( 'post', 'buddypress-activity' );
    function customize_page_tracking_args() {
        // Check if the Activity component is active before using it.
        if ( ! bp_is_active( 'activity' ) ) {
            return;
        }
        bp_activity_set_post_type_tracking_args( 'post', array(
            'component_id'             => buddypress()->blogs->id,
            'action_id'                => 'new_blog_post', // or 'new_post'
            'bp_activity_admin_filter' => __( 'Published a new post', 'emt-buddypress' ),
            'bp_activity_front_filter' => __( 'Posts', 'emt-buddypress' ),
            'contexts'                 => array( 'activity', 'member' ),
            'activity_comment'         => true,
            'bp_activity_new_post'     => __( '%1$s shared a new <a href="%2$s">post</a>', 'emt-textbuddypress' ),
            'bp_activity_new_post_ms'  => __( '%1$s sahred a new <a href="%2$s">post</a>, on the site %3$s', 'emt-textbuddypress' ),
            'position'                 => 100,
        ) );
    }
    add_action( 'bp_init', 'customize_page_tracking_args' );

    Finally I tried to customize the content of the post, in activity stream, as always suggested in this post:
    guide:https://codex.buddypress.org/plugindev/post-types-activities/
    or this:
    https://buddypress.org/support/topic/custom-activity-new-post-content-not-broken-after-update-the-post/

    This is my function:

    function record_cpt_activity_content( $cpt ) {		
        if ( 'new_post' === $cpt['type'] ) {
            $cpt['content'] = '<a href="' . get_permalink( $post->ID ) . '" class="activity-content-title" >' $post->ID). '</span><br />' 
    		. get_the_post_thumbnail( $post->ID, '') . '<br /> <br />'
    		. get_post_field('post_content', $post->ID);
        }
        return $cpt;	
    }
    add_filter('bp_before_activity_add_parse_args', 'record_cpt_activity_content');

    The problem is that the added HTML

    <a href="' . get_permalink( $post->ID ) . '" class="activity-content-title" >' $post->ID). '</span><br />

    tags are not preserved when the post is published. Solutions?

    Thanks for your attention and assistance

    #259959
    livingflame
    Participant

    I know that Buddypress is a good growing project, but, needs very Important Native (by Default) features.

    1) Buddypress Block User (allow users to block other users –– really allow to hide your info, activities, etc. for a specific @user-1 e.g, auto-unfriend, no more messages from the blocked. This feature integrated with rtMedia too).
    OR FOR NOW: Buddypress Report User (with Custom Motives, p. ej. “@user-1 is sending me hateful messages”, “@user-2 published an annoying activity”). So, Admin can to impose a Sanction for @user-1, e. eg. 7 days without Post, 15 days without Sending Messages… or Community Expulsion -–> Block, Delete, Banned Email). Admin can too, to Sent a Message (previously edited for auto ms saying: @user-1 you are banned for…. 30 days. Sincerely the Admins).

    * Buddypress CONFIRM Account immediately after Sign Up.

    A Social or Community without this Function is Nothing. PLEASE!!

    2) Buddypress Chat (too, Message Template, to read Messages in a specific page).

    3) Buddypress Message with Attachments.

    4) Buddypress Global Search.

    5) Buddypress Custom Menu with Account Alerts (e. g. https://goo.gl/reojsE ). Yes. I know, if you go to WP Menus, you can add to your Navbar or Menu – Profile, Activity, Notifications, etc. BUT WITHOUT Bubbles or Account Alerts… That is very very Impractical.

    6) Buddypress Media (yes I know, we have rtMedia, but its add-ons are very expensive. The complete pack = US$500 more or less).

    7) Buddypress Follow/er Native.

    8) Buddypress Share (from activity).

    9) Buddypress Autocomplete Fields (for a specific text area, e. g. City: New York, Fruits: Apple, etc.), Range Fields (e. g. I’m searching friends from 20 to 21). Buddypress Birthdate normal, but, with an option to show only the Age! 10) Buddypress Advance Search. With this you can create an advance Form with Fields for Show on Members Page or in a Widget.

    11) Buddypress with Ads Area (inside Activity, Groups, Members and Forums). (Optional from Buddypress Option Panel)

    12) Buddypress More Customizable. >> A button over Cover Profile for Easy Photo Change (yes, like Facebook has)… The CPanel with MORE Options… MORE Options for: Profile / Settings / Profile Visibility and PRIVACY!!

    For now is all. Thanks!


    @johnjamesjacoby


    @djpaul


    @boonebgorges


    @imath


    @mercime


    @hnla


    @tw2113

    wolfpup64
    Participant

    I posted up on this a little while ago, and danbp was a boss and helped me out, and I thought I could get it to work, but the end fix ended up unfortunately not really fixing the problem.

    I’m having difficulty with a profile tab that is supposed to link to a separate forums profile (wpForo) via a dynamic link that recognizes the displayed user’s page. danbp set me up with something like the below, I changed a bit to make it work better…

    function tab_custom_link_to_page() {
    
    	if ( bp_is_page( 'BP_MEMBERS' ) ||  bp_is_activity_component() || bp_is_profile_component () || bp_is_groups_component () || bp_is_notifications_component () || bp_is_messages_component () || bp_is_settings_component () || bp_is_following_component () || bp_is_followers_component () ) {
    		
    		$link = bp_get_root_domain() . '/community/profile/'. bp_get_displayed_user_username();
    		echo '<li><a href="'. $link .'">Community</a></li>'; 
    	}  
    }
    add_action( 'bp_member_options_nav', 'tab_custom_link_to_page', 10 );

    but I couldnt change the location of the tab, using code or BuddyBoss Reorder Tabs plugin, which is an issue because the theme I’m using (BuddyBoss Boss.) hides the tabs at the end under a clickable “…”. I spoke to someone at BuddyBoss and they told me I wouldn’t be able to move the tab unless it was registered as a “bp_core_new_nav_item( array(“, which requires an array like:

    function add_communityprofile_tab() {
    	global $bp;	
    	bp_core_new_nav_item( array(
    		'name'                  => 'Community',
    		'slug'                  => 'community',
    		'parent_url'            => $bp->displayed_user->domain,
    		'parent_slug'           => $bp->profile->slug,		
    		'position'              => 200,
    		'default_subnav_slug'   => 'community'
    	) );
    }
    add_action( 'bp_setup_nav', 'add_communityprofile_tab', 100 );

    which works fine until I have to link it, apparently I can’t use the tab array/slug thing to reach a dynamic link without the same “$bp->displayed_user->domain”. The link I’m trying to reach is currently at:

    http://localhost/wordpress/community/profile/*displayeduser*/

    from:

    http://localhost/wordpress/users/*displayeduser*/

    If nobody has any helpful suggestions otherwise, I’m thinking the best route might be to have the page

    http://localhost/wordpress/users/*displayeduser*/community/

    redirect to

    http://localhost/wordpress/community/profile/*displayeduser*/

    via a dynamic redirect…I’m trying to figure out how to do that.

    If anyone has any helpful advice it would be super appreciated. My boss wants me to take the site live this week and I think I’m just about there…aside from this huge disconnect between the two separate user profiles…not too bad for someone who has barely any idea what they’re doing. but yeah, sorry for the super long post. thanks for reading and hopefully you can throw me a line.

    – Andrew

    #259891

    In reply to: Please, Help Me!

    Venutius
    Moderator

    If you go to Customize>>menus you will see there are buddyPress pages there you can add to menus, but these are the user specific menu items i.e. My Activity etc. To add the global pages you just need to create a link to the page in question, i.e. http://www.yoursite.com/activity

    #259830
    notapplicable
    Participant

    WP ver 4.6.1
    BuddyPress ver 2.6.2

    Members, activity, profile, are all empty…. Register redirects to something that doesn’t exist, despite setting a known page in the dropdown. Attempted to redirect to known page, via bp-custom.php -this moved it to the page, but it rendered entirely blank. Attempted re-install of buddypress – somehow it claims there’s everything deleted but magically retains all settings when installed again – tried several themes, See mention of “bp template pack” plugin in forum that’d reset it all up, but unable to locate it as an installable plugin…

    #259693
    r083r7
    Participant

    I’m trying to edit BP theme and to figure out which files control what. Would appreciate if someone could go over a couple of basics:

    I’m looking in the folder: plugins/buddypress/bp-templates/bp-legacy/buddypress

    1) What does the /activity folder control?
    2) There’s another instance of activity related file in /members/single/activity.php
    what’s the difference?

    3) What’s the difference between
    plugins/buddypress/bp-templates/bp-legacy/ and
    plugins/buddypress/bp-templates/bp-themes/

    4) Which file controls the header? Where the cover photo and avatar image are displayed towards the top.

    5) I would like to add a custom BP page/tab. I’ve found instructions to add pages through the function.php file (located in my child-theme), is that the best way?

    #259541
    danbp
    Participant

    Ok, i misunderstood the whole… The initial question was:
    what I am trying to link to is
    http://localhost/wordpress/community/profile/<displayed_user>/

    Try this:

    function tab_custom_link_to_page() {
    
    	if ( bp_is_activity_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
    
    		// link to what you want		
    		$link = bp_get_root_domain() . '/community/profile/'. bp_get_displayed_user_username();
    		echo '<li><a href="'. $link .'">Community</a></li>'; 
    	}  
    }
    add_action( 'bp_member_options_nav', 'tab_custom_link_to_page' );
    mbfit
    Participant

    Hello posting this question again, hopefully all is well and I’m informative as much as I can be.

    WP 4.6.1
    bbpress 2.5.10
    buddypress 2.6.2
    rtmedia 4.1.6

    WP installed as directory in root, no sub-directory
    Tested with no plugins other then the ones listed above.
    Custom theme SweetDate
    No core files changed other than a landing page changed in wp-config.php
    which was this:

    /**
     * Change BuddyPress default Members landing tab.
     */
    define('BP_DEFAULT_COMPONENT', 'profile' );

    I use bluehost version that has an installed WP

    I’ve inquired this issue with the SweetDate Theme support forum and they told me to ask
    about it here.

    My site is not live yet.

    I hope that these two questions are at the right place.

    I just have 2 concerns:

    1. When creating a Group there is the option to post texts, pics, etc. If it is a long post and then it is submitted, the post comes with a ‘Read More’. When I click on it it opens up to a new page. From there if I hit the back button the post is gone. If I remove the Read More using:

    .activity-read-more {
        display: none !important;
    }

    then the text field is limited to about 30 words. Is there a way to remove the Read More and just have it as an open regular forum where there isn’t a need to expand or have it go to another page?
    I’ve shared images labeled GroupPost 1to4

    2. The other concern I have is in regards to uploading a Cover Photo for the User Group. If I post an intro text and it winds up being lengthy, the text expands the image. That seems odd. Wondered if this is how it is or on my end. Is there a way to have the text separate and not laid out on the Cover Photo? Would rather have the Cover Photo as a stand alone.
    I’ve added an image COVER-TEXT

    Thanks.

    I realize the photos are a little small.

Viewing 25 results - 201 through 225 (of 838 total)
Skip to toolbar