Search Results for 'buddypress'
-
AuthorSearch Results
-
July 18, 2016 at 11:53 am #256757
In reply to: Get users using specific profile field
danbp
ParticipantNormally profile field values are clickable and by doing this, each visitor can see a list of user who entered the same value. This is buit-in and intended to work on profiles.
Another approach would be to associate a member type to that value.
MT lets you create specific Member Directory.July 18, 2016 at 10:30 am #256755In reply to: Buddypress plugin use best practices
Earl_D
Participant@sharmavishal thanks again for the response I was able to find some relevant info on the matter from these sources external to this site
Separate theme display and functionality with a build-your-own custom functionality plugin
While not specific to Buddypress it is sufficient help me understand what should go into the decision making process.July 18, 2016 at 9:30 am #256750In reply to: [Resolved] Change setting’s delete-account slug
danbp
ParticipantDocumentation for this is in bp-core-buddybar.php
Some working examples for navigation (since 2.6) here.
And here a working example for:
- remove Delete Account on user profile settings tab
- add a new sub-nav item for “Memberships” to Profile > Settings
1 )
function bpex_remove_profile_settings_sub_tab() { // remove Delete Account from Profile Settings bp_core_remove_subnav_item( BP_SETTINGS_SLUG, 'delete-account' ); } add_action( 'bp_actions', 'bpex_remove_profile_settings_sub_tab' );2 )
function bpex_add_sub_nav_to_profile_settings() { global $bp; $parent_slug = 'settings'; $child_slug = 'memberships'; //Add subnav item bp_core_new_subnav_item( array( 'name' => __( 'My Memberships', 'textdomain' ), 'slug' => $child_slug, 'parent_url' => $bp->loggedin_user->domain . $parent_slug.'/', 'parent_slug' => $parent_slug, 'screen_function' => 'bpex_profile_membership_screen' ) ); } function bpex_profile_membership_screen() { add_action( 'bp_template_content', 'bpex_profile_membership_screen_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } function bpex_profile_membership_screen_content() { do_action( 'my_membership_post' ); } add_action( 'bp_setup_nav', 'bpex_add_sub_nav_to_profile_settings', 100 ); function bpex_membership_stuff() { echo 'Some stuff here ?'; ?> <h2>Lorem Ipsum for ever !</h2> <p>Aenean suscipit nulla in justo. Suspendisse cursus rutrum augue. Nulla tincidunt tincidunt mi. Curabitur iaculis, lorem vel rhoncus faucibus, felis magna fermentum augue, et ultricies lacus lorem varius purus. Curabitur eu amet.</p> <?php } add_action( 'my_membership_post', 'bpex_membership_stuff' );Add this to bp-custom.php
July 18, 2016 at 5:31 am #256735In reply to: Issue with site activity page
sharmavishal
Participantyes first check with Customizr theme and then with buddypress media support forums
July 18, 2016 at 3:14 am #256731In reply to: Trouble with BuddyPress on secondary blog
intothemythica
ParticipantBuddypress IS network activated.
I know there’s a way. I’ve had buddy press (on a clean install) work on a sub-site before.
July 18, 2016 at 2:36 am #256729In reply to: Trouble with BuddyPress on secondary blog
Paul Wong-Gibbs
KeymasterHmm. Those are notices (from Visual Composer, and a buddypress.php file in your theme, and from the WP_Widget_Moon_Phases widget), not fatal errors, so unlikely to be breaking the site, and unfortunately shed no light on what might be happening. Not sure.
On your multisite – is BuddyPress network activated?
p.s. even if this was working, all the existing BP configuration settings would live on Site ID 1. I think the BuddyPress content will come across, but you’d have to check/re-set any BuddyPress options.
July 18, 2016 at 12:40 am #256727In reply to: Issue with site activity page
shanehidir
ParticipantHi @danbp, thank you for replying. So based on my understanding of your reply. I should repost my query on the plugins support forums? Is that correct?
Regards,
shanehidirJuly 18, 2016 at 12:21 am #256725In reply to: Issue with site activity page
danbp
ParticipantHi @shanehidir,
it’s not a BuddyPress issue. Ask on buddypres-media and/or theme support.
July 17, 2016 at 10:32 pm #256722In reply to: bp custom notifications proper guide
ah72king
ParticipantI found a solution that can help
<?php // For Custom Notification // Registering Custom Componet function custom_filter_notifications_get_registered_components( $component_names = array() ) { // Force $component_names to be an array if ( ! is_array( $component_names ) ) { $component_names = array(); } // Add 'custom' component to registered components array array_push( $component_names, 'custom' ); // Return component's with 'custom' appended return $component_names; } add_filter( 'bp_notifications_get_registered_components', 'custom_filter_notifications_get_registered_components' ); // Formatting custom with respect to action function bp_custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { //$item_id this your id which you can use to get your respected data $data = get_my_values_custom_function($item_id); // this is custom function it depend on your needs and data $custom_title = $data->title; $custom_link = $data->link; $custom_text = $data->text; // New custom notifications if ( 'custom_action' === $action ) { // WordPress Toolbar if ( 'string' === $format ) { $return = apply_filters( 'custom_filter','Your custom notification for <a href="'.$custom_link.'">'.$custom_title.'</a> ', $custom_text, $custom_link ); // Deprecated BuddyBar } else { $return = apply_filters( 'custom_filter', array( 'text' => $custom_text, 'link' => $custom_link ), $custom_link, (int) $total_items, $custom_text, $custom_title ); } return $return; } } add_filter( 'bp_notifications_get_notifications_for_user', 'bp_custom_format_buddypress_notifications', 10, 5 ); // Adding custom Notification in DB function bp_custom_notification( $item_id, $author_id ) { if ( bp_is_active( 'notifications' ) ) { // if notification is active from admin panel // if notification is active from admin panel bp_notifications_add_notification function to add notification into database bp_notifications_add_notification( array( 'user_id' => $author_id, // User to whom notification has to be send 'item_id' => $item_id, // Id of thing you want to show it can be item_id or post or custom post or anything 'component_name' => 'custom', // component that we registered 'component_action' => 'custom_action', // Our Custom Action 'date_notified' => bp_core_current_time(), // current time 'is_new' => 1, // It say that is new notification ) ); } } add_action( 'custom_hooks', 'bp_custom_notification', 10, 2); /** * custom_hooks is action name which will be call by do_action() function * bp_custom_notification your function name * 10 is priority number * 2 is number of parameter */ /**** * Now Where to call custom_hooks and how */ do_action('custom_hooks', $item_id, $author_id ); /**** * place it where you want to call this action and pass parameter */July 17, 2016 at 8:40 pm #256719In reply to: /forums/forum/forum/
danbp
ParticipantJuly 17, 2016 at 8:36 pm #256718In reply to: How to reduce user’s view on groups only to his owns
danbp
ParticipantJuly 17, 2016 at 3:30 pm #256713In reply to: Trouble with BuddyPress on secondary blog
intothemythica
Participantthis is what I got:
Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). === Trace: #6 /nas/content/live/intothemythica/wp-content/plugins/revslider/includes/tinybox.class.php(49): is_user_logged_in() #7 [internal function]: RevSliderTinyBox::visual_composer_include(”) #8 /nas/content/live/intothemythica/wp-includes/plugin.php(525): call_user_func_array(Array, Array) #9 /nas/content/live/intothemythica/wp-settings.php(277): do_action(‘plugins_loaded’) #10 /nas/content/live/intothemythica/wp-config.php(154): require_once(‘/nas/content/li…’) #11 /nas/content/live/intothemythica/wp-load.php(37): require_once(‘/nas/content/li…’) #12 /nas/content/live/intothemythica/wp-blog-header.php(13): require_once(‘/nas/content/li…’) #13 /nas/content/live/intothemythica/index.php(17): require(‘/nas/content/li…’) #14 {main} === Please see Debugging in WordPress for more information. (This message wa in /nas/content/live/intothemythica/wp-includes/functions.php on line 3897
Notice: Constant BP_AVATAR_THUMB_WIDTH already defined in /nas/content/live/intothemythica/wp-content/themes/x/framework/functions/global/plugins/buddypress.php on line 26
Notice: Constant BP_AVATAR_THUMB_HEIGHT already defined in /nas/content/live/intothemythica/wp-content/themes/x/framework/functions/global/plugins/buddypress.php on line 27
Notice: Constant BP_AVATAR_FULL_WIDTH already defined in /nas/content/live/intothemythica/wp-content/themes/x/framework/functions/global/plugins/buddypress.php on line 28
Notice: Constant BP_AVATAR_FULL_HEIGHT already defined in /nas/content/live/intothemythica/wp-content/themes/x/framework/functions/global/plugins/buddypress.php on line 29
Notice: The called constructor method for WP_Widget in WP_Widget_Moon_Phases is deprecated since version 4.3.0! Use
__construct()
instead. in /nas/content/live/intothemythica/wp-includes/functions.php on line 3718July 17, 2016 at 12:51 pm #256705In reply to: [Resolved] member address
danbp
Participantassuming your fields names are Address, City and Postal code, add this snippet to bp-custom.php and any logged-in user will see these fields on the Member Directory page underneath the already existing informations.
function bpex_address_on_directory( ) { if( bp_is_active( 'xprofile' ) && is_user_logged_in() ) : echo '<p>'; if ( $address = xprofile_get_field_data( 'Address', bp_get_member_user_id() ) ) : echo $address.' '; endif; if ( $zipcode = xprofile_get_field_data( 'Postal code', bp_get_member_user_id() ) ) : echo $zipcode .' '; endif; if ( $city = xprofile_get_field_data( 'City', bp_get_member_user_id() ) ) : echo $city .' '; endif; echo '</p>'; endif; } add_filter ( 'bp_directory_members_item', 'bpex_address_on_directory' );July 17, 2016 at 1:34 am #256697In reply to: Lost access to my site
Paul Wong-Gibbs
KeymasterThis is also not BuddyPress related.
July 16, 2016 at 1:48 pm #256676shanebp
ModeratorYou were clear enough about it being settings – I misread your posts.
You should use this hook:
do_action( 'bp_core_general_settings_after_save' );
Found in:buddypress\bp-settings\bp-settings-actions.phpChanging the feedback message is more difficult.
You could change the content of the message by using this hook:
apply_filters( 'bp_core_render_message_content', $bp->template_message, $type );
Found in:buddypress\bp-core\bp-core-functions.phpBut I don’t see how you can change the type of message from error to success.
So what I would do is – create a new tab on the Settings panel and handle everything separate from the General tab functionality.
There is lots of documentation about that task, this will get you started…
function had_setup_biz_phone_navigation() { bp_core_new_subnav_item( array( 'name' => 'Billing Phone', 'slug' => 'bphone', 'parent_url' => bp_loggedin_user_domain() . 'settings/', 'parent_slug' => 'settings', 'screen_function' => 'name of the function to create the content', 'show_for_displayed_user' => false ) ); } add_action( 'bp_setup_nav', 'had_setup_biz_phone_navigation' );July 16, 2016 at 12:51 pm #256673danbp
ParticipantGuess you have to pick up the correct URL. Read from here to understand how it works:
July 16, 2016 at 12:43 pm #256671danbp
ParticipantbbPress is a separate plugin, so it is intended to work like this untill you code something to your need.
See both links at the bottom of this codex page:
Subscribing to bbPress topics is explained here:
July 16, 2016 at 12:04 pm #256670In reply to: BP exclude member role
Henry Wright
ModeratorYou should use
bp_parse_args(). Check out this article:July 16, 2016 at 9:11 am #256661In reply to: Translation issue in main nav menu
danbp
ParticipantRe-check your po file and see if the original word hasn’t a count beside it. Something like
Members %s. Many translation are omitting this or use an erroneous variable ( something like % or %d or…nothing). In any case, the translation should contain, if exist in the original, such variables.
Same remark if you use plugins or a theme who modify the menu.You can also check for the new nav API examples you could eventually help you to rename the items, but only if nothing goes to work with translation itself.
July 16, 2016 at 8:53 am #256659In reply to: Unable to disable double-click on “Post Update”.
danbp
ParticipantHi,
despite it is not a BuddyPress issue, but a common coding task, here is what i would try to apply (or try to use) your place.
The button ID can be found in bp-legacy/buddypress/activity/post-form.php
Nothing to do with previous, your php version is no more maintained since 10th july 2016. Consider updating to 5.6 or 7.0
July 16, 2016 at 7:05 am #256656In reply to: Group cover photos not uploading
Stacy (non coder)
ParticipantUsing Plain permalinks gives this mesage “BuddyPress is almost ready. You must update your permalink structure to something other than the default for it to work.” So I’m switching back to what it was before.
July 16, 2016 at 4:17 am #256650In reply to: Group cover photos not uploading
Stacy (non coder)
ParticipantSounds like the plugin should show a checklist for all this somewhere. The plugin is working so that means all the requirements are met.
I have
PHP version 5.6 or greater
MySQL version 5.6 or greater
BuddyPress 2.6.0+ with WordPress 4.1.0+
Apache Module mod_rewrite enabled for “pretty permalinks”. (Wenet to settings> permalinks> checked plain> saved)
WP was installed via cpanel’s wordpress installer and BP is working
Using subdomains not subdirectories
Folder name for any subdirectory or subdomain WordPress/BuddyPress installation must be in lowercase.BP is on the main blog.Tested not using the child theme.
Is this supposed to be a created file and folder?
“AllowOverride should be set to All in folder where .htaccess is, for example”July 16, 2016 at 3:01 am #256648had_hc
ParticipantHi shanebpb, what ure referring to is the edit profile tab under the Profile nav menu. What i’m trying to do is add custom field to the General tab under the Settings nav menu. The template I’m talking about is at /buddypress/members/single/settings/ folder of the template folder. Sorry if i wasn’t being clear enough before this.
That said, having the field displayed is not the issue I’m having, saving th custom field is my issue here. The nonce i was talking about is there in the general.php file and it’s within the <form></form> section, so i figure it can be used somehow to save the field.
I’ll try what coffeywebdev suggested by using different action hook instead of the ‘init’ hook I’m using now.July 16, 2016 at 2:18 am #256647In reply to: custom buddypress-functions.php?
danbp
ParticipantHi,
normally you haven’t to touch mentions.min.js, jquery.atwho.min.js, jquery.caret.min.js, along with other buddypress core js files.If you need to customize buddypress JS, use buddypress.js from within the child theme.
about js and child theme:
https://buddypress.org/support/topic/overriding-global-js-with-buddypress-js-not-working/and other customization:
July 15, 2016 at 8:27 pm #256640In reply to: [Resolved] BP 2.6 and BuddyPress Group Extras Plugin
Slava Abakumov
ModeratorVersion 3.6.9 is released, pushed to WordPress repository. Soon it should be available worldwide.
-
AuthorSearch Results