Forum Replies Created
-
In reply to: [Resolved] Check if group has forum
Please use the
codebutton when posting code.
Try:<?php if( bp_group_is_forum_enabled() ) : ?> // do something <?php endif; ?>In reply to: My Ideas and Suggestions for BuddyPressThese plugins should address parts of #12:
https://wordpress.org/plugins/bp-local-avatars/
https://wordpress.org/plugins/buddypress-identicons/
I do list “plupload.full.min.js” and other similar scripts in Autoptimze “Exclude list”
If you don’t include required files, things tend not to work.
In reply to: Profile Fields not showing on 2.3.3Did you put the profile fields in the ‘Base (Primary)’ group?
By default, only those fields appear on Register.Did you try switching to a WP theme like 2015 to determine if the issue is in your theme?
Optimize Press uses a custom post type.
So you need to add activity tracking support to it.In reply to: filter activity loopTry:
function angelo_filter_activity( $retval ) { $retval['scope'] = 'bbp_reply_create,bbp_topic_create'; return $retval; } add_filter( 'bp_after_has_activities_parse_args', 'angelo_filter_activity' );In reply to: Allow users to post other things than just statusYou want to create an event via the update form on the activity page?
afaik – that is not possible.You can create events that will also generate an entry in the activity stream.
This plugin will do that: https://wordpress.org/plugins/buddypress-simple-events/In reply to: [Resolved] “Notifications” Permalink BugGlad you found the problem – the latest WLM has caused all kinds of issues re BP.
In reply to: [Resolved] Double profile fields??In the function, try changing Country to country.
In reply to: [Resolved] Double profile fields??Don’t change the name, just follow the directions about using the function.
In reply to: [Resolved] Double profile fields??You can’t find the word
Countryin the function called ‘naisai_make_field_delete’ ???Can you find this
WHERE name =in that function?In reply to: [Resolved] Double profile fields??Don’t replace the code.
Use this function, and change ‘Country’ to the name you gave the field.
function naisai_make_field_delete() { global $wpdb; $table = $wpdb->prefix . "bp_xprofile_fields"; $wpdb->query( "UPDATE $table SET can_delete = 1 WHERE name = 'Country'" ); } add_action( 'bp_ready', 'naisai_make_field_delete' );Then visit your site’s home page.
Then go to that field in wp-admin and you should see a Delete link.
If you have more than one field you want to Delete, then change the name in the function and repeat the process.
When you are done – remove the function.Then, if you want, get the code from the gist and run again.
In reply to: [Resolved] Double profile fields??You should remove that code as soon the field is created.
If you edit the field name, then a new field will be created – if you don’t remove the code.They dont have a delete button and now I cannot remove any of the fields.
That is because
'can_delete' => false,should be'can_delete' => true,.
I have corrected the gist.To delete the fields you already have, you can use a database tool like phpmyadmin.
You need to find the row(s) in the bp_xprofile_fields table and for each row, change the can_delete field value to 1. Then a ‘Delete’ will appear for that field in wp-admin.What theme are you using?
Try switching to a WP theme like 2015 – if the problem is gone, then it’s something in your theme.In reply to: upload Images in forunsThis is the BP support site.
The bbPress support site is here.Have you tried https://wordpress.org/plugins/gd-bbpress-attachments/ ?
In reply to: Removing the Member Navigation MenuYeah – the names are very confusing and unfortunate.
bp-default is deprecated and only there for compatibility with the few sites that still use it.
I apologize for pointing you to that dir in my first answer – corrected.
In reply to: Only display profile-loop section to profile ownerIt’s probably a matter of adding a simple conditional.
if( bp_is_my_profile() ) // code to show the galleriesIf you added the galleries manually to profile-loop.php, then the conditional could go there.
Have you asked rtMedia ?It’s a lot easier just to turn off avatars if the user is not logged in.
Try this in your theme functions.php or in bp-custom.php.function fresser_turn_off_avatars() { $bp = buddypress(); if ( ! is_user_logged_in() ) $bp->avatar->show_avatars = false; } add_action('bp_core_set_avatar_globals', 'fresser_turn_off_avatars' );In reply to: Get xprofile field names for different member rolesI have run into an issue when trying to get field data from a profile field that has the same name for two separate user role groups.
The simplest solution is to pass the field id rather than the field name.
$value = xprofile_get_field_data($field_id, $user_id);
You can get the field id by looking at the url in wp-admin when you edit that field, or just rolling over the edit button.Have you tried asking on the bbPress support forums ?
In reply to: Domain whitelist for buddypress signup$url_end_str = substr($result['user_email'], -9); if( '.yo.ac.uk' != $url_end_str ) //etcIn reply to: Removing the Member Navigation MenuYou want to remove navigation from all profile pages?
Create a template overload of this file:
bp-templates\bp-legacy\buddypress\members\single\home.phpAnd remove this div:
<div id="item-nav">In reply to: Membership pluginsLook at s2member and WishList Member – both of which work with BP.
In reply to: WP profile fields with BP XProfile SyncHow about all other fields.
Your best bet is to not nibble at the problem.
Write a script to migrate all the WP profile fields & user data into BP xprofile fields & user data.In reply to: bp_loggedin_user_id() is always 0In addition to Henry’s comments…
Don’t include the bp global when you don’t use it in the function.
There is no advantage to your approach, and you expose yourself to a possible timing issues re the hooks. Just call the hook:
function custom_bp_subnav() { $loggedin = bp_loggedin_user_id(); $displayed = bp_displayed_user_id(); if ( $loggedin == $displayed) { // do something } } add_action( 'bp_setup_nav', 'custom_bp_subnav', 50 );Custom notifications in non-components is tough.
Have you try hooking
bp_notifications_get_notifications_for_userwith a higher priority than what bbPress uses? Something like 8 instead of 10?You may want to submit a ticket to bbPress about the orphaned return in their function.