Allow voting on a panel pane?

Events happening in the community are now at Drupal community events on www.drupal.org.
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.

Comments

Voting on a panel pane

todd_tomlinson's picture

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

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

Using another content type for panel pane voting

sapelzin's picture

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

-stew

Works great!!

sapelzin's picture

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

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

Help Needed Panels / Five Star

Ofer Morag's picture

Hi,

I am in need of assistance to solve a problem similar to the one you faced.

The user profiles on my site print out as panel pages. I'd like be able to rate each user.

How may I go about adding the five star rating system to a content in a panel page?

Thank you,

OM

Tallying vote counts in 5 star

todd_tomlinson's picture

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

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

Portland (Oregon)

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: