Forum Replies Created
-
In reply to: Save Button Not Showing?
How do i Publish those pages?
Let me google that for you:
http://easywpguide.com/wordpress-manual/saving-and-publishing-content/Please use the
codewhen sharing code.current_user_xxx refers to the logged in user – not the displayed user.
Use
is_super_admin()to determine if the current user is a site admin.
https://codex.wordpress.org/Function_Reference/is_super_admin$displayed_user_level = some_s2_function( bp_displayed_user_id() ); if( is_super_admin() && $displayed_user_level == 'some level' ) )some_s2_functionis whatever s2 function returns the member level based on a user_id.In reply to: Buddypress profile photo / cover image failsAlso add
define( 'WP_DEBUG_LOG', true );to wp-config.phpIn reply to: Adding profile fields to admin and mod iconsInstead of using
bp_group_list_admin(), usebp_group_admin_ids()and then write your own display loop. Review both functions inbp-groups/bp-groups-template.phpDitto for
bp_group_list_mods()You can use multiple filters with commas:
&action=activity_update,new_blog_postSee the comments here for other info:
Using bp_parse_args() to filter BuddyPress template loopsIn reply to: opt out of directoryThere are a couple of ways to do that.
Try:function iresource_exclude_ids( $retval ) { global $wpdb; $field_id = xprofile_get_field_id_from_name( 'FIELD NAME GOES HERE' ); $query = "SELECT user_id FROM " . $wpdb->prefix . "bp_xprofile_data WHERE field_id = " . $field_id . "AND value = 'FIELD VALUE GOES HERE'"; $exclude_ids = $wpdb->get_col( $query ); $retval['exclude'] = implode(",", $exclude_ids); return $retval; } add_filter( 'bp_after_has_members_parse_args', 'iresource_exclude_ids' );More info:
In reply to: Dynamically Display HTML depending on UserYour question now seems to be about s2member, not BuddyPress.
How are you setting this variable:
$s2member_level1?If you want to display the paybox based on s2member level, then use an s2member function to set
$s2member_level1or use a constant.if( 2 == S2MEMBER_CURRENT_USER_ACCESS_LEVEL ) // etc
https://www.s2member.com/codex/stable/s2member/api_constants/package-globals/#src_doc_S2MEMBER_CURRENT_USER_ACCESS_LEVELIn reply to: Does Buddypress even work?BuddyPress does not include forums.
You can use bbPress for forums.
bbPress is designed to integrate with BuddyPress.Be sure to read this page in the Documentation ( aka codex ):
In reply to: Simply display friends of memberThe solution is on the codex page that I provided a link to.
Create a custom members loop:
<?php if ( bp_has_members( 'user_id=' . bp_loggedin_user_id() ) ) : ?> //etcIn reply to: Simply display friends of memberIn reply to: Private Message Thread – Reply-Box on TopThe reply form has hidden fields that require variables only available within the
bp_thread_has_messagesconditional.In order to get a response to your question, please provide specifics – after reading this:
https://buddypress.org/support/topic/when-asking-for-support-2/It’s a known bug.
There is a patch available.
Read: https://bbpress.org/forums/topic/bbpress-post-edit-causes-multiple-activity-entries/In reply to: Private Message Thread – Reply-Box on TopYou shouldn’t change core files.
You should be able to make your changes via template overloads.
Copy this file
bp-templates\bp-legacy\buddypress\members\single\messages\single.php
to your child theme so that the dir structure looks like this:
your-theme\buddypress\members\single\messages\single.phpThen in single.php, change
if ( bp_thread_has_messages() ) :
to<?php $args = array( 'order' => 'DESC' ); if ( bp_thread_has_messages( $args ) ) : ?>To change the location of the reply box, adjust the html in that same template overload.
In reply to: Questions about the concept of user profilesThere is no BP user_id.
BP uses the ID as found in the WP users table.
BP has functions for getting that user id in different contexts: logged_in, displayed, etc.In reply to: Order by Alphabetical for groupsPlease use the
codebutton when posting code.This works for me:
<?php if ( bp_has_groups( bp_ajax_querystring( 'groups' ) . 'type=alphabetical' ) ) : ?>If you copy & paste, make sure the single quotes ‘ aren’t changed to something else, like `
This is the correct path:
wp-content/themes/relativity/buddypress/groups/groups-loop.phpIn reply to: Order by Alphabetical for groupsThere is no template called
loop.phpUnless you’re are explicitly using the BP default theme, you should be using this file
buddypress\bp-templates\bp-legacy\buddypress\groups\groups-loop.php
And creating a template overload of that file and making your changes in the overload.In reply to: Order by Alphabetical for groups
<?php if ( bp_has_groups( bp_ajax_querystring( 'groups' ) . 'type=alphabetical' ) ) : ?>In reply to: Delted AccountsTry it and find out.
Unless you’ve changed something or use a plugin like WangGuard, they can immediately re-register.In reply to: post type –> buddypress support'user_has_access' => trueIn reply to: Questions about the concept of user profilesTricky task… I don’t envy your use case testing!
BP uses the WP user – but stores profile data separately. But some fields are duplicated – like name.
You may have to write profile data to both user meta and xprofile tables.
And then use a conditional re whether the BP Extended Profiles component is enabled.
If it isn’t, then pull from user meta, etc.More info:
xprofile_sync_wp_profile()syncs Xprofile data (nickname, first name and last name) to the standard built in WordPress profile data.xprofile_sync_bp_profile()syncs the standard built in WordPress profile data to XProfile.In reply to: Set Birthday value buddypressi have red all the files in buddypress plugin
Then you know that BP does not store any data re individual avatars in the database.
In reply to: exclude_by_role function no longer working?I don’t know why your function isn’t working, but since you only want subscribers, there are more efficient ways to approach the task.
Here is one:
Review this: https://codex.wordpress.org/Function_Reference/get_usersTry something like:
function subscribers_only() { $subscribers = get_users( array( 'role' => 'subscriber', 'fields' => array( 'ID' ) ) ); $subscribers = implode(",",$subscribers); return $subscribers; }And
$subscribers = subscribers_only(); bp_has_members( bp_ajax_querystring( 'members' ) . '&include=' . $subscribers )In reply to: Activate = ErrorsPlease use the
codebutton when posting code.
Never include the full path to your installation in code you post publicly.All the ‘errors’ are related to the BuddyBlog plugin.
You should submit your questions to the developer of that plugin: http://buddydev.com/In reply to: Post On Buddypress ProfilePlease use the
codebutton when sharing code.
For long pieces of code, please use a service like gist.You can submit an enhancement ticket here. Please search the existing tickets first for entries that already make the same request.