By 30equals on
hey everyone
i was wondering if it's possible to add a forum column with the topic rating implemented
eg, like here but then in a physically forum column
http://www.vbulletin.com/forum/forumdisplay.php?f=55
i've been looking on the fivestar issue page and this forum but haven't found a solution..
i've seen a post where people use a cck field to implement the rating, and then add a new view, etc...
but the forum doesn't have a customizable view (not in the administer pages), so that's useless for me i guess..?
any ideas ?
i 've looked into the theme_forum_topic_list function, but have no idea how to get the topic rating into this function
thanx
Comments
...
If you're not in a big hurry, this will be coming to advforum. Probably not in the next couple weeks, though. I have some broken stuff I need to fix before I add more features.
Michelle
--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.
hi michelle thanx for the
hi michelle
thanx for the fast reply.
well, actually i am in a hurry unfortunately enough.
i've playing with the theme_forum_topic_list function, and trying to query the ratings from the votingapi_vote table depending on the nid. this works, but of course the value i get from this is a percentage.
is there a quick way to convert those percentage values to the star rating ?
and is this a good way to do this ;)
thanx
follow up
so i managed to get what i wanted...sort of..
i'm not a super pro php coder so bare with me.
i customized the theme_forum_topic_list function. i added this after 'foreach($topics as $topic){
and added the following line in the else part of the $rows array
array('data' => $topic -> number_stars, 'class' => 'rating'),
this probably could have been done better, and if you have any suggestions, the please go ahead.
...
I would use the Fivestar API rather than doing it all manually. But that's all I can suggest until I have time to look into it for advforum.
Michelle
--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.
with fivestar
with fivestar api:
michelle: yeah, i know it
michelle: yeah, i know it would be better to use the fivestar api, but i didn't really have an idea how to implement it in my forum table.
vvn: thanx, i'm going to try that one out.
i didn't have the time to
i didn't have the time to reply - but VVN - that works like a charm. thanx!