mikehale / radiant-ratings-extension

Ratings for radiant pages

This URL has Read+Write access

mikehale (author)
Thu Nov 05 17:05:42 -0800 2009
commit  fb81864a95c062240ab2f1a2e3d9b828f657192d
tree    c12ba53cf855b81f5ebb817f27ba459ed635700a
parent  1d4e63790f10652112024f91e49f839e23124ecf
name age message
file LICENSE Thu Jul 03 13:58:05 -0700 2008 Add license, cleanup readme [mikehale]
file README.rdoc Loading commit data...
directory app/
directory autotest/ Thu Jul 17 14:09:29 -0700 2008 handle stale object exception (once) [mikehale]
directory db/
directory lib/
file ratings_extension.rb
directory test/
README.rdoc

Ratings

 Allows you to rate pages

Installation

  $ cd <radiant_app>/vendor/extensions/
  $ git clone git://github.com/mikehale/radiant-ratings-extension.git ratings

Usage

Add this content to your page (or maybe someplace like your footer snippet):

  <r:rating>
    <p>Current rating: <r:average /></p>

    <r:form>
      <div>
        <r:points:each>
          <input type="submit" name="rating" value="<r:point_value />" />
        </r:points:each>
      </div>
    </r:form>
  </r:rating>

You can also display different options depending on the point value and the page rating:

        <r:points:each>
          <r:if_average_greater>
            <input type="image" src="/images/red_star.png" name="rating" value="<r:point_value />" />
          </r:if_average_greater>
          <r:if_average_less>
            <input type="image" src="/images/grey_star.png" name="rating" value="<r:point_value />" />
          </r:if_average_less>
        </r:points:each>

Home

  http://github.com/mikehale/radiant-ratings-extension/tree/master

Credits

Sponsored by Ignite Social Media LLC - ignitesocialmedia.com/ Further development by Saturn Flyer www.saturnflyer.com

See LICENSE for copyright and licensing details.