Forum Replies Created
-
Hi @offthepage,
Put this into bp-custom.php or in your child theme functions.php
This is only an example ! Don’t forget to change group names and tabs name to your needs.
Just add/remove a case into the switch for each group you want to modify.function bpfr_custom_group_default_tab($default_tab){ /** * class_exists() is recommanded to avoid problems during updates * or when Groups Component is deactivated */ if ( class_exists( 'BP_Group_Extension' ) ) : // $group=groups_get_current_group();//get the current group if(empty($group)) return $default_tab; switch($group->slug){ case 'kill-bill': // group name (slug format) $default_tab='forum'; break; case 'another-group': $default_tab='members'; break; case 'group-test': $default_tab='admin'; break; default: $default_tab='home';// the original default landing tab break; } return $default_tab; endif; // end if ( class_exists( 'BP_Group_Extension' ) ) } add_filter('bp_groups_default_extension','bpfr_custom_group_default_tab');In reply to: Male profiles should be invisible, but how?Don’t duplicate , mainly if ou received an answer !
In reply to: Buddypress not compatible with themeIn reply to: $bp->bp_options_nav wrong user linkstry by adding this at the begin of your function
$user_id = bp_get_activity_user_id();If you’re working on the Toolbar, the correct way to add a menu is like on this example:
/* add links/menus to the admin bar*/ /* more details here: http://wpengineer.com/2113/add-menus-to-the-admin-bar-of-wordpress/ */ function mytheme_admin_bar_render() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'parent' => 'new-content', // use 'false' for a root menu, or pass the ID of the parent menu 'id' => 'new_media', // link ID, defaults to a sanitized title value 'title' => __('Media'), // link title 'href' => admin_url( 'media-new.php') // name of file 'meta' => false // array of any of the following options: array( 'html' => '', 'class' => '', 'onclick' => '', target => '', title => '' ); ) ); } add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );A similar method is used to add a tab. Here on a user profile.
function bpfr_my_setup_nav() { global $bp; $mytab=array( 'name' => 'My Tab', 'link' => 'http://example.com/wp-content/themes/twentythirteen/my_extra_page.php', 'slug' => 'my-tab', 'css_id' => 'my_custom_tab', 'position' => 100, 'user_has_access' => 1, 'screen_function' => 'xprofile_screen_my_tab' ); $bp->bp_options_nav['profile']['my-tab']=$mytab; } add_action('bp_setup_nav', 'bpfr_my_setup_nav');In reply to: How to make a "post gallery" that has member ratingsthis is not a BP support, it’s a WP and theming domain.
1) no !
2) depends of the number of books and their type
3) this is default behavior when WP insert a picture into a post
4) a conditionnal should be added to the page or the post content. WP question anyway.FYI see here:
http://code.tutsplus.com/articles/how-to-create-a-simple-post-rating-system-with-wordpress-and-jquery–wp-24474I suggest you to read carefully the BP Codex (ie. anything about JS handling). 😉
And for the present case: https://codex.buddypress.org/plugindev/bp-custom-php/I can’t suggest anything because i’m wondering why the code doesn’t work on your site.
Personnally I use this code from within bp-custom. Have you tried that ?You also give much details about what you exactly try to do.
Adding a button into plugin who contains many by default is like diving in a hay stack !
Wich button or really really custom for going on another page or what ?Where ideally should he appear ?
Who can use it ?Each header has at least 6 or seven placeholder, only for positionning something in case off, so there’s no need effectively to use a more dedicated filter like the one you tell.
take a look here, for inspiration at least
http://wordpress.stackexchange.com/questions/125754/buddypress-conditionally-filter-directory-based-on-xprofile-fieldThis code was tested today on BP 2.1 and 2013 theme ! Copy/pasting from here works also.
Maybe remove the div wich can give some wrong output depending of your theme.
Anyway you have to style it (css) to see the button correctly.In reply to: "Read more" not working on group activitiesDo you mean the group admin screen on back end ?
Have you tried to strip the shortcode ?
$content = strip_shortcodes($content);
return $content;Removing some filters may also work ?
http://wp-a2z.com/oik_api/kses_remove_filters/
Or, sorry if i’m wrong, see here a similar question, with a clever answer which maybe help you further.Hi @jaybee08,
try this:
function my_custom_button() { // your button here echo ' <br/><div class="mcb"><a href="#" title="">blabla</a><div> '; } add_filter( 'bp_before_member_header_meta', 'my_custom_button' );Add the function to your child theme’s functions.php or to bp-custom.php
In reply to: "Read more" not working on group activitieshi @doremdou,
BP is a few steps away from better js handling, wich can be the cause of your current trouble.
https://buddypress.trac.wordpress.org/ticket/5735Maybe open a ticket and describe the problem ? 😉
In reply to: [Resolved] Enabling ForumIn reply to: [Resolved] Accept site Terms and Conditionshi @chakadizulu,
read here:
https://buddypress.org/support/topic/terms-of-use-plugin-for-buddy-press/
https://buddypress.org/support/topic/adding-terms-of-service-to-registration/
devs opinion: https://buddypress.trac.wordpress.org/ticket/4747or you can give this one a try ?
https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/
In reply to: members pages not showinghi @rukiax
have you tried to activate another theme ? You’re actually using bp-default, and BP 2.x doesn’t use it by default.
You have probably missed a setting somewhere, because the profile link is blank:
http://daklub.tk/members/rukia/
When going to
http://daklub.tk/members/
wich normally shows the members directory, we go to the forum (accordingly your breadcrumb)
Home › Forums › MembersIn any case, you have to create a page called members, for internal purpose only. If this page doesn’t exist you can’t see memebers directory and profiles correctly.
I suggest you to deactivate BP & bbPress, than activate Twenty Fourteen, redo your BP settings and permalinks and finally reactivate bbPress and set it as site wide forum.
Forget bp-default, or if you absolutely want it, read here the chapter about legacybbP is now 2.5, but you can also read here:
https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/using-bbpress-2-2-with-buddypress/In reply to: [Resolved] How to limit length of a xprofile field?Get a solution here:
http://snippetbarn.bp-fr.net/?p=172In reply to: [Resolved] need help on some idea!@noyzen,
If i follow correctly what you’re saying, a post of 1000 words, is good for SEO and that’s why you want an activity feed with over 300 char posts excerpts. But this is practically duplicate content, which is absolutely not good at all (seo or not seo) :-;
That said, the default post excerpt length is 250. And if it’s default, it’s probably also the default best practice value.But you’re the boss…
Add this to fuctions.php or bp-custom.php to get your activity stream exerpts longer without duplicating it.function bpfr_custom_length( $excerpt_length) { $excerpt_length = '200'; // change value to your need return $excerpt_length; } add_filter( 'bp_activity_excerpt_length', 'bpfr_custom_length', 10, 1);In reply to: includePHP Member pageIf your goal is to style the member diretory, which is set by default, you have to style it through CSS or modify the template from ithin a child theme. You can’t do this by adding a personnal template as for an usual WP page, to the BP (internal) page named Members.
In reply to: includePHP Member page@victord34, you should be more explicit i guess.
There is no member page, and the one created at BP activation process is only for internal purpose. Depending of the context, different things are showed at this place.On the members template, the php is
<?php bp_get_template_part( 'members/members-loop' ); ?>In reply to: Buddypress and a wordpress child theme?We’re now in the 2.0 aera.
To apply changes to your BP 2.x site.
– Upload any theme you want and check first if it works with WordPress, specially by creating new users and sending messages.
– Upload and activate BuddyPress. Check conscientiously his settings. Changecalso the permalinks settings to your need (except by default).
– If everything is fine, after testing of course, you create then a child theme.
– if you need to alter some BP templates, you get copies of them from bp-templates/bp-legacy/buddypress/ and put them in your child-theme/community/ or child-theme/buddypress/ directory. All other files, which are not (BP files) filed in bp-legacy, should be copies of your original theme added to your child theme.References:
all comments in bp-templates/bp-legacy/buddypress-functions.php
https://codex.wordpress.org/Child_Themes
https://codex.wordpress.org/Function_Reference/get_template_partIn reply to: Active Friend Sidebar Widgethello @leonyipa,
you’ll find the solution by reading this codex page
In reply to: If asking for help????
In reply to: If asking for helphi @tau001,
have you ever read about BuddyPress before asking ? 😉
BP is compatible with most of the (recent) WP themes. There is no need to reach a dedicated BP theme (these are mostly outdated now < BP 1.8)
Be aware that a commercial theme will cut you off of public forums like this one. Nobody can help you, outside the theme support. And don’t buy a spectacular homepage picture with bright colors and heavy markting claims if you don’t know exactly what you need.
Built first the skeleton and add a skin after. When building a house, you can’t begin with the wallpaper ?!!!For your questions:
1) see link
2) yes of course
3) – yes
– yes with an extra plugin: myCred
– yes & easely, if you know a little about php codingIn reply to: Display post on certain groups