Forum Replies Created
-
PBCK ! Annoying for you, but read here please before telling “it doesn’t work” and give some information about what and how you are handling your issue.
https://buddypress.org/support/topic/when-asking-for-support-2/If you remove something from the original BP files, and this something is still appearing, you probably use a theme or a child theme containing this part.
You should also clear your navigator history. This mostly resolve such situations. π
Hi @metalmick
@username on the profile header is displayed with this code in BP 1.9.2
(see bp-themes/bp-default/members/single/members-header.php:28)if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?> <span class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></span> endif;The @ sign is hardcoded in the span, so you have to remove it manualy from the file.
To do this, you can hide it with a CSS rule or you can remove the whole if statement if you use member-header.php file within a child theme/theme.A more elegant solution would be to do this with a function, so we haven’t to think about theme modification or to forgot a CSS rule or to check BP after each update.
The function bp_displayed_user_mentionname is declared in /plugins/buddypress/bp-activity/bp-activity-template.php:1027
As this function is a filter, we can simply remove it to remove the @username from the template. But because the hardcoded @ sign before the username, we have to add a CSS rule with the remove_filter function. The function above will do all that.
Add these snippet to your bp-custom.php (read here if you don’t know this file)
/* remove @username from the profile header */ function bpfr_remove_mention_from_profile() { echo '<style> h2.user-nicename { display:none; } </style>'; // hide the h2 containing the @ if( bp_is_user() && ! bp_get_member_user_id() ) { // be sure we get the right user_id $user_id = 'displayed: '. bp_displayed_user_id(); } else { $user_id = 'get_member_user: '. bp_get_member_user_id(); } remove_filter( 'bp_get_displayed_user_mentionname', bp_activity_get_user_mentionname( bp_displayed_user_id() ) ); } add_filter( 'bp_get_displayed_user_mentionname', 'bpfr_remove_mention_from_profile' );Succesfully tested on BP 1.9.2 and 2.0 beta 1
This is not directly a BP support question.
If your goal is to stick a search result from the profiles with BP Profile Search Plugin, i guess you have to ask the author of the plugin.hi @saiallexander,
have you tried this plugin ?
https://wordpress.org/plugins/buddypress-featured-members/In reply to: Name instead of usernameFYI, this function will show user_login instead of member_name on the members directory.
Add it to the theme’s functions.php/* Display Username in Directory */ function my_member_username() { global $members_template; return $members_template->member->user_login; } add_filter('bp_member_name','my_member_username');Tested on WordPress 3.8.1 – BuddyPress 1.9.2
In reply to: Translation IssueCould be a theme issue. For ex. a custom file in “community” or “buddypress” folder of a child theme.
Groups directory and Create a Group are used in bp-themes/bp-default/groups/create.php and index.php
Create a group is also in 4 other filesMay also be a group related plugin dependancy.
Please give your BP version, theme name and plugin list.
In reply to: BuddyPress translated to norwegianhi !
BP nb_NO translation is here: https://translate.wordpress.org/projects/buddypress/1.9.x
For further question, take contact here:
https://make.wordpress.org/polyglots/
or in your language here:
https://no.wordpress.org/In reply to: Small Avatar Size in Activity StreamHi,
have you read the Codex about avatars ?
https://codex.buddypress.org/getting-started/guides/customizing-buddypress-avatars/In reply to: What to do against spambot registration?Hi,
as you probably know, spam is a world wide disease and there are no ready to use solutions against it. Only tips at least.So can you please search and read on this forum before asking for such a remaining question ?
In reply to: Buddypress traduΓ§Γ£o pt_BR 1.9.2Please write in english on this forum ! π
Normally you can download pt_br.po/mo files from
https://translate.wordpress.org/projects/buddypress/1.9.xHave also look here:
https://make.wordpress.org/polyglots/Maybe read here too:
https://codex.wordpress.org/L10n:Localization_Teams#Portuguese_.28Portugal.29_-_Portugu.C3.AAs_.28Portugal.29Or see what you can find here
http://wp-translations.org/In reply to: plug in for uploaded item listingMaybe BuddyDrive ?
In reply to: 2.0 top features – ideasI would like to have a better control over xprofile fields creation.
Specially maxlength and is_numeric declaration avaible on the editor page.Something like:
Add a new field (select field type) > single line textarea
Maxlength ? [] Numeric ? []Filtering bp-get-xprofile-field-data for each custom field is not always pertinent IMO. π
Hi guys !
Most of the publishing stuff is regulated from within WordPress settings.
And allowing blog and forums activity comments is a setting of BuddyPress.If you don’t want your users writing notices (what’s new ?), the only thing that is published by buddyPress, you can remove the notice form from the template or add a conditionnal if/else for the allowed members…
@boblebad, FYI buddypress is not a forum software. The forum plugin is bbPress.
In reply to: How to stop spam registrationsIn reply to: Hide Group Admin from the group member listRead here exclude_admins_mods
In reply to: Use images in Medias folder for Groups Avatarit’s not possible actually. Group avatar is handled separately. You have to upload your picture a second time. Or rtMedia plugin could be another (heavy)solution. π
In reply to: Hide Group Admin from the group member listIf you mean the admins list on the top right of a group header, simply remove the appropriate function call who is in the /bp-default/groups/single/group-header.php file
Line 7 and above… or remove the complete div + content (admins and mods)
To do this properly, make this from within a child theme.
In reply to: disable commenting on all activity streams updatesIn reply to: Notification count in dynamic menuHi @transmission,
this is not the solution, but an example for your inspiration.
The below shows how the notification counter can be moved/implemented on the toolbar./* moving the notification counter from right to left */ remove_action( 'admin_bar_menu', 'bp_members_admin_bar_notifications_menu', 90 ); function bpfr_notification_ontheleft() { global $wp_admin_bar; if ( !is_user_logged_in() ) return false; $notifications = bp_core_get_notifications_for_user( bp_loggedin_user_id(), 'object' ); $count = !empty( $notifications ) ? count( $notifications ) : 0; $alert_class = (int) $count > 0 ? 'pending-count alert' : 'count no-alert'; $menu_title = '<span id="ab-pending-notifications" class="' . $alert_class . '">' . $count . '</span>'; // Add the top-level Notifications button $wp_admin_bar->add_menu( array( /*'parent' => 'top-secondary',*/ // this is the original position 'id' => 'bp-notifications', 'title' => $menu_title, 'href' => bp_loggedin_user_domain(), ) ); if ( !empty( $notifications ) ) { foreach ( (array) $notifications as $notification ) { $wp_admin_bar->add_menu( array( 'parent' => 'bp-notifications', 'id' => 'notification-' . $notification->id, 'title' => $notification->content, 'href' => $notification->href ) ); } } else { $wp_admin_bar->add_menu( array( 'parent' => 'bp-notifications', 'id' => 'no-notifications', 'title' => __( 'No new notifications', 'buddypress' ), 'href' => bp_loggedin_user_domain() ) ); } return; } add_action( 'admin_bar_menu', 'bpfr_notification_ontheleft',30); /* other position # are 10, 20, 40, 50, 60, 70, 80, 90 */In your case, you also have to check this Codex page. And possibly do some research here.
If you want some help, please describe the issue !
Hi @cyndimarie,
here’s a filter you can use on the members directory. The bio excerpt will only show up for logged in users. Put this function into your theme’s functions.php file
function bpfr_bio_length() { if ( is_user_logged_in() ) : $profile_bio = bp_get_member_profile_data( 'field=Brief Biography&user_id='.bp_loggedin_user_id() ); if ( strlen($profile_bio) > 200) : //adjust to your need $profile_bio = substr($profile_bio, 0, 200).'...'; //adjust to your need endif; ?> <span class="short-bio"><?php echo $profile_bio; ?></span> <?php endif; } add_action( 'bp_directory_members_item', 'bpfr_bio_length' );If you prefer to modify the members-loop.php file, create first a child theme, and then insert this piece of code at the appropriate place
$profile_bio = bp_get_member_profile_data( 'field=Brief Biography' ); if(strlen($profile_bio) > 50)) $profile_bio = substr($profile_bio, 0, 50).'...'; <span class="short-bio"><?php echo $profile_bio; ?></span>First solution may be better… π
In reply to: [Resolved] How do I make a sticky wall update?Hi @sharmavishal,
the plugin is working on BP 1.9 ! And as site admin you can publish (create) an activity and make it sticky from within your activity admin.
The plugin isn’t intended to make any activity sticky. You can only make an existing post or an existing forum topic sticky. To do so, you have also to activate the screen option when you’re on the edit page.
Be also aware that you can only stick ONE activity.
Please follow this video for complete explanation about all this is working.
hi @pascalh,
your issue maybe related to your theme or a custom function you use.The original “notifications” string is in bp-notifications/bp-notifications-loader.php:109
Check the po file first
If you made a custom function to get the menu, check that function.Be aware that the words “notifications”, “friends” and “groups” are coming with a count and that this counter is included in the translation within a html span tag. This is technically the point who made such translation not showing in some case. Because gettext is not very compleasant with html tags… So the problem can also be the strictness of the php version on use on your server.
You can test this by writing your translation without using the span tag. (meldingen %d for example). If this ok, you’ll be fixed.
In reply to: testing translationsHi @jf_trumpet,
the plugin you’re speaking about is intented for load your BuddyPress with translations provided by translate.wordpress.org
This means that if you’re site is in swedish, the plugin will automatically upload the swedish BP translation. Or similar if you’re site is in italian.
If you need some multilingual settings you have to use another plugin, like WPML for example.
More about BuddyPress translation and internalization here.
Normally you declare the site language from within the wp-config.php file.
For ex. define (‘WPLANG’, ‘it-IT’);
If you just want to test ONE other language, simply change this define to another language.Be also aware that you can only define one language in wp-config.
In reply to: >> French POhi @aniclip
it’s not a bug, you just try to translate something that doesn’t exist in the original file !
The exact string is Notify group members of these changes via emailIf you’re using BP 1.9 the string to translate looks like this in the po file:
5912 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:26
5913 #: bp-themes/bp-default/groups/single/admin.php:26
5914 msgid “Notify group members of these changes via email”
5915 msgstr “Signaler par mail les changements aux membres du groupe”If you need the fr_FR translations, you can find them here:
https://i18n.trac.buddypress.org/browser/fr_FR/tagsAnd in the future, also here:
https://translate.wordpress.org/projects/buddypress/dev/fr/defaultAnd of course, any information about translating BP in french is on the french BuddyPress site: http://bp-fr.net