Support Forum
I have installed the post rating plugin, and against all odds - I've managed to make a cool little list at the forum footer that shows the 10 most rated posts. I don't know if this is the best way of showing the list, but that was all I could do.
Please come with input on the best way of using the plugin
I have used this tag in in spFoot.php:
sp_rating_most_rated_posts_tag($limit=10, $forum=true, $user=true, $postdate=true, $listtags=true, $forumids=0, $count=true)
I got this result, by doing a little bit css:
Now, at the end of all those lines, I would like to show the average vote number. The first line, would e.g look like this:
I forumet: Skravleforumet, emne: Testnavn på tema: av Username (rangert 1 ganger), average votes: 4,7
Is that possible? And in so case - what should I put at the end of the php line?
I assume you have seen: http://codex.simple-press.com/.....st-rating/
but.... afraid that is one of our older template functions and has less flexibility than the newer ones... and as such no real way with that template tag to get the data...
though, kind of a shame, as the data is readily available in the function and the db query already pulls the needed data...
So I would just go ahead and edit the template function and add it yourself... towards the end you will see where the number of ratings is output... just add another output statement there and calculate the rating using $sfpost->ratings_sum / $sfpost->vote_count... be cautious of divide by zero there...
I will open a ticket for us to update the template function to current standards, including a getter option (just return data so you can do what you want)...
Visit Cruise Talk Central and Mr Papa's World
just pushed out an update to this plugin that gives you an option to include the average now...
Visit Cruise Talk Central and Mr Papa's World
good to hear. thanks for the update.
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)