Forum Replies Created
-
as you discovered already, the CSS trick is a poor solution.
Two solution are on hand.
A first one, which applies to all activity feeds.
Basically the below snippet handles globally the activties output. You simply remove the activity(ies) you don’t want to see from the list. Note that almost all activity types are listed.
Add it to child functions.php or to bp-custom.phpfunction demo_parse( $retval ) { // existing BP/bbP activities // remove the one you wont to see from that list $retval['action'] = ' activity_comment, activity_update, bbp_topic_create, bbp_reply_create, friendship_created, joined_group, last_activity, new_avatar, new_blog_post, new_member, updated_profile '; return $retval; } add_filter( 'bp_after_has_activities_parse_args', 'demo_parse' );Codex:
The second solution, is to use a child-theme with a modified activity loop. This let you handle finer condition for each user.
Read this tut how you can do that.
Codex:
In reply to: Making display name uniqueThe solution is given in the second stackexchange’s answer !
In reply to: Add tinymce to Activity Post Reply Formbuddypress/bp-templates/bp-legacy/buddypress/activity/entry.php
Go here to search inside BuddyPress
In reply to: add whats new form to a member activity/friends tabuse this function
bp_get_template_part( 'activity/post-form' );Add this to bp-custom.php or child theme’s functions.php
function whats_new_my_friend() { if ( bp_is_user_friends_activity() ) : bp_get_template_part( 'activity/post-form' ); endif; } add_action( 'bp_before_member_body', 'whats_new_my_friend' );In reply to: Add tinymce to Activity Post Reply FormSorry, i have no idea how to do that.
In reply to: What file handles the display name?That’s a pure wp question !
See https://codex.wordpress.org/Function_Reference/get_userdataIn reply to: Making display name uniqueHi @david-ar,
consider first https://codex.wordpress.org/Function_Reference/get_currentuserinfo
then read here: https://codex.wordpress.org/Function_Reference/get_currentuserinfo
and finally some snippet, http://wordpress.stackexchange.com/questions/82239/make-display-name-unique
As alternative, it exist a wp plugin called Credible Names
In reply to: Rename nav tabs based on member typeHi @maelga,
Querying by member type is explained here:
Then, you’ll have to create a custom function to get a navbar specific to each member type.
In reply to: [Resolved] registration and refresh :/re check all your settings, permalinks and htaccess
You may have a redirect problem because you installed WP/BP in /voyages/ directory
read also this and follow the links for more information:
https://buddypress.org/support/topic/unable-to-register-users-2/#post-241704In reply to: Unable to register usersI donβt know if this is any indication of the issue but no pages were generated during the installation of the plugin, I had to set them all up manually.
The answer is in your first topic:
I have deleted the original copy of BuddyPress from my site and the associated pages.If you haven’t removed BP from DB, via plugins dashboard > delete before reuploading a new copy it’s normal that you have to recreate the pages manually.
The adventure starts here:
In reply to: edit xprofile as an editor not an admin?That’s a recent function i didn’t know ! It’s filtrable, so you haven’t to hack that core file.
See also in same file member_can_edit function, related to bp_moderate capability, used for group admins, but i doubt you can apply it to “editor”…
FYI: https://buddypress.org/support/topic/bp_moderate-capability/
Additionnally, see this snippet written for WP only, if you can combine something:
I’ve already tested all this, but i got the same result as you. But i’m not a dev. π
Good luck !
In reply to: edit xprofile as an editor not an admin?This is actually not possible. Is a work on progress: https://buddypress.trac.wordpress.org/ticket/5121
White page is generally due to a php error. Check your code or revert back.
About the bbpress error:
https://bbpress.org/forums/topic/minor-debug-notice-with-buppypress-version-2-2-beta/Notice are less important.
See on respective wplms-assignments and vibe-customtypes support forums how to repair.If you’re on a production site, deactivate debug mode in wp-config and the mesaages will disappear.
And try to be carefull: never publish your server root path on a public forum.
In reply to: Remove Activity / Join Infohi @billmann,
to remove only last activity date from profile header:
function bpfr_core_get_last_activity( $last_activity_date ) { if ( empty( $last_activity_date ) ) // we do nothing $last_active = ''; else $last_active = sprintf( $string, bp_core_time_since( $last_activity_date ) ); } add_filter( 'bp_core_get_last_activity', 'bpfr_core_get_last_activity' );To remove all last active instance (profile, group & member directory,…), you simply remove the filter
function bpfr_remove_last_activity_filter() { remove_filter( 'bp_core_get_last_activity', $last_active, $last_activity_date, $string ); } add_filter( 'bp_core_get_last_activity', 'bpfr_remove_last_activity_filter' );Add to your child-theme functions.php or to bp-custom.php
bp_core_get_last_activityfunction is in buddypress/bp-core/bp-core-functions.php:1418Note that site wide activity is not affected by these functions.
Do you have ms defines in wp-config ?
define( 'WP_ALLOW_MULTISITE', true );Have you setup pretty permalinks (something other than default) ? Also htaccess may be wrong.
Create a new one.
This can be done by removing the old htaccess and (re)saving permalinks, WP will give you new params or create htaccess for you.
Also are all salt keys in wp-config ? Try to remove the existing and add new one. Take them from here: https://api.wordpress.org/secret-key/1.1/salt/In reply to: Get select options from xprofile fields@stegtflesk,
depends where you want to show these option values : in or outside of a profile.If in, you create filter function containing at least
function function_name() { $val = ( 'FIELD_NAME', $user_id ); // custom field name; case sensitive if($val == 'option_1') : // option name //do something... endif; if($val == 'option_2') : // do something... endif; //if etc } add_filter( 'my_custom_filter', 'function_name', 9, 2 ); // , priority, $valand in the template, you add this filter at the appropriate place, by using
do_action( 'my_custom_filter' );If ouside of profile, you need a user_id
$user_id = bp_get_member_user_id(); $val = xprofile_get_field_data( 'field_name', $user_id ); if($val == 'option_1') do something if($val == 'option_2') do something return $val; add_filter....In both case, you can use an existing BP template filter or a custom one.
Hope this help.
In reply to: [Resolved] Limiting Activities by User’s City@puffyjoe, thank you for sharing your solution ! π
In reply to: How to use bp_member_profile_data when its type URLHi
instead using a link field type, use a normal text box and harcode the link to social account in the function. That way, the user has only to enter his account name and the link is build when the data is on front-end.
profile fields are stripped
profile datas are made clickable by default for search purpose in BP
We don’t want this for icons or when linking to a social network.Here an usage example which use fontawesome to add the icons. That the general idea, change it to your need.
function bpfr_socialize_profile () { echo '<br>'; if ( $data = bp_get_profile_field_data( 'field=Twitter ' ) ) : ?> <a href="http://twitter.com/<?php echo xprofile_get_field_data( 'Twitter', bp_displayed_user_id() );?>/" target="_blank" title="Twitter"><i class="icon-twitter"></i><?php echo $data; ?></a> <?php endif; if ( $data = bp_get_profile_field_data( 'field=Facebook ' ) ) : ?> <a href="http://facebook.com/<?php echo xprofile_get_field_data( 'Facebook', bp_displayed_user_id() );?>/" target="_blank" title="Facebook"><i class="icon-facebook"></i><?php echo $data; ?></a> <?php endif; } add_filter( 'bp_before_member_header_meta', 'bpfr_socialize_profile' );In reply to: Favorite/Bookmark single posthi @nkeatign,
this here if it helps you:
https://buddypress.org/support/topic/adding-favourite-posts-as-a-tab-in-buddypress/#post-236682In reply to: How to show Biographical Info in members profile?to add a profile field like biography to profiles, you have to activate xprofile component in BP settings.
This and much more is all explained on the Codex.
it just showing membername|sitename This is not a issue, but intended so by default.
membername|sitename is the page title when on a member profile
members|sitename is the page title when on the member directory – where “members” is the title you give to the member page. BP create automatically this page and use “members” as title at first install, but you can modify it.Aside, you’re using admin as user name. I strongly recommend you to change this.
https://codex.wordpress.org/Hardening_WordPress
http://www.wpbeginner.com/wp-tutorials/how-to-change-your-wordpress-username/Do you see warnings or notices when you activate debug mode in wp-config ?
Do you use a cache ? Yes ? So clear it.
Also, clear your brwoser history. In many cases, permission deny is a session error, which comes up when you try to login with two different usernames with two different role. (admin vs. subscriber zum beispiel)
In reply to: Blog body content not appearing on Buddybloghi @revadigital,
not sure what you call buddyblog… The blog is part of WordPress, not BuddyPress.
Can you give site url, theme, list of plugins and install type (network or single) please ?
Found a site which seems to be yours. If it is the case, you’re using Frisco for BP, an old theme. This theme hasnβt been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Since BP 1.9 (dec 2013), you can use almost use any existing theme.
If you’re in a test phase, use simply 2015. Once anything is working, you can search a theme. πno need to be a programmer to apply a patch. You’re still know how to copy/paste, i’m sure ! π
the number refer to the line number. If you use a code editor like notepad++ you’ll see them.
+ or – is self explanatory: + is added, – is removed.
Depending the patch size, you should be very attentive and concentrated when copy/pasting.
Or you use the heavy pro method, explained on WP’s Codex:
https://make.wordpress.org/core/handbook/working-with-patches/apply-a-patch-using-tortoisesvn/… but for one or two lines, it’s a bit to much IMO !
In reply to: Extended profile when adding new userWhen the door is closed, you always enter by the window ? π
This is the impossible thing (on backend):
1. create a new user with basic informationThe WordPress login process use ONLY a username, a mail and a password.
As long as this is not handled and correctly introduced to DB, you can’t before or during this process, enter anything related to a given user from back office.WP register first the user.
Once the user is registered, he receive an unique ID. It is this ID who allow BP to add additionnal informations.Or you allow front-end registering or you have to use the 2 step work from back-end: register + extended profile information.