DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:bureaucracy

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
plugin:bureaucracy [2021-07-20 23:50] – version upped andiplugin:bureaucracy [2024-02-09 10:35] (current) Aleksandr
Line 6: Line 6:
 email      : andi@splitbrain.org email      : andi@splitbrain.org
 type       : syntax, action type       : syntax, action
-lastupdate : 2021-07-19 +lastupdate : 2023-05-16 
-compatible : Frusterick Manners, Greebo, Hogfather+compatible : Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum, Kaos
 depends    :  depends    : 
 conflicts  : bureaucracyau, form conflicts  : bureaucracyau, form
Line 157: Line 157:
     * needs a label     * needs a label
     * needs a second argument containing the select options separated by a pipe ''|'' char\\ (''%% "Peaches|Apples|Oranges" %%'')     * needs a second argument containing the select options separated by a pipe ''|'' char\\ (''%% "Peaches|Apples|Oranges" %%'')
-    * example: ''multiselect "Label" "Opt1|Opt2|Opt3" =Opt1,Opt3''+    * example: ''%% multiselect "Label" "Opt1|Opt2|Opt3" =Opt1,Opt3 %%''
     * In mail action: all options will be joined by "'', ''" in e-mail message     * In mail action: all options will be joined by "'', ''" in e-mail message
     * In template action:     * In template action:
Line 284: Line 284:
  
 <code> <code>
-  * field  = Tell us about yourself"+  * field  = Tell us about yourself
   * name   = Your Name   * name   = Your Name
   * age    = Your Age   * age    = Your Age
Line 373: Line 373:
 ==== Mail Mode ==== ==== Mail Mode ====
  
-This is a simple action. When used default all user input will be sent by email to the configured email address. See the example above how to use it. You may specify multiple recipient mail addresses separated by spaces.+This is a simple action. When used defaultall user input will be sent by email to the configured email address. See the example above how to use it. You may specify multiple recipient mail addresses separated by commas.
  
  
Line 400: Line 400:
  
 <code html> <code html>
-Dear @@Your Name@@, +Dear @@Your Name@@,</br> 
- +</br> 
-You are <b>great<b>, you just <i>purchased</i> our @@What do you want@@! +You are <b>great</b>, you just <i>purchased</i> our @@What do you want@@!</br> 
- +</br> 
-We will deliver it fast as possible, see the  +We will deliver it fast as possible, see the </br> 
-<a href="http://example.com/conditions">conditions</a>+<a href="http://example.com/conditions">conditions</a>.</br> 
- +</br> 
-Kind regards, +Kind regards,</br> 
-Future Machines company+Future Machines company</br>
 </code> </code>
  
Line 506: Line 506:
 |''@NSBASE@''                               | (only template action) Namespace that contains new page.\\ eg. if the new page is ''foo:bar:baz:bang'', ''@NSBASE@'' will contain ''baz'' | |''@NSBASE@''                               | (only template action) Namespace that contains new page.\\ eg. if the new page is ''foo:bar:baz:bang'', ''@NSBASE@'' will contain ''baz'' |
 | %Y %F %a %Y-%m-%d %s... etc               | [[phpfn>strftime]] parameters to refer to current time   | | %Y %F %a %Y-%m-%d %s... etc               | [[phpfn>strftime]] parameters to refer to current time   |
-| <nowiki>%%</nowiki>                       | Replaced by ''%'' char, needed to avoid accidental time\\ replacements in your template.| +| <nowiki>%%</nowiki>                       | Replaced by ''%'' char, needed to avoid accidental time replacements in your template.| 
-|''<nowiki>@DATE(<datetime>,%%Y-%%m-%%e)@</nowiki>''\\ ''@DATE(<datetime>)@''  | Accepts different datetime formats, which are outputted in the\\ requested [[phpfn>strftime]] format. Providing no format returns date\\ with format of the [[config:dformat]] setting. |+|''<nowiki>@DATE(<datetime>,%%Y-%%m-%%d)@</nowiki>''\\ ''@DATE(<datetime>)@''  | Accepts different [[phpfn>class.datetime|datetime]] formats, which are outputted in the requested [[phpfn>strftime]] format. If no format is provided, date is returned with format of the [[config:dformat]] setting. ([[plugin:bureaucracy#template_placeholder_date|Example]]) |
 | ''@ID@ @USER@ @MAIL@'' ... etc | DokuWiki [[:namespace_templates#replacement_patterns|replacement patterns]] for templates are available too | | ''@ID@ @USER@ @MAIL@'' ... etc | DokuWiki [[:namespace_templates#replacement_patterns|replacement patterns]] for templates are available too |
 | ''@FORMPAGE_ID@ @FORMPAGE_NS@ @FORMPAGE_CURNS@'' ... etc | Works like [[:namespace_templates#replacement_patterns|replacement patterns]] but refers to the page with the form | | ''@FORMPAGE_ID@ @FORMPAGE_NS@ @FORMPAGE_CURNS@'' ... etc | Works like [[:namespace_templates#replacement_patterns|replacement patterns]] but refers to the page with the form |
Line 629: Line 629:
   * Fifth Number field returns values which are completed with leading zeros. Input of 23 will be returned as 023.   * Fifth Number field returns values which are completed with leading zeros. Input of 23 will be returned as 023.
   * Sixth Number is a combination of Two and Fifth   * Sixth Number is a combination of Two and Fifth
 +
 +==== Template placeholder @DATE@ ====
 +
 +  hidden "today" "=%Y-%m-%d"
 +  hidden "backtrack" "=@DATE(now -3 years,%%Y-%%m-%%d)@"
 +
 +  * in the template placeholder @DATE(...,...)@ the first parameter (before the comma) with the [[phpfn>class.datetime|datetime]] format can be used, for example, to dynamically calculate a date relative to today's date, powered by the php function [[phpfn>datetime.modify]] -> note specific locations of whitespaces in the syntax
 +  * the second parameter (behind the comma) with the strftime syntax can be used for formating the date output, as needed -> note that % in the [[phpfn>strftime]] parameters here have to be escaped by %%
  
 ===== Development ===== ===== Development =====
Line 812: Line 820:
  
   * [[:tips:button_align|How to align a <button> element?]]   * [[:tips:button_align|How to align a <button> element?]]
-  * User-Forum: [[https://forum.dokuwiki.org/thread/13956|Left align in Bureaucracy Plugin]]+  * User-Forum: [[https://forum.dokuwiki.org/d/13956|Left align in Bureaucracy Plugin]]
  
 ===== Issues ===== ===== Issues =====
  
 Please report bug or feature request on the [[https://github.com/splitbrain/dokuwiki-plugin-bureaucracy/issues|Github bugtracker]]. Please report bug or feature request on the [[https://github.com/splitbrain/dokuwiki-plugin-bureaucracy/issues|Github bugtracker]].
plugin/bureaucracy.1626817809.txt.gz · Last modified: 2021-07-20 23:50 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki