Actions

Theme editor/nl: Difference between revisions

From LimeSurvey Manual

(Created page with "Ook ondersteunen wij de [https://github.com/flatlogic/awesome-bootstrap-checkbox Awesome-Bootstrap-Checkbox] plugin. Hierdoor kunt de typische Bootstrap kleur-classes gebruike...")
No edit summary
Line 8: Line 8:
Net als in andere themagebaseerde systemen wordt HTML gebruikt om het sjabloon op te bouwen en te tonen aan de gebruiker. Daarbij worden '''sleutelwoorden''' gebruikt die in accolades ('{', '}') geplaatst worden, deze sleutelwoorden worden later vervangen door de eigenlijke tekst. Hieronder een voorbeeld van het sjabloonbestand en het resultaat zoals het getoond wordt aan de gebruiker.
Net als in andere themagebaseerde systemen wordt HTML gebruikt om het sjabloon op te bouwen en te tonen aan de gebruiker. Daarbij worden '''sleutelwoorden''' gebruikt die in accolades ('{', '}') geplaatst worden, deze sleutelwoorden worden later vervangen door de eigenlijke tekst. Hieronder een voorbeeld van het sjabloonbestand en het resultaat zoals het getoond wordt aan de gebruiker.


<syntaxhighlight lang="html4strict" enclose="div"><center><font face='verdana' color='red'>{SURVEYNAME}</font><br />
<syntaxhighlight lang="html4strict" enclose="div">
<font face='verdana' color='blue'><u>{SURVEYDESCRIPTION}</u></center>
<div style='text-align: center;'><span style='color:red'>My New Survey</span></div>
<div style='text-align: center;'><span style='color:red'>This is a survey written by me to find out what sort of chocolate people like.</span></div>
</syntaxhighlight>
</syntaxhighlight>


Met als resultaat:
Met als resultaat:


<div class="simplebox"><center>'''<span style='color:red'>Mijn nieuwe enquête</span>'''</center>
<div class="simplebox"><div style='text-align: center;'><span style='color:red'>My New Survey</span></div>
<center><u><span style='color:#0000ff'>Ik heb deze enquête gemaakt om te onderzoeken van welke soorten chocolade de mensen houden.</span></u></center></div>
<div style='text-align: center;'><span style='color:red'>This is a survey written by me to find out what sort of chocolate people like.</span></div></div>


Sjablonen bepalen door het gebruik van HTML ook het lettertype en de positie van de tekst en vergelijkbare structuren. Deze structuren worden meestal vastgelegd in cascading style sheets (CSS), die o.a de positie, lettertype, letterkleur en lettergrootte bepalen. Hiervoor worden klassen gebruikt, die refereren aan HTML-objecten in het sjabloon. Binnen LimeSurvey zijn er speciale klassen gedefinieerd, die gebruikt kunnen worden voor het aanpassen van deze elementen. Ook worden sleutelwoorden gebruikt om de inhoud aan te passen, zoals de titel van de enquête en elke vraagtekst.
Sjablonen bepalen door het gebruik van HTML ook het lettertype en de positie van de tekst en vergelijkbare structuren. Deze structuren worden meestal vastgelegd in cascading style sheets (CSS), die o.a de positie, lettertype, letterkleur en lettergrootte bepalen. Hiervoor worden klassen gebruikt, die refereren aan HTML-objecten in het sjabloon. Binnen LimeSurvey zijn er speciale klassen gedefinieerd, die gebruikt kunnen worden voor het aanpassen van deze elementen. Ook worden sleutelwoorden gebruikt om de inhoud aan te passen, zoals de titel van de enquête en elke vraagtekst.


Als je een nieuw sjabloon ontwerpt, overweeg dan om het beschikbaar te stellen aan alle gebruikers van LimeSurvey. Er is een bibliotheek van beschikbare sjablonen, enquêtes en andere aanvullingen, en dat maakt LimeSurvey waardevoller! Kijk hiervoor even in de [http://www.limesurvey.org/en/download-limesurvey-design-templates/com_josetta_menu_control_panel/viewcategory/9-survey-design-templates Sjabloonbibliotheek]
If you create a new custom template, please consider contributing it back to the LimeSurvey community, and make it available to others. With your help, we can grow our repository of templates, surveys, and other add-ons, to make LimeSurvey even better!  
See our [https://www.limesurvey.org/index.php?option=com_sobipro&sid=55:Templates&Itemid=729 LimeSurvey template repository] where you can share your templates.


=Een sjabloon aanmaken=
=Een sjabloon aanmaken=
Line 25: Line 27:
Om een sjabloon aan te kunnen maken (of een bestaande aan te passen) heb je Sjabloonrechten nodig binnen LimeSurvey. Ook heb je toestemming nodig om de bestanden binnen de sjabloonmap te wijzigen.
Om een sjabloon aan te kunnen maken (of een bestaande aan te passen) heb je Sjabloonrechten nodig binnen LimeSurvey. Ook heb je toestemming nodig om de bestanden binnen de sjabloonmap te wijzigen.


<div class="simplebox">'''Waarschuwing:''' Wijzigingen op sjablonen worden doorgevoerd op alle enquêtes die er gebruik van maken! Daarom is het verstandig alleen sjablonen aan te passen, als je een goede HTML-ontwikkelaar bent. </div>
<div class="simplebox">'''Note of Warning:''' As template changes can affect all surveys in an installation. Templates are an advanced feature that can take some experimentation to get correct if you are not familiar with HTML code methods.</div>


Het heeft de voorkeur om een nieuw sjabloon te beginnen via de Sjablooneditor (zie ook onder) in het beheerpaneel. Als je dat wilt, kun je de bestanden ook direct benaderen met je favoriete teksteditor. In dit voorbeeld gebruiken we de Sjablooneditor om een nieuw sjabloon aan te maken. Daarna kun je de bestanden vrijelijk aanpassen met een teksteditor.
Het heeft de voorkeur om een nieuw sjabloon te beginnen via de Sjablooneditor (zie ook onder) in het beheerpaneel. Als je dat wilt, kun je de bestanden ook direct benaderen met je favoriete teksteditor. In dit voorbeeld gebruiken we de Sjablooneditor om een nieuw sjabloon aan te maken. Daarna kun je de bestanden vrijelijk aanpassen met een teksteditor.
Line 31: Line 33:
<div class="simplebox">'''Rechten:''' bij unix/linuxsystemen worden de sjablonen beheerd door de groep en eigenaar die ook de webserver beheerd. Bekijk eerst of je rechten hebt om de bestanden te wijzigen, en dat ze niet van eigenaar veranderen als je ze opslaat. Anders kan het zijn dat ze niet meer benaderbaar zijn in de Sjablooneditor.</div><br />
<div class="simplebox">'''Rechten:''' bij unix/linuxsystemen worden de sjablonen beheerd door de groep en eigenaar die ook de webserver beheerd. Bekijk eerst of je rechten hebt om de bestanden te wijzigen, en dat ze niet van eigenaar veranderen als je ze opslaat. Anders kan het zijn dat ze niet meer benaderbaar zijn in de Sjablooneditor.</div><br />


Een sjabloonbestand is lastig te begrijpen als je er mee begint. Je moet er HTML en CSS voor kennen. Het beste is dan ook om eerst een bestaand sjabloon aan te passen. Kopieer daarvoor een bestaand sjabloon naar een nieuwe map, en wijzig deze bestanden. Daarmee maak je voor jezelf het concept duidelijker.
Template files may seem complex to understand at first. You have to likely understand HTML code, possibly CSS.


Een aantal 'publieke' elementen van LimeSurvey kunnen ook aangepast worden met behulp van sjablonen.
A number of the 'public' elements of LimeSurvey can be adjusted by a series of templates. The next section provides a very brief explanation of these templates.


=De Sjablooneditor=
=The LimeSurvey template editor=


LimeSurvey heeft een editor om gemakkelijk een sjabloon te wijzigen. Alleen gebruikers met sjabloonrechten hebben toegang tot deze editor. Een sjabloon zorgt ervoor dat alle enquêtes die er gebruik van maken er hetzelfde uitzien, maar een foutje is snel gemaakt, waardoor de enquêtes niet meer gebruikt kunnen worden. Beperk daarom de toegang tot gebruikers met verstand van zaken.
To ease the understanding and quick update of a Template, LimeSurvey provides a '''Template Editor''' in the main '''administrative''' toolbar of the application.  This Template Editor is only available to users given the privilege in the User Security settings and to superadministrators.  A template effects all surveys and can render a survey inoperable if not constructed properly.  


Je kunt de bestanden van het sjabloon wijzigen door te klikken op "Sjablooneditor" onder "Configuratie".  
The LimeSurvey template editor allows you to edit the contents of your templates online. Start the Template Editor by clicking on '''Template editor''' in the '''Configuration''' menu.  


[[File:templates.png]]
[[File:templates.png]]
Line 47: Line 49:
[[File:Template-editor-2013-7-10_11_38_16.png|center]]
[[File:Template-editor-2013-7-10_11_38_16.png|center]]


==Sjabloonmenu==
==The template menu==


*'''Bewerk-icoon:''' geeft aan of een sjabloon aangepast mag worden. Een grijs icoon geeft aan dat het sjabloon niet aangepast mag worden, een aanklikbaar icoon dat het aangepast kan worden. Dit kun je aanpassen in de sjabloonrechten.
*'''Create''': Allows you to create a new template. To not have to start from scratch the template 'default' is copied.
*'''Importeren:''' importeren van een sjabloon.
*'''Import''': Allows you to import a template from a ZIP file.
*'''Exporteren:''' exporteert het huidige sjabloon naar een .zip-bestand
*'''Export''': Allows you to export the current template to a ZIP file.
*'''Kopiëren:''' kopieert het huidige sjabloon naar een nieuw sjabloon.
*'''Copy''': Allows you to make a new template by copying the current one.
*'''Hernoemen:''' geeft de mogelijkheid om het sjabloon een nieuwe naam te geven. Dit gebruik je meestal na het kopiëren of importeren van een bestaand sjabloon.
*'''Rename''': Allows you to change the name of the template. Generally used after copying  or importing a template.


In de selectielijst rechts ("Scherm") kun je kiezen welke pagina van de enquête je wilt zien.
The "Screen" drop-down list on the right allows you to choose which particular survey page insie that template you are currently looking at.


==Sjabloon importeren/exporteren/kopiëren==
==Import/export/copy a template==


Als je een sjabloon '''exporteert''', wordt er een zip aangemaakt met alle bestanden (.pstpl-bestanden, plaatjes, style sheets, ...). Deze kun je simpel weer '''importeren''' bij een andere LimeSurvey-installatie. Je kunt ook de zip handmatig kopiëren en daarna uitpakken op de doellokatie. Let er wel op dat je de naam van de map verandert als je dat op de huidige installatie doet.  
When you '''export '''a template, this will create a ZIP-file archive with all the files your template consists of (.pstpl files, images, css files, ...). You can simply '''import '''the exported zip-file at other LimeSurvey systems by using the import feature or you can manually copy the archive to another installation and extract it into the corresponding template directory there.  


Het wordt echter aanbevolen om de LimeSurvey sjabloon import/export/copy functies in de sjabooneditor te gebruiken.
Het wordt echter aanbevolen om de LimeSurvey sjabloon import/export/copy functies in de sjabooneditor te gebruiken.


==Paginastructuur / Sjabloongebruik==
==Page Structure / Template Use==
*'''Welkomstpagina:''' startpage.pstpl, welcome.pstpl, privacy.pstpl, navigator.pstpl, endpage.pstpl
*'''The Welcome Page:''' startpage.pstpl, welcome.pstpl, privacy.pstpl, navigator.pstpl, endpage.pstpl
*'''Vraagpagina:''' startpage.pstpl, survey.pstpl, startgroup.pstpl, groupdescription.pstpl, question.pstpl, endgroup.pstpl
*'''The Questions Pages:''' startpage.pstpl, survey.pstpl, startgroup.pstpl, groupdescription.pstpl, question.pstpl, endgroup.pstpl, endpage.pstpl
*'''Afsluitpagina:''' startpage.pstpl, assessment.pstpl, completed.pstpl, endpage.pstpl
*'''The Final Page:''' startpage.pstpl, assessment.pstpl, completed.pstpl, endpage.pstpl


==Sjabloonbestanden==
==Sjabloonbestanden==


De volgende bestanden worden gebruikt om een enquête op te bouwen, ze moeten aanwezig zijn in elk sjabloon dat je aanmaakt:  
The following template files are used to produce your public survey and must exist in any new template folder you create:
*'''startpage.pstpl:''' De "kop" van elke pagina. Begint met de "<head>" tag, maar de "<html>" tag staat er niet in. Wordt door de scripts aangemaakt. Wees er zeker van dat de startpage.pstpl een <body> tag heeft. Ook al staan de meeste browsers dit toe, dan nog heeft LimeSurvey deze tag nodig om elementen te kunnen wijzigen. Het is niet voor niets dat je veel 'sleutelwoorden' in startpage.pstpl opneemt, alhoewel het nuttig is om de tag {SURVEYNAME} in de titel te zetten. Startpage.pstpl kan code bevatten die in endpage.pstpl afgemaakt wordt, bijvoorbeeld een tabel die je hier opent en in endpage.pstpl weer sluit. Startpage.pstpl en endpage.pstpl files zijn eigenlijk de kop en voettekst van elke pagina van LimeSurvey.
*'''startpage.pstpl:''' Produces the start of each html page. It starts at the "<head>" tag, and should not contain the "<html>" tag. This 'very beginning' of a standard html page is written by the scripts. Please ensure that your startpage.pstpl files contains a <body> tag, even though many browsers do not require strict adherence to the W3 HTML standards, the LimeSurvey script needs to find a <body> tag, to run certain javascript elements. It is not expected that many 'keywords' will be used in the startpage.pstpl file, however you may wish to put the {SURVEYNAME} into the title. The startpage.pstpl file can contain code that ends in the corresponding endpage.pstpl file, so you can start a table in this file and close the table in the endpage.pstpl file. The startpage.pstpl and endpage.pstpl files wrap around every possible page used by LimeSurvey.
*'''survey.pstpl:''' De plaats van de naam en beschrijving van de enquête. Er is geen tegenhanger voor dit gedeelte, dus mocht je HTML willen gebruiken, sluit dan alle tags af aan het eind van dit gedeelte.
*'''survey.pstpl:''' This template is the second used on most pages, and provides a space to put the survey name and description. This template does not have a corresponding 'closing' template, and subsequently you should close all tags opened in this template file (ie: don't leave a table open here because there is nowhere else to close it)
*'''welcome.pstpl:''' Het sjabloon voor het welkomstscherm (of, bij "alles-in-een" enquêtes, het enige scherm). Hier kun je de welkomstboodschap en introductie van de enquête kwijt. Net zoals 'survey.pstpl' is er geen tegenhanger, dus sluit ook hier alle tags af als je die gebruikt.
*'''welcome.pstpl:''' This template is only used in the welcome screen (which is also on the main page for 'all in one' surveys). You can use this to print out the welcome text, and other information that should be provided in the introduction. Like the 'survey.pstpl' file, there is no corresponding 'closing' template, so all tags opened in this template file should be closed as well.
*'''startgroup.pstpl:''' wordt aan het begin van elke vraaggroep getoond. Dit sjabloon heeft de tegenhanger 'endgroup.pstpl', dus je hoeft daar pas de tags te sluiten.
*'''startgroup.pstpl:''' This template can provide a 'summary' wrap around for questions within a group. It has a matching 'endgroup.pstpl' template that can be used to close any opened tags in this file, so you can open a table within this.
*'''groupdescription.pstpl:''' wordt gebruikt om een beschrijving van de groep te geven. Staat apart van startgroup.pstpl, omdat het getoond wordt op zijn eigen pagina terwijl de deelnemer tussen de vraaggroep zit, terwijl het boven de vragen afgebeeld wordt bij opvolgende vraaggroepen. Heeft geen tegenhanger: sluit alle tags af.
*'''groupdescription.pstpl:''' This template file is used to display a description of a group. Please note that in the survey settings you can set if the group description should be shown or not. If not then this file is not included at all.
*'''question.pstpl:''' de plaats van de vraag, antwoord en hulpteksten. In "groepsgeoriënteerde" en "alles-in-een" enquêtes wordt dit gedeelte telkens opnieuw gebruikt. Heeft geen tegenhanger: sluit alle tags af.
*'''question.pstpl:''' This file contains the question, answer and help text sections of your survey, and in the "group by group" and "all in one" surveys this template is cycled repeatedly with each question. There is no corresponding closing file for this and all tags should be closed.
*'''question_start.pstpl:''' bevat de individuele elementen die voor het begin van de vraag gezet worden. Deze worden in 'question.pstpl' via het {QUESTION} sleutelwoord opgenomen. Het is bedoeld om sjabloonontwerpers meer controle te geven hoe een vraag getoond wordt. Vanaf versie 1.87 is dit niet meer nodig: de sleutelwoorden zijn nu direct beschikbaar in question.pstpl. OPMERKING: sommige sjablonen met een question_start.pstpl werken nog wel binnen LimeSurvey 1.x
*'''question_start.pstpl:''' This file contains the individual elements found at the start of a question. It is included within 'question.pstpl' via the {QUESTION} keyword. It is intended to allow template designers more control over the layout of a question. This template sits outside the normal templating system and '''was superseeded (as of LS1.87)'''. All keywords from this template are now available directly in question.pstpl. NOTE: templates using question_start.pstpl will still work at least for a couple more versions of LS 1.x
*'''completed.pstpl:''' wordt getoond als de deelnemer de resultaten verstuurd heeft en de enquête ten einde is. Kan ook gebruikt worden om een "forwarding link" te tonen zoals die gezet is in de instellingen van de enquête.
*'''completed.pstpl:''' This page is displayed as the final page when the survey responses have been saved and the survey is over. It can be used to display a "forwarding link" as set in the survey setup.
*'''endgroup.pstpl:''' sluit een vraaggroep af, en kan gebruikt worden om tags die geopend zijn in startgroup.pstpl te sluiten.
*'''endgroup.pstpl:''' This file closes the group, and can be used to close off any tags opened in the startgroup.pstpl file
*'''navigator.pstpl:''' bevat de knoppen die de navigatiekeuzes "volgende", "vorige", "laatste", "verstuur", "opslaan"  en "wis alles". Wordt gebruikt in alle pagina's behalve de compleet-pagina.
*'''navigator.pstpl:''' This file contains the buttons that navigate through the survey, "next", "prev", "last", "submit", "save so far"  and the "clear all" link. It is used in all pages except the completed page.
*'''printanswers.pstpl:''' hierin staat de de HTML om de gedrukte versie van de enquête te tonen.
*'''printanswers.pstpl:''' This file has the HTML wrapper for the print version of the survey.
*'''print_group.pstpl:''' heeft dezelfde opzet als startgroup.pstpl endgroup.pstpl voor de gedrukte versie van de enquête.
*'''print_group.pstpl:''' This file is the same as startgroup.pstpl endgroup.pstpl but for the print version of the survey.
*'''print_question.pstpl:''' heeft dezelfde opzet als question.pstpl voor de gedrukte versie.
*'''print_question.pstpl:''' This file is the same as question.pstpl but for the print version of the survey.
*'''print_survey.pstpl:''' zelfde betekenis als survey.pstpl maar dan voor de gedrukte versie.
*'''print_survey.pstpl:''' This file is the same as survey.pstpl but for the print version of the survey.


== CSS en JavaScript==
== CSS en JavaScript==
Line 164: Line 166:
In het "Bestandsbeheer"-scherm aan de linkerkant kun je een van de sjabloonbestanden kiezen. De HTML-code zal dan in het "Bewerk"-gedeelte getoond worden. Als je de goede (map)rechten hebt mag je deze aanpassen en opslaan.
In het "Bestandsbeheer"-scherm aan de linkerkant kun je een van de sjabloonbestanden kiezen. De HTML-code zal dan in het "Bewerk"-gedeelte getoond worden. Als je de goede (map)rechten hebt mag je deze aanpassen en opslaan.


Het "Andere bestanden"-gedeelte toont alle andere bestanden in de sjabloonmap. Aan de rechterzijde kun je '''plaatjes of andere bestanden uploaden om te gebruiken in het sjabloon'''. Opmerking: in plaats van een directe link te maken naar het bestand kun je ook het veld {TEMPLATEURL} gebruiken. In plaats van:
The "Other files" window shows a list of all other files in the template directory. You can use the right side to '''upload and select image files (your pics, logos,...) or other files needed to create your template'''. Note: Instead of a link directly to each picture in your template you can use the field string {TEMPLATEURL}.  So instead of:


<syntaxhighlight lang="html4strict" enclose="div">img src='/limesurvey/templates/yourtemplate/mypicture.jpg'</syntaxhighlight> kun je:
<syntaxhighlight lang="html4strict" enclose="div">img src='/limesurvey/templates/yourtemplate/files/mypicture.jpg'</syntaxhighlight>  
You can use {{NewIn|2.50}}:
<syntaxhighlight lang="html4strict" enclose="div">img src='{TEMPLATEURL}files/mypicture.jpg'</syntaxhighlight>


Gebruik in LimeSurvey versies ouder dan 2.50:
Gebruik in LimeSurvey versies ouder dan 2.50:
Line 173: Line 177:
Een voorvertoning van het sjabloon wordt ondertussen onderin het scherm getoond. Er is geen mogelijkheid om binnen LimeSurvey een sjabloonbestand fysiek te verwijderen: dat moet via het bestandsbeheer van de server.
Een voorvertoning van het sjabloon wordt ondertussen onderin het scherm getoond. Er is geen mogelijkheid om binnen LimeSurvey een sjabloonbestand fysiek te verwijderen: dat moet via het bestandsbeheer van de server.


<div class="simplebox">'''Opmerking:''' de meegeleverde sjablonen kunnen niet gewijzigd worden binnen de Sjablooneditor. Als je deze wilt wijzigen, maak dan eerst een kopie, en wijzig deze vervolgens.</div>
<div class="simplebox">'''Note:''' The shipped templates cannot be edited using the template editor. If you want to modify them, create a copy first and modify the copy.</div>


==Locatie van sjabloonbestanden==
==Locatie van sjabloonbestanden==
Line 218: Line 222:


{| class="wikitable alternance"
{| class="wikitable alternance"
|+ Globale klassen
|+ Global classes
|-
|-
! scope="col" | Naam klasse
! scope="col" | Class name
! scope="col" | Onderdeel
! scope="col" | Part
! scope="col" | Vraagtype
! scope="col" | Question type
! scope="col" | Voorbeeld
! scope="col" | Examples
! scope="col" | Opmerking
! scope="col" | Note
|-
|-
! scope="row" | .question
! scope="row" | .question {{ObsoleteIn|30}}
| Elk vraag blok
| All question block
| Elk vraagtype
| All question type
|&lt;p class="question">, &lt;ul class="question">, &lt;table class="question">
|&lt;p class="question">, &lt;ul class="question">, &lt;table class="question">
|
|-
! scope="row" | .ls-answers {{NewIn|3.0}}
| All question block
| All question type
|&lt;div class="ls-answers ">, &lt;ul class="ls-answers ">, &lt;table class="ls-answers">
|  
|  
|-
|-
! scope="row" | .subquestions-list
! scope="row" | .subquestions-list
| Lijst subvragen
| List of subquestion
| Meerkeuzevragen, array vragen
| Multi choice question, array question type
| &lt;ul class="subquestions-list">, &lt;table class="subquestions-list">
| &lt;ul class="subquestions-list">, &lt;table class="subquestions-list">
| .questions-list wordt ook gebruikt
| .questions-list is used too
|-
|-
! scope="row" | .answers-list
! scope="row" | .answers-list
| Lijst antwoorden
| List of answers
| Enkelekeuze, array, Meerdere teksten
| Single choice question, array question type, Multi input text question
| &lt;ul class="answers-list">, &lt;table class="answers-list">
| &lt;ul class="answers-list">, &lt;table class="answers-list">
|  
|  
|-
|-
! scope="row" | .answer-item
! scope="row" | .answer-item
| Het antwoord deel: een antwoord
| The answer part: one answer
| Enkelekeuze, array, Meerdere teksten
| Single choice question, array question type, Multi input text question
| &lt;li class="answer-item">, &lt;td class="answer-item">
| &lt;li class="answer-item">, &lt;td class="answer-item">
|
|
|-
|-
! scope="row" | .noanswer-item
! scope="row" | .noanswer-item
| Het antwoord deel voor geen antwoord
| The answer part for no answer
| Enkelekeuze, array
| Single choice question, array question type
| &lt;li class="noanswer-item">, &lt;td class="noanswer-item">
| &lt;li class="noanswer-item">, &lt;td class="noanswer-item">
| Geen antwoord is ook een antwoord, ze hebben 2 klassen noanswer-item en answer-item
| No answer is an answer too, then have double class noanswer-item and answer-item
|-
|-
! scope="row" | .question-item
! scope="row" | .question-item
| Het vraag deel: een vraag
| The question part: one question
| Meerdere teksten, array
| Multi text question, array question type
| &lt;li class="question-item">, &lt;tr class="question-item">
| &lt;li class="question-item">, &lt;tr class="question-item">
| Sommige antwoorden zijn ook vragen, dan hebben we er veel met class="question-item answer-item"
| Some answer are question too, then we have a lot of class="question-item answer-item"
|-
|-
! scope="row" | .checkbox-list
! scope="row" | .checkbox-list
| Een lijst checkboxen
| A list of checkbox
| Meerkeuze, array getallen (checkbox)  
| Multi choice question, array number (checkbox) question type
| &lt;ul class="checkbox-list">, &lt;tr class="checkbox-list">
| &lt;ul class="checkbox-list">, &lt;tr class="checkbox-list">
| Sommige vraagtypes hebben meerdere lijsten class: zoals checkbox met opmerkingen: class="checkbox-list text-list"
| Some question type have multi list class: like checkbox with comment : class="checkbox-list text-list"
|-
! scope="row" | .checkbox-array  {{NewIn|3.0}}
| A array of checkbox
| Array (numbers) with checkbox option
| &lt;table class="checkbox-list">
|
|-
|-
! scope="row" | .checkbox-item
! scope="row" | .checkbox-item
| Het antwoord deel met een checkbox
| The answer part with a checkbox
| Meerkeuze, array getallen (checkbox)
| Multi choice question, array number (checkbox) question type
| &lt;li class="checkbox-item">, &lt;td class="checkbox-item">
| &lt;li class="checkbox-item">, &lt;td class="checkbox-item">
|
|
|-
|-
! scope="row" | .radio-list
! scope="row" | .radio-list
| Een lijst radioknoppen
| A list of radio item
| Enkelekeuze, array
| Single choice question, array question type (each row)
| &lt;ul class="radio-list">, &lt;tr class="radio-list">
| &lt;ul class="radio-list">, &lt;tr class="radio-list">
|
|-
! scope="row" | .radio-array {{NewIn|3.0}}
| A array of radio item
| Array question type
| &lt;table class="radio-array">
|
|
|-
|-
! scope="row" | .radio-item
! scope="row" | .radio-item
| Het antwoord deel met een radioknop
| The answer part with a radio
| Enkelekeuze, array
| Single choice question, array question type
| &lt;li class="radio-item">, <td class="radio-item">
| &lt;li class="radio-item">, <td class="radio-item">
|
|
|-
|-
! scope="row" | .text-list
! scope="row" | .text-list
| Een lijst tekstinvoer
| A list of text input
| Meerdere teksten, array teksten
| Multi text question type, array of text
| &lt;ul class="text-list">, &lt;tr class="text-list">
| &lt;ul class="text-list">, &lt;tr class="text-list">
|
|
|-
|-
! scope="row" | .text-item
! scope="row" | .text-item
| Het antwoorddeel van tekstinvoer
| The answer part of a text input
| Meerdere teksten, array teksten
| Multi text question type, array of text
| &lt;li class="text-item">, <td class="text-item">
| &lt;li class="text-item">, <td class="text-item">
|
|
|-
|-
! scope="row" | .numeric-list
! scope="row" | .numeric-list
| Een lijst met tekstinvoer alleen numeriek
| A list of text input with numeric only answer
| Meervoudige numerieke invoer, array getallen
| Multi numeric question type, array of number
| &lt;ul class="text-list numeric-list">, &lt;tr class="text-list numeric-list">
| &lt;ul class="text-list numeric-list">, &lt;tr class="text-list numeric-list">
|
|
|-
|-
! scope="row" | .numeric-item
! scope="row" | .number-list
| Het antwoord deel van numerieke invoer
| A list of text input with numeric only answer (each row)
| Meervoudige numerieke invoer, array getallen
| Multi numeric question type, array of number
| &lt;li class="numeric-item">, &lt;td class="numeric-item">
| &lt;ul class="text-list numeric-list">, &lt;tr class="text-list numeric-list">
|
|
|-
|-
! scope="row" | .select-list
! scope="row" | .number-array  {{NewIn|3.0}}
| Een selectie lijst
| The answer part of a numeric input
| Array getallen, dubbele schaal
| Array of number
| &lt;table class="number-array">
|
|-
! scope="row" | .select-list {{ObsoleteIn|2.50}}
| A list of select
| Array numbers, Dual scale array (select)
| &lt;table class="select-list">
| &lt;table class="select-list">
|
|
|-
|-
! scope="row" | .select-item
! scope="row" | .dropdown-list  {{NewIn|2.50}}
| Het antwoord deel van een selectie
| A list of select
| Array getallen, dubbbele schaal, enkelekeuze met  selectie
| Array numbers, Dual scale array (select) (each row)
| &lt;table class="dropdown-list">
|
|-
! scope="row" | .dropdown-array  {{NewIn|3.0}}
| A array of dropdown
| Array numbers, Dual scale array (select)
| &lt;table class="dropdown-array">
|
|-
! scope="row" | .select-item {{ObsoleteIn|2.50}}
| The answer part of a select
| Array numbers, Dual scale array (select), single choice with select
| &lt;p class="select-item">, &lt;td class="select-item">
| &lt;p class="select-item">, &lt;td class="select-item">
|
|
|-
|-
! scope="row" | .hide
! scope="row" | .dropdown-item  {{NewIn|2.50}}
| Gebruikt voor toegankelijkheid: verborgen met CSS maar gelezen met screenreader
| The answer part of a select
| Kort vrije tekst
| Array numbers, Dual scale array (select), single choice with select
| &lt;p class="dropdown-item">, &lt;td class="dropdown-item">
|
|-
! scope="row" | .hide {{ObsoleteIn|3.0}}
| Used for accessibility: hidden with css but read by screenreader, since 2.50 : you can use sr-only from bootstrap
| Short text question
| &lt;label class="hide">
| &lt;label class="hide">
| Kan voor andere doelen gebruikt worden
| Can be used for other purpose
|-
! scope="row" | .ls-js-hidden {{NewIn|3.0}}
| Used for part to be hidden if javascript is activated
| Button for example
| &lt;div class="ls-js-hidden">
| LimeSurvey core used it, but yopu can use it too in your template
|-
! scope="row" | .ls-js-hidden-sr {{NewIn|3.0}}
| Used for accessibility: hide it if js is activated, but always show if user use a screenreader
| Button for example
| &lt;a class="ls-js-hidden-sr">
| Button
|-
|-
! scope="row" | .dontread
! scope="row" | .ls-no-js-hidden {{NewIn|3.0}}
| Gebruikt voor toegankelijkheid: niet te lezen met screenreader
| Used for part to be hidden if javascript is not activated
| Array
| Link
| &lt;th class="dontread">
| &lt;a class="ls-no-js-hidden">
|
| LimeSurvey core used it for inactive link if javascript is not activated
|-
! scope="row" | .ls-label-xs-visibility {{NewIn|3.0}}
|  Label to be hidden in big screen, but show with little screen (with no more table) and to screenreader
| label
| &lt;label class="ls-no-js-hidden">
| Used for label inside table cell of array question type
|-
! scope="row" | .ls-input-group-extra {{NewIn|3.0}}
| Same usage of boostrap input-group-addon, but without the border and the background.
| right suffix
| &lt;div class="ls-input-group-extra">
| Used for right and left suffix (global)
|-
|-
! scope="row" | .checkbox
! scope="row" | .checkbox {{ObsoleteIn|3.0}}
| input[type=checkbox]
| input[type=checkbox]
| Vraag met checkbox
| Question with checkbox
| &lt;input type="checkbox" class="checkbox">
| &lt;input type="checkbox" class="checkbox">
| Alleen voor oudere browsers nodig
| With modern browser: not needed but some old browser need this
|-
|-
! scope="row" | .radio
! scope="row" | .radio {{ObsoleteIn|3.0}}
| input[type=radio]
| input[type=radio]
| Vraag met radioknop
| Question with radio
| &lt;input type="radio" class="radio">
| &lt;input type="radio" class="radio">
| Alleen voor oudere browsers nodig
| With modern browser: not needed but some old browser need this
|-
|-
! scope="row" | .text
! scope="row" | .text
| input[type=text]
| input[type=text]
| Vraag met invoertekst, of textarea
| Question with input text, or textarea
| &lt;textarea class="text">
| &lt;textarea class="text">
|
|
|-
|-
! scope="row" | .answertext
! scope="row" | .answertext
| Array  
| Array question type
| Antwoord deel van array  
| Answer part of array question type
| &lt;th class="answertext">
| &lt;th class="answertext">
|
|
|-
|-
! scope="row" | .col-answers
! scope="row" | .col-answers
| Array  
| Array question type
| Kolom van antwoorden
| Column of answers
| &lt;col class="col-answers">
| &lt;col class="col-answers">
|
|
|-
|-
! scope="row" | .odd .even
! scope="row" | .odd .even {{ObsoleteIn|2.50}}
| Array  
| Array question type
| Afwisseling per kolom
| Alternation for column
| &lt;col class="odd">
| &lt;col class="odd">
|
|
|-
|-
! scope="row" | .odd .even
! scope="row" | .array1 .array2  {{ObsoleteIn|3.0}}
| Array  
| Array question type
| Afwisseling per kolom
| Alternation for line
| &lt;col class="odd">
| &lt;tr class="array1">
|
|
|-
|-
! scope="row" | .array1 .array2
! scope="row" | .ls-odd .ls-even  {{NewIn|3.0}}
| Array  
| Array question type
| Afwisseling per regel
| Alternation for sub-question and Y axis
| &lt;tr class="array1">
| &lt;tr class="ls-odd">
|
|
|}
|}
Line 557: Line 627:
===Alternatieve oplossing voor Internet Explorer===
===Alternatieve oplossing voor Internet Explorer===


Je kunt ook de conditionele klasse in body opnemen (binnen startpage.pstpl) en deze klasse gebruiken in jouw template.css. Deze methode wordt gebruikt in het sjabloon citronade. Toevoegen van een js / no-js klasse om een JavaScript / geen JavaScript systeem te hebben.
You can put conditional class for body in startpage.pstpl, and use this class in your template.css. This method is used in citronade template. Adding a js / no-js class to have javascript / no javascript system.


<source lang="html4strict"><!--[if lt IE 7 ]> <body class="lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie6 ielt7 ielt8 ielt9 no-js"> <![endif]-->
<source lang="html4strict"><!--[if lt IE 7 ]> <body class="lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie6 ielt7 ielt8 ielt9 no-js"> <![endif]-->
Line 585: Line 655:


{|class=wikitable
{|class=wikitable
!'''Sleutelwoord'''!!'''Sjabloon bestand'''!!'''Omschrijving'''
!'''Keyword'''!!'''Template files'''!!'''Description'''
|-
|-
|{SURVEYNAME}||Alle||De titel van de enquête.
|{SURVEYNAME}||All Files||The survey title
|-
|-
|{SURVEYDESCRIPTION}||Alle ||De beschrijving van de enquête.
|{SURVEYDESCRIPTION}||All Files||The survey description
|-
|-
|{WELCOME}||Alle (meestal: welcome.pstpl)|| De welkomst tekst van de enquête.
|{WELCOME}||All files (mainly for welcome.pstpl)||The survey 'welcome' text
|-
|-
|{PERCENTCOMPLETE}||survey.pstpl||Een grafiekje met het percentage dat voltooid is.
|{PERCENTCOMPLETE}||survey.pstpl||A small graph showing the percentage of the survey completed
|-
|-
|{GROUPNAME}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||De naam van de huidige groep.
|{GROUPNAME}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group name
|-
|-
|{GROUPDESCRIPTION}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||De beschrijving van de huidige groep.
|{GROUPDESCRIPTION}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group description
|-
|-
|{NUMBEROFQUESTIONS}||welcome.pstpl||Het aantal vragen in de enquête (alleen het getal).
|{NUMBEROFQUESTIONS}||welcome.pstpl||Displays the total number of questions in the survey (just the number)
|-
|-
|{THEREAREXQUESTIONS}||welcome.pstpl||Toont "Er zijn X vragen in deze enquête." Op plaats van de X staat natuurlijk het aantal vragen. Als er maar een vraag is: "Er is 1 vraag in deze enquête".
|{THEREAREXQUESTIONS}||welcome.pstpl||Displays the sentence "There are X questions in this survey" - from the relevant language file. The X is replaced with the number of questions. Note that this will also work appropriately for singular or plural. If there is only 1 question, it will print "There is 1 question in this survey".
|-
|-
|{CHECKJAVASCRIPT}||Alle (meestal: welcome.pstpl)||Waarschuwing als JavaScript door gebruiker is uitgeschakeld.
|{CHECKJAVASCRIPT}||All files (mainly for welcome.pstpl)||Warning message when end-user browser have javascript disabled
|-
|-
|{QUESTION}||question.pstpl||('''Is verouderd sinds versie 1.87''') Toont de huidige vraagtekst. (Het formaat van {QUESTION} kan gewijzigd worden door 'question_start.pstpl' te wijzigen.) Gebruik het volgende: {QUESTION_TEXT}, {QUESTION_MANDATORY}, {QUESTION_HELP}, {QUESTION_MAN_MESSAGE}, {QUESTION_VALID_MESSAGE} en {QUESTION_INPUT_ERROR_CLASS} en de geschikte HTML voor inkapseling in plaats van {QUESTION}.
|{QUESTION}||Question.pstpl||('''Has been superseeded but the {QUESTION_...} keywords as of LS1.87''') Displays the current question text (The format of {QUESTION} can customised by editing 'question_start.pstpl') Use the following: {QUESTION_TEXT}, {QUESTION_MANDATORY}, {QUESTION_HELP}, {QUESTION_MAN_MESSAGE}, {QUESTION_VALID_MESSAGE} and {QUESTION_INPUT_ERROR_CLASS} and appropriate wrapping HTML instead of {QUESTION}
|-
|-
|{ANSWER}||question.pstpl, print_question.pstpl||het antwoordformulier voor de huidige vraag.
|{ANSWER}||question.pstpl, print_question.pstpl||presents the answer form for the current question
|-
|-
|{SGQ}||question.pstpl, question text||Kan gebruikt worden in de vraagtekst zelf om te refereren aan het invoerveld van de vraag dynamisch door  het tonen van de Survey-Group-Question id van de huidige vraag (sinds versie build 9755).
|{SGQ}||question.pstpl, question text||Can be used in the question text itself, to reference the input field of the question dynamically by displaying the Survey-Group-Question id for the current question. (as of svn build 9755)
|-
|-
|{QUESTIONHELP}||question.pstpl, print_question.pstpl||Toont de helptekst (voorgedefinieerd per vraagtype) van de huidige vraag.
|{QUESTIONHELP}||question.pstpl, print_question.pstpl||Displays help text (predefined tip for question type) for the current question
|-
|-
|{QUESTION_CLASS}||question.pstpl, print_question.pstpl||Unieke klasse voor elk vraagtype. (Wordt toegevoegd in de tags om de vraag heen.)
|{QUESTION_CLASS}||question.pstpl, print_question.pstpl||unique class for each question type. (To be included in the question's wrapping tag.)
|-
|-
|{QUESTION_CODE}||question.pstpl, print_question.pstpl||Toont de huidige vraagcode.
|{QUESTION_CODE}||question.pstpl, print_question.pstpl||Displays the current question code
|-
|-
|{QUESTION_ESSENTIALS}||question.pstpl||De id van de vraag en als een vraag conditioneel is: 'style="display:none;"'. (Wordt toegevoegd in de tags om de vraag heen.)
|{QUESTION_ESSENTIALS}||question.pstpl||the question ID and (if a question is conditional), 'style="display:none;"'. (To be included in the question's wrapping tag.)
|-
|-
|{QUESTION_HELP}||question.pstp, question_start.pstpl||Toont de door de ontwerper van de enquête gemaakte helptekst voor de huidige vraag.
|{QUESTION_HELP}||question.pstp, question_start.pstpl||Displays the user defined help text for the current question
|-
|-
|{QUESTION_TYPE_HELP}||print_question.pstp||Toont de door de ontwerper van de enquête gemaakte helptekst voor de huidige vraag.
|{QUESTION_TYPE_HELP}||print_question.pstp||Displays the user defined help text for the current question
|-
|-
|{QUESTION_INPUT_ERROR_CLASS}||question.pstp, question_start.pstpl||Geeft een klasse bij een invoerfout.
|{QUESTION_INPUT_ERROR_CLASS}||question.pstp, question_start.pstpl||Provides a class if there was user input error
|-
|-
|{QUESTION_ID}||print_question.pstp||Geeft een unieke ID voor elke vraag, hierdoor kunnen vragen specifiek worden opgemaakt.
|{QUESTION_ID}||print_question.pstp||Provides a unique ID for each question to allow styling for specific questions
|-
|-
|{QUESTION_TEXT}||question.pstp, print_question.pstp, question_start.pstpl||Toont de huidige tekstvraag.
|{QUESTION_TEXT}||question.pstp, print_question.pstp, question_start.pstpl||Displays the text for the current question
|-
|-
|{QUESTION_MANDATORY}||question.pstp, print_question.pstp, question_start.pstpl||Toont de vertaalde 'Mandatory' tekst voor de huidige vraag.
|{QUESTION_MANDATORY}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated 'Mandatory' text for the current question
|-
|-
|{QUESTION_MAN_CLASS}||question.pstpl, print_question.pstpl||Klasse als een vraag verplicht is. (Wordt toegevoegd in de tags om de vraag heen.)
|{QUESTION_MAN_CLASS}||question.pstpl, print_question.pstpl||class if a question is mandatory. (To be included in the question's wrapping tag.)
|-
|-
|{QUESTION_MAN_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Toont de vertaalde 'Mandatory' tekst voor de huidige vraag.
|{QUESTION_MAN_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated 'Mandatory' help message text for the current question
|-
|-
|{QUESTION_NUMBER}||print_question.pstpl||Teller van het aantal vragen (lopend).
|{QUESTION_NUMBER}||print_question.pstpl||Incremental count of questions.
|-
|-
|{QUESTION_VALID_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Toont de vertaalde helptekst voor de huidige vraag.
|{QUESTION_VALID_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated valid help message text for the current question
|-
|-
|{QUESTION_SCENARIO}||print_question.pstp||Geeft de 'scenario' tekst voor conditionele vragen.
|{QUESTION_SCENARIO}||print_question.pstp||Prints out the 'scenario' text for conditional questions.
|-
|-
|{NAVIGATOR}||navigator.pstpl||Toont de navigatie knoppen (Volgende, Vorige, Laatste).
|{NAVIGATOR}||navigator.pstpl||Displays navigation buttons (next, prev, last)
|-
|-
|{CLEARALL}||Alle (bedoeld voor: navigator.pstpl)||Toont de "Stoppen wis alle ingevulde antwoorden" link.
|{CLEARALL}||All files (but intended for navigator.pstpl)||Displays the "Exit and Clear Results" link
|-
|-
|{COMPLETED}||completed.pstpl||Toont de boodschap dat de enquête geheel is ingevuld en klaar voor verzending, kan worden aangepast door attribuut_1 en attribuut_2 te vullen.
|{COMPLETED}||completed.pstpl||Displays the 'completed' message for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.
|-
|-
|{URL}||completed.pstpl||Toont de 'url' en 'url tekst'.
|{URL}||completed.pstpl||Displays the survey 'url' and 'url text'
|-
|-
|{PRIVACYMESSAGE}||privacy.pstpl||De privacy informatie wordt getoond als de enquête anoniem is. [[Translating LimeSurvey/nl|De tekst kan worden gewijzigd/vertaald]] in de taalbestanden. Je kunt ook handmatig de door jou gebruikte versie van het sjabloon privacy.pstpl wijzigen.
|{PRIVACYMESSAGE}||privacy.pstpl||The privacy message is shown if you set your survey to be anonymous. [[Translating LimeSurvey|The text can be edited/translated]] in the language files. This can also be changed manually by editing the privacy.pstpl template you wish to use.
|-
|-
|{TEMPLATEURL}||Alle||De URL naar het huidige sjabloon (handig bij refereren aan afbeeldingen in je sjabloon).
|{TEMPLATEURL}||All Files||The URL to the current template location (useful for referencing image files in your template)
|-
|-
|{SUBMITCOMPLETE}||endpage.pstpl||De boodschap (uit de taalbestanden) die aan de respondent toont dat de enquête ingevuld is en dat er op de knop "Verstuur" gedrukt moet worden.
|{SURVEYRESOURCESURL}||All Files||The URL to the current uploaded files for this survey location (useful for referencing image files in your question, group, ....)
|-
|-
|{SUBMITREVIEW}||survey.pstpl||De boodschap (uit de taalbestanden) die aan de respondent toont hoe ze de gegeven antwoorden kunnen bekijken en wijzigen.
|{SUBMITCOMPLETE}||endpage.pstpl||The statement (from the language files) that tells the user they have completed the survey, and to press the "Submit" button
|-
|-
|{SAVEDID}||Alle bestanden||Toont 'Response ID' van respondent
|{SUBMITREVIEW}||survey.pstpl||The statement (from the language files) that tells the user they can review/change the answers they have made by clicking "<< prev"
|-
|-
|{TOKEN:FIRSTNAME}||Alle||***Als de enquête niet anoniem is - dan wordt dit vervangen door de voornaam van de respondent.***
|{SAVEDID}||All Files||Displays 'Response ID' of user
|-
|-
|{TOKEN:LASTNAME}||Alle||***Als de enquête niet anoniem is - dan wordt dit vervangen door de achternaam van de respondent.
|{TOKEN:FIRSTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users first name from the tokens table
|-
|-
|{TOKEN:EMAIL}||Alle||***Als de enquête niet anoniem is - dan wordt dit vervangen door het e-mailadres van de respondent.***
|{TOKEN:LASTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users last name from the tokens table***
|-
|-
|{TOKEN:ATTRIBUTE_1}||Alle||***Als de enquête niet anoniem is - dan wordt dit vervangen door de attribuut_1 behorend bij de respondent.***
|{TOKEN:EMAIL}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users email from the tokens table***
|-
|-
|{TOKEN:ATTRIBUTE_2}||Alle||***Als de enquête niet anoniem is - dan wordt dit vervangen door de attribuut_2 behorend bij de respondent.***
|{TOKEN:ATTRIBUTE_1}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_1 from the tokens table***
|-
|-
|{ANSWERSCLEARED}||Voorkeur: navigator.pstpl||De boodschap "Antwoorden verwijderd" uit de taalbestanden.
|{TOKEN:ATTRIBUTE_2}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_2 from the tokens table***
|-
|-
|{RESTART}||clearall.pstpl||URL om de enquête opnieuw te starten.
|{ANSWERSCLEARED}||Preferably in navigator.pstpl||The "Answers Cleared" statement from the language files
|-
|-
|{CLOSEWINDOW}||Alle (Voorkeur: navigator.pstpl)||URL om het huidge venster te sluiten.
|{RESTART}||clearall.pstpl||URL to restart the survey
|-
|-
|{REGISTERERROR}||register.pstpl||Toont foutmeldingen op de aanmeldingspagina (bijvoorbeeld: "Het e-mailadres dat u opgaf is ongeldig. Probeert u het nog eens.").
|{REGISTERERROR}||register.pstpl||Shows any error messages in the register page (ie: "You must include an email address")
|-
|-
|{REGISTERMESSAGE1}||register.pstpl||De boodschap "Registratie is vereist om deel te nemen aan deze enquête." uit de taalbestanden.
|{REGISTERMESSAGE1}||register.pstpl||The statement "You must be registered to complete this survey" from the language files
|-
|-
|{REGISTERMESSAGE2}||register.pstpl||Details over aanmelden uit de taalbestanden.
|{REGISTERMESSAGE2}||register.pstpl||Details about registering from the language files
|-
|-
|{REGISTERFORM}||register.pstpl||Het actuele formulier voor aanmelding, wordt gewijzigd als attribuut_1 en attribuut_2 zijn gevuld.
|{REGISTERFORM}||register.pstpl||The actual form for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.
|-
|-
|{SAVE}||Specifiek voor navigator.pstpl||Toont de knop 'Sla uw antwoorden tot nu toe op', zodat de respondent de enquête kan opslaan en later de rest kan invullen. Deze knop wordt alleen getoond als de opslaan optie ingeschakeld is.
|{SAVE}||Works suitable on navigator.pstpl||Displays the 'Save your responses so far' button to offer the user to save and come back later to continue the survey. If the Save option is deactivated in the survey properties the tag will not be shown and ignored.
|-
|-
|{LANGUAGECHANGER}||survey.pstpl||Toont een optie om de vraag te wijzigen als de enquête in meerdere talen beschikbaar is.
|{LANGUAGECHANGER}||survey.pstpl||Displays a switch in multilingual surveys to change the question.
|}
|}


Line 718: Line 788:


==Opmaak voortgangmeter==
==Opmaak voortgangmeter==
'''Voor versie 1.87:'''
De afbeelding chart.jpg is een eenvoudig plaatje van een pixel, hiermee wordt de voortgangsmeter opgebouwd in de 'PERCENTCOMPLETE' tabel. Als het plaatje ontbreekt wordt als standaard een kastanjebruin plaatje gebruikt. Als je je eigen kleuren wilt gebruiken, kun je dit plaatje vervangen door een plaatje van jezelf. Het moet een '''JPEG''' zijn van 1 x 1 pixel.
'''Vanaf versie 1.87:'''


De opmaak van de voortgangsmeter kan bepaald worden met CSS.
De opmaak van de voortgangsmeter kan bepaald worden met CSS.
Line 791: Line 855:
<syntaxhighlight lang="php" enclose="div">.lang-fr .en{display:none}
<syntaxhighlight lang="php" enclose="div">.lang-fr .en{display:none}
.lang-en .fr{display:none}</syntaxhighlight>
.lang-en .fr{display:none}</syntaxhighlight>
Je kunt dit gebruiken, maar dan vooral in versies voor 1.92. Vanaf versie 1.92 zijn er betere oplossingen.


==Lay-out van enquête pagina wijzigen==
==Lay-out van enquête pagina wijzigen==
Line 838: Line 900:
==Bestaand logo vervangen==
==Bestaand logo vervangen==


'''NB''': Verwijder eerst het huidige logo als je een nieuw logo upload.
'''Note''': In the '''default'''-Template of 2.50 there is no preembedded logo, please go to [[#Adding_your_own_logo | Adding your own logo]]


1. Om het logo te wijzigen ga naar &bdquo;<u>template.css</u>&rdquo;, je kunt het hier vinden:
1. Om het logo te wijzigen ga naar &bdquo;<u>template.css</u>&rdquo;, je kunt het hier vinden:
Line 870: Line 932:
1. Open het sjabloonbestand &bdquo;<u>startpage.pstpl</u>&rdquo;.
1. Open het sjabloonbestand &bdquo;<u>startpage.pstpl</u>&rdquo;.


[[File:5.PNG|200px]]
[[File:startpage.pstpl.png]]




2. Na de <source lang="html4strict" ><body ... ></source> tag voeg deze regel toe &bdquo;<u>startpage.pstpl</u>&rdquo;:
2. After the <source lang="html4strict" ><div id="topContainer" class="jumbotron"></source> tag add this line to &bdquo;<u>startpage.pstpl</u>&rdquo;:
<source lang="html4strict"><img id="page_logo" src="{TEMPLATEURL}logo.png"><br /></source>
<source lang="html4strict">
<div class="container"><img id='page_logo' src='{TEMPLATEURL}/files/logo.png' class="clearfix pull-right" /></div>
</source>


3. Om een logo toe te voegen, ga naar &bdquo;<u>template.css</u>&rdquo;, je kunt het hier vinden:
3. To upload your own logo go to the template editor and upload your logo.


[[File:6.PNG|500px]]
[[File:uploadyourlogo.png]]


3.2 Voeg toe:
To position your logo please use one of the following css classes:


'''Als je het logo aan de linkerkant wilt hebben:'''
'''Als je het logo aan de linkerkant wilt hebben:'''
Line 889: Line 953:
'''Als je het logo aan de rechterkant wilt hebben:'''
'''Als je het logo aan de rechterkant wilt hebben:'''


<syntaxhighlight lang="php" enclose="div">#page_logo{
<source>clearfix pull-right</source>
   float:right;
}</syntaxhighlight>




'''Als je het logo in het midden wilt hebben:'''
'''Als je het logo in het midden wilt hebben:'''


<syntaxhighlight lang="php" enclose="div">#page_logo{
<source>clearfix center-block</source>
   display: block;
   margin-left: auto;
   margin-right: auto;
}</syntaxhighlight>


==Hetzelfde sjabloon gebruiken met een ander logo==
==Hetzelfde sjabloon gebruiken met een ander logo==
Line 906: Line 964:
Als je hetzelfde sjabloon voor alle enquêtes wilt gebruiken en alleen het logo per enquête wilt wijzigen, dan kun je de {SID} placeholder in het sjabloonbestand the template .pstpl gebruiken om naar een ander plaatje te refereren:
Als je hetzelfde sjabloon voor alle enquêtes wilt gebruiken en alleen het logo per enquête wilt wijzigen, dan kun je de {SID} placeholder in het sjabloonbestand the template .pstpl gebruiken om naar een ander plaatje te refereren:


<syntaxhighlight lang="php" enclose="div"><img src="{TEMPLATEURL}logoImage-{SID}.png"></syntaxhighlight>
<syntaxhighlight lang="php" enclose="div"><img src="{TEMPLATEURL}files/logoImage-{SID}.png"></syntaxhighlight>


==Verwijderen standaard help bij alle vragen (verbergen)==
==Verwijderen standaard help bij alle vragen (verbergen)==
Line 919: Line 977:
==Toon aangepast favicon==
==Toon aangepast favicon==


Een favicon is de kleine afbeelding in je browser in de adresregel en naast je bladwijzers. Je kunt je eigen afbeelding gebruiken door:
A favicon is the little icon you see in the browser's address bar, list of bookmarks or tab. You can display your own icon as follows:
#Een favicon aan te maken.
#Create a favicon - google will find you lots of free favicon generators
#Je noemt dit "favicon.ico" en zet het in de map template
#Name your new favicon "favicon.ico" and place it in your template /files directory
#Voeg de volgende code toe in je '''startpage.pstpl''' voor de </head> tag
#Add the following code to your '''startpage.pstpl''' before the </head> tag


<syntaxhighlight lang="html4strict" enclose="div"><link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" type="image/x-icon">
<syntaxhighlight lang="html4strict" enclose="div"><link rel="shortcut icon" href="{TEMPLATEURL}files/favicon.ico" type="image/x-icon">
<link rel="icon" href="{TEMPLATEURL}favicon.ico" type="image/x-icon"></syntaxhighlight>
<link rel="icon" href="{TEMPLATEURL}files/favicon.ico" type="image/x-icon"></syntaxhighlight>


==Verschillend uiterlijk voor enquête/vraagpagina's==
==Verschillend uiterlijk voor enquête/vraagpagina's==
(''vanaf versie 1.91'')


Als je wilt dat LimeSurvey het uiterlijk van de pagina's afwisselt (dus om en om hetzelfde uiterlijk) kun je de '''.page-odd''' class in je css bestand wijzigen.
Als je wilt dat LimeSurvey het uiterlijk van de pagina's afwisselt (dus om en om hetzelfde uiterlijk) kun je de '''.page-odd''' class in je css bestand wijzigen.
Line 1,012: Line 1,068:
*Kopieer application/views/survey/* naar template/{your_view_directory}/survey/
*Kopieer application/views/survey/* naar template/{your_view_directory}/survey/
*NB: je hoeft alleen de bestanden te kopiëren die je wilt wijzigen, de bestandsstructuur moet hetzelfde blijven als in application/views/survey/
*NB: je hoeft alleen de bestanden te kopiëren die je wilt wijzigen, de bestandsstructuur moet hetzelfde blijven als in application/views/survey/
=Insert Custom CSS or JavaScript files for plugins (version 2.5)=
As of version 2.5, you can use the config.xml file to automatically load plugin files.
*Upload your files to the template /css or /scripts folder
*In /{your_template}/config.xml, add the file paths to the <css> or <js> blocks, something like this:<syntaxhighlight lang="xml" enclose="div"><css>
<filename>css/jquery-ui-custom.css</filename>
<filename>css/bootstrap-slider.css</filename>
<filename>css/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css</filename>
<filename>css/flat_and_modern.css</filename>
<filename>css/template.css</filename>
<filename>css/myCustomPlugin.css</filename>
</css>
<js>
<filename>scripts/template.js</filename>
<filename>scripts/bootstrap-slider.js</filename>
<filename>scripts/myCustomPlugin.js</filename>
</js>
</syntaxhighlight>

Revision as of 16:04, 29 July 2017

Introductie

LimeSurvey heeft een systeem dat het mogelijk maakt om thema's oftewel sjablonen te maken. De sjablonen definiëren het uiterlijk van de pagina's van een enquête. Je kunt in het enquêtebeheer kiezen welk sjabloon gebruikt wordt, en dat aanpassen. Hierbij kunnen het logo en de achtergrondkleuren aangepast worden, maar ook tekstkleuren voor specifieke vragen gemaakt worden.

LimeSurvey wordt geleverd met een set standaardsjablonen. Deze staan in de map templates, voor elk sjabloon is er een map. Hierin staan verschillende soorten bestanden: sjablonen (.pstpl), cascading style sheets (.css), plaatjes (.jpg en .png) en mogelijk andere.

Net als in andere themagebaseerde systemen wordt HTML gebruikt om het sjabloon op te bouwen en te tonen aan de gebruiker. Daarbij worden sleutelwoorden gebruikt die in accolades ('{', '}') geplaatst worden, deze sleutelwoorden worden later vervangen door de eigenlijke tekst. Hieronder een voorbeeld van het sjabloonbestand en het resultaat zoals het getoond wordt aan de gebruiker.

<div style='text-align: center;'><span style='color:red'>My New Survey</span></div>
<div style='text-align: center;'><span style='color:red'>This is a survey written by me to find out what sort of chocolate people like.</span></div>

Met als resultaat:

My New Survey
This is a survey written by me to find out what sort of chocolate people like.

Sjablonen bepalen door het gebruik van HTML ook het lettertype en de positie van de tekst en vergelijkbare structuren. Deze structuren worden meestal vastgelegd in cascading style sheets (CSS), die o.a de positie, lettertype, letterkleur en lettergrootte bepalen. Hiervoor worden klassen gebruikt, die refereren aan HTML-objecten in het sjabloon. Binnen LimeSurvey zijn er speciale klassen gedefinieerd, die gebruikt kunnen worden voor het aanpassen van deze elementen. Ook worden sleutelwoorden gebruikt om de inhoud aan te passen, zoals de titel van de enquête en elke vraagtekst.

If you create a new custom template, please consider contributing it back to the LimeSurvey community, and make it available to others. With your help, we can grow our repository of templates, surveys, and other add-ons, to make LimeSurvey even better! See our LimeSurvey template repository where you can share your templates.

Een sjabloon aanmaken

Om een sjabloon aan te kunnen maken (of een bestaande aan te passen) heb je Sjabloonrechten nodig binnen LimeSurvey. Ook heb je toestemming nodig om de bestanden binnen de sjabloonmap te wijzigen.

Note of Warning: As template changes can affect all surveys in an installation. Templates are an advanced feature that can take some experimentation to get correct if you are not familiar with HTML code methods.

Het heeft de voorkeur om een nieuw sjabloon te beginnen via de Sjablooneditor (zie ook onder) in het beheerpaneel. Als je dat wilt, kun je de bestanden ook direct benaderen met je favoriete teksteditor. In dit voorbeeld gebruiken we de Sjablooneditor om een nieuw sjabloon aan te maken. Daarna kun je de bestanden vrijelijk aanpassen met een teksteditor.

Rechten: bij unix/linuxsystemen worden de sjablonen beheerd door de groep en eigenaar die ook de webserver beheerd. Bekijk eerst of je rechten hebt om de bestanden te wijzigen, en dat ze niet van eigenaar veranderen als je ze opslaat. Anders kan het zijn dat ze niet meer benaderbaar zijn in de Sjablooneditor.


Template files may seem complex to understand at first. You have to likely understand HTML code, possibly CSS.

A number of the 'public' elements of LimeSurvey can be adjusted by a series of templates. The next section provides a very brief explanation of these templates.

The LimeSurvey template editor

To ease the understanding and quick update of a Template, LimeSurvey provides a Template Editor in the main administrative toolbar of the application.  This Template Editor is only available to users given the privilege in the User Security settings and to superadministrators.  A template effects all surveys and can render a survey inoperable if not constructed properly.  

The LimeSurvey template editor allows you to edit the contents of your templates online. Start the Template Editor by clicking on Template editor in the Configuration menu.

Het scherm is vergelijkbaar het enquête administratie-scherm. Je selecteert het sjabloon dat je wilt bewerken/bekijken. Na selectie kunt je vervolgens kiezen uit de openbare enquête-pagina's. Je krijgt een lijst te zien met de sjabloononderdelen van die pagina.

The template menu

  • Create: Allows you to create a new template. To not have to start from scratch the template 'default' is copied.
  • Import: Allows you to import a template from a ZIP file.
  • Export: Allows you to export the current template to a ZIP file.
  • Copy: Allows you to make a new template by copying the current one.
  • Rename: Allows you to change the name of the template. Generally used after copying or importing a template.

The "Screen" drop-down list on the right allows you to choose which particular survey page insie that template you are currently looking at.

Import/export/copy a template

When you export a template, this will create a ZIP-file archive with all the files your template consists of (.pstpl files, images, css files, ...). You can simply import the exported zip-file at other LimeSurvey systems by using the import feature or you can manually copy the archive to another installation and extract it into the corresponding template directory there.

Het wordt echter aanbevolen om de LimeSurvey sjabloon import/export/copy functies in de sjabooneditor te gebruiken.

Page Structure / Template Use

  • The Welcome Page: startpage.pstpl, welcome.pstpl, privacy.pstpl, navigator.pstpl, endpage.pstpl
  • The Questions Pages: startpage.pstpl, survey.pstpl, startgroup.pstpl, groupdescription.pstpl, question.pstpl, endgroup.pstpl, endpage.pstpl
  • The Final Page: startpage.pstpl, assessment.pstpl, completed.pstpl, endpage.pstpl

Sjabloonbestanden

The following template files are used to produce your public survey and must exist in any new template folder you create:

  • startpage.pstpl: Produces the start of each html page. It starts at the "<head>" tag, and should not contain the "<html>" tag. This 'very beginning' of a standard html page is written by the scripts. Please ensure that your startpage.pstpl files contains a <body> tag, even though many browsers do not require strict adherence to the W3 HTML standards, the LimeSurvey script needs to find a <body> tag, to run certain javascript elements. It is not expected that many 'keywords' will be used in the startpage.pstpl file, however you may wish to put the {SURVEYNAME} into the title. The startpage.pstpl file can contain code that ends in the corresponding endpage.pstpl file, so you can start a table in this file and close the table in the endpage.pstpl file. The startpage.pstpl and endpage.pstpl files wrap around every possible page used by LimeSurvey.
  • survey.pstpl: This template is the second used on most pages, and provides a space to put the survey name and description. This template does not have a corresponding 'closing' template, and subsequently you should close all tags opened in this template file (ie: don't leave a table open here because there is nowhere else to close it)
  • welcome.pstpl: This template is only used in the welcome screen (which is also on the main page for 'all in one' surveys). You can use this to print out the welcome text, and other information that should be provided in the introduction. Like the 'survey.pstpl' file, there is no corresponding 'closing' template, so all tags opened in this template file should be closed as well.
  • startgroup.pstpl: This template can provide a 'summary' wrap around for questions within a group. It has a matching 'endgroup.pstpl' template that can be used to close any opened tags in this file, so you can open a table within this.
  • groupdescription.pstpl: This template file is used to display a description of a group. Please note that in the survey settings you can set if the group description should be shown or not. If not then this file is not included at all.
  • question.pstpl: This file contains the question, answer and help text sections of your survey, and in the "group by group" and "all in one" surveys this template is cycled repeatedly with each question. There is no corresponding closing file for this and all tags should be closed.
  • question_start.pstpl: This file contains the individual elements found at the start of a question. It is included within 'question.pstpl' via the {QUESTION} keyword. It is intended to allow template designers more control over the layout of a question. This template sits outside the normal templating system and was superseeded (as of LS1.87). All keywords from this template are now available directly in question.pstpl. NOTE: templates using question_start.pstpl will still work at least for a couple more versions of LS 1.x
  • completed.pstpl: This page is displayed as the final page when the survey responses have been saved and the survey is over. It can be used to display a "forwarding link" as set in the survey setup.
  • endgroup.pstpl: This file closes the group, and can be used to close off any tags opened in the startgroup.pstpl file
  • navigator.pstpl: This file contains the buttons that navigate through the survey, "next", "prev", "last", "submit", "save so far"  and the "clear all" link. It is used in all pages except the completed page.
  • printanswers.pstpl: This file has the HTML wrapper for the print version of the survey.
  • print_group.pstpl: This file is the same as startgroup.pstpl endgroup.pstpl but for the print version of the survey.
  • print_question.pstpl: This file is the same as question.pstpl but for the print version of the survey.
  • print_survey.pstpl: This file is the same as survey.pstpl but for the print version of the survey.

CSS en JavaScript

De volgende twee tags worden gebruikt om de inhoud van de bestanden template.css en template.js toe te voegen in het sjabloon:

  • {TEMPLATECSS}: voegt de links voor standaard css, template.css en template-rtl.css (voor rechts-naar-links-talen) toe.
  • {TEMPLATEJS}: voegt de links toe voor de standaard JavaScript, template.js en alle JavaScriptbestanden nodig om LimeSurvey te laten werken.


Gebruik Bootstrap

LimeSurvey bevat Bootstrap 3, zo kunt u bij uw sjablonen gebruikmaken van de goed gedocumenteerde Bootstrap-classes. Voor meer informatie verwijzen wij u naar de Bootstrap documentatie.

Ook ondersteunen wij de Awesome-Bootstrap-Checkbox plugin. Hierdoor kunt de typische Bootstrap kleur-classes gebruiken (info,waarschuwing,gevaar,enz.) ook met het achtervoegsel "-checkbox", of "radio".

Vervangen van standaard CSS of JavaScript

Sommige vragen gebruiken specifieke onderdelen, waaronder JavaScript en CSS. Als je een functie wilt vervangen, dan kun je het "cascading system" gaan gebruiken. In JavaScript is de laatst gedefinieerde functie (met dezelfde naam) de functie die gebruikt wordt.

Andere sjabloonbestanden

Privacy.pstpl, invitationemail.pstpl, reminderemail.pstpl en confirmationemail.pstpl worden niet meer gebruikt door LimeSurvey en zijn vervangen door standaardwaarden in de taalbestanden bij het sjabloon. E-mailberichten kunnen aangepast worden per enquête.

Standaardpagina's

Er zijn 10 standaardpagina's die een deelnemer mogelijk gaat zien bij het gebruik van LimeSurvey. Elke pagina is weer opgebouwd uit de structuur van het Sjabloon dat gekozen is bij de instellingen van de enquête. Hieronder zie je hoe de structuur samenhangt met de pagina's.

Enquête Pagina:
Sjabloon bestanden
Overzichts-
lijst
Welkomst Vraag Voltooid Wis alles Aanmelden Laad Bewaar Print
Antwoorden
Print
SurveyList
Welcome
Privacy
Navigator
Survey
StartGroup
GroupDescription
Question*
EndGroup
Assessment
Completed
ClearAll
Register
Load
Save
PrintAnswers
Print Survey
Print Group
Print Question
StartPage
EndPage
Template.css

*OPMERKING: Vanaf versie 1.90 vervangt dit question.pstpl en question_start.pstpl. Als je een ouder, aangepast sjabloon gebruikt, moet je deze regel aan het begin van quesion.pstpl toevoegen:

<div {QUESTION_ESSENTIALS} class="{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}">

en question.pstpl afsluiten met:

</div>

*OPMERKING: Voor versie 1.91 worden LimeSurvey js-bestanden niet in het sjabloon opgenomen. Vanaf versie 2 moet je {TEMPLATEJS} gebruiken om de links naar de bestanden te maken. Dat kan in startpage.pstpl of endpage.pstpl. Daar kun je de regel met "{TEMPLATEURL}/template.js" verwijderen en vervangen door {TEMPLATEJS} om je sjabloon te updaten.

Bestandsbeheer

In het "Bestandsbeheer"-scherm aan de linkerkant kun je een van de sjabloonbestanden kiezen. De HTML-code zal dan in het "Bewerk"-gedeelte getoond worden. Als je de goede (map)rechten hebt mag je deze aanpassen en opslaan.

The "Other files" window shows a list of all other files in the template directory. You can use the right side to upload and select image files (your pics, logos,...) or other files needed to create your template. Note: Instead of a link directly to each picture in your template you can use the field string {TEMPLATEURL}.  So instead of:

img src='/limesurvey/templates/yourtemplate/files/mypicture.jpg'

You can use (New in 2.50 ):

img src='{TEMPLATEURL}files/mypicture.jpg'

Gebruik in LimeSurvey versies ouder dan 2.50:

img src='{TEMPLATEURL}mypicture.jpg'

Een voorvertoning van het sjabloon wordt ondertussen onderin het scherm getoond. Er is geen mogelijkheid om binnen LimeSurvey een sjabloonbestand fysiek te verwijderen: dat moet via het bestandsbeheer van de server.

Note: The shipped templates cannot be edited using the template editor. If you want to modify them, create a copy first and modify the copy.

Locatie van sjabloonbestanden

LimeSurvey slaat het sjabloon op in een aparte submap binnen de map /templates, die weer onderdeel uitmaakt van alle publieke bestanden van LimeSurvey. Aangepaste (gebruikers)sjablonen worden in de map /upload/templates geplaatst.

Om een nieuw sjabloon te maken, klik je op het icoon aanmaken naast de selectie van het scherm.

Er moet ALTIJD een map "default" in /templates staan. Deze wordt gebruikt indien het gekozen sjabloon niet (meer) bestaat. Deze map is standaard aanwezig bij de installatie.

Je kunt geüploade plaatjes als volgt gebruiken:

{TEMPLATEURL}filename.xyz

Opmaak vragen

Het toevoegen van stijlen aan vragen is eenvoudig: ieder vraagtype heeft zijn eigen klasse. Verplichte vragen hebben daarbij een aanvullende verplicht-klasse. Voorbeeld van een optionele vraag:

<div id="question5" class="gender">
...
</div>

en van een verplichte vraag:

<div id="question5" class="gender mandatory">
...
</div>

en als de verplichte vraag niet door de validatie komt:

<div id="question5" class="gender mandatory input-error">
...
</div>

en als de vraag niet correct beantwoordt wordt:

<div id="question6" class="text-short input-error">
...
</div>

Globale klassen voor vragen

Deze klassen kunnen door elk vraagtype gebruikt worden, een vraagtype kan één of meerdere klassen gebruiken.

Global classes
Class name Part Question type Examples Note
.question (Obsolete since 30) All question block All question type <p class="question">, <ul class="question">, <table class="question">
.ls-answers (New in 3.0 ) All question block All question type <div class="ls-answers ">, <ul class="ls-answers ">, <table class="ls-answers">
.subquestions-list List of subquestion Multi choice question, array question type <ul class="subquestions-list">, <table class="subquestions-list"> .questions-list is used too
.answers-list List of answers Single choice question, array question type, Multi input text question <ul class="answers-list">, <table class="answers-list">
.answer-item The answer part: one answer Single choice question, array question type, Multi input text question <li class="answer-item">, <td class="answer-item">
.noanswer-item The answer part for no answer Single choice question, array question type <li class="noanswer-item">, <td class="noanswer-item"> No answer is an answer too, then have double class noanswer-item and answer-item
.question-item The question part: one question Multi text question, array question type <li class="question-item">, <tr class="question-item"> Some answer are question too, then we have a lot of class="question-item answer-item"
.checkbox-list A list of checkbox Multi choice question, array number (checkbox) question type <ul class="checkbox-list">, <tr class="checkbox-list"> Some question type have multi list class: like checkbox with comment : class="checkbox-list text-list"
.checkbox-array (New in 3.0 ) A array of checkbox Array (numbers) with checkbox option <table class="checkbox-list">
.checkbox-item The answer part with a checkbox Multi choice question, array number (checkbox) question type <li class="checkbox-item">, <td class="checkbox-item">
.radio-list A list of radio item Single choice question, array question type (each row) <ul class="radio-list">, <tr class="radio-list">
.radio-array (New in 3.0 ) A array of radio item Array question type <table class="radio-array">
.radio-item The answer part with a radio Single choice question, array question type <li class="radio-item">,
.text-list A list of text input Multi text question type, array of text <ul class="text-list">, <tr class="text-list">
.text-item The answer part of a text input Multi text question type, array of text <li class="text-item">,
.numeric-list A list of text input with numeric only answer Multi numeric question type, array of number <ul class="text-list numeric-list">, <tr class="text-list numeric-list">
.number-list A list of text input with numeric only answer (each row) Multi numeric question type, array of number <ul class="text-list numeric-list">, <tr class="text-list numeric-list">
.number-array (New in 3.0 ) The answer part of a numeric input Array of number <table class="number-array">
.select-list (Obsolete since 2.50) A list of select Array numbers, Dual scale array (select) <table class="select-list">
.dropdown-list (New in 2.50 ) A list of select Array numbers, Dual scale array (select) (each row) <table class="dropdown-list">
.dropdown-array (New in 3.0 ) A array of dropdown Array numbers, Dual scale array (select) <table class="dropdown-array">
.select-item (Obsolete since 2.50) The answer part of a select Array numbers, Dual scale array (select), single choice with select <p class="select-item">, <td class="select-item">
.dropdown-item (New in 2.50 ) The answer part of a select Array numbers, Dual scale array (select), single choice with select <p class="dropdown-item">, <td class="dropdown-item">
.hide (Obsolete since 3.0) Used for accessibility: hidden with css but read by screenreader, since 2.50 : you can use sr-only from bootstrap Short text question <label class="hide"> Can be used for other purpose
.ls-js-hidden (New in 3.0 ) Used for part to be hidden if javascript is activated Button for example <div class="ls-js-hidden"> LimeSurvey core used it, but yopu can use it too in your template
.ls-js-hidden-sr (New in 3.0 ) Used for accessibility: hide it if js is activated, but always show if user use a screenreader Button for example <a class="ls-js-hidden-sr"> Button
.ls-no-js-hidden (New in 3.0 ) Used for part to be hidden if javascript is not activated Link <a class="ls-no-js-hidden"> LimeSurvey core used it for inactive link if javascript is not activated
.ls-label-xs-visibility (New in 3.0 ) Label to be hidden in big screen, but show with little screen (with no more table) and to screenreader label <label class="ls-no-js-hidden"> Used for label inside table cell of array question type
.ls-input-group-extra (New in 3.0 ) Same usage of boostrap input-group-addon, but without the border and the background. right suffix <div class="ls-input-group-extra"> Used for right and left suffix (global)
.checkbox (Obsolete since 3.0) input[type=checkbox] Question with checkbox <input type="checkbox" class="checkbox"> With modern browser: not needed but some old browser need this
.radio (Obsolete since 3.0) input[type=radio] Question with radio <input type="radio" class="radio"> With modern browser: not needed but some old browser need this
.text input[type=text] Question with input text, or textarea <textarea class="text">
.answertext Array question type Answer part of array question type <th class="answertext">
.col-answers Array question type Column of answers <col class="col-answers">
.odd .even (Obsolete since 2.50) Array question type Alternation for column <col class="odd">
.array1 .array2 (Obsolete since 3.0) Array question type Alternation for line <tr class="array1">
.ls-odd .ls-even (New in 3.0 ) Array question type Alternation for sub-question and Y axis <tr class="ls-odd">

Voorbeelden van vragen met klassen

Kort vrije tekst vraagtype

<p class="question answer-item text-item ">
<label class="hide label" for="answerSGQA">Answer</label><input type="text" value="" id="answerSGQA" name="SGQA" size="50" class="text  empty">
</p>

Meerdere korte vrije teksten vraagtype

<ul class="subquestions-list questions-list text-list">
  <li class="question-item answer-item text-item" id="javatbdSGQA">
    <label for="answerSGQA">Some example subquestion</label>
     <span><input type="text" value="" id="answerSGQA" name="SGQA" size="20" class="text empty"></span>
  </li>
</ul>

Array vraagtype

<table class="question subquestion-list questions-list ">
	<caption class="hide read">Some explanation for accessibility.</caption>
	<colgroup class="col-responses">
		<col width="50%" class="col-answers">
		<col width="25%" class="odd">
		<col width="13.3%" class="col-no-answer even">
	</colgroup>
	<thead>
		<tr class="array1 dontread">
			<td>&nbsp;</td>
			<th>1</th>
			<th>No answer</th>
		</tr>
	</thead>
	<tbody>
		<tr class="array2 answers-list radio-list" id="javatbdSGQ">
			<th width="20%" class="answertext">Some example subquestion
			</th>
			<td class="answer_cell_001 answer-item radio-item">
				<label for="answerSGQA" class="hide read">1</label>
				<input type="radio" value="1" id="answerSGQA" name="SGQA" class="radio">
			</td>
			<td class="answer-item radio-item noanswer-item">
				<label for="answerSGQA" class="hide read">No answer</label>
				<input type="radio" value="" id="answerSGQA" name="SGQA" class="radio">
			</td>
		</tr>
	</tbody>
</table>

De klassen per vraagtype

Vraagtype Klasse ID
5 punt keuze .choice-5-pt-radio 5
Array (10 punten) .array-10-pt B
Array (5 punten) .array-5-pt A
Array Dubbele schaal .array-flexible-duel-scale 1
Array (Meer, gelijk, Minder) .array-increase-same-decrease E
Array (getallen) .array-multi-flexi :
Array (teksten) .array-multi-flexi-text ;
Array (Ja/Nee/Weet niet) .array-yes-uncertain-no C
Array .array-flexible-row F
Array met kolom .array-flexible-column H
Boilerplaat .boilerplate X
Datum .date D
Geslacht .gender G
Extra lange vrije tekst .text-huge U
Taalkeuze .language I
Lijst (Dropdown) .list-dropdown !
Lijst (Radioknoppen) .list-radio L
Lijst met commentaar .list-with-comment O
Lang vrije tekst .text-long T
Meervoudige numerieke invoer .numeric-multi K
Multiple options .multiple-opt M
Meerkeuzevraag met opmerkingen .multiple-opt-comments P
Meerdere korte vrije teksten .multiple-short-txt Q
Numerieke invoer .numeric N
Rangschikken .ranking R
Kort vrije tekst .text-short S
Ja/Nee .yes-no Y

De volledige lijst met validatieklassen

NB: Voor versie 1.92 waren alleen .mandatory en .input-error beschikbaar.

Deze klassen kunnen gebruikt worden om de stijl van hulp- en/of validatiemeldingen te wijzigen.

De .hide-tip en .input-error opties staan standaard op verbergen ("hidden"), maar worden getoond ("display") als er fouten optreden, en worden verborgen als de fouten gecorrigeerd zijn.

Zo wordt voorkomen dat er popup's getoond worden voor fouten. In plaats daarvan verschijnen/verdwijnen de mededelingen, en ze kunnen van kleur voorzien worden afhankelijk van de fout.

Ook kun je eerst een vriendelijk kleurschema gebruiken als de deelnemer meer informatie nodig heeft. Daarna kun je de kleuren feller maken als de deelnemer geen juiste waarden invoert.

Doel CSS Klasse Beschrijving
Mandatory .mandatory de vraag is verplicht
User input error .input-error er is minstens een validatiefout
Hide Tip .hide-tip ingevuld als je de hide_tip- optie gebruikt
Num answers .em_num_answers voor min_answers en max_answers
Value range .em_value_range voor min/max_num_value_n en multiflexible_min/max
Sum range .em_sum_range voor min/max/equals_num_value
Regex validation .em_regex_validation voor reguliere-expressie validatie van de vraag
Question-level validation function .em_q_fn_validation voor de em_validation_q optie
Subquestion-level validation function .em_sq_fn_validation voor de em_validation_sq optie
Other comment mandatory .em_other_comment_mandatory voor de other_comment_mandatory optie - wordt toegveoegd als "anders" geselecteerd is maar het begeleidend commentaar niet ingevuld is.

Stijlen importeren in je aangepaste sjabloon

De aangepaste stijlen voor vragen staan tegen het eind van het CSS-bestand van de sjabloon, en starten met:

/* --------------------------- START: Question styles  ------------------------------ */

Mocht je een aangepast sjabloon willen wijzigen, dan moet je eerst alle tekst onder dit commentaar templates/default/template.css (voor tabel-gebaseerde layouts) of template/limespired/template.css (voor CSS-gebaseerde layouts) in je eigen bestand kopiëren.

Conditionele stylesheets voor Internet Explorer

Omdat IE6 en IE7 qua webpaginaopbouw behoorlijk afwijken van de rest van de browsers zijn er speciale conditionele stylesheets aanwezig om sjablonen goed te kunnen tonen.

<!--[if IE]>
  <link rel="stylesheet" type="text/css" href="{TEMPLATEURL}IE_fix_all-versions.css" />
<![endif]-->
<!--[if lt IE 7]>
  <link rel="stylesheet" type="text/css" href="{TEMPLATEURL}IE_fix_older-than-7.css" />
<![endif]-->
<!--[if IE 8]>
		<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_8.css" />
<![endif]-->

Kopieer de bovenstaande code in jouw startpage.pstpl, en kopieer de beide IE-stylesheets van ofwel /templates/default of wel /templates/limespired, afhankelijk van je lay-out.

Opmerking: als je deze stijlen in je eigen stylesheet verwerkt zul je ze vast en zeker moeten aanpassen.

Alternatieve oplossing voor Internet Explorer

You can put conditional class for body in startpage.pstpl, and use this class in your template.css. This method is used in citronade template. Adding a js / no-js class to have javascript / no javascript system.

<!--[if lt IE 7 ]> <body class="lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie6 ielt7 ielt8 ielt9 no-js"> <![endif]-->
<!--[if IE 7 ]> <body class="lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie7 ielt8 ielt9 no-js"> <![endif]-->
<!--[if IE 8 ]> <body class="lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie8 ielt9  no-js"> <![endif]-->
<!--[if IE 9 ]> <body class="lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie9 no-js"> <![endif]-->
<!--[if gt IE 9]><!--><body id="body" class="lang-{SURVEYLANGUAGE} {SURVEYFORMAT} no-js"><!--<![endif]-->
<script type='text/javascript'>/*<![CDATA[*/(function(H){ H.className=H.className.replace(/\bno-js\b/,'js') })(document.getElementsByTagName('body')[0]);/*]]>*/</script>

Gebruik dan in template.css:

.ie6{/*voor IE6*/}
.ielt8{/*voor IE6 en IE7*/}
.ie{/*internet explorer*/}

Rechts-naar-links(RTL) talen en uitlijnen

De teksteditor in LimeSurvey kan RTL teksten opnemen. Maar als er volledig uitgelijnd wordt toont deze de tekst in de leesrichting van links naar rechts. Dit is alleen een beeldfout: tijdens de enquête wordt de tekst correct van rechts naar links afgebeeld.

Sleutelwoorden

Sleutelwoorden in een sjabloon worden vervangen door de informatie uit de enquête. Ze worden aangeduid met accolades, voorbeeld: {SURVEYNAME}.

De volgende sleutelwoorden worden vervangen in het sjabloon tijdens de opbouw voor de deelnemers. Ze werken op bijna iedere pagina, behalve de Afsluitpagina. (De woorden kunnen ook in common.php opgezocht worden, of anders in index.php)

Keyword Template files Description
{SURVEYNAME} All Files The survey title
{SURVEYDESCRIPTION} All Files The survey description
{WELCOME} All files (mainly for welcome.pstpl) The survey 'welcome' text
{PERCENTCOMPLETE} survey.pstpl A small graph showing the percentage of the survey completed
{GROUPNAME} startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl Displays the current group name
{GROUPDESCRIPTION} startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl Displays the current group description
{NUMBEROFQUESTIONS} welcome.pstpl Displays the total number of questions in the survey (just the number)
{THEREAREXQUESTIONS} welcome.pstpl Displays the sentence "There are X questions in this survey" - from the relevant language file. The X is replaced with the number of questions. Note that this will also work appropriately for singular or plural. If there is only 1 question, it will print "There is 1 question in this survey".
{CHECKJAVASCRIPT} All files (mainly for welcome.pstpl) Warning message when end-user browser have javascript disabled
{QUESTION} Question.pstpl (Has been superseeded but the {QUESTION_...} keywords as of LS1.87) Displays the current question text (The format of {QUESTION} can customised by editing 'question_start.pstpl') Use the following: {QUESTION_TEXT}, {QUESTION_MANDATORY}, {QUESTION_HELP}, {QUESTION_MAN_MESSAGE}, {QUESTION_VALID_MESSAGE} and {QUESTION_INPUT_ERROR_CLASS} and appropriate wrapping HTML instead of {QUESTION}
{ANSWER} question.pstpl, print_question.pstpl presents the answer form for the current question
{SGQ} question.pstpl, question text Can be used in the question text itself, to reference the input field of the question dynamically by displaying the Survey-Group-Question id for the current question. (as of svn build 9755)
{QUESTIONHELP} question.pstpl, print_question.pstpl Displays help text (predefined tip for question type) for the current question
{QUESTION_CLASS} question.pstpl, print_question.pstpl unique class for each question type. (To be included in the question's wrapping tag.)
{QUESTION_CODE} question.pstpl, print_question.pstpl Displays the current question code
{QUESTION_ESSENTIALS} question.pstpl the question ID and (if a question is conditional), 'style="display:none;"'. (To be included in the question's wrapping tag.)
{QUESTION_HELP} question.pstp, question_start.pstpl Displays the user defined help text for the current question
{QUESTION_TYPE_HELP} print_question.pstp Displays the user defined help text for the current question
{QUESTION_INPUT_ERROR_CLASS} question.pstp, question_start.pstpl Provides a class if there was user input error
{QUESTION_ID} print_question.pstp Provides a unique ID for each question to allow styling for specific questions
{QUESTION_TEXT} question.pstp, print_question.pstp, question_start.pstpl Displays the text for the current question
{QUESTION_MANDATORY} question.pstp, print_question.pstp, question_start.pstpl Displays the translated 'Mandatory' text for the current question
{QUESTION_MAN_CLASS} question.pstpl, print_question.pstpl class if a question is mandatory. (To be included in the question's wrapping tag.)
{QUESTION_MAN_MESSAGE} question.pstp, print_question.pstp, question_start.pstpl Displays the translated 'Mandatory' help message text for the current question
{QUESTION_NUMBER} print_question.pstpl Incremental count of questions.
{QUESTION_VALID_MESSAGE} question.pstp, print_question.pstp, question_start.pstpl Displays the translated valid help message text for the current question
{QUESTION_SCENARIO} print_question.pstp Prints out the 'scenario' text for conditional questions.
{NAVIGATOR} navigator.pstpl Displays navigation buttons (next, prev, last)
{CLEARALL} All files (but intended for navigator.pstpl) Displays the "Exit and Clear Results" link
{COMPLETED} completed.pstpl Displays the 'completed' message for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.
{URL} completed.pstpl Displays the survey 'url' and 'url text'
{PRIVACYMESSAGE} privacy.pstpl The privacy message is shown if you set your survey to be anonymous. The text can be edited/translated in the language files. This can also be changed manually by editing the privacy.pstpl template you wish to use.
{TEMPLATEURL} All Files The URL to the current template location (useful for referencing image files in your template)
{SURVEYRESOURCESURL} All Files The URL to the current uploaded files for this survey location (useful for referencing image files in your question, group, ....)
{SUBMITCOMPLETE} endpage.pstpl The statement (from the language files) that tells the user they have completed the survey, and to press the "Submit" button
{SUBMITREVIEW} survey.pstpl The statement (from the language files) that tells the user they can review/change the answers they have made by clicking "<< prev"
{SAVEDID} All Files Displays 'Response ID' of user
{TOKEN:FIRSTNAME} All Files ***If survey answers are NOT ANONYMOUS - gets replaced with the users first name from the tokens table
{TOKEN:LASTNAME} All Files ***If survey answers are NOT ANONYMOUS - gets replaced with the users last name from the tokens table***
{TOKEN:EMAIL} All Files ***If survey answers are NOT ANONYMOUS - gets replaced with the users email from the tokens table***
{TOKEN:ATTRIBUTE_1} All Files ***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_1 from the tokens table***
{TOKEN:ATTRIBUTE_2} All Files ***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_2 from the tokens table***
{ANSWERSCLEARED} Preferably in navigator.pstpl The "Answers Cleared" statement from the language files
{RESTART} clearall.pstpl URL to restart the survey
{REGISTERERROR} register.pstpl Shows any error messages in the register page (ie: "You must include an email address")
{REGISTERMESSAGE1} register.pstpl The statement "You must be registered to complete this survey" from the language files
{REGISTERMESSAGE2} register.pstpl Details about registering from the language files
{REGISTERFORM} register.pstpl The actual form for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.
{SAVE} Works suitable on navigator.pstpl Displays the 'Save your responses so far' button to offer the user to save and come back later to continue the survey. If the Save option is deactivated in the survey properties the tag will not be shown and ignored.
{LANGUAGECHANGER} survey.pstpl Displays a switch in multilingual surveys to change the question.

Invoervelden

Elk invoertype heeft een eigen klasse, hierdoor kun je in de CSS eigen opmaak voor knoppen en invoervelden toevoegen in je "startpage.pstpl". De klassen zijn:

  • submit (submit knoppen)
  • text (Tekst invoer - voor korte vrije tekst, datum en numerieke invoer)
  • answertext (tekst van antwoorden)
  • radio (radioknoppen)
  • checkbox (checkboxen)
  • select (select / lijst)
  • textarea (lange tekst)
  • clearall De "Stoppen, verwijder alle ingevulde antwoorden" link
  • rank Het vraagtype ranking. Wijzig niet de kleur van de selectbox of de text boxes (die worden al eerder ingesteld), je kunt wel o.a. de background colour, text colour, size wijzigen voor de andere onderdelen.
  • graph De "percentage voltooid" weergave.
  • innergraph onderdeel van de graph met het percentage. Je kunt de kleur wijzigen.
  • question Algemene instellingen voor elke vraag die in een tabel getoond wordt. Je kunt hier de font size en colour instellen, zodat je een standaardwaarde hebt.
  • mandatory  Verplichte vragen.
  • input-error Invoerfout van gebruiker - bijvoorbeeld: verplichte vraag of vraag met validatie.
  • array1 en array2 Deze twee worden afgewisseld bij het tonen van het bereik van antwoorden bij array type vragen. Je kunt dan een verschillende background colour instellen. Array1 wordt ook gebruikt voor de koppen bij de array type vragen.
  • errormandatory Zet de kleur en stijl van de tekst: "Deze vraag is verplicht".
  • warningjs Zet de kleur en stijl van de waarschuwing als de gebruiker JavaScript in de browser heeft uitgeschakeld.

Er zijn ook onderdelen die op ID kunnen worden benaderd (#ID in CSS):

  • surveycontact (De tekst over contact op de beginpagina)
  • tokenmessage (gebruikt voor meldingen in de enquête, bijvoorbeeld: je sessie is verlopen.)

Een voorbeeld van het gebruik van deze klassen in de stylesheets is het sjabloon "bubblegum".

Omdat je alle onderdelen van HTML kunt wijzigen, is er geen reden om in je sjablonen, eigen "

" toe te voegen.

Opmaak voortgangmeter

De opmaak van de voortgangsmeter kan bepaald worden met CSS.

Om de achtergrondkleur te wijzigen moet je aan het eind van je sjabloon css-bestand toevoegen:

#progress-wrapper .ui-widget-header {
 background-color: #3300FF;
}

Je kunt ook de rand wijzigen:

#progress-wrapper .ui-widget-content,
#progress-wrapper .ui-widget-header {
 border: 1px solid #FF0000;
}

Extra functies voor ontwikkelaars

Vanaf versie 0.99 zijn er enkele wijzigingen van gebruikers opgenomen in LimeSurvey. De geavanceerde mogelijkheden vereisen soms wijzigingen in de broncode en dienen dus zorgvuldig te worden gedaan om geen open deur te gaan houden.

Basis CMS Integratie ondersteuning

Ontraden: Deze functie is vervallen met ingang van versie 2.0

Om LimeSurvey in een CMS te integreren, gebruik deze opties in config.php:

// Lees de tekst onder het plaatje

$embedded = false;
$embedded_inc = "";               // pad naar CMS-code,  optioneel
$embedded_headerfunc = "";        // bijv. COM_siteHeader voor geeklog
$embedded_footerfunc = "";        // bijv. COM_siteFooter voor geeklog

Om dit te gebruiken, moet dus $embedded = true; zijn. Je kunt met de variabele $embedded_inc code van de CMS toevoegen (include).  Met de variabelen $embedded_headerfunc en $embedded_footerfunc, kun je functies (die in de CMS-code staan) aanroepen om te zorgen voor de kop en voet, anders gelden de standaardwaarden van LimeSurvey.

Ondersteuning voor je eigen JavaScript

Soms wil een gebruiker JavaScript op de enquête pagina's gebruiken, maar dat kan dan niet door de aanroep van checkconditions() in de BODY. Deze aanroep is vervangen door een JavaScript functie in de HEAD die controleert op de aanwezigheid van checkconditions() en template_onload() voor ze aan te roepen.  Hierdoor kan een ontwerper van sjablonen een eigen template_onload() functie in de HEAD maken.

Vanaf versie 1.87:

  • Filter HTML op XSS - in Instellingen -> Beveiliging, zet "Filter HTML op XSS" op Nee.
  • Vul je script in de bron van een vraagbeschrijving of vraaggroepbeschrijving.
  • Meer informatie.

Video over sjablonen

Deze video toont de basis en geavanceerde sjabloonfuncties die voor elke gebruiker beschikbaar zijn. Dit is het wijzigen van het uiterlijk van de schermen en het toevoegen van aangepaste grafieken. Je loopt stap voor stap door de acties met sjablonen zoals, het wijzigen, voorvertonen, importeren, exporteren, wijzigen opmaak van vragen in de CSS en het wijzigen van diverse enquête pagina's.

video - eigen sjabloon maken

TIPS

Taalafhankelijkheden

Als je in een voettekst een regel wilt hebben met een helptekst die taalafhankelijk is, dan kun je in het .pstl bestand een regel optioneel tonen of verbergen afhankelijk van de taal. In template.css kan de pseudo selector :lang gebruikt worden, maar om meer compatibel te zijn, gebruiken we een class.

Voorbeeld, met een tekst in het Frans en het Engels in de voet, dus in endpage.pstpl:

<div class="fr" lang="fr">Pour de l'aide en direct appelez le 000000</div>
<div class="en" lang="en">For some help, please call 000000</div>

en in template.css

.lang-fr .en{display:none}
.lang-en .fr{display:none}

Lay-out van enquête pagina wijzigen

Bij het wijzigen van een sjabloon kan het sjabloon aan een enquête gekoppeld worden. De enquête overzichtspagina, die wordt getoond op www.yourdomain.org/limesurveyinstallfolder, toont al je enquêtes.

Om je huidige sjabloon ook voor deze pagina te gebruiken, moet je de bijbehorende instelling bij de Instellingen wijzigen. In oudere versies kan dit gedaan worden door de $defaulttemplate instelling te kopiëren uit config-defaults.php naar config.php, en wijzig het in $defaulttemplate = 'yourtemplatename';

Importeren/Exporteren van sjabloon : Mac gebruikers

NB: Mac OSX standaard archief utility kan problemen hebben met gegenereerde zip folders.

een oplossing is om de unzip van unix te gebruiken op de commandoregel:

$ unzip template.zip -d template

Archive: template.zip

 inflating: template/startpage

 inflating: ...

of met gecompileerde scripts:

http://homepage.mac.com/roger_jolly/software/

Wijzigen sjabloon verkeerslicht van rood in groen

Als je het nog niet gedaan hebt, zet de map admin op read/write/execute (777). De bestanden in de map mogen echter worden gezet op read/execute only (chmod 755).

Ga naar de map templates.

1 Wijzig de rechten op bijvoorbeeld de map "vallendar" naar read 777.

2 Kijk! Het rode verkeerslicht voor "vallendar" is nu groen.

3 NB: om de toegang tot sjabloonbestanden te beperken, zou je de rechten na het wijzigen weer terug kunnen zetten naar wat ze waren (bijvoorbeeld 644)

Help icoon vervangen

Als een helptekst van een vraag wordt getoond, dan wordt er ook een help.gif afbeelding getoond uit de standaard sjabloon map.

Je kunt deze afbeelding vervangen door een help.gif, help.png of help.jpg te uploaden (komt in upload/templates map). Deze afbeelding wordt dan standaard getoond.

Bestaand logo vervangen

Note: In the default-Template of 2.50 there is no preembedded logo, please go to Adding your own logo

1. Om het logo te wijzigen ga naar „template.css”, je kunt het hier vinden:

2. Klik op de knop Search, om de het gebruik van de logo style te vinden.

3. Zoek in het resultaat naar #logo

File:3.PNG

4. Wijzig het style bestand

Je ziet code die ongeveer gelijk is aan:


Als je de afbeelding wilt vervangen, vervang dan logo.gif door een andere link. Bijvoorbeeld: (logo.png, logo.jpg, logo.swf).


Als je de grootte van de afbeelding wilt wijzigen, wijzig dan de pixels in:

width:100px; height:100px;

Een eigen logo toevoegen

1. Open het sjabloonbestand „startpage.pstpl”.


2. After the
<div id="topContainer" class="jumbotron">
tag add this line to „startpage.pstpl”:
<div class="container"><img id='page_logo' src='{TEMPLATEURL}/files/logo.png' class="clearfix pull-right" /></div>

3. To upload your own logo go to the template editor and upload your logo.

To position your logo please use one of the following css classes:

Als je het logo aan de linkerkant wilt hebben:

clearfix pull-left


Als je het logo aan de rechterkant wilt hebben:

clearfix pull-right


Als je het logo in het midden wilt hebben:

clearfix center-block

Als je hetzelfde sjabloon voor alle enquêtes wilt gebruiken en alleen het logo per enquête wilt wijzigen, dan kun je de {SID} placeholder in het sjabloonbestand the template .pstpl gebruiken om naar een ander plaatje te refereren:

<img src="{TEMPLATEURL}files/logoImage-{SID}.png">

Verwijderen standaard help bij alle vragen (verbergen)

Je kunt de standaard help op drie manieren verwijderen:

  1. met het hide_tip attribuut voor alle vragen en elke enquête.
  2. je kunt ook de {QUESTIONHELP} verwijderen in het bestand question.pstl, maar dat kan een slecht idee zijn voor een screenreader.
  3. voor het default sjabloon en enkele anderen, voeg dit toe onderaan in tempate.css
span.questionhelp{display:none;}

Toon aangepast favicon

A favicon is the little icon you see in the browser's address bar, list of bookmarks or tab. You can display your own icon as follows:

  1. Create a favicon - google will find you lots of free favicon generators
  2. Name your new favicon "favicon.ico" and place it in your template /files directory
  3. Add the following code to your startpage.pstpl before the </head> tag
<link rel="shortcut icon" href="{TEMPLATEURL}files/favicon.ico" type="image/x-icon">
<link rel="icon" href="{TEMPLATEURL}files/favicon.ico" type="image/x-icon">

Verschillend uiterlijk voor enquête/vraagpagina's

Als je wilt dat LimeSurvey het uiterlijk van de pagina's afwisselt (dus om en om hetzelfde uiterlijk) kun je de .page-odd class in je css bestand wijzigen.

Voorbeeld default sjabloon in versie 1.91+

.page-odd table.question-group {
 background-color: #D2F2D3;
}

Om dit omwisselen in het (default) sjabloon te voorkomen, moet je alle voorkomens van .page-odd in template.css verwijderen.

Toevoegen verticale scheiding voor dubbele schaal array

Om een verticale scheiding te maken bij een dubbele schaal array kun je de volgende regels toevoegen aan je bestand template.css.

table.question thead td.header_separator,
table.question tbody td.dual_scale_separator
{
   border-right:solid 1px #00A8E1;
}

header_separator wordt gebruikt als scheidingsteken in de header "td" en "dual_scale_separator" wordt gebruikt als scheidingsteken kolom in het dubbele schaal array.

Verberg enquête contact bericht

Om de melding "Neem contact op..." op de startpagina te verbergen, kun je het volgende toevoegen aan de $(document).ready functie in het bestand template.js van het sjabloon wat je gebruikt:

$('#surveycontact').hide(); //Verberg het contact bericht

Verwijder het contact bericht bij fouten

Als je geen contact bericht wilt tonen bij foutmeldingen, dan is het wat ingewikkelder. Je kunt de aanroep van een functie toevoegen aan de $(document).ready functie in het bestand template.css van het sjabloon wat je gebruikt:

removeContactAdressFromMessage(); //Verwijderd het contact bericht bij foutmeldingen

en voeg de volgende functie toe in je bestand *template.js*

function removeContactAdressFromMessage()
{
if ($('#tokenmessage').length > 0)
   {
   var oldMessage = $('#tokenmessage').html();
   var indexContact = oldMessage.indexOf('Bitte kontaktieren');
   var newMessage = oldMessage.substr(0, indexContact);
   $('#tokenmessage').html(newMessage);
   }
}

Dit zal waarschijnlijk niet goed werken voor een Engelse enquête, het zal ook uitgebreid moeten worden bij enquêtes met meertaligheid. Maar het is een manier hoe je zoiets kunt aanpakken.

Hoe om te gaan met meertaligheid bij vraagattributen (versies voor 2.0)

Als je een enquête met meertaligheid hebt en je bijvoorbeeld een andere tekst wilt gebruiken voor het veld "Andere", kun je dit alleen doen voor de standaardtaal (totdat deze mogelijkheid is toegevoegd in versie 2.0). Als oplossing kun je het volgende doen

<span class="en">New label</span><span class="nl">Nieuw label</span>

In de template.css van je sjabloon (/limesurvey/upload/templates/<yourtemplatename>/template.css) voeg je toe:

html:lang(en) .nl{display:none}
html:lang(nl) .en{display:none}

Aangepaste vraag-views (versie 2.5)

NB: Dit is een tijdelijk functie die in de toekomst vervangen wordt door vraagplugins. De functie is standaard uitgeschakeld.

Vanaf versie 2.5 kunt u sjabloonspecifieke aangepaste views aanmaken voor vragen en enkele onderliggende onderdelen. Dit is handig als u de HTML-lay-out van een bepaald vraagtype wilt wijzigen voor een of meer enquêtes.

  • Zoek in application/config/config.php naar 'config'=>array en voeg deze regel toe in het array : 'allow_templates_to_overwrite_views'=>1
  • Zet in /{your_template}/config.xml "overwrite_question_views" op true
  • Kopieer application/views/survey/* naar template/{your_view_directory}/survey/
  • NB: je hoeft alleen de bestanden te kopiëren die je wilt wijzigen, de bestandsstructuur moet hetzelfde blijven als in application/views/survey/


Insert Custom CSS or JavaScript files for plugins (version 2.5)

As of version 2.5, you can use the config.xml file to automatically load plugin files.

  • Upload your files to the template /css or /scripts folder
  • In /{your_template}/config.xml, add the file paths to the <css> or <js> blocks, something like this:
    <css>
    	<filename>css/jquery-ui-custom.css</filename>
    	<filename>css/bootstrap-slider.css</filename>
    
    	<filename>css/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css</filename>
    	<filename>css/flat_and_modern.css</filename>
    
    	<filename>css/template.css</filename>
    
    	<filename>css/myCustomPlugin.css</filename>
    </css>
    <js>
    	<filename>scripts/template.js</filename>
    	<filename>scripts/bootstrap-slider.js</filename>
    
    	<filename>scripts/myCustomPlugin.js</filename>
    </js>