-
Henry Wright replied to the topic E-Mail notification after registration in the forum How-to & Troubleshooting 11 years, 11 months ago
Check out this article on what hooks are and how you can use them to interact with WordPress and BuddyPress:
-
Henry Wright replied to the topic E-Mail notification after registration in the forum How-to & Troubleshooting 11 years, 11 months ago
bp_core_activated_useris the hook you can use for this sort of thing. -
Henry Wright replied to the topic Rate members in buddypress (HOT or NOT) in the forum Creating & Extending 11 years, 11 months ago
@amid11 you could use WP user meta to tally the ratings. +1 for an up-vote and -1 for a down-vote. Querying by user meta is supported by WP_Query – see here:
https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
-
Henry Wright replied to the topic Getting the notification link for Activities? in the forum How-to & Troubleshooting 11 years, 11 months ago
@godavid33 that plugin is actually free. Maybe tear open the code to see if a solution jumps out at you? Just an idea.
Regarding your problem, I came across the issue a few months back when 1.9 was rolled out. You need to capture the item’s ID when adding a notification. See here for some related…[Read more]
-
Henry Wright replied to the topic Activation link in email takes user to blank page in the forum How-to & Troubleshooting 11 years, 11 months ago
Try deactivating all plugins ‘one-by-one’ to see if any are causing the issue.
-
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
There might be a problem with
$user->IDthen? Can you echo that out to see if that is what you expect it to be? -
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
This might be a silly question but check these members actually do have friends. The var_dump seems to indicate they don’t as an empty array seems to be returned.
-
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
something like
$var = friends_get_friend_user_ids( $user->ID );
var_dump( $var ); -
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
All I can think of is
friends_get_friend_user_ids( $user->ID );doesn’t return an array as we expect. I just looked at the documentation and it doesn’t specify the return type. Maybe try echo’ing outfriends_get_friend_user_ids( $user->ID );to see what exactly is returned? -
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
Try changing:
$friend = get_userdata( $friend->ID );to:
$friend = get_userdata( $friend ); -
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
Can you paste how you’re using
friends_get_friend_user_ids()? -
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
Sorry, you’re right!
friends_get_friend_user_ids( $user_id )should be what you need. So change my first line to:$friends = friends_get_friend_user_ids( $user_id ); -
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
I the function is the one you need to use, you’ll just have to do a little more work to get info about each friend. Loop through the array that’s returned by
friends_get_friend_count_for_user()and then useget_userdata()like this:$friends = friends_get_friend_count_for_user( $user_id );[Read more]
if ( $friends != false ) {
foreach ( $friends as… -
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
Just looked at your plugin code and think you may be using the function wrong. I could be wrong but you seem to be treating what is returned as an object where as it will be either an array of user IDs, or false if none are found.
-
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
As far as I’m aware you don’t need to include any files in order to use BP core functions. I’ve never had to. Perhaps someone else here can confirm?
-
Henry Wright replied to the topic Probleme using BP core functions in the forum Creating & Extending 11 years, 11 months ago
Hi @mika89
You should be able to use
friends_get_friend_count_for_user()in your plugin. Are you sure you have BP activated? Are you sure you have the Friends component enabled? -
Henry Wright replied to the topic Display total number of contributors in the forum Installing BuddyPress 11 years, 11 months ago
Further to @shanebp‘s method, WordPress has a native function called
count_users()which can be used to get the number of users in each role.https://codex.wordpress.org/Function_Reference/count_users
$users = count_users();// display total users (if you want to).
echo $users['total_users'] . ' total users';// display count for…[Read more]
-
Henry Wright replied to the topic How hard is it? in the forum Installing BuddyPress 11 years, 11 months ago
What is the difference between using BuddyPress from the webiste versus downloading it to your computer?
Do you mean like wordpress.com and wordpress.org?
BuddyPress is downloadable only – there is no web service version of it available like there is with wordpress.com.
-
Henry Wright replied to the topic Activity Bug? in the forum How-to & Troubleshooting 11 years, 11 months ago
Hi @denmengel
This is most definitely a theme issue. Which theme are you using?
-
Henry Wright replied to the topic Recommended Chat Plugin in the forum Third Party Plugins 11 years, 12 months ago
Bp Chat is free and makes use of BP profiles.
Chat logs must not build up causing site to slow down etc
I haven’t tested it myself so can’t answer this. It’s available here:
- Load More
@henrywright
Active 2 years, 1 month ago