Forum Replies Created
-
If you’re simply redirecting, then you don’t need a ‘me’ destination. Try:
function chatty_me_check() { if( is_user_logged_in() ) { global $wp; $request = $wp->request; $me = stripos( $request, '/me/' ); if( $me !== false ) { wp_redirect( bp_loggedin_user_domain() ); exit(); } } } add_action('wp', 'chatty_me_check');You’ll need to look at and adjust the screen function – bp_jm_resumes – for that nav item.
Your question should be directed to the creator of that plugin.In reply to: Pagination on homepage redirecting to root URLHave you tried switched to a WP theme like 2012, to see if the problem persists?
In reply to: Pagination on homepage redirecting to root URLCalling posts with pagination and using widgets on home page is pretty standard, so I suspect some issue with how your home page is built.
btw – the home page pagination is working fine for me, using Chrome, not logged in. Maybe you just changed something?
In reply to: Pagination on homepage redirecting to root URLYou shouldn’t call the main query and then change it and call it again.
Besides being inefficient, it can lead to other problems.
Try:$args = array( 'post_type' => 'leaning_bikes', 'paged' => $paged, 'posts_per_page' => 6 ); $wp_query = new WP_Query( $args ); while ($wp_query->have_posts()) : $wp_query->the_post();In reply to: Redirect users to their notifications after loginTry this:
function jessicana_redirect_page( $redirect_to, $request, $user ) { $redirect_to = bp_core_get_user_domain($user->ID) . 'notifications/'; return $redirect_to; } add_filter('login_redirect', 'jessicana_redirect_page', 11, 3);In reply to: Redirect users to their notifications after loginTry:
return bp_loggedin_user_domain() . 'notifications/';In reply to: Dear developers: Testing data and tools, please!This is a BuddyPress forum.
Go here for the bbPress forum.add_filter should always return something.
Try this:
// snipped $activity->content = $activity_content; } return $activity; }Or this:
// snipped $activity_action = sprintf(__('%1$s posted a new reward : %2$s', 'buddypress'), bp_core_get_userlink((int) $post->post_author), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>'); } return $activity_action; }In reply to: Locking some profiles fieldsDid you follow the link in my answer?
In reply to: Display filtered overview of membersPlease use the ‘code’ button to format your code.
Is ‘ar’ your $table_prefix, as defined in wp-config.php ?
If so, then this:
$wpdb->ar_bp_xprofile_data
Should be this:
$wpdb->bp_xprofile_dataalso – Why use ‘LIKE’ if you’re looking for exact matches?
value = 'female'is faster.In reply to: Display filtered overview of membersDo they also have a profile field for gender?
You could write custom mysql queries – more info.
Have you seen this?
In reply to: Which File and How to Sort?Use a template overload.
And this is the file to use:
buddypress\bp-templates\bp-legacy\buddypress\activity\activity-loop.phpDid you mean BuddyPress as opposed to bbPress?
Wouldn’t it be faster to just check for BuddyPress in your plugin and if found remove their filter and then replace it?
You can always create a ticket in trac. If you do, please reference this thread.
In reply to: Hook for when a user first logs in@valuser Thanks for sharing the function.
One issue re ‘proper’ WP coding – add_filter should always return something, so…function sbp_first_login_check( $redirect_to, $not_used, $user ) { if( bp_get_user_last_activity( $user->ID ) !== '' ) $redirect_to = bp_core_get_user_domain($user->ID) .'/groups/'; else $redirect_to = bp_core_get_user_domain($user->ID) .'/profile/change-avatar/'; return $redirect_to; } add_filter( 'login_redirect', 'sbp_first_login_check', 20, 3 );In reply to: Comments appear two times on activity streamCheck the Activity entries in wp-admin to see if there are really 2 entries for a particular item.
If there aren’t, then it’s most likely a theme issue.
In reply to: Function to check if group has notificationsNice @danbp, but a couple of issues…
bp_core_get_notifications_for_useris deprecated.Instead use
bp_notifications_get_notifications_for_user( $user_id, $format = 'string' )And I’d try using
$format = 'object'so you can loop thru the results and only display those items related to that group.Of course, this will only get notifications for a single person.
I’m not sure if there would be notifications for a group other than activity update…?In reply to: Secure enough for medical patients?Good question.
BP can be quite secure.
It’s more about your server and then about WP and then about any additional plugins that you may use.
There are lots of articles about WP security.
Here’s one.In reply to: Locking some profiles fieldsThis will hide fields on the profile edit page and on the register page.
You need to add the field IDs.
Put the function in bp-custom.php.function oazar_hide_profile_fields( $retval ) { if( is_super_admin () ) return $retval; if( bp_is_profile_edit() || bp_is_register_page() ) $retval['exclude_fields'] = '3'; //field ID's separated by comma return $retval; } add_filter( 'bp_after_has_profile_parse_args', 'oazar_hide_profile_fields' );In reply to: Hook for when a user first logs inYou might be able to use the login_redirect filter hook.
And then check to see if a last_activity entry exists for the user.
If not, then it’s their first login.
Untested:function ndh_first_login_check( $redirect_to, $not_used, $user ) { if( bp_get_user_last_activity( $user->ID ) == '' ) echo ' first login '; return $redirect_to; } add_filter( 'login_redirect', 'ndh_first_login_check', 20, 3 );In reply to: Activity Issueone of the silliest questions you’d ever heard.
Not even close 🙂
But not really answerable unless you at least provide an url where the theme is being used.
Providing a test user / pw is also recommended.Try changing the priority from 10 to 11 in class.cscf_filters.php
In reply to: Making tabs visible only after log inIf your theme supports WordPress menus then you can use this approach.
In reply to: NumbersMultiple installs on multiple domains on a single account should not a problem, if your host allows the same number of databases as installs.
Performance will be affected by the amount of content, the number of users and the number of concurrent users.