Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'wordpress'

Viewing 25 results - 11,001 through 11,025 (of 32,679 total)
  • Author
    Search Results
  • #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 );
    #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/

    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

    @mercime
    Participant

    @envieme WP/BP versions? What’s the name of the theme activated in your dashboard menu > Appearahce > Themes? I have to ask again because new installations do not get the BP Default Theme served in the Appearance > Themes panel. (continued from WP Forums)

    Thanks Dan.

    EDIT – Discussion continued and issued resolved at WPorg forums.

    #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/

    WPChina
    Participant

    Yes you’re right it is a WP issue rather than BP 😉 But any thoughts on how to deal with that? I see this on the WP forums that it has not been dealt with fully yet:
    https://wordpress.org/support/topic/tweak-for-high-traffic-sites-delete-user-drop-down-menu

    Yes, deleting users from the frontend works fine, but for more systematic searches and tweaks, deleting from the backend works better (just not in this case~)

    danbp
    Participant

    hi @envieme,

    is there a simple way I can achieve this hacking the wordpress code?

    NO !
    But you can check this plugin: http://urbangiraffe.com/plugins/headspace2/

    nyxxie
    Participant

    I have a user asking me this and I tried to find the answer with no avail. Please help. It seems like such an easy problem to fix.

    I just want to make line breaks. Like the blank spaces that are in between the lines I’m writing now.

    I have the latest version of BuddyPress, WordPress. And my site is weapprovethis.com

    Thanks!

    envieme
    Participant

    I would like to use default buddypress theme on the site and just for the posts page as well as all posts type I would like to use a different theme (not template!)

    I tried researching and found just one plugin which looked promising (Jonardio multiple themes) but they do not support a buddypress site.

    Is there a simple way I can achieve this hacking the wordpress code?

    #183748
    shanebp
    Moderator

    @mercime

    hlna’s code uses the old method for storing last_activity.
    It was appropriate when written, but is no longer valid.

    It can easily be updated by following the instructions here re new API functions:
    User last_activity data and BuddyPress 2.0

    #183747
    davidprimadi
    Participant

    Hello there,

    I have this error Create a Group” /> ( http://englishjunkies.com/wp-content/uploads/2014/06/Capture.png ) at my buddypress group page when i log in.

    FYI: this is my website: http://englishjunkies.com/ — My wordpress version is 3.9.1 and my buddypress version is 2.0.1 and i use Yoast WordPress SEO..

    Can someone give me suggestion and some help?

    #183718
    @mercime
    Participant
    #183717
    @mercime
    Participant

    @johnhome That is so strange. Sanity checks re xampp installation:

    1. The only plugin you’ve activated is BuddyPress and you are using the Twenty Fourteen theme, correct?
    2. Your WP version is 3.9.1 and BP version is 2.0.1 (not the 2.0 mentioned above)?
    3. Missing pages only happening in individual member pages, i.e. Members Directory page is working and are the Groups Directory and individual Group pages?
    4. To make sure that BP download is not corrupted, could you check if the members files and folders/files within as seen here https://plugins.svn.wordpress.org/buddypress/tags/2.0.1/bp-templates/bp-legacy/buddypress/members/single/ are also in your xampp htdocs/yourfoldername/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/ folder

    #183686
    @mercime
    Participant

    @zvi18 We are all volunteers here living in different time zones and try to help as many people that we can. You do not need to pay BuddyPress for anything. You are also free to hire a developer by posting at http://jobs.wordpress.net/ or somewhere else. Thanks.

    #183678
    whedlund
    Participant

    I need to disable the Extended Profile fields for users. I’m importing their data from our database into WordPress so they can view their info and also search for other members; but they can’t be allowed to change the data as it’s not all data they have permission to update (like membership level, etc.) Plus, we’re not setup to sync their changes in buddypress with our internal database yet.

    I’ve done some searching and can’t seem to find a solution. I hope there’s one out there.

    Thanks in advance for your help.

    chuckingit
    Participant

    these errors are still happening and today i checked error log to find that a hacker (or bot) within 2 minutes launched 73 attempts to login with non existing username and created 26k error file … thus i’m concerned that this kind of login errors could crash my site by rogue attacks like this … below is clip from first entry and the last one …

    accordingly, anybody have any suggestions as to how i can prevent this from happening ..??.. i just installed the login lock down plugin on site 16 thus this should help to limit login attempts but still, BuddyPress seems like it is hiccupping in this dept by looking for non-existant users ..??..

    
    [05-Jun-2014 08:43:58 UTC] WordPress database error Table 'mysite_wp01main.wp01_16_signups' doesn't exist for query SELECT * FROM wp01_16_signups WHERE active = 0 AND user_login = 'islandbread' ORDER BY signup_id DESC LIMIT 0, 1 made by wp_signon, wp_authenticate, apply_filters('authenticate'), call_user_func_array, bp_core_signup_disable_inactive, BP_Signup::get
    [05-Jun-2014 08:45:50 UTC] WordPress database error Table 'mysite_wp01main.wp01_16_signups' doesn't exist for query SELECT * FROM wp01_16_signups WHERE active = 0 AND user_login = 'islandbread' ORDER BY signup_id DESC LIMIT 0, 1 made by wp_signon, wp_authenticate, apply_filters('authenticate'), call_user_func_array, bp_core_signup_disable_inactive, BP_Signup::get
    
    #183667
    danbp
    Participant
    #183665
    danbp
    Participant

    @hatherley

    “why” is sometimes a complex question… in your case i think, ajax handling of comment and topic ID’s. FYI you probably have to search on Trac for some devs point of views about “replies” or “group activity”.

    For example (but not direct answers)
    https://buddypress.trac.wordpress.org/ticket/5014#comment:3
    https://buddypress.trac.wordpress.org/ticket/2587
    etc

    #183662
    John.Home
    Participant

    The member pages like profile, messages, etc are missing. Or are there broken links?
    Fresh wordpress install, fresh buddypress install, nothing else.

    whedlund
    Participant

    I am trying to write a function that will send me an email whenever a user makes a change to one of their profile fields. Thanks to Chris Perryman at Revelation Concept I was able to figure out how to do this when the user makes changes to a standard wordpress profile field like nickname or user_email.

    But she and I both got stuck trying to apply her awesome solution to buddypress xprofile fields. Here’s the thread from yesterday’s conversation between she and I.

    I would be super grateful if anyone has any ideas on what we’re missing. Thanks!

    #183660
    danbp
    Participant

    Hi @cronhound,
    perhaps consider this plugin: http://buddydev.com/plugins/bp-limit-members-per-group/
    or if you’re confortable with PHP study this old plugin: https://wordpress.org/plugins/buddypress-restrict-group-creation/

    cronhound
    Participant

    Hi, I’m currently setting up a team system on my WordPress site and to do this I’m using buddypress. At the moment, users can join up to more than one team and that’s not the way I’d like it to work. So before I code a plugin to stop that, is there any pre-existing plugins/guides that stop users from joining and creating more than one group?

    #183640
    shughey
    Participant

    I am using the latest version of both WordPress and BuddyPress (along with bbpress). I have two questions,

    1. What is the difference between the Profile link and Settings Profile link?
    2. The Profile link (upper left) works fine but the Settings:Profile link goes to a blank page.

    Thanks for any help,
    Sam Hughey

    alfredojp
    Participant

    I’m running WordPress 3.9.1 running Maya Shop Child theme.
    buddypress latest version

    I currently changed the avatar to go to the profile page when i’m on the shopping cart page however when i’m on the profile page i want the user to go to the change avatar page. To try and fix this I created a new member-home-2 that links to the change avatar page and I put it in the home.php in place of <?php bp_get_template_part( ‘members/single/member-header’) ?> however but that seems to be used across the site no matter where i am and it overwrote the change i intended for the shopping cart page.

    Can someone please help me with this?

    CommonEasy
    Participant

    Hi there,

    I try to perform a procedure query which updates the wp_bp_xprofile_data table with information from a view. The procedure should be started when somebody updates his profile. this is the code i use in bp-custom.php.

    function something_updated_profile() {
    
      $wpdb->query("CALL dekking_ophalen( )");
      
      }
    add_action('xprofile_updated_profile', 'something_updated_profile');

    however, when i update my profile i only see a white page ( i have debugger enabled). i use wordpress 3.9.1 & bp 2.0.1. The stored procedure is stated as:

     INSERT INTO wp_bp_xprofile_data
    ( field_id,  user_id, value )
    
    SELECT 15, User,  dekking_absoluut
    FROM  dekking
    
    On duplicate KEY UPDATE 
    wp_bp_xprofile_data.value=(SELECT dekking.dekking_absoluut
      FROM dekking
      WHERE dekking.user=wp_bp_xprofile_data.user_id )

    what point am i missing here?

Viewing 25 results - 11,001 through 11,025 (of 32,679 total)
Skip to toolbar