O'Reilly logo

Drupal 7 Development by Example Beginner's Guide by Kurt Madel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — creating a custom Fivestar widget

The Fivestar module documentation provides a recipe for creating custom rating widgets. The documentation is available at http://drupal.org/node/234391 Creating and Contributing a Fivestar Widget Set. We are going to follow those simple instructions to create a custom Thai pepper widget for rating recipes on our d7dev site.

  1. First, we are going to implement the Fivestar module hook_fivestar_widgets hook, so that we will be able to place our custom Fivestar widget inside our d7dev module. In Aptana Studio open the fivestar.module file in the sites/all/modules/fivestar folder.
  2. Find the fivestar_fivestar_widgets function, and copy the entire function (including the comments).
  3. Open our d7dev.module ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required