Skip to main content

Rating widget based on thumbs up and down.

Project description

This will add those terribly “delish” little thumbs all over facebook to products of your choosing. By default, only logged in users can rate a product, and once they are logged in they can vote once (and change their vote at any time)

Installation

Your mission, should you choose to accept it is to add the package to your buildout config and rerun buildout. If you want it as a viewlet below the content title, you must follow the viewlet directions below before restarting and installing. Otherwise install immediately and then skip to the section on browser views.

As a Viewlet

Then, in the configure.zcml in the base of your product you need to tell which content types should display the thumbs. For example, with the PloneSoftwareCenter product, the configure.zcml has the lines:

<include package="cioppino.twothumbs" />
<class class=".content.project.PSCProject">
   <implements interface="cioppino.twothumbs.interfaces.ILoveThumbsDontYou" />
</class>

That little diddy would add the thumbs viewlet to the PSCProject product only. You only need to include the package 1 time but you need to add the class block for every content type you would like to show the thumbs.

As a Browser View

Additionally, you can generate the widget on any content page in any place by just adding a few lines to your template:

<div tal:content="structure here/@@rate-if-you-dare"/>

Migration

If you used to use plone.contentratings and want to migrate to the thumbs product, there is an example in the trunk of PloneSoftwareCenter. It’s pretty easy. Please see http://svn.plone.org/svn/collective/Products.PloneSoftwareCenter/tags/1.6.1/Products/PloneSoftwareCenter/Extensions/migrateratings.py for an example.

Bugs/Suggestions/Help

Please file bugs at https://github.com/eleddy/cioppino.twothumbs.

Credits

This product was initially developed at the Plone Cioppino Sprint in Bodega Bay 2011. The source code is filled with plenty of inside jokes and may only be maintainable after drinking copious numbers of Manhattans. Without the [drink] support of everyone there, this may not have been made possible. Big ups. Changelog =========

1.3 (2011-09-22)

  • Turn thumbs background images into a sprite [marcosfromero]

  • Improve accessibility: non AJAX/JavaScript support [marcosfromero]

  • Improve i18n and added new Spanish translations [marcosfromero]

  • Improve feedback for anonymous users and after voting [marcosfromero]

1.2 (2011-05-27)

  • Initial i18n and Spanish translation [hvelarde]

1.1 (2011-02-15)

  • switch to absolute patch for form actions since it breaks when under the influence of rewriting [eleddy]

1 (2011-02-14)

  • Initial release [eleddy on code, spanktar on graphics]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cioppino.twothumbs-1.3.tar.gz (33.2 kB view details)

Uploaded Source

File details

Details for the file cioppino.twothumbs-1.3.tar.gz.

File metadata

File hashes

Hashes for cioppino.twothumbs-1.3.tar.gz
Algorithm Hash digest
SHA256 04ff74b5eeadcfc9d5832fb6f346811194b1caea61502e7b42762d9112a02636
MD5 b96c2bf5a8bffc3bc5046c5ce781060a
BLAKE2b-256 c88eac7dddd06f983263716c69086dca47491a33378426d46d73b52b3e5d6177

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page