utilitees

- Addons for ExpressionEngine 1.7.x

Entry Rating Documentation

Download Download

Requirements

To display entries ordered by their rating ExpressionEngine 1.6.5 is required.

Back to top

Upgrading from version 1.0.x

  • Goto CP Home ›  Admin ›  Utilities ›  Extensions Manager  and disable the Entry Rating Extension. You can delete the file from your extensions folder. It is not needed anymore
  • Upload the entry_rating-folder into the modules folder of your ExpressionEngine system directory, overwriting the old files.
  • If you’re displaying entries based on their rating somewhere adjust your template according to these instructions.
Back to top

Installation

  • Upload the entry_rating-folder into the modules folder of your ExpressionEngine system directory.
  • Upload the lang.entry_rating.php-file into the language/english folder of your ExpressionEngine system directory.
  • 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.
  • In your Control Panel goto Modules, locate the Entry Rating module and click Install.
Back to top

Configuration of the module

  • In your Control Panel goto Modules, locate the Entry Rating module and click its name 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

     

Back to top


Show Rating Tag

{exp:entry_rating:show_rating entry_id="{entry_id}"}
{visitor_vote_symbol}
{
/exp:entry_rating:show_rating} 

The show_rating-tag is used to output the voting results for an entry. It has to be placed inside an {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.

Variables:

{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

Back to top

Rating Form Tag

{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.
Again, this tag has to placed inside an {exp:weblog:entries}{/exp:weblog:entries} tag-pair.

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 labeld 1-5

5 4 3 2 1  

otherwise it defaults to a select-list.

 

Back to top

Display entries ordered by their rating

{exp:entry_rating:order type="overall" limit="5"}
 {exp
:weblog:entries fixed_order="{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}
  
<br />
 
{/exp:weblog:entries}
{
/exp:entry_rating:order} 

To show a list ordered by voting results the {exp:entry_rating:order}-tag is wrapped around an {exp:weblog:entries}-tag like shown above.
Note that the weblog:entries-tag must have the parameters fixed_order=”{rating}” and dynamic=“off”.

Parameters:

type="" 

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

limit="" 

Optional.
Limits the number of entries to be shown.
Defaults to 10.

sort="asc"
sort="desc" 

Optional.
The results can either be sorted ascending or descending.
Defaults to “desc”.

Back to top

Questions / bug reports

For general comments, brickbats & bouquets please use the form over here.
Name:

Email:

URL:


Remember my personal information
Notify me of follow-up comments?


Page 2 of 2 pages  <  1 2

User Talk

Oliver:
2009-10-17 20:54

You could run the SQL commands:
DELETE FROM tool_entry_rating;
DELETE FROM tool_entry_rating_log;
or just uninstall and reinstall the module.



Connie du Toit:
2009-10-17 14:54

Hi,

The module works great.

Where is the data stored?  I’d like to reset the votes (since I’ve been testing it and want to implement it now and have my votes cleared).  Is there a way to do that?



Angel Grablev:
2009-09-13 02:21

If you are interested in star rating, i created a tutorial to use jQuery and give the effect of star rating. Check out WebDevMania.

http://webdevmania.com/archive/star_rating_in_expression_engine_using_jquery/



Oliver:
2009-06-03 22:05

Yes, that’s how it is right now.

If take the number of votes into the equation you might come into the situation that you have to explain why an entry with an average rating of 4 ranks higher than an entry with 4.8.

Personally I think that if you display the number of votes together with the average result people do understand the implications of one-vote-entries at a glance.



Web Designer:
2009-06-03 19:09

I am using your module and works like a charm! But I have a question about listing the highest rated. Currently weblogs with 1 vote and a rating of 5 trumps a weblog with 100 votes and a rating 4.75? is there anyway to find the average between how many votes and the rating of weblogs and display it in that order?

Any help is greatly appreciated



Aaron:
2009-05-17 00:51

Ive downloaded and installed the module yet icant seem to make it work.
Im using 1.6.6 ee and pasted
{exp:entry_rating:show_rating entry_id=”{entry_id}”}
{visitor_vote_symbol}
{/exp:entry_rating:show_rating} 

tag but it displays nothing.
{exp:weblog:entries weblog=”{my_weblog}” limit=“1” fixed_order=”{rating}” dynamic=“off”}

(the above is what weblog tag looks like)



Ruud Heerkens:
2009-01-10 03:21

Oliver,
Thanks for updating to 1.1.2.

I changed tags to fixed_order=“{rating}“ and increased {exp:entry_rating:order}limit. Makes perfect sense now.

- R -



Oliver:
2009-01-07 14:04

First off, it is fixed_order=“{rating}“.

Second: The {exp:entry_rating:order}-tag does not support the category-parameter. Hence it will return entry_ids regardless of their category.
These entries will then however be limited by the category- and limit-parameters in the enclosed {exp:weblog:entries}-tag. So it might be neccessary to choose a higher limit in the {exp:entry_rating:order}-tag, if you know what I mean.

Third. The “error around line 57”-thingie has been fixed in the latest version.



Ruud Heerkens:
2009-01-07 07:55

Hello,

From ‘Display entries ordered by their rating’ I’m using this code:

{exp:entry_rating:order type=“overall” limit=“5” sort=“desc” }
(Ave) / (# Stemmen)

{exp:weblog:entries category=“14” imit=“5” fixed_orderby=”{rating}”  dynamic=“off”}
{exp:entry_rating:show_rating entry_id=”{entry_id}”}<a href=”{path=v6/continue/{entry_id}}” title=”{title}”>({overall_vote}) / ({overall_votings})</a>{/exp:entry_rating:show_rating}


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

I want to show a top 5 list by rating for my category 14 entries. However it always shows all postings ascended by date ? Am i missing some parameters perhaps.

One thing I noticed also is that leaving the optional parameters out yields a error around line 57 from the code.

- Ruud -