Forum Replies Created
-
In reply to: Activity Link Redirecting to Home Page
@abbie2636 –
You should Not post, here or anywhere, the password, user name, database, salts or keys from your wp-config file – so unless you swapped out those values before pasting them here – edit that post !A .htaccess file starts with a period – often those files are hidden.
On Windows, you can see hidden files by adjusting ‘folder options’.
There shouldn’t be anything sensitive in the htaccess file, so you can post it here.Use http://pastebin.com/ to share your error-log, if you like.
In reply to: [resolved] BP Skeleton ComponentMy mistake –
I was doing some filtering on ‘pre_get_posts’ for another CPT and didn’t allow for the Skeleton CPT.The tab shows all members, including those who have never logged in.
The second number shows only those members who have logged in at least once.In BP 1.6 – Both numbers will only show those members who have logged in at least once.
@boonebgorges – Hope this helps… maybe in 1.7 ?
@thebeardedone – Thank you! Percona’s work was done on a BP 1.5.6 install… or?@djpaul ticket created:
https://buddypress.trac.wordpress.org/ticket/4362In reply to: Redirect syntaxTry:
`
bp_core_redirect($bp->loggedin_user->domain . “/activity” );or
bp_core_redirect($bp->loggedin_user->domain . “activity” );
`In reply to: BP pages not functioning – permalink issue?Ask your hosting provider for help re converting Apache mod rewrites for Zeus.
In reply to: BP pages not functioning – permalink issue?Is your server using apache?
Do you have an .htaccess file ? (look in the directory where you keep wp-config,php )
If so, it should look something like this:`
order allow,deny
deny from all# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]# END WordPress
`In reply to: activate member from adminA simple google search shows that
wp_new_user_notification is in wp-includes/pluggable.phpAs @rogercoathup said:
you’d need to be a competent PHP developer to implement his hintsIn reply to: Redirect syntaxTry:
`
bp_core_redirect( get_option(‘siteurl’).”/activity” );
`In reply to: Combining Gravity Forms With BuddypressBP 1.5.5, WP 3.4, GF 1.6.3.3.4
Registration attempts via our mobile theme recently started to fail.
Submit results in refresh of page with fields inputs showing.Thought it might be a s2member conflict…
So confirmation that a GF issue exists is helpful – thanks.GF instances, like the reg form, are shared across the desktop and mobile themes.
The fate of the mobile theme is being decided, so I haven’t dug around much or tried your -disable ajax or -switch hooks fixes.
So mainly I was just bumping the thread.
In reply to: Combining Gravity Forms With Buddypress@pealo86
I’m also interested in a solution to this.What versions, specifically, of BP and G-Forms are you using?
Did you ask G-Forms about this issue and if so what exactly did they say?
In reply to: n00b confused as $%#*Have to disagree with that.
The stream is an easy way to look at prior posts – especially helpful because the search doesn’t work.
I have an activity stream on my profile – but it’s always at least 2 months behind and never comprehensive.So having neither a useable stream or search means people using this site… well you know how they feel.
This approach might be safer for most people.
It adds to the recorded post_types instead of replacing them.`
add_filter ( ‘bp_blogs_record_post_post_types’, ‘activity_publish_custom_post_types’,1,1 );
function activity_publish_custom_post_types( $post_types ) {
$post_types[] = ‘videos’;
$post_types[] = ‘pictures’;
return $post_types;
}
`And if you go thru the trouble of creating a CPT, why not filter the activity action so it isn’t the generic ‘…wrote a new post’. For example:
`
add_filter(‘bp_blogs_activity_new_post_action’, ‘record_cpt_activity_action’, 1, 3);
function record_cpt_activity_action( $activity_action, $post, $post_permalink ) {
global $bp;
if( $post->post_type == ‘videos’ ) {
if ( is_multisite() )
$activity_action = sprintf( __( ‘%1$s created a new Videos post, %2$s, on the site %3$s’, ‘buddypress’ ), bp_core_get_userlink( (int) $post->post_author ), ‘‘ . $post->post_title . ‘‘, ‘‘ . get_blog_option( $blog_id, ‘blogname’ ) . ‘‘ );else
$activity_action = sprintf( __( ‘%1$s created a new Videos post, %2$s’, ‘buddypress’ ), bp_core_get_userlink( (int) $post->post_author ), ‘‘ . $post->post_title . ‘‘ );}
return $activity_action;
}
`I’ll bet it’s something in your theme.
Try switching to the default BP theme.That error is due to the missing $bp global.
>So I’m trying to add a new navigation under the “my profile” tab
Do you mean in the admin bar at the top?
Or on profile pages under ‘Profile’ in the ‘Activity Profile Messages’ etc nav ?if it’s the latter, you want to a subnav item, not a nav item.
Try this (which assumes you don’t know about the other functions needed) :`
add_action( ‘bp_setup_nav’, ‘add_feedback_subnav_tab’, 100 );
function add_feedback_subnav_tab() {
global $bp;
bp_core_new_subnav_item( array(
‘name’ => ‘Feedback’,
‘slug’ => ‘feedback’,
‘parent_url’ => trailingslashit( bp_loggedin_user_domain() . ‘profile’ ),
‘parent_slug’ => ‘profile’,
‘screen_function’ => ‘profile_screen_feedback’,
‘position’ => 50
)
);
}// show feedback when ‘Feedback’ tab is clicked
function profile_screen_feedback() {
add_action( ‘bp_template_content’, ‘profile_screen_feedback_show’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
}function profile_screen_feedback_show() {
echo “Feedback Screen”;// call your feedback template
//locate_template( array( ‘feedback-profile.php’ ), true );}
`
Try using xprofile_get_field_data().
If you have a profile field called ‘city’, then:$city = xprofile_get_field_data('city', bp_get_group_member_user_id() ); echo $city;Try this:
<?php global $bp; $user_id = $bp->loggedin_user->id; echo "user_id=" . $user_id; if ( bp_has_groups( 'max=20&user_id=' . $user_id ) ) : ?>If $user_id echos a blank, then you have other problems in your file.
Your answer is in the codex:
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-groups-loop/You need to pass the actual user id. Try this:
loggedin_user->id ) ) : ?>@rogercoathup
In 1.6, you can use`
xprofile_get_field_data( $field, $user_id = 0, $multi_format = ‘array’ )
`
From bp-xprofile/bp-xprofile-functions.php.To get a comma-separated string, use the other $multi_format option which will implode the array for you
`
xprofile_get_field_data( $field, $user_id = 0, $multi_format = ‘comma’ )
`In reply to: How to remove Sub Nav Items in BuddyPress [Resolved]Please put your code between backticks
Try this:
`
bp_core_remove_subnav_item( bp_get_current_group_slug(), ‘send-invites’ );
`In reply to: Stop users accessing /wp-adminYou already said that – aka – Stop hitting yourself
In reply to: BP Members Loop in a WidgetTry this:
`
<?php
$this_id = bp_get_member_user_id();
$this_profile_field = xprofile_get_field_data(‘About%20My%20Research’, $this_id);
echo $this_profile_field;
?>
`In reply to: 1.6 beta – forums setupThanks for the info.
I think more Forums set-up info is a must and perhaps is better delivered in a bbPress codex page specifically for BP.
And provide a link on the bb-forums-setup page
Or it could go right on the bb-forums-setup page.A start to discussion:
https://buddypress.trac.wordpress.org/ticket/4292In reply to: Users can’t upload their avatar when on MacFor iOS avatar uploads, I sent them to a separate mobile screen on which I did this:
`<a id="applink1" href="aurup:?uploadUrl=/mobile-apple-avatar-process&redirectUrl=&redirectDelay=5&uploadTimeOut=10&licenseKey=1234&fields=id%3D%3Bmnonce%3D”>
Upload Avatar Photo`
And ‘mobile-apple-avatar-process’ is a WP page that calls
`
locate_template( array( ‘photo-process/mobile-apple-avatar-process.php’ ), true );
`
And ‘photo-process’ is a dir in my mobile theme.
In ‘mobile-apple-avatar-process.php’ I use a non-WP approach to creating the full and thumb images because for images uploaded on iOS, you need to check orientation (rotation) via exif_read_data. And I did a crude ‘auto-crop’.So the user should never see the ”mobile-apple-avatar-process’ page.
And they are then sent to the value of redirectUrl in the href above.
And that screen should show them any bp_core_add_message values you created in ‘mobile-apple-avatar-process.php’It’s awkward, but it works.