 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/23/2007 3:15 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 12:22 PM
Location: St Pete, FL
|

|
|
|
|
 |
| abdulbasit wrote:
|
|
But I think still there is 1 problem left. When I save the configuration, it works fine but when I enable the option of Cash MOD in Quiz and save it so it gives again SQL error!
|
Yep, there was another error in the code. This is what I did to correct this:
OPEN
admin/admin_quiz.php
FIND
| Code:
|
|
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = " . str_replace("\'", "''", htmlspecialchars($HTTP_POST_VARS['Quiz_admin_cash_currency'])) . " WHERE config_name = 'Quiz_Cash_Currency'";
|
REPLACE WITH
| Code:
|
|
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = '" . str_replace("\'", "''", htmlspecialchars($HTTP_POST_VARS['Quiz_admin_cash_currency'])) . "' WHERE config_name = 'Quiz_Cash_Currency'";
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/23/2007 3:31 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 12:22 PM
Location: St Pete, FL
|

|
|
|
|
 |
| abdulbasit wrote:
|
Is it possible to make small or capital letter the answer should come correct. This is big problem than cash MOD with Quiz MOD
|
Yes, this is how I corrected this problem:
OPEN
quiz.php
FIND
| Code:
|
|
$actual_answer = quiz_answer(($i + 1), $id, $table);
|
AFTER, ADD
| Code:
|
$actual_answer2 = strtolower(trim($actual_answer));
$user_answer2 = strtolower(trim($user_answer));
|
FIND
| Code:
|
|
if($user_answer == $actual_answer)
|
REPLACE WITH
| Code:
|
|
if($user_answer2 == $actual_answer2)
|
FIND
| Code:
|
|
else if($user_answer != $actual_answer)
|
REPLACE WITH
| Code:
|
|
else if($user_answer2 != $actual_answer2)
|
Now the font case will not be an issue, neither will trailing or leading spaces...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/23/2007 4:29 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 8:22 PM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
Thanks brother. You are great.  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Ultimate Quiz MOD |  |
Posted: 06/23/2007 4:42 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 12:22 PM
Location: St Pete, FL
|

|
|
|
|
 |
It's still possible to have the right answer but have it counted wrong. If someone answers The Shadow with two spaces between The and Shadow in the Co-admin quiz, it would be counted wrong simply because of the extra space. It would really be hard to fix this to work correctly for every single answer but at least now, font case and trailing and leading spaces won't be causing any problems any longer...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/23/2007 5:15 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 8:22 PM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
| The double space problem I think is alright. The problem which you fixed was big problem in that MOD. |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Ultimate Quiz MOD |  |
Posted: 06/23/2007 5:43 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 12:22 PM
Location: St Pete, FL
|

|
|
|
|
 |
Right, I doubt that the extra spacing problem between words will be a problem that often. Hopefully now that I posted the solution to this problem, Karen and anyone else using the MOD can fix their copies too...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/23/2007 5:53 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 8:22 PM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
Yes, right.  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Ultimate Quiz MOD |  |
Posted: 06/23/2007 6:30 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 12:22 PM
Location: St Pete, FL
|

|
|
|
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/23/2007 9:00 AM |
|
|
|
|
|
| Citation |
| Posts |
556 |
| Word Cnt. |
20,326 |
| BDay |
Jan 26 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Nov 26, 2006
Local time: 5:22 PM
Location: west midlands:uk
|

|
|
|
|
 |
ah cool, il do this maybe next week now, it did get annoying coz people would complain, didn't think it could get fixed lol  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Ultimate Quiz MOD |  |
Posted: 06/23/2007 6:56 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 12:22 PM
Location: St Pete, FL
|

|
|
|
|
 |
Almost anything can be fixed if you know where to look for the problem and what to do once you find it...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Information |  |
|