News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

SMF Quiz

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

Previous topic - Next topic

emanuele

If you read the last three/four pages you'll find at least three to four similar cases with two to four different solutions.

It may be another javascript interfering with this, some character in a question or in an answer, a bug (unless I posted the fixed package, don't remember).
But, most important: which version are you using of the two available?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

kenso

Quote from: emanuele on October 02, 2012, 04:26:43 AM
If you read the last three/four pages you'll find at least three to four similar cases with two to four different solutions.

It may be another javascript interfering with this, some character in a question or in an answer, a bug (unless I posted the fixed package, don't remember).
But, most important: which version are you using of the two available?

Sorry Man, I should have looked closer... It was the Fancybox 4. Working well now Thanks for your hard work with this should be fun!
The Farmers and self-sufficiency forum
http://www.ozfarmer.com.au

emanuele

No problem. ;)

BTW I thought I fixed that one...

* emanuele is becoming old... :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

FrizzleFried

I think this has been asked before... but can someone help out us hacks who have no clue what were doing who would love to see a PHP block to display the stats, top 10, etc... can anyone help?

CapadY

Quote from: vkot on September 24, 2012, 04:56:14 PM
Quote from: Kindred on August 27, 2012, 04:58:01 PM
Quote from: vkot on August 27, 2012, 02:48:50 PM
I guess that this script can easily be modified to play an audio file. Instead of displaying a string with a question, it could embed an mp3 player with the audio file. Right? Has anyone done this yet?

You guess that would be an easy modification?   No, I don't think it would be easy at all....   Changing a text display to a "play an mp3" is not that easy... especially not within a script that is already doing a dozen things to display on the screen.

I just installed the mod. As I imagined (and hoped), I just needed to put the html code in the question text. For example, I put:
<embed type="application/x-shockwave-flash" flashvars="audioUrl=http://www.labnol.org/assets/mp3/unofficial-yahoo-song.mp3" src="http://google.com/reader/ui/3523697345-audio-player.swf" ></embed>
and it works!  ;)
I just need to make the the question text field character limit higher.

I'm happy now! And also I'll translate the mod to greek.

Is there a similar trick to view videoclips ?

If there is, can you post a code example of it ?
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

emanuele

Quote from: FrizzleFried on October 02, 2012, 11:40:45 AM
I think this has been asked before... but can someone help out us hacks who have no clue what were doing who would love to see a PHP block to display the stats, top 10, etc... can anyone help?
Don't think there is any at the moment, if anyone wants to write it feel free.
I'm still here, but...heck always working on something else... lol


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

vkot

Quote from: CapadY on October 02, 2012, 11:50:03 AMIs there a similar trick to view videoclips ?

If there is, can you post a code example of it ?

Sure! Try this:

<iframe width="280" height="157" src="http://www.youtube.com/embed/39AIK-WIWAs?rel=0&autoplay=1&showinfo=0&autohide=1&controls=0&disablekb=0&end=20" frameborder="0"></iframe>

I used youtube's embed code, with a few adjustments: Notice that I have made the dimensions smaller (half of what youtube gave me) so that the video will fit, and I added some useful parameters to the URL. (see https://developers.google.com/youtube/player_parameters)
For specialized SMF installation/customization, Web Development, Linux Server Administration, click here.
Για εξειδικευμένες υπηρεσίες στα παραπάνω, πατήστε εδώ.

vkot

Are there any plans to make the question_text field (in the database and in the template) bigger than 255 characters? (which is even less with UTF-8). I think can do it for myself, but I was just wondering if I should wait for it in the next version.
For specialized SMF installation/customization, Web Development, Linux Server Administration, click here.
Για εξειδικευμένες υπηρεσίες στα παραπάνω, πατήστε εδώ.

emanuele

Feel free, unfortunately I'm more busy than expected with other things and I can't touch this one for the time being... :(
Feel also free to post instructions on how to do the same, so if others want to increase the size will have a guide. ;)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

vkot

OK I did it. Here are the steps to increase question_text field size:

1) In table quiz_question, change question_text field type from varchar(255) to varchar(2000) or whatever you want. Just click & edit with phpMyAdmin, or use the command: ALTER TABLE quiz_question MODIFY question_text VARCHAR(2000);

2) In SMFQuizAdmin.template.php change:
<td align="left"><input type="text" name="question_text" maxlength="400" size="90"/></td>
to:
<td align="left"><textarea name="question_text" cols="70" rows="5"></textarea></td>
and
<td align="left"><input type="text" name="question_text" maxlength="400" size="90" value="' , format_string($row['question_text']) , '"/></td>
to:
<td align="left"><textarea name="question_text" cols="70" rows="5">' , format_string($row['question_text']) , '</textarea></td>
For specialized SMF installation/customization, Web Development, Linux Server Administration, click here.
Για εξειδικευμένες υπηρεσίες στα παραπάνω, πατήστε εδώ.

Jessica.

#710
Everything is working except for when you start a quiz. They just don't start. A pop up comes up...and both boxes are pitch black. Nothing loads up

EDIT: Oops I guess I can try to find the solution in this topic. Never mind!

EDIT #2: I can't figure it out...:/
Testing Zone - SMF 2.0.7, default Curve
School & Chat - phpBB3, over 170 mods installed, official live forum

I use the latest version of Chrome

phpBB: Forum = a section; Board = whole site
SMF: Forum = whole site; Board = a section

Dave J

#711
I would like to thank vkot for giving us the ability to add mp3 files to questions. As an update regarding the playing of music files in questions I have done the following.

The code I have added as the question is as follows:

Quote<embed type="application/x-shockwave-flash" flashvars="audioUrl=http://the route to your mp3 file&autoPlay=true" src="http://google.com/reader/ui/3523697345-audio-player.swf" ></embed>

Notice I have added the '&autoPlay=true' following the route to the mp3 file, this enables the track to auto play once the button is pressed to start the quiz.

You can create a packge of the quizzes and they will be imported to another site and play without error, but please note that the link created for the track goes back to the site where the quiz question was originally created and is not stored on your site, this means that if the original site goes down your questions will not work (this is for mp3 tracks only, all other imported packages will work fine). I would suggest that you create your own tracks and put them in a similar folder on the root of your domain.

Well that's it if anyone needs any help let me know and Ill answer as soon as I can.


PS> It's worth noting that you can use any type of music file you want to, although I've only tested mp3, but need to set the file with the lowest Kbs file setting as possible so as not to increase your storage too much, the antmusic.mp3 file thats being used is 40Kbs and has a size of only 89kb and it's 17.6 seconds long.


UPDATE 07.10.2013. The code from Google is no longer supported, see this http://www.simplemachines.org/community/index.php?topic=293949.msg3619389#msg3619389


vkot

Yes, &autoPlay=true is necessary!

Anyway, today I discovered a strange problem. Some of the question answers were missing, and I spent too much time searching, editing, wondering why they couldn't be saved. I copy-pasted the text again and again, saved, but then when I checked the question, the answer text had disappeared. Finally I isolated the problem, there's something going on when the answer text contains one or both of the greek letters Γ and Δ. I changed them to small letters (γ and δ) and all is OK. I cannot imagine why this happens. Now that it's working, I don't want to search it anymore...  :-\
For specialized SMF installation/customization, Web Development, Linux Server Administration, click here.
Για εξειδικευμένες υπηρεσίες στα παραπάνω, πατήστε εδώ.

Dave J

Quote from: vkot on November 26, 2012, 05:50:34 PM
Yes, &autoPlay=true is necessary!

Anyway, today I discovered a strange problem. Some of the question answers were missing, and I spent too much time searching, editing, wondering why they couldn't be saved. I copy-pasted the text again and again, saved, but then when I checked the question, the answer text had disappeared. Finally I isolated the problem, there's something going on when the answer text contains one or both of the greek letters Γ and Δ. I changed them to small letters (γ and δ) and all is OK. I cannot imagine why this happens. Now that it's working, I don't want to search it anymore...  :-\

Glad you got it working OK vkot   :)

I have now managed to do 3 different beat the intro music quizzes and as I have every UK top 40 single since 1952 there are lots more to come  :laugh:

vkot

wow, davejo, nice! Can I have your quizzes?
(If you have cut/resampled the mp3s it would be nice for me to have them as well. If not, don't worry, I'll find them)
For specialized SMF installation/customization, Web Development, Linux Server Administration, click here.
Για εξειδικευμένες υπηρεσίες στα παραπάνω, πατήστε εδώ.

vkot

This is my code, for playing mp3s with the google player:

<embed type="application/x-shockwave-flash" flashvars="audioUrl=http://xxxxx.xxx.xxx/xxxx.mp3&autoPlay=true" src="http://google.com/reader/ui/3523697345-audio-player.swf" width="400" height="27" quality="best"></embed>

I have added width="400" height="27" so that the player will not be too tall (causing the quiz window to have vertical scroll bar), and quality="best"
For specialized SMF installation/customization, Web Development, Linux Server Administration, click here.
Για εξειδικευμένες υπηρεσίες στα παραπάνω, πατήστε εδώ.

Dave J

Quote from: vkot on November 27, 2012, 02:08:38 PM
This is my code, for playing mp3s with the google player:

<embed type="application/x-shockwave-flash" flashvars="audioUrl=http://xxxxx.xxx.xxx/xxxx.mp3&autoPlay=true" src="http://google.com/reader/ui/3523697345-audio-player.swf" width="400" height="27" quality="best"></embed>

I have added width="400" height="27" so that the player will not be too tall (causing the quiz window to have vertical scroll bar), and quality="best"

Thanks to vkot I have now found out that there is a limit to how many charachters you can put into the question. If you don't want to mess about with changing code/script to allow more charactures then I suggest you keep the path and title of the mp3 to a minimum.

fredcarrie

Hi Guys,

Great quiz, our users love it!

I  have 2 issues

1. I can import most  quizzes from the packages, but those with  lots of quizzes - like "music" (50 quizzes)  look like they are loading then I get a bank screen. Nothing is imported.  Smaller packages import fine.

2. First round of leagues worked fine, now on round 2  to  the quizzes won't load. This only happens with leagues, although I have set all normal quizzes to 1 play max. per  user.

I am using SMF Quiz 1.1.1 beta1

thanks



Dave J

Quote from: fredcarrie on November 29, 2012, 07:24:46 AM
Hi Guys,

Great quiz, our users love it!

I  have 2 issues

1. I can import most  quizzes from the packages, but those with  lots of quizzes - like "music" (50 quizzes)  look like they are loading then I get a bank screen. Nothing is imported.  Smaller packages import fine.

2. First round of leagues worked fine, now on round 2  to  the quizzes won't load. This only happens with leagues, although I have set all normal quizzes to 1 play max. per  user.

I am using SMF Quiz 1.1.1 beta1

thanks

Hi fredcarrie and welcome to SMF,

Firstly I noticed the same problem the other day and I have now made those category items in smaller packages, I will attached them to a new post later today when I get home.

Secondly, did you read any other previous posts here about the 'leagues' if you do a search from the top of this page for leagues then all the posts containing that should be found. I personally haven't used the leagues so I don't know what the answer is but I do know that others have had problems in the same area.

fredcarrie

Thanks davejo!

I'll download the smaller packages later. You guys are the greatest!   :)

re- leagues - I have had a few odd things happening and I noticed the "perpetual loading"  issue goes away when I select just one category of quizzes for any league.

Advertisement: