Search Results for 'buddypress'
-
AuthorSearch Results
-
July 9, 2016 at 1:42 pm #256169
In reply to: How do I add metadata to a BuddyPress post?
danbp
ParticipantGuess you have to code it completely.
A great and very complete tutorial is Creating Maintainable WordPress Meta Boxes
And here an overview of almost all BP hooks and filters related to meta.
July 9, 2016 at 1:39 pm #256168In reply to: How do I change the activity-greeting copy?
socialc
Participant@danbp yeah, sorry about that :). Reason I went a bit further was when working on a theme earlier I was using a function
get_displayed_group_id()or something with a similar name. I was expecting a return value but it was echoing no matter where I placed this.Ended up using a different method.
Just wondered if there were other functions inside BuddyPress that looked like a return value but had output instead.
July 9, 2016 at 1:12 pm #256167In reply to: How do I change the activity-greeting copy?
danbp
ParticipantMaybe it’s me who’s wrong. I haven’t tested, but it’s how i used such a function in the past, called inside another one. I also wrote “something like”, which is very different of “use this”. It’s an example, not the absolute solution! 😉
Let’s wait for Allan’s reaction before continuing this discussion. For the moment, the only important thing related to this post is:
$goal = xprofile_get_field_data( 'Your goal', $user_id );July 9, 2016 at 1:00 pm #256166In reply to: Custom post type
danbp
ParticipantHave you read this tutorial ?
Note that most of BP custom functions for core are better handled when living in bp-custom.php. Sometimes also, a same function may work from within one file, but not from the other. In other case, which file has no real importance.
Even if in background there is a hierarchy and a load order, to take in account for the file choice.That said, as it is related to CPT, bp-custom is the best place IMO.
Theme’s functions.php contains functions related to theme, templating and evtl. wp stuff
BP custom functions goes to bp-custom.phpIt’s also better for you to have such separated functions.
July 9, 2016 at 9:15 am #256158In reply to: How do I change the activity-greeting copy?
socialc
ParticipantInside your theme, make sure there is a file
wp-content/themes/your-theme/buddypress/activity/post-form.php. If there is no file in that location copy this filewp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/post-form.phpinto the first location.Then, look at line number 28 – 32 of post-form.php.
From there, you will notice you can change this text for the activity update form which reads “What’s new in “GROUP NAME” if you’re on a group page posting the update or “What’s new USERNAME” if you’re any where else.
So, to swap in a specific profile field you’d need to supply a bit more about the nature of your project and how it’s setup. You could simply drop in some static text, but if you want it to relate to a specific profile field in a dynamic way then please elaborate further.
July 8, 2016 at 11:37 pm #256142In reply to: BP Profile – Replacing USERNAME with NICKNAME
danbp
ParticipantHi,
if nothing made sense of what you already read, i doubt i can help you as i would certainly repeat the same things… 😉Nickname doesn’t exist in WordPress. On a WP install, a new user is only asked for a username(generally it’s a nickname like creatorsite), an email and a password. That’s all!
By convinience, a WP user can add his first and last name to his profile, but it is not an obligation.
When BP is added, he adds a mandatory field called Name which can by filled with first and last name or whatever else. Only the field is mandatory, not the content. And you can change his nale to what you want. Eg. Your dogs name. An other difference for this field is that it let you enter uppercase and space, what the WP username field doesn’t allow. BP use this field to synchronize members from WP and those registered once BP is activated.
Users are handled by WP, not by BP which is only a plugin, btw. both use the same DB user table.
Here a complete description of WP’s database, and read attentively the part related to wp_users.
Nickname = username. Your question is related to username vs. display_name.
Read here for a solution.
ps: your picture mention that nicknames can eliminate a security issue. Which one exactly ? i’m curious to learn how over 200 000 active BP sites are threatened by hackers seaking for usernames in 2016 !
July 8, 2016 at 10:53 pm #256141In reply to: Adding Multiple Custom Activity Feeds to the Stream
danbp
ParticipantRead and learn from here:
July 8, 2016 at 1:35 pm #256135In reply to: Don’t auto login after user activation
pulidomate
ParticipantI’m using WPLMS theme:
https://themeforest.net/item/wplms-learning-management-system/6780226Maybe is not a problem of Buddypress?
sharmavishal
ParticipantJuly 8, 2016 at 7:49 am #256078In reply to: Customizing Preset Groups Page
danbp
ParticipantIf you’re sepaking about the Group directory page, yes !
# of columns can be defined by CSS. For other details, read here
https://buddypress.org/support/topic/how-to-display-multiple-single-group-headers-on-a-single-page/You need also a child-theme to do customization.
Codex is your friend. 😉
July 7, 2016 at 9:23 pm #256071In reply to: Buddypress not sending activation emails
danbp
ParticipantWhat is your BP version ? Have you tried to use the email repair tool ?
July 7, 2016 at 9:10 pm #256070In reply to: PHP 7.0 compatibility
danbp
ParticipantJuly 7, 2016 at 6:45 pm #256066In reply to: PHP 7.0 compatibility
AngryGerman
ParticipantHas there been any update on this, i.e. is BuddyPress fully compatible with PHP 7 at this point?
July 7, 2016 at 6:38 pm #256065In reply to: How to use bp_has_activities filtering in a function
danbp
Participanthi @ljmac,
Filter description
Usage example (sorry if i’m wrong) of the filter inside a function
https://buddypress.org/support/topic/adding-favourite-posts-as-a-tab-in-buddypress/#post-236682July 7, 2016 at 5:58 pm #256064r-a-y
Keymaster@passiondigitalpublishing – We’ve confirmed this is a bug and have a fix ready for v2.6.2:
https://buddypress.trac.wordpress.org/ticket/7173In the meantime, you can manually fix this issue by patching
bp-members/bp-members-functions.php:
https://buddypress.trac.wordpress.org/changeset/10939July 7, 2016 at 4:43 pm #256061danbp
ParticipantHi,
please open a ticket for this on Trac if you expect a quick advice. Login by using same credentials as here.
July 7, 2016 at 7:12 am #256053In reply to: how to add new members to groups automatically?
5high
Participant@earl_D – I’ve been using this code for a year now and it works instantly.
However I’ve just found an option to add to groups automatically via my membership plugin (s2member framework) by adding some extra code/php file. And as my registration form is the membership form (and is fully integrated with BP) I’m trying this one too.
Here’s the info about it in the s2member knowledge base: http://s2member.com/kb-article/how-can-i-automatically-add-a-user-to-a-buddypress-group/
So my question now is: which is the better way to do this? Via the bp-custom.php or via the s2member s2-bp-groups.php method?
Maybe someone very up on code/BP/site load order would be able to advise?
Cheers – and good luck earl_d!
July 6, 2016 at 11:03 pm #256050In reply to: Add custom notification
danbp
ParticipantHi @omdisa7
See this topic if it can help you:
https://buddypress.org/support/topic/notification-is-created-but-cant-list-it-for-the-user/
July 6, 2016 at 1:16 pm #256038Strothi
ParticipantHey guys,
thanks a lot. @danbp your code worked perfectly 🙂 The only thing that’s not reordering properly is for some reason the Media tab, which comes from the rtMedia plugin. It worked with my old code when referencing “media”, but for some reason this doesn’t work with your code anymore, even though technically it should! Any idea?
As for your notice @imath, actually, the change in the default tab had nothing to do with the theme. I just followed this advice: https://codex.buddypress.org/getting-started/guides/change-members-profile-landing-tab/ and put the code into wp-config.
It works still fine, but I take it from your comment that this way is going to be depreciated and thus I should replace it with your code. Correct?
Thanks so much for your help guys, highly appreciated!
July 6, 2016 at 10:43 am #256030In reply to: search within groups
July 6, 2016 at 10:36 am #256026July 6, 2016 at 10:35 am #256025In reply to: Couple Searching
July 6, 2016 at 9:18 am #256024In reply to: Control Social Interaction
Henry Wright
ModeratorI can’t speak for Paid Memberships Pro because I haven’t used that plugin but it can’t be done with BuddyPress out-of-the-box. You would need to find a plugin.
July 5, 2016 at 10:50 pm #255992danbp
ParticipantYou can use something like this (add to bp-custom.php or child theme’s functions.php)
BuddyPress usermenu usage: remove_node(‘$id-$nav-$subnav’)
/* remove items from Toolbar Usermenu (top-right) */ function bpex_admin_bar_remove_this(){ global $wp_admin_bar; $wp_admin_bar->remove_node('my-account-forums-favorites'); $wp_admin_bar->remove_node('my-account-messages-starred'); // etc... } add_action('wp_before_admin_bar_render','bpex_admin_bar_remove_this');July 5, 2016 at 7:54 pm #255990danbp
ParticipantMerci @imath !
The old way
The following syntax to change the tab order is deprecated since 2.6 and will throw an error notice:
function rt_change_profile_tab_order() { global $bp; $bp->bp_nav['profile']['position'] = 10; $bp->bp_nav['activity']['position'] = 20; } add_action( 'bp_setup_nav', 'rt_change_profile_tab_order', 999 );The new way
Now the correct syntax to use for modifying – since 2.6 – the tabs position on the buddybar when you’re on a profile.
This example list all BP related items who appear by default on a profile nav, in order of appearance and include also the forum tab (if you use bbPress for group forums).
By default, activity tab comes as 1st. The snippet will move it to 4th position.To modify a position you simply change the numeric value.
If you want to move only one item, you remove or comment (add//at begin of the line) the ones you don’t want to move.function bpex_primary_nav_tabs_position() { buddypress()->members->nav->edit_nav( array( 'position' => 4, ), 'activity' ); buddypress()->members->nav->edit_nav( array( 'position' => 5, ), 'profile' ); buddypress()->members->nav->edit_nav( array( 'position' => 7, ), 'notifications' ); buddypress()->members->nav->edit_nav( array( 'position' => 9, ), 'messages' ); buddypress()->members->nav->edit_nav( array( 'position' => 2, ), 'friends' ); buddypress()->members->nav->edit_nav( array( 'position' => 6, ), 'groups' ); buddypress()->members->nav->edit_nav( array( 'position' => 3, ), 'forums' ); buddypress()->members->nav->edit_nav( array( 'position' => 1, ), 'settings' ); } add_action( 'bp_setup_nav', 'bpex_primary_nav_tabs_position', 999 );That’s it for the buddybar nav menu order on profile.
-
AuthorSearch Results