Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 9,976 through 10,000 (of 69,015 total)
  • Author
    Search Results
  • danbp
    Participant

    The function tells gettext() to change a string to another. It use a switch called $original_string. If not explicit enough, this means the original phrase or words you want to modify. You see it near ‘case’. And right of return, you can put your words.
    The present example use only one case. But you can add more. (See php switch)

    function abcd_gettext( $translated, $original_text, $domain ) {
    
        if ( 'buddypress' !== $domain )  
               return $translated;
    
        switch ( $original_text ) {
            case 'STING YOU WANT TO MODIFY':
                return 'MODIFIED STRING';
    
            default:
                return $translated;
        }
    }
    add_filter( 'gettext', 'abcd_gettext', 20, 3 );

    IMPORTANT

    Why to use po/mo if this kind of function can be used ?

    – because po/mo is much faster as only loaded once.
    – using this function force gettext to recalculate all strings one by one at each string load. Imagine what will happen on your server if you translate all 1970(BP2.6) BP’s string like this!
    – this function can be handy only in case you need to change a few words. I wouldn’t use it for more as 10 strings.
    – it’s also handy if you already use a mo file, but need temporary a different word/string.

    So you’re warned. Best practice to change strings is to use po/mo files. See codex for details.

    #254769
    sharmavishal
    Participant
    #254765

    In reply to: global avatar

    junglejim620
    Participant

    Hi Buddypress,

    That is cool, I been wanted to change the sizes ,etc for the avatar for long time as well. Thanks much on this help!

    However, my initial help I want is just to ADD an image above each member avatar, without touch any codes (see below link).

    I only able to find the php to add this cherry image shown on the members page ONLY? Which I wanted globally on every members!

    Here is the link I used for the members page, but also want to locate that (CLASS=AVATAR )for other files and directory that I can also paste the same link global for all avatar.

    <div class=”search-item”>

    <div class=”avatar”>

    Please see before and after example for the cherry above. I needed to find that MAIN/GLOBAL area as well.

    Please advise help, thanks
    cherry on each avatar

    #254754
    danbp
    Participant

    @dono12,

    when the cover image option is enabled, BP use cover-image-header.php not member-header.

    To get your idea to work, you need a function to calculate who is online and to add a class to the exiting div. Depending the result, we can then add an online or an offline class.
    And of course, some css rules.

    The function to add this class to the div with an action hook.
    Add it to bp-custom.php

    function check_connected(){
    
       $last_activity = bp_get_user_last_activity( bp_displayed_user_id() );
    
       $curr_time = time(); 
    
       $diff = $curr_time - strtotime( $last_activity );
    
       $time = 5 * 60;  // = 3mn - time must be in seconds
    
    if( $diff < $time ) { 
       echo 'online';
         } else {
       echo 'offline';
       }
    }
    add_action( 'online_class', 'check_connected' );

    Now you just have to add the hook to the template. Open from within child-theme, /buddypress/members/single/cover-image-header.php
    Go to line 25, and change
    <div id="item-header-avatar">
    to
    <div id="item-header-avatar" class="<?php do_action( 'online_class' ); ?>">

    Open /child-theme/style.css and add:

    div.online img {
        border: solid 2px #008000!important;
        background: rgba( 255, 255, 255, 0.8 )!important;
    }
    
    div.offline img {
        border: solid 2px #be3631!important;
        background: rgba( 255, 255, 255, 0.8 )!important;
    }

    And voila, you’re done !

    Note: you can use the same hook in member-header.php, so you can enable/disable cover-image without loosing the on/offline layout on profile header avatar.

    jameshh93
    Participant

    Wait it seems this was caused by me not setting friend connections and private message in buddypress settings..

    #254746
    navyspitfire
    Participant

    Hmm so I did that and it didn’t work. I copied the .pot file into sublime text and saved it as buddypress-en_US.po, then saved it as buddypress-en_US.mo then moved both those files into the specified folder on my server.

    #254744
    Paul Wong-Gibbs
    Keymaster

    That screen isn’t provided by BuddyPress. It’s something provided by another plugin, or perhaps within the theme. Can you identify which one?

    sharmavishal
    Participant

    this should fix it for u

    THEME UPDATE – VERSION 3.0.11 (June 7th 2016)

    Updates and fixes.

    Updated to Slider Revolution v5.2.5.3.
    Fixed BuddyPress multi-field checkboxes being output twice.
    Fixed some PHP notices.

    #254737

    In reply to: global avatar

    danbp
    Participant

    Several topics are related to your question on the forum.

    https://buddypress.org/support/search/bp_core_fetch_avatar/

    #254734

    In reply to: global avatar

    sharmavishal
    Participant
    #254729
    sharmavishal
    Participant

    @sjoerdlagraauw as r-a-y mentions test this version of bp

    BuddyPress 2.6.0 Release Candidate 1 now available for testing

    regarding @mention as danbp suggested its not a bp issue. i checked this myself. its working in default 2016 theme of wp. but NOT working for other paid themes i have.

    mostly paid themes or custom themes use their own jss/css stuff in their own custom manner which creates an issue.

    if you got jss/css issues best of be asked at the custom themes support

    #254728

    In reply to: Two Types of Activity

    sharmavishal
    Participant
    #254724
    Sjoerdlagraauw
    Participant

    Just to make sure I understand. Is it a theme problem of will it be solved in the next update of Buddypress @sharmavishal, @r-a-y and @danbp? Cause there are some other issues with ajax in this theme as well.

    I am in no hurrie so if it will be solved next week that would save me a lot of searching and debugging 😉

    Thanks for all the help!

    danbp
    Participant

    it’s explained above !
    Another solution here:

    Hide All Members Tag

    timsilva_
    Participant

    I am curious how to achieve this as well with the current version of BuddyPress (2.5.3).

    I can see that the “Create an Account” title in on line 3070 of bp-core-template.php

    How could I change this to “Register” through a hook/filter in functions.php or bp-custom.php?

    #254712

    In reply to: CV upload in Profile

    danbp
    Participant

    That plugin create field types. You asked for how to create a CV with BuddyPress. Basically, such a feature use a text-area field type. 🙂

    navyspitfire
    Participant

    Essentially my issue is I am trying to see a users profile/registration before I activate them because their registration process includes info/files that need to be vetted before activation. Now it appears there’s no way to do that under vanilla buddypress/manage signups menu, but per this thread I can see all that info under the BP registration plugin.

    The issue becomes I need to activate/approve the user twice; once under manage signups, once under BP registration.

    #254707

    In reply to: CV upload in Profile

    aamirpsy
    Participant

    Thanks, i found helpful plugin for solution.
    Plugin Name:
    BuddyPress Xprofile Custom Fields Type
    https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/

    #254706

    In reply to: colors on emails

    r-a-y
    Keymaster

    Check out this codex page:
    https://codex.buddypress.org/emails/#customize-header

    danbp
    Participant

    By default these buttons are showing on the profile header.
    The action location is defined in
    /bp-templates/bp-legacy/buddypress/members/single/member-header.php:66
    /bp-templates/bp-legacy/buddypress/members/single/cover-image-header.php:45

    When Profile Cover option is enabled (see bp settings), BP use the cove-image-header file.
    If the option is disabled, he use member-header.

    In both case, these buttons need the displayed_user_id and the loggedin_user_id to work. This means you need to be at least in the member loop.

    You want these buttons to appear elsewhere. OK. But where exactly ?
    Don’t hesitate to provide a screenshot sketching the new place.

    #254701

    In reply to: CV upload in Profile

    danbp
    Participant

    Add a a new field group to profiles, call it CV, add some fields and options and you’re done.

    User Extended Profiles

    As you certainly want to get this part a bit apart of the other profile fields, you can also use this plugin who brings a nice tabbed profile page.

    #254697
    danbp
    Participant

    Error message can be changed to whatever by using the language file (even if your site use en_Us or en_GB…).

    Customizing Labels, Messages, and URLs

    danbp
    Participant

    I made some changes on BuddyPress theme

    – if don’t show what you did, how could it be possible to help you ?

    Revert back step by step to find what you did wrong.

    #254694
    danbp
    Participant

    @bryanbatcher,

    you can use a function within bp-custom.php
    Something like:

    function bpfr_remove_nav_tabs() {
    
    	bp_core_remove_nav_item( 'messages' ); 
       // and so on for each item you want to remove
    
    }
    add_action( 'bp_setup_nav', 'bpfr_remove_nav_tabs', 15 );

    References
    nav-item
    http://hookr.io/plugins/buddypress/2.4.3/functions/bp_core_remove_nav_item/
    sub-nav-item

    bp_core_remove_subnav_item

    For the header thing, see template file and made your modification from within a child-theme.
    – profile pic and username: bp-templates/bp-legacy/buddypress/members/single/member-header.php
    – cover image: bp-templates/bp-legacy/buddypress/members/single/profile.php

    #254691
    r-a-y
    Keymaster

    Group Extension API only works for groups. Andrew is asking about member navigation.

    There is currently no member extension API.

    Check out the bp_core_new_nav_item() and bp_core_new_subnav_item() functions in bp-core/bp-core-buddybar.php:
    https://buddypress.trac.wordpress.org/browser/tags/2.6.0-rc1/src/bp-core/bp-core-buddybar.php?marks=15-38,369-399#L15

    You’d want to register your navs on the 'bp_setup_nav' hook.

    eg.

    function my_custom_bp_nav() {
    	// Fill this in from the documentation.
    	$nav_args = array();
    
    	// Add nav.
    	bp_core_new_nav_item( $nav_args );
    
    	// If you need to add another nav, copy and paste the block above and paste here.
    }
    add_action( 'bp_setup_nav', 'my_custom_bp_nav' );

    Check out this older example on the codex as well:
    https://codex.buddypress.org/developer/function-examples/core/bp_core_new_nav_item/

    Depending on your requirements, you could also use the BP Skeleton Component:
    https://github.com/boonebgorges/buddypress-skeleton-component

    However, that might be too much for what you need.

Viewing 25 results - 9,976 through 10,000 (of 69,015 total)
Skip to toolbar