Support Forum
we can consider it...
since you seem at least comfortable with coding, let me tell you a little secret... forum - toolbox - data inspector... you can use that handy little tool to tell you what data is already available in global object...
in this case, a user object, more specifically for each post in topic view, the $spThisPostUser... if you dump that out you will see the data that you can readily grab and use for each user for each post... the thanks given and thanked counts are there and can simple be output...
the template functions are really just generic helper functions for outputting basic elements... so rather than:
sp_thanks_user_stats('tagClass=spCenter spThanksUserStats', $spThisPostUser->user_id, 'Thanks Given: %THANK%'); sp_thanks_user_stats('tagClass=spCenter spThanksUserStats', $spThisPostUser->user_id, 'Thanks Earned: %THANKED%');
you could have just done
echo 'Thanks Given: '.$spThisPostUser->thanks; echo 'Thanks Received: '.$spThisPostUser->thanked;
and not had to edit the plugin... obviously not a big deal, but an easy to way to make some specific customizations...
Visit Cruise Talk Central and Mr Papa's World
It could be added to the plugin's template file (sp-thanks-user-stats.php) like:
if (empty($user->thanked)) $user->thanked = 0; if (empty($user->thanks)) $user->thanks = 0; $label = str_ireplace('%THANKED%', $user->thanked, $label); $label = str_ireplace('%THANKS%', $user->thanks, $label); $label = str_ireplace('%POSTS%', $user->posts, $label);
Then when calling the function as he wants shown:
sp_thanks_user_stats('tagClass=spCenter spThanksUserStats', $spThisPostUser->user_id, 'Thanks given: %THANKS% <br /> Thanks received: %THANKED%');