Allow voting on a panel pane?

sapelzin's picture

I have panel pages that contain panes of RSS feed items. I'd like to enable user voting for a feed pane. I haven't found a way to do this with fivestar or the votingapi. Is there a way to do this without a lot of programming modification to either the panels or feed aggregator modules?

Thank you.

Login to post comments

Voting on a panel pane

todd_tomlinson's picture
todd_tomlinson - Fri, 2009-08-07 00:27

Hi sapeizin,

We use fivestar on nearly all of our client sites. Since fivestar is tied to nodes (content types) -- the easiest work around would be to create a simple content type (e.g., Introduction to feeds) and enable fivestar for that content type. I would then create a node using the content type I just created for each panel pane - assigning that node to either the top or the bottom of that pane. This approach is an "out of the box" solution that should meet your objective without having to write any custom code/hack the module.

Todd Tomlinson
Managing Partner
aHa! Consulting
www.ahaconsulting.com


Using another content type for panel pane voting

sapelzin's picture
sapelzin - Fri, 2009-08-07 12:50

Thank you Todd. That's a great idea, and I'll give it a try.

-stew


Works great!!

sapelzin's picture
sapelzin - Sat, 2009-08-08 00:21

Thank you again Todd. You're method works great. Now I just need to figure out how to tally votes and rearrange the panel panes based on popularity.

-stew


Use a view and the 'offset'

merlinofchaos's picture
merlinofchaos - Sat, 2009-08-08 00:48

Use a view and the 'offset' parameter to pick which item in the view to load.


Tallying vote counts in 5 star

todd_tomlinson's picture
todd_tomlinson - Sat, 2009-08-08 00:47

Hey Stew --

You can get the voting results from a node by calling the following function:

      $vote_results = votingapi_recalculate_results('node', $node->nid);

This assumes that you have the $node object loaded and available that you're trying to pull the voting results from. Glad the node approach worked for you!

Todd Tomlinson
Managing Partner
aHa! Consulting
www.ahaconsulting.com