Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
blith
Client



Joined: Jul 18, 2003
Posts: 977

PostPosted: Wed Jun 02, 2004 8:00 am Reply with quote

I would like to make it possible to not have to score. Right now you have to choose a numerical value. I would like no score to be an option. Maybe a - (dash) to be no score chosen. Any ideas? Thanks!
 
View user's profile Send private message Visit poster's website
blith







PostPosted: Thu Jun 03, 2004 12:38 pm Reply with quote

Anyone have any thoughts on this? Thanks!
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Jun 03, 2004 4:32 pm Reply with quote

Okay, I'm going to hang out the carrot and expect you to get it Laughing

in modules/Reviews/index.php you should have a couple instances of
Code:
    <option name=\"score\" value=\"1\">1</option>
Add this line after it
Code:
    <option name=\"score\" value=\"0\">0</option>


Then, find any code that looks like this (should only be 1)
Code:
    if (($score < 1) || ($score > 10)) {
and modify it to read
Code:
    if (($score < 0) || ($score > 10)) {


Now I haven't tested this, just glanced at it Wink
 
View user's profile Send private message
blith







PostPosted: Fri Jun 04, 2004 7:46 am Reply with quote

That's got it! BUT... I tried some non numerical values and it wouldn't take probably because of the "value" command... so I am going to look into being able to have a - (dash) as a value... maybe a hint on how to do that...
 
blith







PostPosted: Fri Jun 04, 2004 7:47 am Reply with quote

Wait I am going to try and figure it out... if I can't then I will be back... trying to fish!
 
Raven







PostPosted: Fri Jun 04, 2004 7:53 am Reply with quote

You really need to leave it as a value to avoid exploits that required using the intval() to fix. If you use alpha-numeric values, you can't use the intval() and will have to have some kind of a security trap.
 
blith







PostPosted: Fri Jun 04, 2004 8:03 am Reply with quote

okay. Thank you! whew.. I am soo glad you are on the job!!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©