• Page 1 of 1
  • 1
uCause Community » Trash & Archives » Publisher , Site Catalog, Ad board , File Catalog » I like it
I like it
CheburatorDate: Friday, 2011-07-01, 1:37 AM | Message # 1
Member
Group: Senior Members
Messages: 43
Awards: 2
Reputation: 3
Status: :-(


Description:
A small script to rate the materials on your website.
There are 2 versions of this script. On the 1st version only registered members can rate the materials and on the 2nd version all users can rate the materials.
-> No PHP is needed
-> No extra module is needed

Installation:
Login in to your CP then go to Customice design - File catalog - Page with entry full text and its comments and add one of the following codes where you like to see this script.

Version 1:
Code
<div align="right" style="padding-right: 10px;">    
      <a style="text-decoration: none;" href="javascript://" id="golike" onclick="<?if($LOG_FORM$)?>_uWnd.alert('You can not vote for this material!','Error',{w:270,h:60,t:8000});<?else?>$.get('/load/0-1-1-$ID$-3',function(data) {if($(data).text().indexOf('already rated')>-1) _uWnd.alert('You have already rated this material!','Error',{w:270,h:60,t:8000}); else {_uWnd.alert('You have successfully rated this material!','Success',{w:270,h:60,t:8000})};});<?endif?>">I like it</a>    
      <img align="absmiddle" style="margin-top: -3px; border: none" id="like_img" src="http://uscripts.de/upload/likeStar.png">    
      <span id="num_like" title="Votes">$RATED$</span>    
    </div>


Version 2: (For this code guest must have more rights, check the screenshot at the bottom.)
Code
<div align="right" style="padding-right: 10px;">    
      <a style="text-decoration: none;" href="javascript://" id="golike" onclick="$.get('/load/0-1-1-$ID$-3',function(data) {if($(data).text().indexOf('already rated')>-1) _uWnd.alert('('You have already rated this material!','Error',{w:270,h:60,t:8000}); else {_uWnd.alert('You have successfully rated this material!','Success',{w:270,h:60,t:8000})};});">I like it</a>    
      <img align="absmiddle" style="margin-top: -3px; border: none" id="like_img" src="http://uscripts.de/upload/likeStar.png">    
      <span id="num_like" title="Votes">$RATED$</span>    
    </div>




Now we have finished the installation biggrin
Attachments: 9810468.png(2.0 Kb)


Message edited by Cheburator - Friday, 2011-07-01, 1:37 AM
 
0 Thanked you For This Useful Post:
Maczo12310Date: Friday, 2011-07-01, 1:49 AM | Message # 2
Member
Group: Senior Members
Messages: 987
Awards: 12
Reputation: 11
Status: :-(
Hm.. Nice script.

Quote (Cheburator)
(Guests must have enough rights to rate the material)


Can you say which rights they actually need to rate ? And the edit your message so people dont say i doesn't work. This would be helpful.



Visit my Graphic forum board on uCause !!!
 
0 Thanked you For This Useful Post:
HermesDate: Friday, 2011-07-01, 1:52 AM | Message # 3
Member
Group: Senior Members
Messages: 455
Awards: 7
Reputation: 8
Status: :-(
Cheburator, Nice job smile
 
0 Thanked you For This Useful Post:
CheburatorDate: Friday, 2011-07-01, 1:59 AM | Message # 4
Member
Group: Senior Members
Messages: 43
Awards: 2
Reputation: 3
Status: :-(
Donught, here is a screenshot, the Checkbox at rate entries musst be active!
Attachments: 4458367.png(19.6 Kb)
 
0 Thanked you For This Useful Post:
Maczo12310Date: Friday, 2011-07-01, 2:08 AM | Message # 5
Member
Group: Senior Members
Messages: 987
Awards: 12
Reputation: 11
Status: :-(
Edited the first post, Cheburator, I think this will help people. Thanks for it.


Visit my Graphic forum board on uCause !!!
 
0 Thanked you For This Useful Post:
AnimorphDate: Friday, 2011-07-01, 2:24 AM | Message # 6
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
i like it too , nice script smile
 
0 Thanked you For This Useful Post:
redpepper007Date: Friday, 2011-08-12, 2:56 PM | Message # 7
Member
Group: Senior Members
Messages: 77
Awards: 0
Reputation: 0
Status: :-(
it gives 1 star rating instead of 5 tongue

for a 5 star rating use this:


Quote
/load/0-1-5-$ID$-3


http://mobilesunleashed.net/ - Mobiles Unleashed - Symbian & Android downloads, tutorials

Message edited by redpepper007 - Friday, 2011-08-12, 4:50 PM
 
0 Thanked you For This Useful Post:
AnimorphDate: Friday, 2011-08-12, 7:31 PM | Message # 8
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
redpepper007, Its because the script works like that , but thankyou for the 5 star option
 
0 Thanked you For This Useful Post:
redpepper007Date: Friday, 2011-08-12, 8:07 PM | Message # 9
Member
Group: Senior Members
Messages: 77
Awards: 0
Reputation: 0
Status: :-(
Quote (Animorph)
redpepper007, Its because the script works like that , but thankyou for the 5 star option


well, I thought if someone would press ''I like it'' button then its pretty sure the person acutally likes the specific entry, so why should he give 1 star rating instead of 5? tongue


http://mobilesunleashed.net/ - Mobiles Unleashed - Symbian & Android downloads, tutorials
 
0 Thanked you For This Useful Post:
uCause Community » Trash & Archives » Publisher , Site Catalog, Ad board , File Catalog » I like it
  • Page 1 of 1
  • 1
Search:


"Making uCoz web designs simple and easy to use"
- uCause Developers