SMF Quiz

Started by Diego Andrés, February 18, 2009, 01:08:19 PM

Previous topic - Next topic

Dave J

Quote from: GlitchPC on March 04, 2012, 10:57:55 AM
Will you be submitting this to SMF for approval?

I have no plans to...all I'm doing is trying to help out someone who's stuck...the file I have attached works for me so I am sharing it with others. I am not a coder and do not have any training as such... this is just a hobby...nothing else...if I can help someone along the way I will.

The original poster of this mod has abandoned it and said that anyone can take it over so I don't really see that there is a problem with sharing the file....unless you know different!!!
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

mrselnombre

Do you know how i can change creator of all the quizzes in the sql file?

It added tons of quizzes fine :D
So thank you heaps for that.
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Total Twaddle.

Dave J

Quote from: mrselnombre on March 04, 2012, 11:49:26 AM
Do you know how i can change creator of all the quizzes in the sql file?

It added tons of quizzes fine :D
So thank you heaps for that.

No problem glad I could help.

I had an idea that if you created another admin on the site and then installed the quiz with that account it would use that name as the creator of the quiz.

I created a user called 'Quizmaster' and created a quiz with that account and it worked ok....but I'm not sure about doing it with the tables I have shared.

I'll have a mess around by re-installing it again on the test site with another admin name and see if it works...watch this space  ;)
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Quote from: mrselnombre on March 04, 2012, 11:49:26 AM
Do you know how i can change creator of all the quizzes in the sql file?


Ok I have tried and tested some theories and it seems that the default creator of the quizzes is 'User 1' if I change the member id's in the database and reverse them i.e Quizmaster=1 and Dave=2 then it shows as 'Quizmaster' but as a soon as I revert back to the correct id's it revert the creator to 'Dave' again. As you know the installer username of the site is 'User 1'

This means that the settings for this are determined within the code of the files for the quiz when it's installed. I don't know how to or even if it's worth the hassle of trying to change it. Sorry I can't help any more than that
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

mrselnombre

I was thinking about running a sql query to just change the identity of the creator of all the quizzes in the sql file you had.
I don't mind being the creator of future quizzes. It would just be fun to join in on the playing on the new ones we have.

(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Total Twaddle.

mrselnombre

I created a new user called Quiz Master then I did this
UPDATE `quiz` SET `creator_id` = '4067' WHERE `quiz`.`creator_id` =1
and it worked

(i have a different system for my databases hence table names (mine don't have smf_)
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Total Twaddle.

Dave J

Quote from: mrselnombre on March 04, 2012, 01:10:38 PM
I created a new user called Quiz Master then I did this
UPDATE `quiz` SET `creator_id` = '4067' WHERE `quiz`.`creator_id` =1
and it worked

(i have a different system for my databases hence table names (mine don't have smf_)

ok thanks for that...I ran

UPDATE `smf_quiz` SET `creator_id` = '12' WHERE `creator_id` =1

and that worked too.

Thanks for the heads up on that I'll run that on the main site now  ;)
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

mrselnombre

No problem.
:D

It's a good Mod, hopefully someone will pick it up and take it on :D
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Total Twaddle.

Kindred

hmmm.... what database changes did you need to make?

The quiz installed perfectly well on my 2.0.2 installation of SMF
The only issue with the package, as presented on the mod site, is that the smf quiz site is gone, so there are no more notices or quick packages.


As for sharing your version....   yes, the original author has said that anyone may take it over.... However, you're not taking it over and, by including the mod as an attachment, you bypassed the checks that the SMF makes to make sure that mods don't contain obvious security issues or back doors.... So users who download and/or use attached packages need to be aware and careful.
I'm not going to remove the package, since the author essentially opened it up... but it does border on the edge of the rules. :)


to the user with the "previously declared" error.
You apparently did an additional install without uninstalling first.
You will have to MANUALLY remove all of the duplicated code (and there is likely more affected than just the part giving you the error message)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Chalky

Quote from: Kindred on March 04, 2012, 05:17:29 PM

to the user with the "previously declared" error.
You apparently did an additional install without uninstalling first.
You will have to MANUALLY remove all of the duplicated code (and there is likely more affected than just the part giving you the error message)

If you mean me, I have uninstalled each time before trying to reinstall.  I know I have because the first two times I uninstalled immediately that I saw the error message.  The third time I installed it I had a sniff around a bit first before uninstalling.  I have also installed each time through the Package Manager.  Each time the install passes all the tests then claims to have installed successfully, ie. it seems a completely normal installation.  I can even navigate around the front end of the application from the "Quiz" button on my menu bar, although there are no quizzes in there.  The error message only appears when I try to access the settings for the Quiz in my admin area, and of course when SMF tries to auto-direct to the settings immediately after install.

If however, you believe I have duplicated code that needs removing, please can you point me in the right direction - what and where?  I'm a complete newbie at this. 

Kindred

you will have to check the mod parse instructions and go through each instruction to check for duplicated code.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Chalky

Thanks, I will have to have a look at this tomorrow now as my head is jangled.

GlitchPC

Quote from: davejo on March 04, 2012, 11:44:38 AM
Quote from: GlitchPC on March 04, 2012, 10:57:55 AM
Will you be submitting this to SMF for approval?

I have no plans to...all I'm doing is trying to help out someone who's stuck...the file I have attached works for me so I am sharing it with others. I am not a coder and do not have any training as such... this is just a hobby...nothing else...if I can help someone along the way I will.

The original poster of this mod has abandoned it and said that anyone can take it over so I don't really see that there is a problem with sharing the file....unless you know different!!!

Nope...just looking for a fully functional mod for 2.0.2.  I'll give it a shot...and thanks!

GlitchPC

Quote from: davejo on March 04, 2012, 09:55:48 AM
Quote from: Sabrinova on March 04, 2012, 09:18:19 AM
Have you any ideas about my issue Davejo?  I've reinstalled from a fresh download but it's exactly the same...

I have just installed this on a fresh install of 2.0.2 and there were no errors at all. I have also changed the database files as i described and have a fully functioning quiz.

I might have changed some code in the original package. So I have attached it below. You do not have to delete the tables to re-install the quiz.

Using the file you supplied in the above post.  I had to extract and compress as a zip file since the Package Manager does not use .rar files.

Installation with Package manager had no errors...however, my error log shows different:

xxxx://glitchpc.net/index.php?action=admin;area=quiz;sa=adminCenter
8: Trying to get property of non-objectFile: /xxx/xxx/xxxxx/xxxxxxxx/xxxxxxxx/Sources/SMFQuizAdmin.php
Line: 2408

xxxx://glitchpc.net/index.php?action=admin;area=quiz;sa=adminCenter
8: Trying to get property of non-objectFile: /xxx/xxx/xxxxx/xxxxxxxx/xxxxxxxx/Sources/SMFQuizAdmin.php
Line: 2411

xxxx://glitchpc.net/index.php?action=admin;area=quiz;sa=adminCenter
2: Invalid argument supplied for foreach()File: /xxx/xxx/xxxxx/xxxxxxxx/xxxxxxxx/Themes/default/languages/BadBehavior_bbc.english.php (main sub template - eval?)
Line: 1740

Any suggestions?

Kindred

Quote from: Kindred on March 04, 2012, 05:17:29 PM
hmmm.... what database changes did you need to make?

The quiz installed perfectly well on my 2.0.2 installation of SMF
The only issue with the package, as presented on the mod site, is that the smf quiz site is gone, so there are no more notices or quick packages.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GlitchPC

Thanks, Kindred...I sort of realized that after looking at the code from those two lines of SMFQuizAdmin.php.  However, I still have one error that needs to be addressed.  I put a support request over at the Bad Behavior mod support forum and was told to disable template eval to remove the above error.  After doing so...the error now reads:

xxxx://glitchpc.net/index.php?action=admin;area=quiz;xxxxxxxxxxx=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2: Invalid argument supplied for foreach()File: /xxx/xxx/xxxxx/xxxxxxxx/xxxxxxxx/Themes/default/SMFQuizAdmin.template.php
Line: 1740

Kindred

Do you have quizzes in the list?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GlitchPC

#397
None...I'm just adding categories at the moment.

Edit...

Duh!  That explains it.  I like the way you make a person think, Kindred...

I appreciate the help...really.

On another note...

Can someone tell me how to clean this up?  See attachment...

Dave J

Quote from: GlitchPC on March 04, 2012, 11:04:55 PM
On another note...

Can someone tell me how to clean this up?  See attachment...

It might be a theme issue Glitch....have you tried copying the 'quiz_css' into the custom themes css folder?

Can't think of anything else
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

GlitchPC

#399
Thanks for the reply...

I doubt it's a theme issue since I see the same on your site...and I also experience the same in the default SMF Curve theme.  It just looks so ugly the way it's displayed...almost like an accordion...ya know?

I just think it's the way it's coded.  However...I've said it once...and I'll say it a thousand times...I'm no coder.  Kindred make me think about it, though...which I do...sometimes.  Sometimes I figure it out...and sometimes I don't.  That's when Kindred steps in and gives me a little nudge.  He's good for that...and I hope he knows I appreciate it.  As well as I appreciate your help, too, davejo.  Thanks!

Advertisement: