Forum Replies Created
-
In reply to: [Resolved] Help for THIS forum
Hi @playerzero
It depends on what kind of support you need. If the problem you’re having is a bug then you can create a ticket at Trac:
https://buddypress.trac.wordpress.org/
If the problem is a ‘how-to-do’ something then the Codex (user context) has lots of useful information:
https://codex.buddypress.org/context/user/
If the problem is something else, then feel free to create a new topic to discuss (as @bphelp already mentioned above).
In reply to: Load more button stops working … sometimesAre there any console errors when you click it?
@naijaping yeah you’re right, no reason to use Bootstrap – you can quite easily write your own media queries. I actually do use Bootstrap a lot (mainly for the responsive grid), but that’s because I’m lazy 🙂
I also get this error:
ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress
It’s very Facebook-esq in the way it looks, which I think will be appreciated by some users as they’ll be familiar with how Facebook works.
Just a suggestion, could you try making the theme responsive? I took a look on my laptop, tablet and mobile. It works and looks great on my laptop, but could be optimised slightly more for tablet and mobile.
In reply to: "Are you sure?" / "Voulez-vous vraiment faire cela?"Have a read of this article:
It may help solve the problem.
In reply to: Feature Request: Ajax loading spinner@godavid33 and @naijaping – whilst on the subject of preloaders – check out this resource http://ilovepreloaders.tumblr.com/ – I’ve found it V useful in the past
In reply to: Feature Request: Ajax loading spinnerHi @godavid33 I think users will always appreciate some sign of ‘we are working behind the scenes whilst you’re waiting’ especially when the wait happens to be for a few seconds. Perhaps you could share your code in a jsfiddle so we can see a demo?
In reply to: multi step registrationThere was a Trac ticket raised for this. I’m not sure if anyone agreed it was going to happen. Perhaps @sooskriszta can provide an update?
In reply to: E-Mail notification after registrationCheck out this article on what hooks are and how you can use them to interact with WordPress and BuddyPress:
In reply to: E-Mail notification after registrationbp_core_activated_useris the hook you can use for this sort of thing.In reply to: Rate members in buddypress (HOT or NOT)@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
In reply to: Getting the notification link for Activities?@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 discussion
In reply to: Activation link in email takes user to blank pageTry deactivating all plugins ‘one-by-one’ to see if any are causing the issue.
In reply to: Probleme using BP core functionsThere might be a problem with
$user->IDthen? Can you echo that out to see if that is what you expect it to be?In reply to: Probleme using BP core functionsThis 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.
In reply to: Probleme using BP core functionssomething like
$var = friends_get_friend_user_ids( $user->ID ); var_dump( $var );In reply to: Probleme using BP core functionsAll 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?In reply to: Probleme using BP core functionsTry changing:
$friend = get_userdata( $friend->ID );to:
$friend = get_userdata( $friend );In reply to: Probleme using BP core functionsCan you paste how you’re using
friends_get_friend_user_ids()?In reply to: Probleme using BP core functionsSorry, 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 );In reply to: Probleme using BP core functionsI 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 ); if ( $friends != false ) { foreach ( $friends as $friend ) { $friend = get_userdata( $friend->ID ); echo $friend->display_name . '<br />'; } else { // this user is friendless }In reply to: Probleme using BP core functionsJust 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.
In reply to: Probleme using BP core functionsAs 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?
In reply to: Probleme using BP core functionsHi @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?In reply to: Display total number of contributorsFurther to @shanebp’s method, WordPress has a 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 contributors. foreach( $users['avail_roles'] as $role => $count ) { if ( $role == 'contributor' ) echo $count . ' contributors'; }