Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 3,126 through 3,150 (of 3,820 total)
  • @shanebp

    Moderator

    For renaming things, the recommended practice is to use a language file:

    Customizing Labels, Messages, and URLs

    If you make a lot of changes, you should use that approach.

    The ‘counting bubble’ is filled using sprintf.
    You’re missing that call from your change.
    You could try
    $bp->bp_nav['messages']['name']='Mails <span>%d</span>';
    But I’d be surprised if it works.

    Here’s another method, that you can paste in your functions.php:

    function sundev_change_buddypress_profile_tabs( $translated, $original_text, $domain ) {
    
        if ( 'buddypress' !== $domain )  {
            return $translated; 
        }
    
        switch ( $original_text ) {
        
            case 'Messages <span>%d</span>':
                return 'Mails <span>%d</span>';
    
            case 'Messages':
                return 'Mails';
                			
            default:
                return $translated;
        }
    }
    add_filter( 'gettext', 'sundev_change_buddypress_profile_tabs', 10, 3 );

    Untested, but that should change the label in both a profile and the buddy-bar.

    @shanebp

    Moderator

    Yes, BP_User_Query now supports preserving the order the ‘user_ids’ parameter.

    So if you’re using a function to collect member ids, take a look at

    BP_User_Query

    Note the last entry.

    @shanebp

    Moderator

    >…not used on the profile group tabs when the user is editing their profile

    Try using the ‘xprofile_filter_profile_group_tabs’ filter hook in
    bp_profile_group_tabs() in
    \buddypress\bp-xprofile\bp-xprofile-template.php

    @shanebp

    Moderator

    Don’t use ‘id’ in your plugin, use ‘field_id’ instead.

    In reply to: Editing Field error

    @shanebp

    Moderator

    >I think it occurs because the user can not see the hidden fields.

    The field is not hidden.
    It doesn’t exist in the form because you skipped it.
    But it is included in the hidden input ‘field_ids’, near the bottom of the form.
    BP will try to save it, based on the fields ids, but not find it and then throw the error.

    Instead of skipping, try changing the field type to hidden.

    If you don’t want it in the form at all, then skip it AND remove it from the string of included ids.
    Use bp_get_the_profile_group_field_ids() and do your removals and then put the new string in the ‘field_ids’ input field.

    @shanebp

    Moderator

    I’d use the approach @boonebgorges suggests – a custom table with these fields:
    -user_id unique
    -long
    -lat

    Then you don’t need any joins.

    >individual forum posts are geo-tagged

    Based on where they were created or based on the existing geo-tag for the user?
    If the former, you can add a column to the custom table.
    If the latter, you’re good to go.

    @shanebp

    Moderator

    @lonepalmus – let’s assume you’ve cleared all the am-I-a-dummy hints suggested so far.

    The timing can be tricky on these things.
    You might try changing the priority so that the function runs later.

    Once I had an issue including a thumbnail in an entry for the activity stream upon the creation of a cpt.
    The solution was to save the cpt as a draft, do the image handling, set the cpt to publish and then create the activity entry – at which point the image was available.
    Your task is bit different, but it may be a hint.

    @shanebp

    Moderator

    >to use the normal bp loop functions to return all potential results regardless of location, and then write a PHP function to apply the radius test.

    Don’t do that.

    Use the radius, etc test first to gather matching user ids.
    Then pass them to BP_User_Query, using the bp_pre_user_query_construct hook, so that you only have BP process the relevant ids.

    BP_User_Query

    @shanebp

    Moderator

    Are you sure the post meta exists?
    And exists at the moment you are calling it?

    If your code is only a few lines, paste it here.
    Otherwise make a gist.

    [ You have Site Tracking selected here: /wp-admin/options-general.php?page=bp-components ?]

    @shanebp

    Moderator

    Unless you have some other ideas for the site, you don’t need BP.

    Google ‘WordPress booking scheduling calendar’.
    There are several premium plugins that should do the task.
    Maybe somebody else here can may a direct recommendation.

    @shanebp

    Moderator

    Members


    Links in members loop work properly here in Chrome and IE – was not logged in.

    @shanebp

    Moderator

    You don’t have to add the do_action.
    It already exists in the template file.

    Just :
    – remove any changes you made to the template
    – add the function I provided to your theme/functions.php
    – make sure all quotes are single and straight, sometimes they are changed during copy / paste.

    I just did a test and it works fine.

    @shanebp

    Moderator

    @shanebp

    Moderator

    Make sure that all quotes are not curved, as in
    xprofile_get_field_data( ‘Location’
    in the post above.
    They should be straight, like the ones in the add_action in the post above.

    @shanebp

    Moderator

    Remove your changes.

    Untested, but try this in your theme/functions.php

    function bbp_add_xprofile_field() { 
      $user_location = xprofile_get_field_data( ‘Location’, bbp_get_reply_author_id() ) ;
      if (strlen($user_location) > 0 ) 
       echo 'Location: ' . $user_location;
    }
    add_action( 'bbp_theme_after_reply_author_details', 'bbp_add_xprofile_field' );

    @shanebp

    Moderator

    > exclude creation of public groups and comments posted in them from displaying in the activity stream.

    Changing to $hide_sitewide will prevent it from appearing anywhere ( including the group activity stream ) except the activity stream for the person who created the item.

    You probably want items to appear in the group stream, so try this in bp-custom.php or your theme functions.php

    function remove_groups_from_activity( $activity ) { 
      if( $activity->component == 'groups' )
        $activity->hide_sitewide = true; 
    }
    add_action( 'bp_activity_before_save', 'remove_groups_from_activity', 1, 1); 

    Of course, this will only apply to new activity items.

    Then you need to ‘reveal’ those hidden items in a group stream…

    Create a template overload of this file:
    \bp-templates\bp-legacy\buddypress\activity\activity-loop.php

    Then before the loop, check if you’re viewing a group and if so, then change the
    bp_has_activities call to:

    if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&show_hidden=true') ) :

    The activity stream is quite flexible:

    Activity Loop

    @shanebp

    Moderator

    Just looked at your site.
    All page url include ‘index.php’.

    I don’t know why, but suggest you do a search or ask on the WP forums.

    You’re not the first to have this problem:
    https://wordpress.org/search/remove+index.php+from+urls

    @shanebp

    Moderator

    Permanently delete the Groups page – don’t just put it in the Trash.

    Then go to /admin.php?page=bp-page-settings
    And assign or create a new page for User Groups

    If that doesn’t work, then there is some other problem with either your BP or WP install.

    @shanebp

    Moderator

    The problem is the ‘index.php’ in your url.

    On this screen: /wp-admin/options-permalink.php
    Is ‘Post name’ selected?

    On this screen: wp-admin/options-general.php
    what does WordPress Address (URL) say?
    And Site Address (URL) say?

    Go to Pages > Groups and click edit.
    If you see ‘index.php’ in the permalink, remove it.

    @shanebp

    Moderator

    There are 4 tables related to xprofile. The table names all include _bp_xprofile_.

    If you’re looking at the correct database and cannot see them, then there is not much anyone can do to help you.

    @shanebp

    Moderator

    Have you activated groups via the checkbox on this screen?
    /wp-admin/options-general.php?page=bp-components

    Have you assigned a page to Groups via this screen?
    /wp-admin/admin.php?page=bp-page-settings

    The same and more info:

    Configure BuddyPress

    @shanebp

    Moderator

    @henrywright – ‘Close, but you’re way off’. -homer simpson

    Problematic:
    bp_modify_page_title( $argument1, $argument2 )

    Valid:
    bp_modify_page_title( $argument1, $argument2, $argument3 )

    Specific:
    bp_modify_page_title( $title, $sep, $seplocation )

    @mib314 – your best bet is to file a ticket with the creators of your theme.
    They’re probably calling wp_title() without passing all three arguments.
    So the BP filter call is throwing the warnings.

    @shanebp

    Moderator

    It is simple, if you use the correct parameter, anyway…

    Create a template overload of this file:
    \bp-templates\bp-legacy\buddypress\activity\activity-loop.php

    Then change this:
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>

    To this:

    <?php
    $friends = friends_get_friend_user_ids( bp_loggedin_user_id() );
    $friends[] = bp_loggedin_user_id();
    $friends_and_me = implode( ',', (array) $friends );
    $friends_and_me =  '&user_id=' . $friends_and_me;
    ?>
    
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . $friends_and_me) ) :  ?>

    Creating a template overload:

    Theme Compatibility & Template Files

    @shanebp

    Moderator

    That should be a simple task using the ‘include’ parameter in the activity loop.

    But I just tried it and couldn’t get it to work.

    Perhaps I did something dumb…

    @shanebp

    Moderator

    The link to your gist:
    https://gist.github.com/vidluther/9370018

    You’ll probably get a better response by opening a ticket at:
    https://buddypress.trac.wordpress.org/

Viewing 25 replies - 3,126 through 3,150 (of 3,820 total)
Skip to toolbar