| Author |
Message |
rats
Joined: 29 May 2006 Posts: 44
|
|
|
|
with "{rating-middle}", can I get a full number?
Ex: not 4.3, but 43
I want to make a small hack, so people can't vote in the short-story, only in full-story, so I wanna make a cute bar with dynamic width, witch will look like the voting bar 
|
|
| Sat Apr 07, 2007 4:18 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
In plugins/rating.php the following line calculates the value for {rating-middle}:
 |  | $middle = @round(($row['rating'] / $row['votes']), 1); |
Change it for example to this:
 |  | $middle = ($row['rating'] / $row['votes'] * 10); |
|
|
| Tue Apr 10, 2007 6:46 pm |
|
 |
PJR
Joined: 17 Oct 2005 Posts: 161 Location: Czech republic |
|
|
|
The is a colllision with this anf "Today" plugin. If today plugin is on, the ajax rating doesn't work...
|
|
| Sat May 05, 2007 9:42 pm |
|
 |
marcusmagalhaes
Joined: 24 Apr 2007 Posts: 70
|
|
|
| Sat May 05, 2007 11:56 pm |
|
 |
Ramon
Joined: 12 Oct 2005 Posts: 462 Location: Hoogeveen, NL |
|
|
|
hehe that's because it doesn't round anymore. I dont know why FI-DD deleted that, but you should try something like this.
 |  | $middle = @round(($row['rating'] / $row['votes'] * 10), 2); |
_________________
 |
|
| Sun May 06, 2007 2:04 am |
|
 |
marcusmagalhaes
Joined: 24 Apr 2007 Posts: 70
|
|
|
|
where I put this code?
 |  | hehe that's because it doesn't round anymore. I dont know why FI-DD deleted that, but you should try something like this.
 |  | $middle = @round(($row['rating'] / $row['votes'] * 10), 2); |
|
|
|
| Sun May 06, 2007 2:36 am |
|
 |
marcusmagalhaes
Joined: 24 Apr 2007 Posts: 70
|
|
|
|
{rating:5:25}
not middle
 |  | hehe that's because it doesn't round anymore. I dont know why FI-DD deleted that, but you should try something like this.
 |  | $middle = @round(($row['rating'] / $row['votes'] * 10), 2); |
|
|
|
| Sun May 06, 2007 2:42 am |
|
 |
Ramon
Joined: 12 Oct 2005 Posts: 462 Location: Hoogeveen, NL |
|
|
|
My bad, i'm sorry.. What does line 49 of your rating.php file says?
_________________
 |
|
| Sun May 06, 2007 4:00 pm |
|
 |
marcusmagalhaes
Joined: 24 Apr 2007 Posts: 70
|
|
|
|
before .... $middle = @round(($row['rating'] / $row['votes']), 1);
now... $middle = @round(($row['rating'] / $row['votes'] * 10), 2);
and line 48 ... $rating = $row['votes'] > 0 ? $row['rating'] / $row['votes'] : 0;
 |  | My bad, i'm sorry.. What does line 49 of your rating.php file says? |
|
|
| Sun May 06, 2007 11:16 pm |
|
 |
marcusmagalhaes
Joined: 24 Apr 2007 Posts: 70
|
|
Re: rating problem |
|
any suggestion???
|
|
| Mon May 07, 2007 1:47 pm |
|
 |
Ramon
Joined: 12 Oct 2005 Posts: 462 Location: Hoogeveen, NL |
|
|
|
I don't get it, it doesnt seem to round. And when you changed it to  |  | $middle = @round(($row['rating'] / $row['votes'] * 10), 2); | It should have multiplied by 10, making the rating 40.08..
Try this
 |  | $middle = round(($row['rating'] / $row['votes']), 2); |
And be sure to delete the cache 
_________________
 |
|
| Mon May 07, 2007 9:59 pm |
|
 |
marcusmagalhaes
Joined: 24 Apr 2007 Posts: 70
|
|
Re: News rating (ajax) |
|
I put this in my template <div id="ratingform{id}">{rating:5:10}</div>
and shows in my page this////
please help-me!!!
in my page i put this:
<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" />
|
|
| Wed May 09, 2007 1:57 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
1. Open plugins/rating.php and remove this:
 |  | 'Currently '.$current_rating.'/'.$stars.'</li>'. |
2. Open plugins/rating/rating.php and remove this:
 |  | 'Currently '.$current_rating.'/'.$stars.'</li>'. |
|
|
| Wed May 09, 2007 6:22 pm |
|
 |
supafly
Joined: 24 May 2007 Posts: 2
|
|
|
|
Just added this and I'm having some issues. The stars are there and you can hover over them but once they're clicked the "please wait" flashes quickly and no vote is recorded.
Any one have any ideas?
|
|
| Thu May 24, 2007 12:30 am |
|
 |
Ramon
Joined: 12 Oct 2005 Posts: 462 Location: Hoogeveen, NL |
|
|
|
I've got exactly the same problems. It also doesnt seem to work on the cnr example page :S
_________________
 |
|
| Mon Jul 02, 2007 6:55 pm |
|
 |
|