Hi, can someone point me in the right direction of a resource to look up please?
My users don't seem to use the rating system properly, they rate most everything a 10 no matter how bad it is. I want to attempt to figure out how to change the 1-10 review system to 10 different words instead, like AWESOMEST, Terrific, Great, Good, Like it, OK, Alright, Ummm, Dreadful, Troll that would then input as a number.
I figured out that the file to look at is includes/reviewform. It looks like it uses a shorthand to get the 1-10 to show up without listing each number separately, so it would have to be completely rewritten, probably more complicated than before.
Can someone please give me a link, or the terms to search for the 1-10 drop down list in php, and what a drop down list of words in php would be? If I can recreate one by itself that would be step one in figuring this out. Then I'll have to figure out how to translate the word into a number, and then input that into the database. Intuitively I think that this may be the right direction and something easy enough that I could figure out in time. Is this possible?
Thank you in advance!
Whoever said nothing is impossible never tried slamming a revolving door.
Right. You'll need to change this section of includes/reviewsform.php
for($x=10; $x > 0; $x--) {
$form .= "<option value="$x"".($review['rating'] == $x ? " selected" : "").">$x</option>";
}
I would add an array of options like this:
$opts = array(
10 => "Wow!",
9 => "Awesome!",
8 => "Terrific!",
7 => "Great!",
6 => "Good",
5 => "Okay",
4 => "So-so",
3 => "Needs work",
2 => "Bad",
1 => "Awful"
);
for($x=10; $x > 0; $x--) {
$form .= "<option value="$x"".($review['rating'] == $x ? " selected" : "").">".$opts[$x]."</option>";
}
My usual disclaimer on this...I haven't tested it.
Wow, thank you so much Tammy!! 🙂 I will try and practice with that in depth and try to learn from it. 😀 I need a hobby while in school, right?
Whoever said nothing is impossible never tried slamming a revolving door.