AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Show Likes get and likes give

3 Posts
2 Users
0 Reactions
728 Views
bitstorm66
Posts: 14
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@bitstorm66)
Eminent Member
Joined: 5 years ago
[#62621]

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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@bitstorm66)
Eminent Member
Joined: 5 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: 8 years ago

Support Team
Posts: 5775
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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
Share: