Forum Replies Created
Cancel that, it’s working now. I tried again, must have had a syntax error somewhere.
@henrywright Tidy, I’ve been away from BuddyPress for a while but this is achieable. Thanks.
<?php echo bp_notifications_get_unread_notification_count(bp_loggedin_user_id()); ?>
You can build your own menu using this inside to show the count.
@danbp Ah yeah no doubt, although surely if it’s changed in one place it should be changed in all occurrences? “Create [group]” for example would also need changed.
*update* via CSS this can still work, but would be nice to have a bit more control here.
… or just add a login link to your site anywhere in your theme files. e.g
<a href="<?php echo wp_login_url(bp_loggedin_user_domain()); ?>"><?php _e('Login', 'buddypress'); ?></a>.
This will redirect a user to their profile page after logging in.
@danbp yeah, sorry about that :). Reason I went a bit further was when working on a theme earlier I was using a function
get_displayed_group_id()or something with a similar name. I was expecting a return value but it was echoing no matter where I placed this.
Ended up using a different method.
Just wondered if there were other functions inside BuddyPress that looked like a return value but had output instead.
The function will never return false as you’ve set a default for
$goalin the parameters.
If it were to be defaulting to
$user_idwas set the return would be
When a value is passed to the
$goalparameter and assuming the label was in the DB the return would still be
Maybe I’m reading this wrong.
Inside your theme, make sure there is a file
wp-content/themes/your-theme/buddypress/activity/post-form.php. If there is no file in that location copy this file
wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/post-form.phpinto the first location.
Then, look at line number 28 – 32 of post-form.php.
From there, you will notice you can change this text for the activity update form which reads “What’s new in “GROUP NAME” if you’re on a group page posting the update or “What’s new USERNAME” if you’re any where else.
So, to swap in a specific profile field you’d need to supply a bit more about the nature of your project and how it’s setup. You could simply drop in some static text, but if you want it to relate to a specific profile field in a dynamic way then please elaborate further.
@henrywright Already I see the use of this, thanks very much.
Hey @henrywright thanks, I’ll take a look at this now.
Activity stream updates support oEmbed for popular sites you can see supported sites here https://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F
If you want direct uploading on the activity stream there are a few plugin choices that exist. I think one is called RTMedia and there is also one from BuddyBoss.
With regard to activity posts going to the top on older items. I can’t help you with that at the moment, maybe someone else will come along.