Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 7,226 through 7,250 (of 94,559 total)
  • Author
    Search Results
  • #282115
    lookingahead
    Participant

    the direct link to the Codex page if anyone wants to see it:

    https://codex.buddypress.org/themes/guides/customizing-buddypress-avatars/

    #282114
    lookingahead
    Participant

    @prashantvatsh if you happen to have any idea how to get BuddyPress to use local avatars and stop trying to use Gravatars…while also allowing for certain classes of users (subscriber, participant, administrator, keymaster, etc.) to have their own default avatar, i’d greatly appreciate it

    lookingahead
    Participant

    Hi.

    Instructions in the BuddyPress Codex need to be updated. Specifically, regarding options detailed in a screenshot. It was updated 5 months ago, but apparently someone didn’t notice that at the end of the codex (help) page, its instructions and screenshot are no longer applicable. They don’t correspond to the structure of BuddyPress anymore.

    I was looking at this page because my ULTIMATE issue is that I need gravatar images to not be used…at all….and to instead just have local avatar images used in BuddyPress. I’ve gone through basically every avatar plugin in the WordPress plugin repository, and they ‘half-work’ — they fix the issue in bbPress, but not BuddyPress. And I’m using both bbPress and BuddyPress. So you get to my groups and see the “Administrators” display for the groups below the cover photo for the group. Great. BUT, lol…the Gravatar still shows for Administrators there…regardless of if bbPress behaves with plugins that shut off Gravatars and use only local avatars. Turns out that bbPress is quite amenable to using local avatars when told, but BuddyPress sticks up a middle finger to any command to behave as nicely as bbPress does with commands to use local avatars when Gravatars are shut off.

    So I need a solution for BuddyPress that shuts off Gravatars and uses local avatars.

    My users will not be allowed to upload their own avatars. Only Admins will. Ideally, I’d like a default avatar used for every ‘class’ of user…as in, a default Subscriber avatar, a default Author avatar, a default Admin avatar, a default Keymaster avatar….if that is not possible, then I need the option to have a default avatar sitewide, and then I will change the avatar myself (SOMEHOW)…..for each individual user. But regardless of how this is done, I need to be able to SHUT OFF GRAVATARS in BuddyPress. 😀

    Thanks in advance for any and all help.

    In the meantime, the BuddyPress Codex really needs an update on that “Customizing BuddyPress Avatars” page.

    Here’s what I’m talking about:

    #282110
    m1000
    Participant

    Hello,

    I would like to deregister buddypress.min.css. I used following code in functions.php of child theme

    add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 20 );
    
    function remove_default_stylesheet() {
        
        wp_dequeue_style( 'bp-nouveau-css' );
        wp_deregister_style( 'bp-nouveau-css' );
    }

    but it’s not working. I know it’s possible with bp-custom.php but I don’t want to touch the plugins directory so how to do it with functions.php in child theme?

    #282103

    In reply to: Activation Key

    Arize Nnonyelu
    Participant

    I strongly think it’s a problem with an outdated plugin or theme.

    Try to update themes and plugins, from my experience that could happen when buddypress is working with an outdated, theme or plugin.

    #282102

    In reply to: Avatar blurred

    Venutius
    Moderator

    Might be an idea to raise this as a feature request on Trac – https://buddypress.trac.wordpress.org/ Maybe they can set the cropping window to max size as a solution?

    #282101

    Topic: Avatar blurred

    in group forum Installing BuddyPress
    sorenzo
    Participant

    Hi there,

    I know this has been discussed before. But all the provided solutions, especially those ones:

    Customizing BuddyPress Avatars


    did not work. The avatar still gets blurred, even though the uploaded file is of a high resolution.
    I found out what causes this error:
    when an avatar is uploaded, the cropper sets a predefined size of the cropping window within the uploaded image (which is quite small, maybe a third of the uploaded image)
    –>users might not change the size of this predefined cropping window and just move it around to find the part they want to appear
    –>the image is then resized to the max. heigt/width set in the file wp-content\themes\x\framework\functions\plugins\buddypress.php
    this max size in my case is bigger than the cropped part of the image and therefor it gets dragged to a bigger size than it was. This causes it to appear blurred.
    I can solve this by manually fitting the cropping window as large as possible. But users will not know about this fix, so I have to find another solution. Anyone has an idea how I could achieve this? ( I was thinking about changing the preset cropping window to the maximum, but I haven´t found a way to achieve this)

    any ideas?
    thank you very much!

    #282097
    shanebp
    Moderator

    Thanks for reporting this issue.
    Since you are using WP 5.0 beta, some issues are expected.

    To make the issue is not related to your theme, please try switching momentarily to a WP theme like 2016 and see if the issue persists.

    If it does not, then the issue is probably related to your theme.

    Otherwise, please provide this info:

    1. BuddyPress version
    2. which BP template pack you are using – see wp-admin > Settings > BuddyPress > Options
    3. any javascript errors in your browser’s console
    4. any errors in the php error log for your website
    #282095

    After upgrade wordpress 5.0 beta 5-43933 everything ok with Buddypress 3.2.0 but after cliking on user message tab. The meassage inbox cant display.
    If anybody say any solve for this!!
    My theme: flatsome 3.7.1
    Website: https://microdoshomoeopathi.com

    #282091
    gossamerzzz
    Participant

    Hello! Please help me correct errors in the code ..

    
    Warning: Declaration of BP_Group_Categories::display() should be compatible with BP_Group_Extension::display($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 339
    
    Warning: Declaration of BP_Group_Categories::edit_screen() should be compatible with BP_Group_Extension::edit_screen($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 339
    
    Warning: Declaration of BP_Group_Categories::edit_screen_save() should be compatible with BP_Group_Extension::edit_screen_save($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 339
    
    Warning: Declaration of BP_Group_Categories::create_screen() should be compatible with BP_Group_Extension::create_screen($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 339
    
    Warning: Declaration of BP_Group_Categories::create_screen_save() should be compatible with BP_Group_Extension::create_screen_save($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 339
    
    Warning: Declaration of BP_Group_Categories_UserGroups::display() should be compatible with BP_Group_Extension::display($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 390
    
    Warning: Declaration of BP_Group_Categories_UserGroups::edit_screen() should be compatible with BP_Group_Extension::edit_screen($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 390
    
    Warning: Declaration of BP_Group_Categories_UserGroups::edit_screen_save() should be compatible with BP_Group_Extension::edit_screen_save($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 390
    
    Warning: Declaration of BP_Group_Categories_UserGroups::create_screen() should be compatible with BP_Group_Extension::create_screen($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 390
    
    Warning: Declaration of BP_Group_Categories_UserGroups::create_screen_save() should be compatible with BP_Group_Extension::create_screen_save($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 390
    
    Warning: Declaration of BP_Group_Categories_Create::display() should be compatible with BP_Group_Extension::display($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 508
    
    Warning: Declaration of BP_Group_Categories_Create::edit_screen() should be compatible with BP_Group_Extension::edit_screen($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 508
    
    Warning: Declaration of BP_Group_Categories_Create::edit_screen_save() should be compatible with BP_Group_Extension::edit_screen_save($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 508
    
    Warning: Declaration of BP_Group_Categories_Create::create_screen() should be compatible with BP_Group_Extension::create_screen($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 508
    
    Warning: Declaration of BP_Group_Categories_Create::create_screen_save() should be compatible with BP_Group_Extension::create_screen_save($group_id = NULL) in XXX\wp-content\plugins\bp-group-categoriestypes\includes\bp-grouptypes-classes.php on line 508

    bp-grouptypes-classes.php ====

    <?php
    class BP_Category_Group {
    	var $group_id;
    	var $parent_group_id;
    	
    	/**
    	 * BP_Category_Group()
    	 *
    	 * This is the constructor, it is auto run when the class is instantiated.
    	 * It will either create a new empty object if no ID is set, or fill the object
    	 * with a row from the table if an ID is provided.
    	 */
    	function BP_Category_Group( $group_id = null ) {
    		global $wpdb, $bp;
    		
    		if ( $group_id ) {
    			$this->group_id = $group_id;
    			
    			$this->populate( $this->group_id );
    		}
    	}
    	
    	/**
    	 * populate()
    	 *
    	 * This method will populate the object with a row from the database, based on the
    	 * ID passed to the constructor.
    	 */
    	function populate() {
    		global $wpdb, $bp, $creds;
    		$this->parent_group_id=groups_get_groupmeta($this->group_id, 'parent_cat');
    		
    	}
    	
    	function is_cat_group(){
    		global $bp;
    		if(groups_get_groupmeta($bp->groups->current_group->id, 'group_type')=='category')
    			return true;
    		return false;
    	}
    	
    	function has_sub_categories(){
    		global $wpdb,$bp;
    		$sql = $wpdb->prepare( "SELECT * FROM {$bp->groups->table_name_groupmeta} WHERE meta_key = 'parent_cat' AND meta_value = %d", $bp->groups->current_group->id );
    		if( $wpdb->get_row( $sql ))
    			return true;
    		return false;
    	}
    	
    	function has_sub_groups(){
    		global $wpdb,$bp;
    		$sql = $wpdb->prepare( "SELECT gmcat.groupid FROM {$bp->groups->table_name_groupmeta} gmcat, {$bp->groups->table_name_groupmeta} gmtype WHERE gmcat.meta_key = 'parent_cat' AND gmcat.meta_value = %d AND gmtype.meta_key = 'group_type' AND gmtype.meta_value = 'user_group'", $bp->groups->current_group->id );
    		if( $wpdb->get_var( $sql ))
    			return true;
    		return false;
    	}
    	
    	function get_all_cats(){
    		global $wpdb, $bp;
    		$sql = $wpdb->prepare( "SELECT DISTINCT gmcat.group_id FROM {$bp->groups->table_name_groupmeta} gmcat, {$bp->groups->table_name_groupmeta} gmtype WHERE gmcat.meta_key = 'parent_cat' AND gmtype.meta_key = 'group_type' AND gmtype.meta_value = 'category'" );
    		return $wpdb->get_col( $sql );
    	}
    	
    	/**
    	 * get_sub_cats()
    	 *
    	 * Accepts three parameters group type, page number, and limit.
    	 * Returns sub category group ids based off of parameters. 
    	 */	
    	function get_sub_cats($group_type = null, $page = null, $limit = null){
    		global $wpdb, $bp;
    		if( $page && $limit ){
    			$pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 
    		}
    		$sql = $wpdb->prepare( "SELECT DISTINCT gmcat.group_id, gmcat.meta_key, gmcat.meta_value as parent_cat, gmtype.meta_key, gmtype.meta_value as group_type FROM {$bp->groups->table_name_groupmeta} g, {$bp->groups->table_name_groupmeta} gmcat, {$bp->groups->table_name_groupmeta} gmtype WHERE  gmcat.meta_key = 'parent_cat' AND gmcat.meta_value = {$this->group_id} AND gmtype.meta_key = 'group_type' AND gmtype.meta_value = '{$group_type}'  {$pag_sql}" );
    		$paged_groups = $wpdb->get_col( $sql );	
    		
    		$sql = $wpdb->prepare( "SELECT DISTINCT gmcat.group_id, gmcat.meta_key, gmcat.meta_value as parent_cat, gmtype.meta_key, gmtype.meta_value as group_type FROM {$bp->groups->table_name_groupmeta} g, {$bp->groups->table_name_groupmeta} gmcat, {$bp->groups->table_name_groupmeta} gmtype WHERE  gmcat.meta_key = 'parent_cat' AND gmcat.meta_value = {$this->group_id} AND gmtype.meta_key = 'group_type' AND gmtype.meta_value = '{$group_type}' AND gmcat.group_id = gmtype.group_id" );
    		$total_groups = $wpdb->get_col( $sql );
    		$count=0;
    		//todo get rid of foreach use COUNT DISTINCT instead
    		foreach($total_groups as $group_id)
    			$count++;
    		$total_groups=$count;
    		return array( 'groups' => $paged_groups, 'total' => $total_groups );
    	}
    
    /*  Dont need these anymore	save incase needed in later version
    	function is_sub_cat($id){
    		global $wpdb, $bp;
    		$sql = $wpdb->prepare( "SELECT * FROM {$bp->groups->table_name_groupmeta} WHERE meta_key = 'parent_cat' AND meta_value = %d AND group_id = %d", $this->group_id , $id );
    		if($wpdb->get_row( $sql ))
    			return true;
    		return false;
    	}
    	
    	function is_user_group($id){
    		global $wpdb, $bp;
    		$sql = $wpdb->prepare( "SELECT * FROM {$bp->groups->table_name_groupmeta} WHERE meta_key = 'parent_cat' AND meta_value = %d AND group_id = %d", $this->group_id , $id );
    		if($wpdb->get_row( $sql ))
    			return true;
    		return false;
    	}
    */	
    // TODO combine display_categories() and display_userGroups() into one function and add in a group type parameter
    	function display_categories(){
    		global $bp;
    		$urlstr = $_SERVER["REQUEST_URI"];
    		$current=strpos($urlstr,'?page=');
    		if(!$current){
    			$current=1;
    		}
    		else
    			$current=substr($urlstr,(int)($current)+6);
    		$limit = 5;
    		$subcats=$this->get_sub_cats('category', $current, $limit);		
    		$total_subcats = $subcats['total'];
    		$paged_subcats = $subcats['groups'];
    		$paged_subcats_num = 0;
    		foreach($paged_subcats as $groupid)
    			 $paged_subcats_num++;
    		$pagination = array(
    	  'base' => site_url() . '/' . $bp->groups->slug . '/' . bp_get_group_slug() . '/sub-categories%_%', //%_% is replaced by the format below
    	  'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number
    	  'total' => round(($total_subcats / $limit)+0.4),
    	  'current' => $current,
    	  'show_all' => false,
    	  'prev_next' => true,
    	  'prev_text' => __('&larr;'),
    	  'next_text' => __('&rarr;'),
    	  'end_size' => 5,
    	  'mid_size' => 2,
    	  'type' => 'plain',
    	  'add_args' => false, // array of query args to add
    	  'add_fragment' => ''
    		);
    		?>
    		<h4>Sub Categories</h4>
    		<?php
    		if($current>1){
    			$first_group=(($current-1)*$limit)+1;
    			$sec_group = ($first_group)+$paged_subcats_num-1;
    		} else{
    			$first_group=1;
    			$sec_group = $paged_subcats_num;
    		}
    		?>
    		<div class="pag-count" id="group-dir-count">Viewing group <?php echo $first_group ?> to <?php echo $sec_group ?> (of <?php echo $total_subcats ?> groups)</div>
    		<?php
    	  	echo paginate_links( $pagination );
    	  	?>
    	  	<ul id="groups-list" class="item-list">
    	  	<?php
    		foreach($paged_subcats as $groupid){
    			$group = new BP_Groups_Group($groupid);
    			 if ( !$avatar = bp_core_fetch_avatar( array( 'item_id' => $group->id, 'object' => 'group', 'type' => 'thumb', 'avatar_dir' => 'group-avatars', 'alt' => __( 'Group avatar', 'buddypress' ), 'id' => $group->id, 'class' => 'avatar' ) ) )
                 	$avatar = '<img src="' . attribute_escape( $group->avatar_thumb ) . '" class="avatar" alt="' . attribute_escape( $group->name ) . '" />';
     
    			?>
    			<li>
    					<div class="item-avatar">
    						<a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug . '/' . $group->slug . '/'  ?>"><?php echo $avatar;//bp_get_group_avatar( 'id='.$group->id ) ?></a>
    					</div>
    		
    					<div class="item">
    						<div class="item-title"><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug . '/' . $group->slug . '/' ?>"><?php echo $group->name ?></a></div>
    						<div class="item-meta"><span class="activity"><?php printf( __( 'active %s ago', 'buddypress' ), bp_get_group_last_active($group) ) ?></span></div>
    		
    						<div class="item-desc"><?php echo bp_create_excerpt( bp_get_group_description($group), 20) ?></div>
    		
    						<?php do_action( 'bp_directory_groups_item' ) ?>
    					</div>
    					
    					<div class="action">
    						<?php bp_group_join_button($group) ?>
    
    					<div class="meta">
    						<?php bp_get_group_type($group) ?>
    					</div>
    
    						<?php do_action( 'bp_directory_groups_actions' ) ?>
    					</div>
    		
    					<div class="clear"></div>
    			</li>
    			
    			<?php	
    		}
    		?>
    		</ul>
    		<?php
    		echo paginate_links( $pagination );	
    	}
    	
    	function display_userGroups(){
    		global  $bp;
    		$urlstr = $_SERVER["REQUEST_URI"];
    		$current=strpos($urlstr,'?page=');
    		if(!$current){
    			$current=1;
    		}
    		else
    			$current=substr($urlstr,(int)($current)+6);
    		$limit = 20;
    		$subcats=$this->get_sub_cats('user_group', $current, $limit);
    		$total_subcats = $subcats['total'];
    		$paged_subcats = $subcats['groups'];
    		$paged_subcats_num = 0;
    		foreach($paged_subcats as $groupid)
    			 $paged_subcats_num++;
    		$pagination = array(
    	  'base' => site_url() . '/' . $bp->groups->slug . '/' . bp_get_group_slug() . '/groups%_%', //%_% is replaced by format (below)
    	  'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number
    	  'total' => round(($total_subcats / $limit)+0.4),
    	  'current' => $current,
    	  'show_all' => false,
    	  'prev_next' => true,
    	  'prev_text' => __('&larr;'),
    	  'next_text' => __('&rarr;'),
    	  'end_size' => 5,
    	  'mid_size' => 5,
    	  'type' => 'plain',
    	  'add_args' => false, // array of query args to add
    	  'add_fragment' => ''
    		);
    		?>
    					<h4>Groups</h4>
    		<?php
    		if(!((int)$total_subcats>0)):
    		?>
    			<div id="message"><p>Sorry there are no groups filed under this category.  You can create one if you like.</p></div>
    		<?php
    		else:
    		if($current>1){
    			$first_group=(($current-1)*$limit)+1;
    			$sec_group = ($first_group)+$paged_subcats_num-1;
    		} else{
    			$first_group=1;
    			$sec_group = $paged_subcats_num;
    		}
    		?>
    		<div class="pag-count" id="group-dir-count">Viewing group <?php echo $first_group ?> to <?php echo $sec_group ?> (of <?php echo $total_subcats ?> groups)</div>
    		<?php
    		endif;
    		echo paginate_links($pagination);
    		?>
    			<ul id="groups-list" class="item-list">
    		<?php
    		foreach($paged_subcats as $groupid){
    			$group = new BP_Groups_Group($groupid);
    			if ( !$avatar = bp_core_fetch_avatar( array( 'item_id' => $group->id, 'object' => 'group', 'type' => 'thumb', 'avatar_dir' => 'group-avatars', 'alt' => __( 'Group avatar', 'buddypress' ), 'id' => $group->id, 'class' => 'avatar' ) ) )
                 	$avatar = '<img src="' . attribute_escape( $group->avatar_thumb ) . '" class="avatar" alt="' . attribute_escape( $group->name ) . '" />';
     
    			?>
    			<li>
    					<div class="item-avatar">
    						<a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug . '/' . $group->slug . '/'  ?>"><?php echo $avatar;//bp_group_avatar( 'type=thumb&width=50&height=50&class=avatar&id='.$group->id ) ?></a>
    					</div>
    		
    					<div class="item">
    						<div class="item-title"><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug . '/' . $group->slug . '/' ?>"><?php echo $group->name ?></a></div>
    						<div class="item-meta"><span class="activity"><?php printf( __( 'active %s ago', 'buddypress' ), bp_get_group_last_active($group) ) ?></span></div>
    		
    						<div class="item-desc"><?php bp_create_excerpt( $group->description, 20 ) ?></div>
    		
    						<?php do_action( 'bp_directory_groups_item' ) ?>
    					</div>
    		
    					<div class="action">
    						<?php bp_group_join_button($group) ?>
    		
    						<div class="meta">
    							<?php echo bp_get_group_type($group) ?> / <?php echo $group->total_member_count; ?>
    						</div>
    		
    						<?php do_action( 'bp_directory_groups_actions' ) ?>
    					</div>
    		
    					<div class="clear"></div>
    			</li>
    			
    			<?php	
    		}
    		?>
    		</ul>
    		<?php
    		echo paginate_links( $pagination );
    	}
    	
    }
    // TODO combine all these group extensions into one if possible and move these out of here
    class BP_Group_Categories extends BP_Group_Extension {	
    
    	function BP_Group_Categories() {
    		global $bp;
    		$this->name = 'Sub Categories';
    		$this->slug = 'sub-categories';
    		$this->visibilty='public';
    		$this->enable_edit_item=false;
    		$this->enable_create_step = false;
    		$this->nav_item_position = 41;
    		$this->enable_nav_item = $this->enable_nav_item(); // make sure this is a categories group and it has sub categories
    		bp_core_remove_subnav_item( $bp->groups->slug, 'send-invites' );
    		bp_core_remove_subnav_item( $bp->groups->slug, 'members');
    	}
    
    	function create_screen() {
    
    	}
    
    	function create_screen_save() {
    
    	}
    
    	function edit_screen() {
    
    	}
    
    	function edit_screen_save() {
    	}
    
    	function display() {
    		/* Use this function to display the actual content of your group extension when the nav item is selected */
    		global $bp,$wp_query;
    		$displaygroup= new BP_Category_Group($bp->groups->current_group->id);
    		$displaygroup->display_categories();
    	}
    	
    	function enable_nav_item() {
    	if ( ( BP_Category_Group::has_sub_categories() ) )
    		return true;
    	else
    		return false;
    	}
    
    	function widget_display() { 
    		
    	}
    }
    if(BP_Category_Group::is_cat_group())
    bp_register_group_extension( 'BP_Group_Categories' );
    
    class BP_Group_Categories_UserGroups extends BP_Group_Extension {	
    
    	function BP_Group_Categories_UserGroups() {
    		global $bp;
    		$this->name = 'Groups';
    		$this->slug = 'groups';
    		$this->visibilty='public';
    		$this->enable_edit_item=false;
    		$this->enable_create_step = false;
    		$this->nav_item_position = 51;
    		$this->enable_nav_item = true; // make sure this is a categories group and it has sub categories
    		bp_core_remove_subnav_item( $bp->groups->slug, 'send-invites' );
    		bp_core_remove_subnav_item( $bp->groups->slug, 'members');
    	}
    
    	function create_screen() {
    
    	}
    
    	function create_screen_save() {
    
    	}
    
    	function edit_screen() {
    
    	}
    
    	function edit_screen_save() {
    	}
    
    	function display() {
    		// Use this function to display the actual content of your group extension when the nav item is selected 
    		global $bp;
    		$displaygroup= new BP_Category_Group($bp->groups->current_group->id);
    		$displaygroup->display_userGroups();
    	}
    
    	function widget_display() { ?>
    		<div class="info-group">
    			<h4><?php echo attribute_escape( $this->name ) ?></h4>
    			<p>
    				You could display a small snippet of information from your group extension here. It will show on the group
    				home screen.
    			</p>
    		</div>
    		<?php
    	}
    }
    if(BP_Category_Group::is_cat_group())
    bp_register_group_extension( 'BP_Group_Categories_UserGroups' );
    
    	function display_breadcrumb(){
    		global $bp;
    		?>
    		<div style="float:left;"id="bp-group-cat-breadcrumb">
    		<div style="float:left;margin:0;padding:0;">
    					<a title="Go To Home." href="<?php echo $bp->root_domain . '/'; ?>">Home</a>
    		</div>
    		<div style="float:left;margin:0;padding:0;">
    					&rarr; <a title="Go To Groups." href="<?php echo $bp->root_domain . '/' . $bp->groups->slug . '/'; ?>">Groups</a>
    		</div>
    		<?php
    		$breadcrumb="";
    		$group_id=$bp->groups->current_group->id;
    			while($group_id!=-1&&$group_id!=0):
    				$group= new BP_Groups_Group($group_id);
    				$breadcrumb=substr_replace($breadcrumb,'<div style="float:left;margin:0;padding:0;">&rarr; <a title="Go To Group '.$group->name.'." href="'.bp_get_group_permalink($group).'">'.$group->name.'</a></div>',0,0);
    				$group_id=groups_get_groupmeta($group_id, 'parent_cat');
    			endwhile;
    			echo $breadcrumb;
    		?></div>
    		<?php
    	}
    	add_action('bp_after_group_header' , 'display_breadcrumb');
    	function display_create(){
    		global $bp;
    		?>
    				<label for="target_uri"><?php _e( 'How to categorize this group?', 'bp-group-types' ) ?></label>
    				<select name="bp-groupcats-parent-group">
     				<option selected="selected"value="0">No Category</option>
    				 			<?php $catgroups = BP_Category_Group::get_all_cats();
    				 			foreach($catgroups as $catid):
    				 				$catgroup = new BP_Groups_Group($catid);
    				 				$parent = (int)groups_get_groupmeta($bp->groups->current_group->id,'parent_cat');
    				 				?>	
    				    			<option <?php if($parent==$catid) echo'selected="selected"' ?>value="<?php echo $catid; ?>"><?php echo $catgroup->name; ?></option>
    							<?php endforeach; ?>
    				</select>
    		<?php if(is_site_admin()):
    			if(groups_get_groupmeta($bp->groups->current_group->id, 'group_type')=='category')
    				$current_type=groups_get_groupmeta($bp->groups->current_group->id, 'group_type');
    			else
    				$current_type='user_group';
    		?>
    		<label for="target_uri"><?php _e( 'What type of group?', 'bp-group-types' ) ?></label>
    			<input type="radio" name="bp-group-type" value="user_group" <?php if($current_type=='user_group') echo 'CHECKED'  ?> /> User Group<br />
    			<input type="radio" name="bp-group-type" value="category" <?php if($current_type=='category') echo 'CHECKED' ?> /> Category
    		<?php
    		endif;
    	}
    
    	function display_create_save(){
    		global $bp;
    		if(isset($_POST['bp-groupcats-parent-group']))
    			groups_update_groupmeta($bp->groups->current_group->id, 'parent_cat',$_POST['bp-groupcats-parent-group']);
    		else
    		groups_update_groupmeta($bp->groups->current_group->id,'parent_cat', 0);
    		if(isset($_POST['bp-group-type']))
    		groups_update_groupmeta($bp->groups->current_group->id,'group_type',$_POST['bp-group-type']);
    		else
    		groups_update_groupmeta($bp->groups->current_group->id,'group_type','user_group');
    	}
    
    class BP_Group_Categories_Create extends BP_Group_Extension {	
    
    	function BP_Group_Categories_Create() {
    		global $bp;
    		$this->name = 'Category';
    		$this->slug = 'category';
    		$this->visibilty='public';
    		$this->enable_edit_item=true;
    		$this->create_step_position = 2;
    		$this->enable_nav_item = false;
    	}
    
    	function create_screen() {
    		global $bp;
    		if ( !bp_is_group_creation_step( $this->slug ) )
    			return false;
    		
    		display_create();
    		wp_nonce_field( 'groups_create_save_' . $this->slug );
    	}
    
    	function create_screen_save() {
    		global $bp;
    		check_admin_referer( 'groups_create_save_' . $this->slug );
    		display_create_save();
    	}
    
    	function edit_screen() {
    		global $bp;
    		display_create();
    		?>
    		<br /><br />
    		<input type="submit" name="save" value="Save Category Settings" />
    		<?php
    		wp_nonce_field( 'groups_edit_save_' . $this->slug );
    	}
    
    	function edit_screen_save() {
    		global $bp;
    		if(!isset($_POST['save']))
    			return false;
    		check_admin_referer( 'groups_edit_save_' . $this->slug );
    		display_create_save();
    	}
    
    	function display() {
    
    	}
    
    	function widget_display() {
    
    	}
    }
    bp_register_group_extension( 'BP_Group_Categories_Create' );
    
    ?>
    #282088
    alriknijdam
    Participant

    Alright, I’ve downloaded my entire WP directory and searched for bp_members_screen_display_profile with Notepad++ Search in Files. But the only files showing hits belong to Buddypress.

    F:\\wp-content\plugins\buddypress\bp-members\classes\class-bp-members-component.php (3 hits)
    	Line 329: 				'screen_function'     => 'bp_members_screen_display_profile',
    	Line 346: 			'screen_function' => 'bp_members_screen_display_profile',
    	Line 359: 				'screen_function'     => 'bp_members_screen_display_profile',
    F:\\wp-content\plugins\buddypress\bp-members\classes\class-bp-members-theme-compat.php (1 hit)
    	Line 58: 			do_action( 'bp_members_screen_display_profile' );
    F:\\wp-content\plugins\buddypress\bp-members\screens\profile.php (3 hits)
    	Line 15: function bp_members_screen_display_profile() {
    	Line 22: 	do_action( 'bp_members_screen_display_profile' );
    	Line 31: 	bp_core_load_template( apply_filters( 'bp_members_screen_display_profile', 'members/single/home' ) );

    CRITICAL Cannot redeclare bp_members_screen_display_profile() (previously declared in /wp-content/plugins/buddypress/bp-members/screens/profile.php:22) in /wp-content/plugins/buddypress/bp-members/screens/profile.php line 32

    How to go from here?

    Best regards,
    Alrik

    daniellekong
    Participant

    [I posted this in the bbPress support forum but posting here too in case it’s more relevant here]

    I set up bbPress following the steps in “C. Set Up Group Forums Only” in these instructions: https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/

    To test the group forums, I created a main category called “Group Forums” to be the parent of all group forums. (I don’t know why I have to do this, but I did what the instructions said. Anyone know why this is necessary if I just don’t create any forums outside of groups?)

    Anyway,
    I have a forum under a buddypress group with the permalink structure /groups/group-name/forum/

    I then created a sub-forum but when I click on it the permalink structure changes to /forums/forum/group-forums/group-forum-name/sub-forum-name/
    Which means that I’m now taken out of the groups page and in a separate forums page instead.

    Is it possible to change it so that all sub-categories and sub-forums stay within the group?

    This is necessary for the community I’m trying to create so that the page design is consistent and users don’t feel like they’re out of the group when they click on sub-forums.

    Any help with this would be appreciated!

    shanebp
    Moderator

    … taking my own profile as example, on the domain/members page it shows last online 3hrs ago, but on the right sidebar is shows last active minutes ago.

    Are you using a cache plugin?
    If so, try clearing all caches.

    But please note that you are probably referring to 2 separate items.

    afaik, last online is not a BuddyPress feature, and is being added by your theme, a plugin or some custom code.

    And last active is generated by BuddyPress.

    So, if last active is accurate, but last online is not, then please contact the creator of that code.

    Hanz17
    Participant

    Hello,

    I’m trying to change something in member-header.php, but the change does not take effect.
    But changes in register.php does take effect.

    /wp-content/themes/socialize-child/buddypress/members/single/member-header.php
    /wp-content/themes/socialize-child/buddypress/members/register.php

    Thanks for help.
    Jan

    #282068
    Venutius
    Moderator

    Hi there,

    If you are using BP Nouveau the sitewide notice widget is not supported:

    https://buddypress.trac.wordpress.org/ticket/7893

    #282066
    bumblebeegames
    Participant

    Hello, Buddies.
    I’ve got a weird issue here: I’m running a WP4.9.8 site running with BuddyPress 3.2.0. I’ve also setup a custom registration panel using “Membership Pro Ultimate WP”. This is correctly transferring the First and Last name from the registration screen into the WordPress default First Name and Last Name field.
    As I am primarilly using custom extended profile fields, I have written this script to fill in the extended fields as well:

    function update_extended_fields( $user_id ) {

    $user_info = get_userdata($user_id);
    $first_name = $user_info->first_name;
    $last_name = $user_info->last_name;
    $current_first = bp_get_profile_field_data( array( ‘field’ => ‘First Name’, ‘user_id’ => $user_id ) );
    $current_last = bp_get_profile_field_data( array( ‘field’ => ‘Last Name’, ‘user_id’ => $user_id ) );
    if ($current_first==””) {
    xprofile_set_field_data( “First Name”, $user_id, $first_name, $is_required = true );
    }
    if ($current_last==””) {
    xprofile_set_field_data( “Last Name”, $user_id, $last_name, $is_required = true );
    }
    wp_update_user( array( ‘ID’ => $user_id, ‘last_name’ => $last_name ) );
    //xprofile_set_field_data( “field_42”, $user_id, $company, $is_required = false );
    }
    add_action( ‘user_register’, ‘update_extended_fields’, 10, 1 );

    This is all working perfectly fine … until I edit the profile using buddypress on the frontend. After editing and saving it, the user’s WordPress Last Name gets lost. The extended field is still being displayed correctly.
    Any idea why this is happening?
    Thanks a lot!

    #282065
    jaybury7
    Participant

    Hi there the site wide notice widget is not appearing in my widget lists. The other widgets appear.

    The problem persists when I switch to the Twenty Fifteen theme.

    Wordpress version 4.9.8
    Buddypress version 3.2.0
    my site https://www.ac.glitterandpaperclips.com

    thanks for your help

    #282062
    #282052
    hytan96
    Participant

    I am currently building a custom edit profile page.
    The default url of buddypress will be
    http://yourwebsite/members/user/profile/edit/group/1/
    Is that possible to change it to
    http://yourwebsite/members/user/profile/edit/ ?

    #282051

    In reply to: Hackers Getting In….

    bob0072
    Participant

    Thanks!! Will do! I really like buddypress and bbpress, just gotta get a handle on the trouble makers. ????????

    #282049

    In reply to: buddypres

    shanebp
    Moderator

    Your current registration page url ends with __trashed, so your link is still pointing to that page.
    You can edit links or create custom links by going to …wp-admin > Appearance > Menus

    But you cannot just replace the register page, if that is what you did.

    Have you read the
    modifying-the-registration-form

    You can customize the layout by editing the template.
    If you are using the Legacy Template pack, this is the file:
    buddypress\bp-templates\bp-legacy\buddypress\members\register.php

    Instead of editing core files, you can overload a template in your child theme.
    Read this.

    #282042
    Webmakend
    Participant

    Hello,

    I have a problem with buddypress and the Event Manager. I have a website for a primary school. parents can login and add their children in buddypress.

    Now we use the event manager and would like to use the form fields of buddypress in it. Is this possible?

    I hope someone could help me.

    Roy

    #282035
    Monique23
    Participant

    Hi there,

    My client wants to have a community website based on WordPress and BuddyPress. On this site, they want members to be able to share knowledge (courses, lessons et cetera) through sort of demand and supply. So members should be be able to publish their own request or offer. Someone places an offer for a training X and someone else places a request looking for a training X. In this way they can (find a) match.

    For the time being this will be done with no exchange of funds. They consider at a later stage to start working with paid memberships.

    Is this possible with BuddyPress? Or would we need a specific addon/plugin for that? Can you give some advise please?

    Thanks & regards,
    Monique

    #282024
    iamdev
    Participant

    Can anyone help i am having problem caching buddypress site logged in user are served the cached page

    #282018
    bob0072
    Participant

    I have been using bbpress and buddypress on my website as a test of usability. I have it ticked so that new users can create accounts, BUT, I must approve them before they become active. I have had a few hackers circumvent this, and create a user account, AND activate it. How are they doing this, and how do I stop it?

Viewing 25 results - 7,226 through 7,250 (of 94,559 total)
Skip to toolbar