SimpleModal advanced poll EXAMPLE TEMPLATE

You need jQuery for this example. This example uses the extension t3jquery. Furthermore you need SimpleModal from here: http://www.ericmmartin.com/projects/simplemodal/ Download it and copy it to your fileadmin-folder. Test it with this TypoScript:

plugin.tx_myquizpoll_pi1 {
	templateFile = EXT:myquizpoll/examples/template_poll_simplemodal.html
	isPoll = 0
	useCookiesInDays = 7
	userData.askAtQuestion = 0
	email.send_admin = 1
	advancedStatistics = 1
	myVars.answers {
		input_id = 1
		input_label = 1
		input_checkbox = class="my_checkbox"
		input_text = class="my_text"
		input_area = rows="3"
	}
	dontShowCorrectAnswers = 1
	showAllCorrectAnswers = 1
}
page.includeCSS.simplemodal = EXT:myquizpoll/examples/poll_simplemodal.css

// Customise this line:
page.includeJS.simplemodal = fileadmin/template/files/simplemodal.js

// And if you don“t always include jQuery:
includeLibs.t3jquery = EXT:t3jquery/class.tx_t3jquery.php
page.11 = USER
page.11.userFunc = tx_t3jquery->addJqJS

Umfrage

###REF_ERRORS### ###REF_QUESTIONS### ###REF_SUBMIT_FIELDS### ###HIDDENFIELDS###
###REF_ERRORS### ###REF_QUIZ_ANALYSIS###

Template-Snippets

Instead of VAR_ANSWER_POINTS you can use VAR_QUESTION_POINTS or VAR_NEXT_POINTS (test it). And you can use ###VAR_QUESTION_IMAGE###, ###VAR_QUESTION###, ###VAR_QUESTIONS###, ###VAR_QUESTION_NUMBER###, ###VAR_QUESTION_TYPE###, ###VAR_QUESTION_ANSWERS###, ###VAR_CATEGORY### (current category) and ###VAR_NEXT_CATEGORY### (next category).

In ###TEMPLATE_QUESTION_ANSWER### you can use this too: ###VAR_QA_CATEGORY###, ###VAR_QA_NR###

###VAR_QUESTION_TITLE###
###VAR_QUESTION_NAME###
###VAR_QUESTION_ANSWER###
###REF_DELIMITER###
 

You can use this marker too in the following templates: ###VAR_QA_CATEGORY### (and ###VAR_QA_NR###)

###VAR_QUESTION_ANSWER###
###VAR_QUESTION_ANSWER###
###VAR_QUESTION_ANSWER###
###VAR_QUESTION_ANSWER###
###VAR_QUESTION_ANSWER###
If user results should be hidden, set hidden = 1. Example: see template_statistics.html.
###NAME###:
###EMAIL###:
###HOMEPAGE###:
###SR_FREECAP_NOTICE###
###SR_FREECAP_CANT_READ###

###SR_FREECAP_IMAGE### ###SR_FREECAP_ACCESSIBLE###


Folgende Umfrage wurde soeben abgesendet:

 

###NO_SUBMIT###

###DOUBLE_ENTRY###

###NOT_LOGGEDIN###

###CHEATING###

###CAPTCHA_NOT_OK###

Show all questions and correct answers in the email. (You can use ###REF_QR_ANSWER_ALL### instead of ###REF_QR_ANSWER_CORR### and you can use ###VAR_QUESTION### and ###VAR_QUESTIONS###)
###VAR_QUESTION_TITLE###: ###VAR_QUESTION_NAME###
###REF_QR_ANSWER_ALL### ###REF_DELIMITER###

Email to admin (if email.send_admin > 0):
1. Reference to TEMPLATE_QUIZ_USER_SUBMITED or TEMPLATE_POLL_SUBMITED
2. Reference to TEMPLATE_QUIZ_ANALYSIS_x. x depends on "showAnalysis". REF_QUIZ_ANALYSIS will be empty if showAnalysis and showEvaluation = 0 !
3. Reference to TEMPLATE_EMAIL_ALLANSWERS if "showAllCorrectAnswers = 1".

###SUBJECT### ###EMAIL_TAKEN### ###QUIZ_NAME### ###REF_INTRODUCTION### ###REF_EMAIL_ALLANSWERS###

Email to quiz taker (if email.send_user > 0):
1. Reference to TEMPLATE_QUIZ_USER_SUBMITED or TEMPLATE_POLL_SUBMITED
2. Reference to TEMPLATE_QUIZ_ANALYSIS_x. x depends on "showAnalysis". REF_QUIZ_ANALYSIS will be empty if showAnalysis and showEvaluation = 0 !
3. Reference to TEMPLATE_EMAIL_ALLANSWERS if "showAllCorrectAnswers = 1".

###SUBJECT### ###REF_INTRODUCTION### ###REF_QUIZ_ANALYSIS### ###REF_EMAIL_ALLANSWERS###