 | [Solved] Ultimate Quiz MOD |  |
Posted: 06/21/2007 3:04 PM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
Hello brother,
I just installed Ultimate Quiz MOD and it' working fine but in ACP, General Admin, Quiz whose setting when I try to save it so it gives me Cash MOD related error which i tried to change some settings and even tried to keep off that cash MOD function in Quiz MOD but the settings aren't been saved successfully!
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Ultimate Quiz MOD |  |
Posted: 06/21/2007 5:18 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 3:05 PM
Location: St Pete, FL
|

|
|
|
|
 |
There were a couple of flaws in the admin_quiz.php file. This is what I did to correct the problem:
OPEN
admin/admin_quiz.php
FIND
| Code:
|
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = " . intval($HTTP_POST_VARS['Quiz_CashMOD_On']) . " WHERE config_name = 'Quiz_CashMOD_On'";
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = " . intval($HTTP_POST_VARS['Quiz_CashMOD_On']) . " WHERE config_name = 'Quiz_CashMOD_On'";
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = " . intval($HTTP_POST_VARS['Quiz_admin_cash_correct']) . " WHERE config_name = 'Quiz_Cash_Correct'";
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = " . intval($HTTP_POST_VARS['Quiz_admin_cash_incorrect']) . " WHERE config_name = 'Quiz_Cash_Incorrect'";
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = " . intval($HTTP_POST_VARS['Quiz_admin_cash_tax']) . " WHERE config_name = 'Quiz_Cash_Tax'";
$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 = " . intval($HTTP_POST_VARS['Quiz_CashMOD_On']) . " WHERE config_name = 'Quiz_CashMOD_On'";
if( $board_config['Quiz_CashMOD_On'] == ON )
{
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = " . str_replace("\'", "''", htmlspecialchars($HTTP_POST_VARS['Quiz_admin_cash_currency'])) . " WHERE config_name = 'Quiz_Cash_Currency'";
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = " . intval($HTTP_POST_VARS['Quiz_admin_cash_correct']) . " WHERE config_name = 'Quiz_Cash_Correct'";
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = " . intval($HTTP_POST_VARS['Quiz_admin_cash_incorrect']) . " WHERE config_name = 'Quiz_Cash_Incorrect'";
$sql[] = "UPDATE " . CONFIG_TABLE . " SET config_value = " . intval($HTTP_POST_VARS['Quiz_admin_cash_tax']) . " WHERE config_name = 'Quiz_Cash_Tax'";
}
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/22/2007 4:06 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
Ohk. I see changes in the codes you replaced but never understands what does that mean
Need to do php language course than I will understand properly  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Ultimate Quiz MOD |  |
Posted: 06/22/2007 4:45 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 3:05 PM
Location: St Pete, FL
|

|
|
|
|
 |
Basically the replacement code above checks to see if the Cash MOD was being used. If not, it now bypasses the queries that aren't needed. The original ran the queries anyway even though since the fields were never displayed and populated, there was no data available to run the queries, which caused the errors that you saw...
Also if you look in the first example code, he had a copy and paste error and ran the same query twice in a row, which wasn't necessary at all. The replacement code got rid of the duplicate SQL query...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/22/2007 4:49 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
Aah, Alright. I understand a little bit now
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!
So I won't be able to enable the cash MOD with Quiz MOD configuration
It's not necessary to make it enable but just want to know... |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Ultimate Quiz MOD |  |
Posted: 06/22/2007 4:58 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 3:05 PM
Location: St Pete, FL
|

|
|
|
|
 |
| If you get an error when it is set to use the Cash MOD, I may have introduced a new error. So I will have to take another look at it... |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/22/2007 5:11 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
| No No. This error you haven't make it. It was there from before. You can have a look later any time. Not necessary to look now brother. |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/22/2007 6:30 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
There is 1 more problem in this MOD while we were testing that when a quiz author made 1 answer as White and when a user enters white in small letters "w" in small letter so the quiz MOD gives it wrong answer as it wants to enter the user White, "W" in capital.
Is it possible to make small or capital letter the answer should come correct. This is big problem than cash MOD with Quiz MOD  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/22/2007 2:12 PM |
|
|
|
|
|
| Citation |
| Posts |
556 |
| Word Cnt. |
20,326 |
| BDay |
Jan 26 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Nov 26, 2006
Local time: 8:05 PM
Location: west midlands:uk
|

|
|
|
|
 |
| Ohh thats annoying, iv had that prob with my quiz mod, but its just how the author has done this mod, be great if it could be changed to either capital letters or lowercase coz it aint fair on members getting the question wrong just coz of that |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Ultimate Quiz MOD |  |
Posted: 06/22/2007 2:22 PM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Information |  |
|