Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 14,701 through 14,725 (of 69,016 total)
  • Author
    Search Results
  • #230729

    In reply to: Spam/Bot users

    danbp
    Participant

    It’s not buddypress but WP who manage registering and concerning bots, they go directly on your server.

    A good starting point is to read the WP Codex:
    https://codex.wordpress.org/Hardening_WordPress

    And at least,
    Never use “admin” as username
    Never user wp_ as table prefix

    If you search for “spam” on this forum, you will find many topics about this subject.
    And the latest one, even if not directly related to your issue, is one of the sticky post on the forum homepage. https://buddypress.org/support/topic/this-is-why-we-cant-have-nice-things/

    #230724
    danbp
    Participant

    Sorry to answer you with a big laught, it’s not html but php. 😀
    You should also find the time to read more attentively the forum, or search by keywords.
    in this case: hide xprofile fields

    https://buddypress.org/support/search/hide+xprofile+fields/

    You’re welcome. Glad you got it. 😉

    #230723
    danbp
    Participant

    Sorry i just realized i forgot a point….

    If your install is at the site root, aka www folder
    /xampp/www/testbuddy/
    /xampp/www/testbuddy/wp-content/
    /xampp/www/testbuddy/wp-content/plugins/buddypress/
    …..

    the htaccess rules should look like this

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    Just in case of

    #230721
    danbp
    Participant

    if you’re using latest xampp, you have respect the new way to declare DNS. One for the server itself, and one for the site.
    :80 virtual host port is a server rule and has nothing to do with buddypress.

    127.0.0.1 localhost
    ::1 localhost

    AND (this is a bit new), you have to set the same for each site running locally

    127.0.0.1 buddylocal
    ::1 buddylocal

    This is how it works for wampp. Check the xampp help or documentation if you use linux to get sure.

    #230719
    @mercime
    Participant

    @jwchameleoncorp BuddyPress Codex (Documentation link above) is your friend.

    You will need to install bbPress forums which integrates well with BuddyPress. There is a step-by-step guide at https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/ You just have to decide on what forums setup you want for your site.

    #230718
    danbp
    Participant

    Hi @amic58, @tecca

    When BP is installed and xProfile is activated, the original WP profile settings are not accessible to user.

    The WP register process use only username, password and email and BuddyPress add by default a Name field as base for other extended profile fields.

    In short this means that username and name fields can contain a same information(a name, a pseudonym, a first or/and a last name). The plugin you mention is best for a WP install where user had choosen first/last name as output on post, comments, etc Once BP is activated, this became a little different.

    Now to the initial question.
    The CSS trick is a very inelegant solution as it lets everybody knowing how BP works to surround this invisibility. You’re also loosing any flexibility if you want to show some fields privately for example.

    You can do this properly with a little snippet, as explained here:

    Using bp_parse_args() to filter BuddyPress template loops

    Here’s an example which let you hide fields or fiels group to members, but not to site admin

    function bpfr_hide_profile_field_group( $retval ) {
    	if ( bp_is_active( 'xprofile' ) ) :	
    	
    	// hide profile group/field to all except admin	
    	if ( !is_super_admin() ) {		
    		//exlude fields, separated by comma
    		$retval['exclude_fields'] = '1';  
    		//exlude groups, separated by comma
    		$retval['exclude_groups'] = '1'; 			
    	} 
    	return $retval;		
    	
    	endif;
    }
    add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_field_group' );

    Add it to bp-custom.php or your child-theme functions.php

    Of course you can also choose to show a field or group, but remove the possibility for the user to edit it later. Simply add more conditionnal to the function.

    Here another example:

    function bpfr_hide_profile_edit( $retval ) {	
    	// remove field from edit tab
    	if(  bp_is_user_profile_edit() ) {		
    		$retval['exclude_fields'] = '54'; // ID's separated by comma
    	}	
    	// allow field on register page
    	if ( bp_is_register_page() ) {
    		$retval['include_fields'] = '54'; // ID's separated by comma
    		}		
    	
    	// hide the field on profile view tab
    	if ( $data = bp_get_profile_field_data( 'field=54' ) ) : 
    		$retval['exclude_fields'] = '54'; // ID's separated by comma	
    	endif;	
    	
    	return $retval;	
    }
    add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_edit' );

    Hope to be clear.

    #230717
    @mercime
    Participant

    I installed BuddyPress using the install wizard


    @ryanp11
    What version of WP and BP are you on? What theme are you using? Can you change to the Twenty Fourteen theme and check if issue is resolved?

    #230716
    buffos
    Participant

    * yes , register page is activated
    * yes, i can register
    * yes, members, activity.. etc.. show fine

    ==htaccess==

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /testbuddy/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /testbuddy/index.php [L]
    </IfModule>

    # END WordPress

    ==logs==
    no errors

    * does buddypress support non :80 ports?

    #230711
    danbp
    Participant

    Did you followed these recommendations ?

    Configure BuddyPress

    #230707
    danbp
    Participant

    hi @buffos,

    despite your details, i have to ask:

    • did also activate the Register page ?
    • can you register from the back-end ?
    • do the other component page show up ?
    • is RewriteEngine On in htaccess and is that module enabled on your local apache server ?
    • have you checked the error logs of php, apache, mysql ?

    Configure BuddyPress

    #230704
    sandyfischler
    Participant

    @amic58 I think the code referenced above doesn’t work with WP 4. I have it partly working now but I still have text links instead of icons that link. Help I’ve gotten elsewhere indicates that xprofile_get_field_data() works differently in the current version of WP. I’ve tested in both my child theme and TwentyFourteen and get the same result, so I’m sure it has something to do with the current version of WP and not the theme.

    Anyway, here is where I’m at now with trying to make this work (I have this code in a file called bp-custom.php that sits in my root Plugins folder). I used the code sample I found here:
    https://buddypress.org/support/topic/display-users-social-follow-buttons-in-profile/

    <?php
    //Social Media Icons based on the profile user info
    function member_social_extend(){
    		$dmember_id = $bp->displayed_user->id;
    		$fb_info = xprofile_get_field_data('facebook', $dmember_id);
    		$google_info = xprofile_get_field_data('googleplus', $dmember_id);
    		$linkedin_info = xprofile_get_field_data('linkedin', $dmember_id);
    		$twitter_info = xprofile_get_field_data('twitter', $dmember_id);
    		echo '<div class="member-social">';
    		if($fb_info||$google_info||$linkedin_info||$twitter_info){
    			echo 'My Social: ';
    		}
    
    		if ($fb_info) {
    		?>
    		<span class="fb-info"><?php echo $fb_info; ?>" title="My Facebook" target="_blank"><img src="<?php bloginfo('wpurl'); ?>/wp-content/themes/family-openstrap-child/images/facebook.png" /></span>
    	<?php
    	}
    		?>
    		<?php
    		if ($google_info) {
    		?>
    		<span class="google-info"><?php echo $google_info; ?>" title="My Googleplus" target="_blank"><img src="<?php bloginfo('wpurl'); ?>/wp-content/themes/family-openstrap-child/images/googleplus.png" /></span>
    	<?php
    	}
    		?>
    		<?php
    		if ($linkedin_info) {
    		?>
    		<span class="linkedin-info"><?php echo $linkedin_info; ?>" title="My LinkedIn" target="_blank"><img src="<?php bloginfo('wpurl'); ?>/wp-content/themes/family-openstrap-child/images/linkedin.png" /></span>
    	<?php
    	}
    		?>
    		<?php
    		if ($twitter_info) {
    		?>
    		<span class="twitter-info"><?php echo $twitter_info; ?>" title="My Twitter" target="_blank"><img src="<?php bloginfo('wpurl'); ?>/wp-content/themes/family-openstrap-child/images/twitter.png" /></span>
    	<?php
    	}
    	echo '</div>';
    }
    add_filter( 'bp_before_member_header_meta', 'member_social_extend' );
    ?>

    I have been adjusting this as new information comes in. One thing that seems wrong to me is putting the social icons in a theme dependent folder. If the point is to have this work with ANY theme, those image files need to live in more static location.

    When I figure out more I’ll post here (hopefully later today).

    #230695
    Tecca
    Participant

    Ah, gotcha. Alright, so if you want to remove the Mentions tab in user profiles, you’ll need to add this to your bp-custom.php or functions.php file:

    add_action( 'bp_setup_nav', 'remove_mention_tab', 999 );
    function remove_mention_tab() {
      global $bp;
    	bp_core_remove_subnav_item($bp->activity->slug, 'mentions');
    }

    To remove the latest update portion in profiles, I think the easiest solution is to open up the member-header.php file located in your theme. It’ll be in a folder called either buddypress or community:

    yourthemelocation/buddypress/members/single/member-header.php

    Find the following line and remove it:

    <span class="activity"><?php bp_last_activity( bp_displayed_user_id() ); ?></span>

    If you can’t find that file in there, it’s because the theme author hasn’t edited it specifically for the theme. You can simply drop it in the folder if it’s not there and then edit it. It’s originally located in the /plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single folder

    #230688
    danbp
    Participant
    #230656
    colabsadmin
    Participant

    Sorry I thought I was clear. I dont need an example of how to create the tab and the submenus.

    What I did was write a class that creates a top level member area tab called Favorites that consolidates all types of favorites within a single tab. https://github.com/colabsadmin/bp-favorites/blob/master/bp-favorites.php

    The submenus that have been created so far are Activity, Topics, Posts and a few more for some CPTs that I’ve written. This will make it easier for my users to find their favorites when they cant remember if it came from a topic, posts, activity, etc. Instead of jumping around from tab to tab, its all in one tab. The only submenu that doesnt work is Activity. The code, which I provided in my first question, was copied directly from Buddypress core code with one change to use ‘bp_core_new_subnav_item’. I used similar code to display content in all the other submenus. For example, the following shows the favorite topics

    // Favorite topics
    bp_core_new_subnav_item( array(
    		'name'            => __( 'Topics', 'kleo' ),
    		'slug'            => "topics",
    		'parent_url'      => $bp->displayed_user->domain . $bp->bp_nav['favorites']['slug'] . '/',
    		'parent_slug'     => $bp->bp_nav['favorites']['slug'],
    		'screen_function' => 'bbp_member_forums_screen_favorites',
    		'position'        => 10,
    		'item_css_id'     => 'favorites'
    ));
    

    So, my question, does bp_activity_screen_favorites() only work within the context of /members/membername/activity action? Or can it be used elsewhere as in /members/membersname/favorites?

    danbp
    Participant

    Do you have some “old” custom function in bp-custom.php or theme functions§.php ?
    A modified file in your child-theme ?
    Could also be a corrupted file. Reload BuddyPress via FTP if nothing of the previous is the case.

    #230648
    Tecca
    Participant

    It’s essentially a social network plugin for WordPress. Check out the about page: https://buddypress.org/about/

    #230633
    danbp
    Participant

    There is already a my favorites tab in BuddyPress menu. Don’t know what you’re trying to do, but here is a code example you can try(or study).

    Add it to your child-theme functions.php or bp-cutom.php

    function my_test_setup_nav() {
    global $bp;
    $parent_slug = 'test';
    $child_slug = 'test_sub';
    
    	//name, slug, screen, position, default subnav
    	bp_core_new_nav_item( array(
    		'name' 					=> __( 'Company Labs' ),
    		'slug' 					=> $parent_slug,
    		'screen_function' 		=> 'my_test_page_function_to_show_screen',
    		'position' 				=> 40,
    		'default_subnav_slug' 	=> $child_slug 
    	) );
    
    	//Add the subnav items to the profile/
    	// name, slug, parent_url, parent slug, screen function
    
    	// Tab 
    	bp_core_new_subnav_item( array( 
    		'name' 					=> __( 'Company Favs' ), 
    		'slug' 					=> $child_slug, 
    		'parent_url' 			=> $bp->loggedin_user->domain . $parent_slug.'/', 
    		'parent_slug'			=> $parent_slug, 
    		'screen_function' 		=> 'my_test_page_function_to_show_screen'
    		) );
    	}
    
    	// tab
    	function my_test_page_function_to_show_screen() {
    
    	//add title and content here – last is to call the members plugin.php template
    
    	add_action( 'bp_template_title', 'my_test_page_function_to_show_screen_title' );
    	add_action( 'bp_template_content', 'my_test_page_function_to_show_screen_content' );
    	bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    	}
    
    	function my_test_page_function_to_show_screen_title() {
    	echo 'Taskforce Titled';
    	}
    
    	function my_test_page_function_to_show_screen_content() {
    	echo 'Taskforce content';
    	do_action( my_test_post);
    	}
    
    add_action( 'bp_setup_nav', 'my_test_setup_nav' );
    
    function my_test_fav_custom_content() {
    ?>
    	<h3>Hello Company !</h3>
    	<p>Lorem ipsum de facto est</p>
    <?php	
    }
    add_action(  'my_test_post', 'my_test_fav_custom_content' );
    #230624
    colabsadmin
    Participant

    Sorry for posting in “installing”. Tried to edit, but it takes me to buddypress.org main page. Wont allow me to edit.

    #230622
    GurleenOberoi
    Participant

    Thanks for responding.
    Basically i am new in buddypress, i need to create a functionality in buddypress same as Friends functionality. Can you suggest.

    #230619
    danbp
    Participant
    #230608
    danbp
    Participant

    the filter name is bp_activity_can_comment
    defined: bp-activity/bp-activity-template.php:3305

    More here

    #230606
    shanebp
    Moderator

    Another approach: bp_user_query

    #230605
    shanebp
    Moderator
    #230601
    Henry Wright
    Moderator

    As far as I know, unregistered users have an ID of 0. An ID is necessary to send the message so unregistered users will all be seen as the same person by BuddyPress. So to answer your question, I don’t think it’s possible

    #230597
    Hugo Ashmore
    Participant

    @gnfb you have already created a thread for this question, please don’t create new ones and subject lines must reflect the issue. Closing this thread please bump the other if you haven’t had a response.
    https://buddypress.org/support/topic/almost-identical-to-twitter/

Viewing 25 results - 14,701 through 14,725 (of 69,016 total)
Skip to toolbar