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: Previous  1, 2
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
Re: [Solved] Ultimate Quiz MOD
PostPosted: 06/23/2007 3:15 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: 12:22 PM
Location: St Pete, FL
peace.gif
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'";

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/23/2007 3:31 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: 12:22 PM
Location: St Pete, FL
peace.gif
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 Wink

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...

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/23/2007 4:29 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: 8:22 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Thanks brother. You are great.  Applause  Applause  Applause
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/23/2007 4:42 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: 12:22 PM
Location: St Pete, FL
peace.gif
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...

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/23/2007 5:15 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: 8:22 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
The double space problem I think is alright. The problem which you fixed was big problem in that MOD.
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/23/2007 5:43 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: 12:22 PM
Location: St Pete, FL
peace.gif
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...

banana  banana  banana  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/23/2007 5:53 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: 8:22 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Yes, right.  Applause  Applause
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/23/2007 6:30 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: 12:22 PM
Location: St Pete, FL
peace.gif
banana  banana  banana  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/23/2007 9:00 AM 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: 5:22 PM
Location: west midlands:uk
greatbrE.gif
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  Applause
Back to Top
View user's profile Find all posts by ~^Karen^~ Send private message   Visit poster's website Yahoo Messenger MSN Messenger
Re: Ultimate Quiz MOD
PostPosted: 06/23/2007 6:56 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: 12:22 PM
Location: St Pete, FL
peace.gif
Almost anything can be fixed if you know where to look for the problem and what to do once you find it...

banana  banana  banana  banana  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
 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: Previous  1, 2
Page 2 of 2


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.0735s (PHP: 63% - SQL: 37%) - SQL queries: 57 - GZIP disabled - Debug on