Forum Replies Created
-
Thanks for the update, mercime.
Things definitely are not yet ‘back to normal’ but hopefully will be soon.
[ check re '0 and 0' re replies and voices ]
For ‘expert web developers’
http://codex.buddypress.org/To change the output, use the filter hook in
bp-groups-template.php -> bp_get_groups_pagination_count()return apply_filters( 'bp_get_groups_pagination_count', sprintf( __( 'Viewing group %1$s to %2$s (of %3$s groups)', 'buddypress' ), $from_num, $to_num, $total ) );You can’t override functions unless they are pluggable.
http://codex.wordpress.org/Pluggable_FunctionsUsing ‘scope’ will over-ride any filters, as noted in bp-activity-template.
There are various ways to makes this a function, but it depends on your install params, hooks etc.
Following on with your approach, try putting this (untested) at the top of the main activity template.
$user_id = bp_loggedin_user_id(); $following = array(); if ( bp_is_active( 'bp-follow') ) $following = bp_follow_get_following( array( 'user_id' => $user_id ) ); $friends = array(); if ( bp_is_active( 'friends') ) $friends = friends_get_friend_user_ids( $user_id ); $me = array( $user_id ); $wall = array_merge( $following, $friends, $me ); $wall = array_unique( $wall ); $user_ids = implode( ',', $wall ); $get_users = "'user_id=" . $user_ids . "'"; if ( bp_has_activities( $get_users ) ) //etcActually, in bp-activity=template -> bp_has_activities, there is a filter ‘user_id’ that accepts a csv string.
You shouldn’t need to hack that file.Did you try getting friends & followers and then passing that into bp_has_activities ?
Something like:
$user_ids = 'user_id=' . $csv_string . "'"; if ( bp_has_activities( $user_ids ) )sorry, wrong thread
Your error message refers to ‘SimplePie’, a plugin ?
Deactivate that plugin and see if you still get the fatal error.function show_xprofile_fields ( $user ) { $field_value = xprofile_get_field_data( 'x', $user->ID, $multi_format = 'comma' ); echo "x: " . $field_value . '<br />'. $field_value = xprofile_get_field_data( 'y', $user->ID, $multi_format = 'comma' ); echo "y: " . $field_value . '<br />'. } add_action( 'edit_user_profile', 'show_xprofile_fields' );You don’t need to repeat the function, just add as many additional field calls as you want to the function.
>am i missing something?
It would seem so, but I have no idea what it would be.
Did you adjust the code for your situation?Try this in plugins/bp-custom.php
Put this function in your theme/functions.php or plugins/bp-custom.php
And change ‘members’ to the slug of the page you want.function custom_login_redirect_to($user_login, $user) { bp_core_redirect( get_option('siteurl') . "/members/" ); } add_action('wp_login', 'custom_login_redirect_to', 10, 2);@funmi-omoba
Thank you for mentioning our BuddyBlock plugin.@tim_marston
If you’re using BP 1.7 then BuddyBlock will do exactly this:
” each individual member to be able to block another member from seeing/contacting/interacting with them”.Re IPs – there are some WordPress plugins that get IPs for posts and comments.
But the best way is to get the IP when a user registers and store it in the usermeta table.
That would probably require some custom code.
Then use htaccess to block that IP if necessary.It’s easy to display profile fields in the Dashboard.
Editing the fields on that screen requires additional custom work.
If that is something you need, please go to
http://www.philopress.com/services/You can adjust the font size via filters.
If you don’t know how to use apply_filters, then editing or over-riding the css is another approach.
Look for ‘mini’ and ‘acomment’.
For example, ‘mini’ can be found in
bp-themes\bp-default\_inc\css\responsive.css
bp-themes\bp-default\_inc\css\default.css
bp-themes\bp-default\_inc\css\default-rtl.cssThanks for the note re BuddyBlock
It is our most popular plugin and user response has been great !
In 1.7, you can adjust the activity query via a filter – so you don’t have to hack a core file.
Take a look at the bp_activity_get_user_join_filter hook in bp-activity-classes.php
In particular, the $where_sqlSo you know how to code a plugin that creates and handles cpts ?
Then something like this in the plugin class:
add_action( 'bp_setup_nav', array( $this, 'bp_stories_tab' ), 5 ); // create the tab function bp_stories_tab() { bp_core_new_nav_item( array( 'name' => __( 'Stories', 'bp-member-stories' ), 'slug' => 'stories', 'position' => 200, 'screen_function' => array( $this, 'bp_stories_screen' ), 'default_subnav_slug' => 'stories' ) ); } // load template when tab is clicked function bp_stories_screen() { add_action( 'bp_template_content', array( $this, 'bp_stories_profile_screen' ) ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } // show the stories screen function bp_stories_profile_screen() { // etc. }>Is this the way it is supposed to be?
Yes.
Why? I’ve no idea, but it’s a ‘design’ decision.You can filter the activity stream via bp-custom.
But probably be easier to locate the css that makes it smaller.BP can’t do that out of the box.
You can extend it using custom post types.
No need to send them to wp-admin, they could create stories via a page within their profile.
Read and sort can be handled via the usual WP post functions, within or outside profiles.Glad you got it sorted.
But ‘manage_options’ is a powerful cap.
I could see where you wouldn’t want to grant that cap to a custom role.Now that you can explain the issue, I suggest you submit a bug.
http://buddypress.trac.wordpress.org/Perhaps try using an existing role, like Editor, instead of a custom role ?
And add caps to that role?also – some role editors are funky.
Make sure it’s not that plugin.
Use this to check if your custom role really has those caps:
http://wordpress.org/extend/plugins/members/Try giving them the ‘bp_moderate’ capabilities.
It seems edit_profile checks to see if it’s your profile or whether
bp_current_user_can( 'bp_moderate' ) || current_user_can( 'edit_users' )
so adding the ‘edit_users’ cap should work.See bp_core_can_edit_settings() in bp-members-functions.php
It may not be a bug, but you could find out by submitting a bug
http://buddypress.trac.wordpress.org/