Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:create:functions:textlink [04.01.2015 14:27] – [Example 2] alexander.ritteren:create:functions:textlink [29.09.2020 18:19] – [textlink()] sophia.schauer
Line 3: Line 3:
 ====== textlink() ====== ====== textlink() ======
  
-''string **textlink**(string //textID//, string //label//, [int //width//, int //height//])''+''string **textlink**(string //textID//, mixed //label//, [int //width//, int //height//])''
  
 It is equally possible to display text (e.g. a lengthy label) in a new window (pop-up), instead of directly in the questionnaire. The text will appear in the same layout as it would in the questionnaire. It is equally possible to display text (e.g. a lengthy label) in a new window (pop-up), instead of directly in the questionnaire. The text will appear in the same layout as it would in the questionnaire.
  
   * //textID//\\ ID of the text element to be shown in the pop-up window.    * //textID//\\ ID of the text element to be shown in the pop-up window. 
-  * //label//\\  Label of the hyperlink that opens the pop-up.+  * //label//\\  Label of the hyperlink (text or HTML code) that opens the pop-up
 +    * <string> -- Label independent of the language version 
 +    * <array> -- Label according to language version. The ID of the language version (e.g. ''"ger"'' or ''"eng"'') is used as the key of the array, the actual label is used as the associated value.
   * //width//\\  Width of the pop-up window in [[:en:glossary#pixel|pixels]] (optional).   * //width//\\  Width of the pop-up window in [[:en:glossary#pixel|pixels]] (optional).
   * //height//\\ Height of the pop-up window in pixels (optional).    * //height//\\ Height of the pop-up window in pixels (optional). 
Line 20: Line 22:
 **Tip:** The size of the new window can be specified optionally. It often makes sense to keep the window small so the questionnaire can still be seen in the background. If no size is specified, the default size of 600 × 500 pixels is used.  **Tip:** The size of the new window can be specified optionally. It often makes sense to keep the window small so the questionnaire can still be seen in the background. If no size is specified, the default size of 600 × 500 pixels is used. 
  
-**Tip:** If you do not want to open a separate window in the questionnaire when displaying a short amount of text -- who knows if the participant can find their way back to the questionnaire afterwards -- then read the following chapter: [[:en:create:popup|Click to Show Information]]+**Tip:** If you do not want to open a separate window in the questionnaire when displaying a short amount of text -- who knows if the participant can find their way back to the questionnaire afterwards -- then read the following chapter: [[:en:create:popup|Click to Get Information]]
  
  
Line 47: Line 49:
  
 <code php> <code php>
-replace('%link%', textlink('explanation', 'here'));+replace('%link%', textlink('explanation', 'here'), 'html');
 </code> </code>
  
en/create/functions/textlink.txt · Last modified: 29.09.2020 18:23 by sophia.schauer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki