Forum Replies Created
-
Hi @julia_b,
try this snippet (bp-custom.php)
function bpfr_activity_nocomment( $can_comment = true, $type = '' ) { if ( empty( $can_comment ) ) { return $can_comment; } // activities which can't be commented $cant_comment_types = array( 'bbp_topic_create' => 1, 'bbp_reply_create' => 1, ); return ! isset( $cant_comment_types[ $type ] ); } add_filter( 'bp_activity_can_comment', 'bpfr_activity_nocomment', 10, 2 );This is only an example. To get the exact activity name you want to disallow comments on the feed, see in xx_bp_activities table
In reply to: Profile Page layoutHi,
ever heard about html and CSS ?
Go to your profile, check the source code of that page and you will see how it’s made.
If you use your browser web developpers tools you can check more indeep.If you like to learn, you can read the codex about theming.
If all this is already right for you, you can go to bp-templates/bp-legacy/buddypress/members/single/and grab the appropriate template file, in occurence member-header.phpAns to make this work correctly, you have to create a child-theme first.
For much more details, Codex is your friend.
In reply to: Activity Feed for members only?The activity loop is in the template. And the file you can edit doesn’t exist.
In fact it exist, but you have to make a copy of it first, make your modification and add the copied file to your child-theme.
Be warned š : if you modify the original file, the modification will be lost at the next update of BP.
The concerned file is /buddypress/bp-templates/bp-legacy/buddypress/activity/activity-loop.php
Inside that file you will see what is explained on the codex page i indicated you previously.All the other points are also explained on the codex.
Would be better if there was an option in the Admin section
Do you imagine the number of settings which would be necessary to fit all existing and upcoming use cases ? Even our spumoni dudes devs haven’t implemented a pizza oven yet ! š
In reply to: Forum in private groupshi @melle328, @milenushka
i opened a ticket about that issue. Feel free to connect to Trac and give your feedback.
https://buddypress.trac.wordpress.org/ticket/6202To login, use same credentials as on this ofrum.
In reply to: Noob recommendationsI published some BuddyPress use case, see here: http://bp-fr.net/realisations/
There is also a category called showcase with some other examples.
This will hopefully help you to see how BP is and can be used.– separating users is now possible with member_type (see codex)
– scheduling is not avaible in BP, but thought there are some plugins for this (search on WP repo)
– conditionnal xprofile fields is a popular question on the forum. You’ll probably find some discussion here.BuddyPress is first of all a great and awesome tool for building communities around the members.
In reply to: Activity Feed for members only?Activity feed for Members only or Friends only ?
and pay attention to scope. As of BP 2.2.0, you can now use multiple scope.if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&scope=friends,groups' ) ) :You could also use bp_parse_args in a custom function or
search on forum for similar to your question, like this one.In reply to: Display members like a portfolioYou’re wrong (it’s about member directory page), and i wrote be inspired, not that it is THE exact answer. By Design, I thought playing with lists CSS to display them in 4 cols; by widget, the tool to generate the content.
Design + Widget + your work = the begin of what you want to get.
In reply to: Modify the activity loopGive this a try (functions.phhp or better, bp-custom.php) This will force the chronology of the blog post.
Since recently (1.9 ?), a post published the 5th january is in the SWA at this date. A comment added to it the 26 january is attached to this post and appears under the 5th swa log…. so it’s just impossible to see if you have a long SWA.
This snippet revert the swa to the previous behave.
Posted: 5th -> swa: 5th
Commented: 26th -> 26thfunction bpfr_stream( $qs, $object ) { if ( 'activity' != $object ) { return $qs; } $qs = wp_parse_args( $qs, array() ); $qs['display_comments'] = 'stream'; return $qs; } add_filter( 'bp_ajax_querystring', 'bpfr_stream', 20, 2 );Private groups activities are not visible on the SWA. They show only on that group, if user is member and logged in.
Hope that helps? š
Hi @chatty24,
Instead of disallowing, allow those you need. š
// allow tags on updates form function bpfr_whitelist_tags_in_activity( $allowedtags ) { $allowedtags['img']['target'] = array(); return $allowedtags; } add_filter( 'bp_activity_allowed_tags', 'bpfr_whitelist_tags_in_activity' );Reference: bp-activity-filters.php:184
In reply to: Member pagination not working on custom member pageHi @evitorino,
update to BP 2.2.0 first, than you can use the new member_type functionality.
Find a usage example here, based on what is written on Codex.
In reply to: Display members like a portfolioIn reply to: Activate & Register page questionOn a network install, BP is activated on the main site (standart usage).
An you create activation and register page only on this site, for the entire network !You haven’t to create these pages for each blog, as they are all dependant, by sub-domain or sub-directories, of the same WP install.
One WP + one BP = ms network && 10 000 blogs. š
In reply to: Rounded admin / buddy bar corners? CssStyling the WP Toolbar is not directly related to BuddyPress and a bit out of the scope of this forum.
Please ask better on a specialized CSS forum. š@garrett-eclipse, @henrywright,
i added this dicussion here.
In reply to: This is why we can't have nice thingsAnother forum bug is related here.
In reply to: Noob recommendationsMy 2 cents about your question is it would be difficult to answer.
The site you mention is not a WordPress install.
Visually:
The used theme is nice and if you check what exist for WP, you’d probably find a similar one.Functionnaly
as you say nothing about your project, it’s difficult to tell if BP is adapted.Generally, imitating an existing site is not a good idea. WP and BP are powerfull enough to let you get unique.
Conclusion:
this is a firstly a support forum, with not much advices around pro and contras. There are many specialized sites around design and BP usage to let you make an opinion.You can begin here by reading the about page, the blog and the whole forum.
Good luck ! š
In reply to: Buddypress Settings Won't Save?hi @rhoward8419,
the issue could be theme related. Wich theme do you use ?
In reply to: Activate & Register page questionhi @yosmc,
registration and activation are directly dependant of WordPress, that’s (i presume) the reason why BP doesn’t create those page for you automatically.
This is not a problem when you use a fresh install, but can be one if you’re installing BP on an existent WP install. In this case, some original settings may be slightly change i guess.
BP uses all those page for internal purpose. And this usage is somehow enforced with 2.2.0 version.(see here from trac)There is anyway no alternative when BP is on. You have to create those page manually. Point.
I don’t think there is a way to get those page automatically created.
Creating them will take 1 mn, which is a less effort in regard of developing a custom function for an operation which is only done once. šIn reply to: Make wp Admin bar visibleHi,
it’s not possible without heavy code modification. The usermenu is intended to be on the toolbar.
But you can give this a try. All items will be visible on the toolbar, instead under the howdy.
function laura() { global $bp, $wp_admin_bar; remove_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_my_account_menu',4); } add_action( 'bp_setup_nav', 'laura', 4 );Reference: /bp-members/bp-members-adminbar.php:74
WP Codex wp_admin_barIn reply to: Noob recommendationsPlease don’t double post. Wait at least 24 hours before bumping…
This forum is maintained by volunteers, and we can only answer or help on our free time.Closed your previous post.
In reply to: bp_get_member_type() is not working in the loophi @philippmuenchen,
here’s a gist published by @imath to sort the member directory by member_type.
That (working)example is based on this Codex article
Try this snippet, which let’s you determine wich tab you will see first when on a group.
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 (use slug format) $default_tab='forum'; break; case 'titanic': $default_tab='members'; 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');Comment shane’s function before using this function.
In reply to: Custom display of sitewide noticeshi @chlab,
if you read code documentation in /bp-legacy/buddypress-functions.php
// Only hook the 'sitewide_notices' overlay if the Sitewide // Notices widget is not in use (to avoid duplicate content). if ( bp_is_active( 'messages' ) && ! is_active_widget( false, false, 'bp_messages_sitewide_notices_widget', true ) ) { add_action( 'wp_footer', array( $this, 'sitewide_notices' ), 9999 ); }I guess you have to modify your custom code accordingly. š
In reply to: Child Theme/FunctionsHi @nopartysystem,
Can somebody please tell me what Iām doing wrong?
in brief: all ! š
After you create a child theme, you’ll have a folder ‘my_child_theme’ and a unique file in it ‘style.css’
If you want to modify BuddyPress, you create a folder named ‘buddypress‘ into your child-theme folder, and in this bp folder, you copy /folder/file/ you want to modify from
/bp-templates/bp-legacy/buddypress/Read here for more details
In your case, you use /child_theme/buddypress/activity/activity-loop.php
Than you modify the code to reflect
if ( bp_has_activities( bp_ajax_querystring....
(read here)Another method to filter your activities is to use bp_parse_args (also explained on the codex)