Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
[Solved] Ultimate Quiz MOD
Post new topic   Reply to topic View previous topic :: View next topic
Goto page: 1, 2  Next
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
[Solved] Ultimate Quiz MOD
PostPosted: 06/21/2007 3:04 PM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
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!

dontknow
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Ultimate Quiz MOD
PostPosted: 06/21/2007 5:18 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:05 PM
Location: St Pete, FL
peace.gif
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'";
}

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Ultimate Quiz MOD
PostPosted: 06/22/2007 4:06 AM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Ohk. I see changes in the codes you replaced but never understands what does that mean Very Happy

Need to do php language course than I will understand properly Wink
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Ultimate Quiz MOD
PostPosted: 06/22/2007 4:45 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:05 PM
Location: St Pete, FL
peace.gif
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...

banana
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Ultimate Quiz MOD
PostPosted: 06/22/2007 4:49 AM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Aah, Alright. I understand a little bit now Smile

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  dontknow

It's not necessary to make it enable but just want to know...
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Ultimate Quiz MOD
PostPosted: 06/22/2007 4:58 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:05 PM
Location: St Pete, FL
peace.gif
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
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Ultimate Quiz MOD
PostPosted: 06/22/2007 5:11 AM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
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
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: [Solved] Ultimate Quiz MOD
PostPosted: 06/22/2007 6:30 AM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
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 Wink
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: [Solved] Ultimate Quiz MOD
PostPosted: 06/22/2007 2:12 PM Reply with quote
Citation
~^Karen^~
Citation
Posts 556
Word Cnt. 20,326
BDay Jan 26
Sign Aquarius
Sex Sex:Female
Joined: Nov 26, 2006
Local time: 8:05 PM
Location: west midlands:uk
greatbrE.gif
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
View user's profile Find all posts by ~^Karen^~ Send private message   Visit poster's website Yahoo Messenger MSN Messenger
Re: [Solved] Ultimate Quiz MOD
PostPosted: 06/22/2007 2:22 PM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 11:05 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Yeah, right.
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
 Post new topic  Reply to topic
Information
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support

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 cannot attach files in this forum
You cannot download files in this forum
All times are GMT - 5 Hours
Goto page: 1, 2  Next
Page 1 of 2


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.1038s (PHP: 55% - SQL: 45%) - SQL queries: 57 - GZIP disabled - Debug on