Entry Rating Documentation
- Requirements
- Upgrading from version 1.0.x
- Installation of the module
- Configuration of the module
- Show Rating Tag
- Rating Form Tag
- Display entries ordered by their rating
- Q & A
Requirements
To display entries ordered by their rating ExpressionEngine 1.6.5 is required.
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.
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.
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
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
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
otherwise it defaults to a select-list.
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”.
Questions / bug reports
For general comments, brickbats & bouquets please use the form over here.User Talk
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?
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/
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)
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 -
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 -