EE entry rating module

I finally could force myself to write up at least a rough documentation for an entry rating module I made some time ago. So here it comes.

Features / characteristics are:

  • independent from comments
  • can be restricted to logged-in members only
  • voting results from members and visitors may be shown separately or overall
  • rating-form is either drop-down with configurable options or radio-inputs from 1 to 5
  • result output either with images (like the stars here) or numbers or both - can be defined with variables in the template
  • works on single- and multi-entry pages
  • {exp:weblog:entries} can be used to list entries sorted by highest ratings.
  • one vote per member per entry allowed
  • one vote per IP per entry allowed

You can see it in action over here


Installation:

  1. Upload the entry_rating-folder into the modules folder of your ExpressionEngine system directory.
  2. Upload the ext.entry_rating_ext.php-file into the extensions folder of your ExpressionEngine system directory.
  3. Upload the lang.entry_rating.php-file into the language/english folder of your ExpressionEngine system directory.
  4. Upload the images empty.gif, half.gif & full.gif to any directory you like. You can also use your own set of images as long as you keep the names.
  5. In your Control Panel goto Modules, locate the Entry Rating module and click Install.
    • Now you can click on the Entry Rating module to enter the settings.
    • If you want to use the images to represent the voting result, enter the URL of the folder to which you uploaded the images. If the URL is correct the images will appear instead of the ??? once you clicked update settings.
    • If you want to use the SELECT-input for voting you can edit the options here.
    • You may also change the label of the button used to submit the vote
    • and the text that appears if the user already voted on an entry
  6. In your Control Panel goto Admin > Utilities > Extensions Manager, locate the Entry Rating extension and click Enable?.

The tags:

{exp:entry_rating:show_rating entry_id="{entry_id}"}<br />
{/exp:entry_rating:show_rating}

The show_rating tag is used to output the voting results for an entry. Obviously it has to be placed inside a {exp:weblog:entries}{/exp:weblog:entries} tag-pair. This can be done on a single-entry page as well as on a multientry-page.

Parameters:
entry_id="{entry_id}”
This parameter is mandatory.

Inside the show_rating tag-pair you have access to several variables to output your results.

{overall_votings} The total number of votes
{overall_vote} The numerical value of the average voting result, logged-in users and visitors combined
{overall_vote_symbol}Graphical representation of the average voting result, logged-in users and visitors combined

{visitor_votings} The total number of votes made by visitors
{visitor_vote} The numerical value of the average voting result by visitors
{visitor_vote_symbol} Graphical representation of the average voting result by visitors

{member_votings} The total number of votes made by logged-in users
{member_vote} The numerical value of the average voting result by logged-in users
{member_vote_symbol} Graphical representation of the average voting result by logged-in users


{exp:entry_rating:rating_form entry_id="{entry_id}"}

This tag displays the rating form if the current user has not already voted for this entry. If he has already voted his vote is displayed instead of the form. Note: this tag has no closing tag.

Parameters:
entry_id="{entry_id}”
This parameter is mandatory.

members_only="1”
If this parameter is set, the form will only be displayed to logged-in members.

type="radio”
If this parameter is set, the rating-form is displayed with radio-buttons labels 1-5.

5 4 3 2 1  

otherwise it defaults to a select-list.


 


{exp:entry_rating:order_by_rating type="overall" limit="5"}
{exp
:weblog:entries weblog="testsite" entry_id="{order_by_rating}" sortby="rating" dynamic="off"}
<a href="{path=site/article}">{title}</a>
{exp:entry_rating:show_rating entry_id="{entry_id}"}({overall_vote}){/exp:entry_rating:show_rating}
{
/exp:weblog:entries}
{
/exp:entry_rating:order_by_rating}</p>

To show a list ordered by voting results the {exp:entry_rating:order_by_rating}-tag is wrapped around a {exp:weblog:entries}-tag like shown above.

Parameters:

type="”
Optional. Can be set to “overall”, “members” or “visitors” depending on which wihich result you want to show. Defaults to “overall”.

limit="”
Optional. Limits the number of entries to be shown. Defaults to 10.



Download: ee_entry_rating.zip
10.38 KB

If you found something useful here and want to show your appreciation feel free to

or


Comments:

3 of 6 pages « Erste  <  1 2 3 4 5 >  Letzte »

I’m afraid that won’t work without some modifications since the gallery module uses it’s own tables and stuff.
I might make a version for the gallery as well but it’s not high on my priority list right now.

Posted by  on  01/01  at  09:18 PM

Hi ther, you lucky father. Happy New Year full of health.

No I need your assistance on something. How can I use your EE entry rating module script in my gallery entries?

Is there anyway to doit?

Posted by Kevin  on  12/30  at  09:32 PM

THanks!  That fixed it!  Great module!

Best
cs

Posted by  on  12/20  at  03:02 PM

Please download the latest version (1.0.2) and see if the problem persists.

Posted by  on  12/20  at  02:06 PM

I am new to EE, this level of it anyways, and am running into a problem making the vote submission stick or be counted.  I can click on the submit button and url appears correct, but nothing happens on the page.

Here’s my code:

{exp:weblog:entries weblog="sc_recipe_index"}
{exp:entry_rating:show_rating entry_id="{entry_id}"}
{exp:entry_rating:rating_form entry_id="{entry_id}" type="radio"}

{overall_votings} The total number of votes

{overall_vote} The numerical value of the average voting result, logged-in users and visitors combined

{overall_vote_symbol}Graphical representation of the average voting result, logged-in users and visitors combined

{visitor_votings} The total number of votes made by visitors

{visitor_vote} The numerical value of the average voting result by visitors

{visitor_vote_symbol} Graphical representation of the average voting result by visitors

{member_votings} The total number of votes made by logged-in users

{member_vote} The numerical value of the average voting result by logged-in users

{member_vote_symbol} Graphical representation of the average voting result by logged-in users

{/exp:entry_rating:show_rating}
{/exp:weblog:entries}

where am i going wrong?

Posted by  on  12/19  at  11:10 PM

You can just update the files.

Posted by  on  12/05  at  01:06 AM

3 of 6 pages « Erste  <  1 2 3 4 5 >  Letzte »