Notifications
Clear all

Script Show Likes get and likes give

3 Posts
2 Users
0 Reactions
69 Views
bitstorm66
Posts: 14
Topic starter
(@bitstorm66)
Eminent Member
Joined: 4 years ago

THe following code was working on wpforo 1.9.x

How to get this work on wpforo 2.x, is there a new syntax?

 

<?php wpforo_print_number(WPF()->member->get_votes_and_likes_count($member['userid']), true); ?>

<?php wpforo_print_number(WPF()->member->get_user_votes_and_likes_count($member['userid']), true); ?>
2 Replies
bitstorm66
Posts: 14
Topic starter
(@bitstorm66)
Eminent Member
Joined: 4 years ago

WHat i already know is, the fields are now named reactions_in and reactions out. The question is how to display this in the memberlist.

i try the following syntax but i receive 1 for both values and all users.

 

<?php echo intval( $member['reactions_out'] ) ?>
Reply
1 Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 5328

@bitstorm66 

You need the following two values: 

$members[‘reactions_in’]
$members[‘reactions_out’]

These are arrays. You can use var_dump() to inspect their contents and extract the items you need to display them as you like.

Reply