Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
News rating (ajax)
Goto page 1, 2, 3, 4, 5, 6  Next
 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
News rating (ajax)
Author Message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post News rating (ajax) Reply with quote
You can check it out here:

http://english.cutenews.ru/cuteru/example/



Features:

- Ajax based

- Different stars in short and full story

- Prevent multiple votes by IP and/or cookie

- Select the number of stars via the template (2 - 10 stars)

- Select the size of the stars via the template



Installation:



1. Copy rating.ini to the inc/lang/en/plugins/ folder.

2. Copy rating.php and the rating/ folder to the plugins/ folder.

3. Activate the plugin and go to Options -> News ratings to create the new database table.



4. Put this between the <head> tags of your news page (head.php must be included before):

Code:
<script type="text/javascript" src="<?=$config_http_script_dir; ?>/plugins/rating/star.js"></script>

<link href="<?=$config_http_script_dir; ?>/plugins/rating/star.css" rel="stylesheet" type="text/css" media="screen" />




5. Put this in your template to show the rating:

Code:
<div id="ratingform{id}">{rating:5:25}</div>


(5 is the number of stars (2-10), 25 is the size of the stars (10, 25, 30))



6. Put this in your template to show the average rating:

Code:
<div id="rating_middle{id}">{rating-middle}</div>




7. Put this in your template to show the total votes:

Code:
<div id="rating_total{id}">{rating-total}</div>




rating_ajax.zip
 Description:
News rating (ajax)

Download
 Filename:  rating_ajax.zip
 Filesize:  11.09 KB
 Downloaded:  368 Time(s)



Last edited by FI-DD on Wed Mar 14, 2007 11:43 pm; edited 2 times in total
Wed Mar 14, 2007 4:22 pm View user's profile Send private message
Guest








Please login to hide the ads.

asson



Joined: 24 Nov 2006
Posts: 46
Location: Karlstad, Sweden

Post Reply with quote
Very nice, thanks FI-DD
Wed Mar 14, 2007 9:56 pm View user's profile Send private message
astrostart



Joined: 11 Feb 2007
Posts: 124
Location: The Netherlands

Post Reply with quote
It looks brilliant! But I just can't seem to get it to work.



I have made a screenshot. FI-DD, could you take a look at it? Thank you very much! Very Happy



avatar.jpg
 Description:

Download
 Filename:  avatar.jpg
 Filesize:  130.14 KB
 Downloaded:  181 Time(s)


_________________
My site: http://www.astrostart.nl | Thanks to everyone here who has helped me!
Wed Mar 14, 2007 10:25 pm View user's profile Send private message Visit poster's website
astrostart



Joined: 11 Feb 2007
Posts: 124
Location: The Netherlands

Post Reply with quote
Also, if I activate the Ratings (Ajax) script, it doesn't show {views} in my news.

_________________
My site: http://www.astrostart.nl | Thanks to everyone here who has helped me!
Wed Mar 14, 2007 10:29 pm View user's profile Send private message Visit poster's website
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
astrostart wrote:
It looks brilliant! But I just can't seem to get it to work.


Oh sorry, I forgot to let you include the css file.



Put this between the <head> tags of your news page:

Code:
<link href="<?=$config_http_script_dir; ?>/plugins/rating/star.css" rel="stylesheet" type="text/css" media="screen" />




(I updated the instructions above.)
Wed Mar 14, 2007 11:28 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
astrostart wrote:
Also, if I activate the Ratings (Ajax) script, it doesn't show {views} in my news.


Fixed in the download above.


Last edited by FI-DD on Wed Mar 14, 2007 11:44 pm; edited 1 time in total
Wed Mar 14, 2007 11:30 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Now you're turning into the php and ajax guru FI-DD. This is one of the coolest additions to cutenews.ru it works sooo incredibly smoothly. Plus, I really like that it doesn't need to refresh the page (making {views} calculate again just for a rating).



You are the man.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Wed Mar 14, 2007 11:40 pm View user's profile Send private message Visit poster's website AIM Address
astrostart



Joined: 11 Feb 2007
Posts: 124
Location: The Netherlands

Post Reply with quote
Wow! Now it works!



But, I hope you don't mind, I found one little problem.



When I vote and I refresh, then it shows all this weird dots (see attachment)



How can I get rid of them?



Is there also a way to get rid of the horizontal line below it?



Thanks! Very Happy



This is really the best plugin ever!



astroforum.jpg
 Description:

Download
 Filename:  astroforum.jpg
 Filesize:  177.37 KB
 Downloaded:  188 Time(s)


_________________
My site: http://www.astrostart.nl | Thanks to everyone here who has helped me!
Thu Mar 15, 2007 12:14 am View user's profile Send private message Visit poster's website
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
astrostart wrote:
When I vote and I refresh, then it shows all this weird dots (see attachment)


I guess the star.css is clashing with your other css file.

Make sure you set list-style:none; for the <ul> and <li> tag in your css file.



Quote:
Is there also a way to get rid of the horizontal line below it?


Remove border-bottom:1px solid #999; three times from star.css.
Thu Mar 15, 2007 12:37 am View user's profile Send private message
WellWho



Joined: 09 Jan 2007
Posts: 62

Post Reply with quote
I think that multiple votes is still possible. Try to rate one news on http://english.cutenews.ru/cuteru/example/ for 5 times

_________________
:: | www.funnyarena.net |:: thanks Scott
Thu Mar 15, 2007 1:49 am View user's profile Send private message Visit poster's website
astrostart



Joined: 11 Feb 2007
Posts: 124
Location: The Netherlands

Post Reply with quote
Vielen Dank! It works! Very Happy



I'm so happy!

_________________
My site: http://www.astrostart.nl | Thanks to everyone here who has helped me!
Thu Mar 15, 2007 3:01 am View user's profile Send private message Visit poster's website
astrostart



Joined: 11 Feb 2007
Posts: 124
Location: The Netherlands

Post Reply with quote
WellWho wrote:
I think that multiple votes is still possible. Try to rate one news on http://english.cutenews.ru/cuteru/example/ for 5 times




Try to refresh. You see that you cannot vote anymore. It may look like you can vote one, five or even ten times, but after one vote, the system already blocks you out. You just have to refresh to notice it.

_________________
My site: http://www.astrostart.nl | Thanks to everyone here who has helped me!
Thu Mar 15, 2007 3:02 am View user's profile Send private message Visit poster's website
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Quote:
You just have to refresh to notice it.




Oh that's neat. I hadn't noticed that!

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Thu Mar 15, 2007 5:56 am View user's profile Send private message Visit poster's website AIM Address
PJR



Joined: 17 Oct 2005
Posts: 161
Location: Czech republic

Post Reply with quote
I would like use it in only some posts (categories), concurrently with the standard rating, is it possible somehow?



(fe. I would like users could rate the record in music reviews with ajax version).
Thu Mar 15, 2007 9:38 am View user's profile Send private message
astrostart



Joined: 11 Feb 2007
Posts: 124
Location: The Netherlands

Post Reply with quote
HELP! I did something wrong, but I don't know what it is.



Users with Internet Explorer (7.0, i don't know about earlier versions) cannot vote lower than the average score on my site. The yellow stars seem to overlap the clickable stars.



For instance: http://www.astrostart.nl/index.php/2005/01/21/discussieer-mee-met-polls.html



This is weird, because it seems to work on FI-DD's example site. So it must have to do something with what I've done.



Does someone know which part must be altered? Thanks!



Crying or Very sad

_________________
My site: http://www.astrostart.nl | Thanks to everyone here who has helped me!
Thu Mar 15, 2007 10:03 am View user's profile Send private message Visit poster's website
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.