Fivestar voting in custom module

Events happening in the community are now at Drupal community events on www.drupal.org.
sreedharprabhu.mca@gmail.com's picture

Hello,

I created a custom form in custom module. I want to implement fivestar voting module in that.

I gone through fivestar module. That is working only for the content types. Anyone let me know how to implement fivestar voting in my custom module.

Thanks,
Sree

Comments

What version of drupal are

frob's picture

What version of drupal are you using? The fivestar module works on any entity type. If your needing something more bare-metal then checkout the voting api http://drupal.org/project/votingapi

The voting api module is what the fivestar module uses for all it backend heavy lifting and provides the database schema to store votes on just about anything.

Hi sreedhar, Try

muniraj.m's picture

Hi sreedhar, Try this...

<?php
        $form_val
= drupal_get_form('fivestar_form_node_'.$nid, 'node', $nid);
        echo
$form_val;
?>

India

Group notifications

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

Hot content this week