Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 25,101 through 25,125 (of 94,569 total)
  • Author
    Search Results
  • #183862
    danbp
    Participant
    Doremdou
    Participant

    Hi 🙂

    I would like to disable commenting on mentions notifications/activities, how could I do that please? 🙂

    Because I am using bbpress with Buddypress, and when someone mentions me for example in his topic, I’ve got a notification on my profile.
    Some people on my website are directly replying and commenting to those notifications in their activity feed BUT… their answers are not showing in the forum (bbpress) topic like this! they are just commenting activies so it is useless and no one will ever see their answers on the forum.

    Can someone help? If possible I would like to disable all commenting possiblities on activity feed but keep the comment button only on: activity only notes (for example “what’s new”) and groups activities.

    Thank you very much!

    PS: sorry for my english I am trying to do my best to explain ^^
    Thanks
    Dorem

    #183856
    guoyunhebrave
    Participant

    I use BuddyPress 2.0.1 with WordPress 3.9.1. My site http://zjubot.org/ is enabled admin bar for all users. When users aren’t logged in, there should be items for log in and register in admin bar. There is also a search input.

    But when view it in mobile browser, or small window desktop browser, the admin bar is blank for non-logged-in users. That is really bad for user experience.

    It is caused by some default CSS settings of admin bar. Hope this can be fixed.

    #183854
    cwjordan
    Participant

    Instead of the template change suggested above, it works better to add the following

    /* set default BP to profile page instead of activity page */
    define( 'BP_DEFAULT_COMPONENT', 'profile' );
    

    in your wp-content/plugins/bp-custom.php file (create that file if it does not exist – see https://codex.buddypress.org/plugindev/bp-custom-php/ for more about that file).

    cwjordan
    Participant

    It may be that you need to set:

    /* set default BP to profile page instead of activity page */
    define( 'BP_DEFAULT_COMPONENT', 'profile' );
    

    in your wp-content/plugins/bp-custom.php file (create that file if it does not exist – see https://codex.buddypress.org/plugindev/bp-custom-php/ for more about that file).

    #183851
    eschlesinger2013
    Participant

    Running WP version 3.8.3 & BP Version 2.0.1

    I have bbPress (latest version) sitewide forums set up. I also have BuddyPress Group-specific forums enabled. However, the Group-specific forums aren’t working. When i click on a group forum, either through the Forum tab on a group’s page or via the link to the group’s forum in my main forum area, it takes me to the sitewide Forum Root instead.

    Under “BuddyPress Integration” in the bbPress settings area, I have selected “Enable Group Forums” and set the Group Forums Parent as “Groups”.

    Don’t know if this has anything to do with it, but the permalink structure looks kind of odd.
    The permalink for a group forum is http://”mysite.com”/groups/”groupname”/forum/
    The permalink for the main site forum is http:”mysite.com”/forums/forum/”forum root”/
    However, “Groups” and the “Forum Root” are siblings.

    I solved this problem awhile ago by deleting bbPress and BuddyPress completely (not just deactivating) and doing a clean install. However, the problem returned, possibly after a BuddyPress upgrade, and I can’t seem to fix it again. Plus, once the site goes live i don’t want to be deleting the plugins. Any fix for this?

    #183850
    godavid33
    Participant

    Ok, well I had to figure this one out. It’s a bit of a lengthy solution. I’m not going to explain everything, as I can’t for either lack of knowledge or fear of being incorrect. I’ll just give you the code, tell you what it does, and where it goes.

    First, lets add the favorite button to the comments template. Find comment.php (in /activity) and add the code:

    
    		<?php global $activities_template; ?>
    		<?php if ( bp_activity_can_favorite() ) : ?>
    			<?php
    				$my_fav_count = bp_activity_get_meta( bp_get_activity_comment_id(), 'favorite_count' );
    				
    				$my_fav_count = "<span>".$my_fav_count."</span>";
    				
    				$is_favorite = apply_filters( 'bp_get_activity_is_favorite', in_array( bp_get_activity_comment_id(), $activities_template->my_favs ) );
    			?>
    
    			<?php if ( !$is_favorite ) : ?>
    
    				<a href="<?php echo apply_filters( 'bp_get_activity_favorite_link', wp_nonce_url( home_url( bp_get_activity_root_slug() . '/favorite/' . bp_get_activity_comment_id() . '/' ), 'mark_favorite' ) ); ?>" class="tooltip-trigger fav bp-secondary-action bp-primary-action" title="<?php echo god_get_favorited_usernames(bp_get_activity_comment_id()); ?>" style="position:relative;"><?php _e( 'Like', 'buddypress' ); ?><?php echo $my_fav_count; ?></a>
    
    			<?php else : ?>
    
    				<a href="<?php echo apply_filters( 'bp_get_activity_favorite_link', wp_nonce_url( home_url( bp_get_activity_root_slug() . '/favorite/' . bp_get_activity_comment_id() . '/' ), 'mark_favorite' ) ); ?>" class="tooltip-trigger unfav bp-secondary-action bp-primary-action" title="<?php echo god_get_favorited_usernames(bp_get_activity_comment_id()); ?>" style="position:relative;"><?php _e( 'Unlike', 'buddypress' ); ?><?php echo $my_fav_count; ?></a>
    
    			<?php endif; ?>
    
    		<?php endif; ?>	
    

    This code simply adds the buttons, and gets all the necessary info and variables.

    Then, you’re going to need to modify the buddypress javascript. I personally modified both global.js and buddypress.js (through overriding in my template, which is a topic for a whole other thread), though I might be wrong in this. At any rate, look for the line (around 264 in buddypress.js):

    
    var parent = target.closest('.activity-item');
    

    and change it to

    
    var parent = target.closest('li');
    

    The reason we changed this line is so that our custom favorite button doesn’t default to grabbing the top level activity id. Now you can actually favorite comments!

    But wouldn’t it be nice if the user received a notification when someone favorited their activity? Add this bad boy to functions.php

    
    
    add_action("bp_activity_add_user_favorite","favorite_notification", 10, 2);
    
    function favorite_notification( $activity_id, $user_id = 0){
    	// By type and item_id
    	if($user_id != $activities["activities"][0]->user_id){
    		$activities = bp_activity_get_specific( array( 'activity_ids' => $activity_id, 'display_comments' => true) );
    		
    		bp_core_add_notification( $activity_id, $activities["activities"][0]->user_id, "notifier", bp_core_get_username(bp_loggedin_user_id())." liked: '".substr($activities["activities"][0]->content,0,20)."...'", $activity_id ) ;		
    	}
    }
    

    Hope this helped someone. It mostly works for me.

    #183840
    danbp
    Participant

    @wpleo,

    i checked the buddypress-pt_BR.po/mo. Sitewide Activity is correctly translated.
    I also added all gettext filters to the po, as mentionned by @shanebp
    without any result.
    I also tested with mesocolumn theme and magazine theme, with no result.

    The only solution for the moment is to change the original code to the old style way of translating a string ( __(”,”) )

    the string is in bp-activity-loader.php:109

    Change
    ‘directory_title’ => _x( ‘Sitewide Activity’, ‘component directory title’, ‘buddypress’ ),
    to
    ‘directory_title’ => __( ‘Sitewide Activity’, ‘buddypress’ ),

    will resolve the problem.

    #183839
    shanebp
    Moderator

    Just fyi – if you only have a few labels that you want to change, you can use these functions.

    https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
    https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext_with_context

    It’s a lot faster than messing with .po files.
    But you need to know if the label is using a context parameter.

    So you can use this approach for ‘Sitewide Activity’…

    function example_gettext_with_context( $translated, $text, $context, $domain ) {
    
      if ( 'buddypress' !== $domain )  
            return $translated; 
            
      switch ( $text ) {
    
            case 'Sitewide Activity':
                return 'Bongos';		
    	
            default:
                return $translated;
        }
    
        return $translated;
    }
    add_filter( 'gettext_with_context', 'example_gettext_with_context', 11, 4 );
    #183836
    shanebp
    Moderator

    You need to add this:

    _x:1,2c

    To Catalog Properties > Sources keywords in PoEdit.

    This is due to the use of the ‘context’ parameter for some titles via ‘_x’

    For example, the second element is the context parameter:
    _x( 'Sitewide Activity', 'component directory title', 'buddypress' )

    Make sure your Sources Keywords has at least these entries:

    _
    _()
    __
    __()
    _x:1,2c

    I use this approach and can change titles like ‘Sitewide Activity’

    #183834
    paco013
    Participant

    hi there.need an advice.making a web site in different language than english.most of the titles i’ve translated in different form.php. but not realy sure in which php form i can overwrite titles in buddypress plugin. can help anyone? many thanx

    #183833
    aldebaranmirko
    Participant

    thank you very much, but it definitely works because I entered the code incorrectly.

    I use RTpanel theme then /wp-content/themes/rtpanel/header.php post at bottom:

    <body onload=’ location.href=”#anchor” ‘>

    while <div id=’anchor’>whatever</div> in wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/members-loop.php

    the page to jump below the header is that of the user profile BuddyPress, where there is activity, friends, groups, messages, etc …

    then I did not understand the ‘whatever’
    sorry but it is my first website, I have already learned a lot and I would also fix this thing

    thanks again

    #183827
    danbp
    Participant
    danbp
    Participant
    #183821
    danbp
    Participant

    hi @escudero95

    here are 2 function you can use for do what you need. The first add Happy birthday on the Toolbar, near the Howdy.

    The second will add the same thing on the profile header, above @username at the right of the avatar.

    These function can be used from within bp-custom.php or theme’s functions.php

    You have to create a date type profile field and set it to be viewed by friends only.

    Naturally this is intended to be an example of use. It’s certainly perfectible. Also take care of the different comments inside the code. Have fun !

    
    function bpfr_happybirthday( $wp_admin_bar ) {
    	global $bp;
    	
    	// if user is not logged in, we show nothing
    	if ( !is_user_logged_in() )
    	return false;
    	
    	// is xprofile component active ?
    	if ( bp_is_active( 'xprofile' ) )	
    		   // fetch the birthdate
    		   // as the function should work outside of the profile loop, we first need the user_id
    		$user_id = bp_get_activity_user_id();
    			
    			// now we get the birthdate and our text to show (text | username). 53 is the field id.
    			// depending your theme, this may be adjusted by css as it goes probably on two lines
    		$birthdate = xprofile_get_field_data('53', $user_id ) ? __( 'Happy Birthday ' ) . bp_core_get_username( bp_displayed_user_id() ) : '';	
    		
    		// building the output and adding some css	 
    		$user_id = bp_displayed_user_id();
    
    		// condition for the greating on the toolbar
    		if (!is_user_logged_in( $user_id ) ) { 		
    		
    		$my_title = '<span style="float: left; width: 16px;	height: 16px; margin: 5px 5px 0 -1px; display: block; background-color: green; border-radius: 16px;"></span> '.$birthdate.' ';
    		
    			$args = array(
    			'parent'    => 'top-secondary', // position
    			'id'		=> 'birthday_item', // unique identifier
    			'title' 	=> $my_title, // the name who appears on the bar
    			);
    		
    	
    			$wp_admin_bar->add_node($args);
    		}
    	
    }
    add_action( 'admin_bar_menu', 'bpfr_happybirthday', 90 );
    
    function bpfr_happybirthday2u() {
    	global $bp;
    	
    	// if user is not logged in, we show nothing
    	if ( !is_user_logged_in() )
    	return false;
    	
    	if( bp_is_user() && ! bp_get_member_user_id() ) {
            $user_id = 'displayed: '. bp_displayed_user_id();
        } else {
            $user_id = 'get_member_user: '. bp_get_member_user_id();
        }
    	
    	// is xprofile components active ?
    	if ( bp_is_active( 'xprofile' ) )
    	
    	// fetch the birthdate
    	// as the function should work outside of the profile loop, we first need the user_id
    	$user_id = bp_get_activity_user_id();
    	
    	// now we get the birthdate and our text to show (text | username). 53 is the field id.
    	// depending your theme, this may be adjusted by css as it goes probably on two lines
    	$birthdate = xprofile_get_field_data('53', $user_id ) ? __( 'Happy Birthday ' ) . bp_core_get_username( bp_displayed_user_id() ) : '';	
    	
    	// building the output and adding some css
    	$my_title = '<div style="margin: 5px 5px 20px 5px; border:1px solid red; min-height:18px;"><div style="float: left; width: 16px; height: 16px; margin: 5px 5px 0 -1px; display: block; background-color: green; border-radius: 16px;"></div> '.$birthdate.' </div>';
    	
    	echo $birthdate;	
    	
    }
    add_action( 'bp_before_member_header_meta', 'bpfr_happybirthday2u' );

    Codex references:
    https://codex.wordpress.org/Class_Reference/WP_Admin_Bar

    Developer Resources

    Playing with the toolbar (in french but code is in english)
    http://www.geekpress.fr/wordpress/tutoriel/modifier-howdy-admin-bar-1102/

    #183816
    joeyaberle
    Participant

    I was following the directions on the codex to try and change the default landing tab for member pages. I ended up creating the bp-custom.php page, but it didn’t work. I’m not sure if the file was supposed to go in the buddypress folder or another one. Anyone know?

    Thanks,

    Joey

    Change Default Members Profile Landing Tab

    #183813
    shanebp
    Moderator

    In this context, component IDs are the name of the component.

    I would use the ‘action’ filter and leave out ‘friendship_created’.

    Before you make changes, created a template over-ride for the activity-loop template.

    See:

    Theme Compatibility & Template Files

    escudero95
    Participant

    Hello! First off, just wanted to say how impressed I am with buddypress’ functionality so far. I have freelanced web design for a while and have never found anything so handy.

    My question relates to the primary notification area in the top bar and/or activity stream. I was seeking a way to have friends’ birthdays appear there with a small thumbnail like a little candle or something of that nature but was unable to find a plugin or internet search solution for that topic. Anyone have any insight?

    Question answers:
    1. Which version of WordPress are you running? 3.9.1

    2. Did you install WordPress as a directory or subdomain install? Directory

    3. If a directory install, is it in root or in a subdirectory? Root

    4. Did you upgrade from a previous version of WordPress? If so, from which version? No

    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting. Yes

    6. Which version of BP are you running? 2.0.1

    7. Did you upgraded from a previous version of BP? If so, from which version? No

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
    bbPress, buddypics, CNN News, frontend uploader, site offline mode, video conference, buddypress like

    9. Are you using the standard BuddyPress themes or customized themes? Aggregate (from eleganthemes)

    10. Have you modified the core files in any way? no

    11. Do you have any custom functions in bp-custom.php? no

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? 2.5.4

    13. Please provide a list of any errors in your server’s log files.

    14. Which company provides your hosting? register.com

    15. Is your server running Windows, or if Linux; Apache, nginx or something else?
    Linux

    #183809
    escudero95
    Participant

    Hi,

    I also have no buddypress items in the Menu area under appearance. I am running 3.9.1. Does this functionality still exist?

    My site is at mukkytalk.com and is using Aggregate theme from eleganthemes.

    Thank you.

    #183808
    shanebp
    Moderator

    Take a look at:

    Activity Loop

    In particular: filtering-options re action and object, and filtering-examples

    #183800
    aldebaranmirko
    Participant

    Hello to all,
    I have a little problem, when I’m having a great header in the user profile page every time I click any item in the profile page refreshes brought me back to the top.
    you always need to scroll down and it is very annoying.
    you can anchor only that page so that it opens automatically below the header?
    thanks in advance

    sorry for my english ….

    Buddypress 2.01, wp 3.91

    #183798
    @mercime
    Participant

    @johnhome glad you have a working BP install using XAMPP.

    @zvi18 I would suggest that you start off by checking out BuddyPress Documentation https://codex.buddypress.org/ and explore the features https://codex.buddypress.org/buddypress-components-and-features/ Try it out first locally by installing https://make.wordpress.org/core/handbook/installing-a-local-server/installing-xampp/

    #183795

    In reply to: Avatar Cropping

    tydd
    Participant

    I resolved it by fixing wp-content/plugins/buddypress/bp-core/bp-core-avatars.php

    if ( !defined( 'BP_AVATAR_FULL_WIDTH' ) )
    		define( 'BP_AVATAR_FULL_WIDTH', 580 );
    
    if ( !defined( 'BP_AVATAR_FULL_HEIGHT' ) )
    		define( 'BP_AVATAR_FULL_HEIGHT', 580 );
    #183794
    tydd
    Participant

    BuddyPress Version 2.0.1
    bbPress Version 2.5.4

    site: http://www.ban-trai.com/
    id “hoangnam”
    pass “thethi0604”

    Problem: tiny pixelated avatar

    Possible cause:

    In the script below which i found in the source of the webpage where i crop avatar.

    There are 2 lines

    var fw = 150;
    var fh = 150;

    Which should be 580 as the original theme

    var fw = 580;
    var fh = 580;

    Please tell me what file to modify so it turn back to 580. Thank you!

    <script type="text/javascript">
            jQuery(window).load( function(){
                jQuery('#avatar-to-crop').Jcrop({
                    onChange: showPreview,
                    onSelect: showPreview,
                    onSelect: updateCoords,
                    aspectRatio: 1,
                    setSelect: [ 113, 113, 337, 337 ]
                });
                updateCoords({x: 113, y: 113, w: 337, h: 337});
            });
     
            function updateCoords(c) {
                jQuery('#x').val(c.x);
                jQuery('#y').val(c.y);
                jQuery('#w').val(c.w);
                jQuery('#h').val(c.h);
            }
     
            function showPreview(coords) {
                if ( parseInt(coords.w) > 0 ) {
                    var fw = 150;
                    var fh = 150;
                    var rx = fw / coords.w;
                    var ry = fh / coords.h;
     
                    jQuery( '#avatar-crop-preview' ).css({
                        width: Math.round(rx * 450) + 'px',
                        height: Math.round(ry * 450) + 'px',
                        marginLeft: '-' + Math.round(rx * coords.x) + 'px',
                        marginTop: '-' + Math.round(ry * coords.y) + 'px'
                    });
                }
            }
        </script>
Viewing 25 results - 25,101 through 25,125 (of 94,569 total)
Skip to toolbar