Rounding & Rating System.

This is a discussion on "Rounding & Rating System." within the PHP Forum section. This forum, and the thread "Rounding & Rating System. are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 18th, 2008, 14:10
Jack Franklin's Avatar
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,268
Blog Entries: 7
Thanks: 10
Thanked 4 Times in 4 Posts
Rounding & Rating System.

I have a variable called $act_rating which contains the rating of a website. This is for my Flash Gallery Project, which will display the best flash sites on the net I hope!

If $act_rating, is say, 4, I want to display an image with 4 stars, if it is 3, I want it to display an image with 3 stars, etc. But the $act_rating variable contains an average so it could be decimals. How Can I round the number to 0 decimal places? So 4.3 = 4, 3.5 = 4.

And how would the best way be to do the rating form? A radio box for each rating?

Cheers,

Jack
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
Reply With Quote

  #2 (permalink)  
Old Feb 18th, 2008, 14:31
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,012
Blog Entries: 2
Thanks: 5
Thanked 23 Times in 20 Posts
Send a message via Skype™ to Aso
Re: Rounding & Rating System.

This should help out with the rounding.

I'm not sure how people code this, but I like it when there's a star for each rating, and you click on the one you want, and the number of stars are highlighted depending on what the rating is.

In other words, the rating like iMDB (if you're logged in, you just click on the star for your rating)
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #3 (permalink)  
Old Feb 18th, 2008, 14:33
Jack Franklin's Avatar
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,268
Blog Entries: 7
Thanks: 10
Thanked 4 Times in 4 Posts
Re: Rounding & Rating System.

Yeh so do I, but I have no idea how! I've got a slight idea, I'll experiment with it.
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
Reply With Quote
  #4 (permalink)  
Old Feb 20th, 2008, 14:35
Junior Member
Join Date: Feb 2008
Location: Glasgow
Age: 28
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Rounding & Rating System.

I used one of these before, just googled and integrated it, I'm not entirely sure but I think it was this one - http://www.masugadesign.com/the-lab/...ar-rating-bar/
Reply With Quote
  #5 (permalink)  
Old Feb 20th, 2008, 18:12
Jack Franklin's Avatar
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,268
Blog Entries: 7
Thanks: 10
Thanked 4 Times in 4 Posts
Re: Rounding & Rating System.

Thanks able, but I now have one working, stars n all I'll post a screenshot up later. Hoping the site will be up in a few days.
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spinal007 - Anyone recommend a good rating/star rating script? sing2trees PHP Forum 17 Jun 8th, 2008 21:23
Please help, 2 way feedback rating system marie2007 PHP Forum 0 Sep 13th, 2007 01:25
Poll/Rating System lexxweb JavaScript Forum 1 Dec 9th, 2006 21:27
Rating system... courtjester Classic ASP 2 May 22nd, 2004 12:36


All times are GMT. The time now is 20:50.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43