The release 1.1 is currently in development and not available.
The updates provided by the 1.1 release are the following:
- counter mode added
- unvote (removing of the last vote)
- use of user name rather than IP addresses
- use of a master table rather than n tables
- counter mode
&nbStars=`0` disallow the rating mode and implied the counter mode
- canVote
Use of &canVote implied the storage of the user name rather than ip address
- unVote
&unVote=`1` allows a user to remove his vote
unvote remove the last user votes (in case of multiple votes)
for compatibility with anythingRating 1.0, unVote = 0 by default
- debug
debug mode added.
Generate a log file in the snippets/anythingRating folder
Code changes:
- store the votes in a master table "anythingRating_def":
anythingRating_def :
- id
- group : rating group name
- mode : rating / counter
- nbStars : nmber of stars if mode = rating
- language : language file
- template : template file
- canVote : user group allowed to vote
- unVote : allow unvote
- multiVote : allow multiple votes
- endDate : endDate of vote
- maxNbVotes : max number of votes stored
- noCookies : usage of cookies
- extra : version & debug mode usage
anythingRating_content :
- id
- group : rating group name
- item : rated item id
- rating : rating or counter value
- voter : voter identification (user name or IP address)
- nbVotes : number of votes linked with the rating value
- voteDate : date of vote
Rules for the displaying of the unVote/vote buttons :
The vote button is not displayed when:
- not allowedToVote (ie: canVote defined and not registered as named user)
- cookies allowed and a cookie has already set for a vote for this item
- multiVote disallowed and a vote already exist
- noVotes for this item
The unVote button is not displayed when:
- not allowedToVote (ie: canVote defined and not registered as named user)
- unVote disallowed
- nb votes = 0
Template and placeholder available with the counter mode:
anythingCounter.tpl:
<div id="[+atr.counterId+]"> [+atr.showUnVote:is=`1`:then=`[+atr.unVoteSection+]`+] <div id="[+atr.countId+]" class="[+atr.countClass+]">[+atr.count+]</div> [+atr.showVote:is=`1`:then=`[+atr.voteSection+]`+] <div id="[+atr.msgId+]" class="msgCount">[+atr.msg+]</div> </div>
By défault, is set to "-" and to "+".
The voteSection link use the labels $_lang['atr_lbVote'] and $_lang['atr_titleVote'] defined in your defined language file. The class "vote" is used to style the link
The unVoteSection link use the labels $_lang['atr_lbUnVote'] and $_lang['atr_titleUnVote'] defined in your defined language file. The class "unVote" is used to style the link
The countClass uses the sytle "count" and "oneVote". "oneVote" is used when the vote become not allowed.