Differences

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

Link to this comparison view

Both sides previous revision Previous revision
en:entwickler:message-klasse_fuer_hinweistexte [2016/12/03 15:05] – codestyle and typos ximexen:entwickler:message-klasse_fuer_hinweistexte [2016/12/03 15:06] (current) – codestyle ximex
Line 12: Line 12:
 The files are already in common.php included and an Object **$gMessage** also exists automatically. The files are already in common.php included and an Object **$gMessage** also exists automatically.
  
-If you now want to output an advisory text, the simple call is sufficient:<code php>$gMessage->show("text code");</code>+If you now want to output an advisory text, the simple call is sufficient:<code php>$gMessage->show('text code');</code>
 The texts are managed in //message_text.php//. There should not occur **PHP variables** or code snippets. If you need variables so you can set a placeholder with scheme **%VAR1%**. For further placeholders simply increment (%VAR2%, % VAR3% ...). (Most of the texts with variables are already replaced but some still exists) The texts are managed in //message_text.php//. There should not occur **PHP variables** or code snippets. If you need variables so you can set a placeholder with scheme **%VAR1%**. For further placeholders simply increment (%VAR2%, % VAR3% ...). (Most of the texts with variables are already replaced but some still exists)
  
 The variables are set with <code php>$gMessage->addVariableContent($myVariable, 1);</code> The 2nd passed parameter is the variable number. But it can also be omitted, then the variables must be actually delivered in the correct order. The variables are set with <code php>$gMessage->addVariableContent($myVariable, 1);</code> The 2nd passed parameter is the variable number. But it can also be omitted, then the variables must be actually delivered in the correct order.
-If there is only one variable in the text (is approximately 90% of cases) so you can also use an abbreviated notation and the variable is passed directly when calling. <code php>$gMessage->show("text code", $myVariable1);</code>+If there is only one variable in the text (is approximately 90% of cases) so you can also use an abbreviated notation and the variable is passed directly when calling. <code php>$gMessage->show('text code', $myVariable1);</code>
  
 If you want to redirect to an URL so you can call <code php>$gMessage->setForwardUrl($myUrl, 2000);</code> Here the second passed parameter is optional. If it is specified these are the milliseconds after which is automatically redirected to the page. If it is not specified then there is a Next button. If you want to redirect to an URL so you can call <code php>$gMessage->setForwardUrl($myUrl, 2000);</code> Here the second passed parameter is optional. If it is specified these are the milliseconds after which is automatically redirected to the page. If it is not specified then there is a Next button.
  
 If forwarding to an URL, give the user the opportunity to decide this himself, so can  can call the function <code php>$gMessage->setForwardYesNo($myUrl);</code> Only the URL is passed to reference at //Yes//. This makes sense, for example, at delete queries. If forwarding to an URL, give the user the opportunity to decide this himself, so can  can call the function <code php>$gMessage->setForwardYesNo($myUrl);</code> Only the URL is passed to reference at //Yes//. This makes sense, for example, at delete queries.
  • en/entwickler/message-klasse_fuer_hinweistexte.txt
  • Last modified: 2016/12/03 15:06
  • by ximex