Forum Replies Created
-
In reply to: Auto Affiliate Link and Call Functions
You’re lucky !
Download the latest version of the plugin, as it seems that this is now in since 101 minutes:
Added support for Buddypress custom profile fieldshttps://plugins.trac.wordpress.org/browser/wp-auto-affiliate-links/
add a conditionnal to existing on template for that element.
$user_id != bp_loggedin_user_id()In /child-theme/buddypress/members/single/activity.php
Replace line 48 or so with this:if ( is_user_logged_in() && bp_is_my_profile() && ( $user_id != bp_loggedin_user_id() ) && ( !bp_current_action() || bp_is_current_action( 'just-me' ) ) )In reply to: [Resolved] My Comments Tab@bigkahunaburger You’re welcome ! 😉
WordPress is the software behind buddyPress.
If you need custom roles&capabilities on your site, you can add roles programatically as explained on your mentionned tutorial. If it works, site admin can attribute one of the additionnal role to members, within admin.BuddyPress, at this time, handles only member types. A member type is not a role or a capability à la WordPress, but only a way to sort better your members. In other words, a kind of a member category.
To handle such behave from front-end while registering, you can associate a xprofile field value with an existing WP role. See here for a solution (untested) provided a few month ago.
https://buddypress.org/support/topic/how-to-assign-a-wp-user-role-based-on-a-registration/#post-232887Add snippet to your child theme functions.php or into bp-custom.php and give it a try.
In reply to: [Resolved] function enqueue depend of dynamic urlIn reply to: [Resolved] My Comments Tabi completed the snippet so it comes with pagination.
Here a great tutorial about pagination.
In reply to: “$bp->current_component” returns empty stringCan you give details about what you’re trying to build ?
Add custom page dynamically is not enought.In reply to: BuddyPress Activate/Register Page Setupyou don’t know how to create a page with WordPress ? Hum… really ? 😉
dashboard > pages > add new.
Enter a title, save and you’re done .
Go to BP page settings and select the one you created for activate. Do the same for register.In reply to: Mentions in regular comment formWhen you mention a member in a blog comment, that member is informed of that on is profile notification screen and via the notif bubble in user menu (top right under howdy). But no mail is send in this case.
May be related topics:
https://buddypress.org/support/topic/no-notifications-for-mentions-in-comments/
https://buddypress.org/support/topic/notifications-component-fixing-custom-templatestemplates/Also:
In reply to: BuddyPress Activate/Register Page SetupNo. You have to create Activate/Register pages manually.
In reply to: [Resolved] My Comments Tabhi @bigkahunaburger,
Give this a try (goes to bp-custom.php or child-theme functions.php)
function bpfr_get_user_comments_on_profile() { // number of comments to show per page define( 'DEFAULT_COMMENTS_PER_PAGE', 3 ); $page = (get_query_var('page')) ? get_query_var('page') : 1; $limit = DEFAULT_COMMENTS_PER_PAGE; $offset = ($page * $limit) - $limit; $param = array( 'user_id' => bp_displayed_user_id(), 'status' => 'approve', 'offset' => $offset, 'number' => $limit ); $total_comments = get_comments(array( 'orderby' => 'comment_date', 'order' => 'ASC', 'status' => 'approve', 'parent' => 0 )); $pages = ceil(count($total_comments)/DEFAULT_COMMENTS_PER_PAGE); $comments = get_comments( $param ); $args = array( 'base' => @add_query_arg('page','%#%'), 'format' => '?page=%#%', 'total' => $pages, 'current' => $page, 'show_all' => false, 'mid_size' => 4, 'prev_next' => true, 'prev_text' => __('« backward'), 'next_text' => __('onward »'), 'type' => 'plain' ); // Output pagination echo paginate_links( $args ); ?> <ul> <?php foreach($comments as $comment) { // short version //echo '<li>'. ($comment->comment_content .' <a href="'. esc_url( get_permalink( $comment->comment_post_ID ) ) ).'">View post</a></li>'; // long version echo '<li>'. ($comment->comment_content .' <a href="'. esc_url( get_permalink( $comment->comment_post_ID ) ) ).'">'. get_the_title( $comment->comment_post_ID ) .'</a> Comment: '. get_comment_date( '', $comment ) .'</li>'; } ?> </ul> <?php } add_action ( 'my_profile_comment', 'bpfr_get_user_comments_on_profile' ); function bpfr_comment_profile_setup_nav() { global $bp; $parent_slug = 'comments'; $child_slug = 'comments_sub'; // Add nav item bp_core_new_nav_item( array( 'name' => __( 'My comments' ), 'slug' => $parent_slug, 'screen_function' => 'bpfr_profile_comment_screen', 'position' => 40, 'default_subnav_slug' => $child_slug ) ); //Add subnav item bp_core_new_subnav_item( array( 'name' => __( 'My latest comments' ), // as content title 'slug' => $child_slug, 'parent_url' => $bp->loggedin_user->domain . $parent_slug.'/', 'parent_slug' => $parent_slug, 'screen_function' => 'bpfr_profile_comment_screen' ) ); } function bpfr_profile_comment_screen() { add_action( 'bp_template_content', 'bpfr_profile_comment_screen_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } function bpfr_profile_comment_screen_content() { do_action( my_profile_comment ); } add_action( 'bp_setup_nav', 'bpfr_comment_profile_setup_nav' );Reference: https://codex.wordpress.org/Function_Reference/get_comments
To do the same for user’s post, see here:
https://buddypress.org/support/topic/creating-a-custom-tab-that-takes-in-the-info-from-wp-recent-posts/In reply to: “$bp->current_component” returns empty stringI can’t figure out what is going on.
That snippet is 6 years old. BuddyPress is slightly different today.
Some explanation here:
May be you can also read here:
In reply to: Activity stream customisation options…@djsteveb, All,
you can only post max 3 links on this forum. There is no moderation for this, meaning there is no way to un-moderate. If you publish a topic with 4 or more links, the topic will never been published and you’re simply redirected to the comment screen.
In reply to: Buddypress site for kids that is COPPA CompliantNo idea really, but see here if you find something
https://wordpress.org/plugins/search.php?type=term&q=cookie+lawIn reply to: Display Nameif you don’t use bp-default theme, this advice from @prabin04 is wrong:
Copy BuddyPress *members* folder frombp-default folderinside your child theme, and search for member-header.php file located inside members->single folder.You need to take the copy from bp-templates/bp-legacy/buddypress/
See this plugin, which is made for that:
https://wordpress.org/plugins/buddypress-sitewide-activity-widget/WP’s comment widget is for main blog comments, not activity comments.
In reply to: Blog creation at registration checked by defauldBy default it’s closed. Which theme/plugins do you use ? Do a test with one of twenty theme.
Are what’s new form or activity comment working correctly or do you have also toggle issue with them ?In reply to: Blog creation at registration checked by defauld@gebar,
the allow blog checkbox is a conditionnal who open a sub form via ajax. If you remove it from the template, it will compromise the register process. But as the only thing we need is the value (0 or 1), we have to change it from 0 (empty) to 1 (ckecked) in the core. The function who made this isbp_get_signup_with_blog_valuewhich contains a filter for$value.Give this a try. Add it to bp-custom.php
function create_blog_activated( $value ) { if ( function_exists( 'bp_get_signup_with_blog_value' ) ) // default value is '' $value = 1; return $value; } add_filter( 'bp_get_signup_with_blog_value', 'create_blog_activated', 10, 1 );Now the register page shows blog activation part open and checkbox is ticked.
In reply to: Group Post supportBuddyPress is a plugin dedicated to members, not blogs. On a multisite install, each member can get his separate blog, without limitation. These member blogs are then refrenced on a blog directory. An each membrer profile will show a blog directory with that member’s blog(s).
Groups is a component to group members, not blogs. If you need a group blog, instead or in addition of individual member blogs, you can use BuddyPress Groupblog. Such blog will be for all group members and each group can have only one blog. But each group member can have his own blog. In this case, the network will have a main blog, group blogs and individual blogs.
Whatever solution you use, a blog is always part of WordPress and will work exactly like the main site blog where you installed BuddyPress.
This means that it’s the responsability of each member with a blog to admin his blog, even if the main site admin has priority and can allow/disallow plugins and themes. Usually disallowed, so members can only use what main site admin decided they can use.Enhancement can be asked on Trac. Read here about user participation and contribution to BuddyPress.
In reply to: Double post in group activity@gitavns, it’s not a BP bug. But you have to verify your install. Since when did you get this issue ? What have you done (update, adding custom function) ?
– Activate debug mode in wp-config.
– Deactivate Divi and activate Twenty fifteen theme.If you use plugins and/or custom code (bp-custom or child-theme functions.php), deactivate them and give a try. If it’s OK with only WP/BP, reactivate and test each plugin one by one.
Once plugins being tested, and if OK, reactivate your theme.If it appears that the issue comes from Divi, you should ask on their support forum, as we can’t help much here with premium theme.
In reply to: Suspending user accountsDo you use open and closing php tags ?
A bp-custom.php file must contain one opening and one closing tag. And like any php file, without any blank line at begin and end of file. Here the one i’m using since years.
<?php // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) exit; //////////////////////////////// - custom stuff start here - ///////////////////////////////// function one() { .... } function whatever() { ... } //////// end of custom stuff ///////////////// ?>Please, try the solution before telling insanity.
Members bulk management is done in admin.
To remove a group member, you have the opportunity to do it from frontend0. One by one, as mod or group admin. Why not bulk action on front ? Because it is not the place for achieve massive user administration.Back to backoffice where are
A members list (with members)
A group list (with group entities)Both allowg bulk actions (add/delete)
If you check attentively, there is no relation between both list. No groups are mentionned on members list, and no members are mentionned on group list, except a member count.Now you’re coming in and ask how to bulk delete group members.
Fortunately, you got a solution. No the best, not the only one, but at least, one.Alas, you didn’t really understand what to do with and where to use it. 3 topics and 2 screenshots later, explaining the difference between back and frontend, the only thing you find to say is I want to delete a member from a group not from the site.
Do you really think that that code removes a site member ? Did you ever read the code ? Perhaps you don’t understand what
groups_leave_groupdoes ?
This instruction removes only a member from one or more groups. Exactly that what you asked for. And it’s done from the only place where a members list is on hand: in admin.I close this topic, before getting totally out of scope and becaming to trollish.
Double post. Topic started here:
https://buddypress.org/support/topic/urgent-need-a-hook-which-is-called-during-click-og-comment-button-urgent/Closing this topic.
Please don’t double post. It doesn’t bring more answers.
You already received some answers. This topic is closed and can be continued here:
https://buddypress.org/support/topic/urgent-need-a-hook-which-is-called-during-click-og-comment-button-urgent/Would you please read twice and triple check the answers you receive ? I added a screnshot and a link example you have to follow.
Remeber that you asked for if I want to delete a member
I suppose that you know how to manage users in admin ? Go there…