DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:newpagetemplate

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:newpagetemplate [2022-02-02 17:49] – [openas] turnermmplugin:newpagetemplate [2024-03-08 09:19] (current) – old revision restored (2024-03-08 09:07) dregad
Line 3: Line 3:
 ---- plugin ---- ---- plugin ----
 description: Loads predefined page content from a given template description: Loads predefined page content from a given template
-author     : Jason GroutMyron Turner +author     : Damien Regad, Jason GroutMyron Turner 
-email      : turnermm02@shaw.ca +email      : dregad@mantisbt.org 
-type       : syntax +type       : syntax, CLI 
-lastupdate : 2022-02-02 +lastupdate : 2023-10-19 
-compatible : lemming,anteater,rincewind,angua,adora belle,weatherwax,binky,hrun,detritus,"Elenor Of Tsort""Frusterick Manners",Greebo,hogfather+compatible : LemmingAnteaterRincewindAnguaAdora belle, WeatherwaxBinkyHrunDetritus, Elenor Of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum, Kaos+
 depends    : depends    :
 conflicts  : conflicts  :
Line 15: Line 15:
 sourcerepo : https://github.com/turnermm/newpagetemplate # https://github.com/jasongrout/dokuwiki-newpagetemplate/ sourcerepo : https://github.com/turnermm/newpagetemplate # https://github.com/jasongrout/dokuwiki-newpagetemplate/
 bugtracker : https://github.com/turnermm/newpagetemplate/issues bugtracker : https://github.com/turnermm/newpagetemplate/issues
-donationurl: http://mturner.org/userfiles/donate.php+donationurl: https://github.com/sponsors/dregad
 ---- ----
  
 ===== Description ===== ===== Description =====
  
-This plugin loads into the edit window a template specified in the ''newpagetemplate'' parameter of the $_REQUEST  global. Effectively, this means that you can invoke a template, similar to the namespace template pages, either in the URL or in a POST form coded to create a new page. The plugin has been extensively modified and integrated into the [[plugin:openas]] plugin by Myron Turner.+This plugin loads into the edit window a template specified in the ''newpagetemplate'' parameter of the $_REQUEST  global. Effectively, this means that you can invoke a template, similar to the namespace template pages, either in the URL or in a POST form coded to create a new page. In simple terms, you can create a page in your dokuwiki and then use that page as a template for new pages. The plugin has been extensively modified and integrated into the [[plugin:openas]] plugin by Myron Turner. 
  
 The [[plugin:openas]] plugin and the [[plugin:addnewpage]] plugin provide techniques which support the ''newpagetemplate'' plugin. The [[plugin:openas]] plugin includes a simple method of creating a form designed for use with the ''newpagetemplate'' plugin, making it possible for each user to assign unique values to the template's variables. The [[plugin:openas]] plugin and the [[plugin:addnewpage]] plugin provide techniques which support the ''newpagetemplate'' plugin. The [[plugin:openas]] plugin includes a simple method of creating a form designed for use with the ''newpagetemplate'' plugin, making it possible for each user to assign unique values to the template's variables.
Line 63: Line 64:
 As with the ''_template.txt'' [[:namespace_templates|namespace templates]], the following variables are replaced in your template. As with the ''_template.txt'' [[:namespace_templates|namespace templates]], the following variables are replaced in your template.
  
-^ @ID@              | full ID of the page                                                                  +^ @ID@              | full ID of the page                                                                    
-^ @NS@              | namespace of the page                                                                +^ @NS@              | namespace of the page                                                                  
-^ @PAGE@            | page name (ID without namespace and underscores replaced by spaces)                  +^ @PAGE@            | page name (ID without namespace and underscores replaced by spaces)                    
-^ @!PAGE@           | same as above but with the first character uppercased                                +^ @!PAGE@           | same as above but with the first character uppercased                                  
-^ @!!PAGE@          | same as above but with the first character of all words uppercased                   +^ @!!PAGE@          | same as above but with the first character of all words uppercased                     
-^ @!PAGE!@          | same as above but with all characters uppercased                                     +^ @!PAGE!@          | same as above but with all characters uppercased                                       
-^ @FILE@            | page name (ID without namespace, underscores kept as is)                             +^ @FILE@            | page name (ID without namespace, underscores kept as is)                               
-^ @!FILE@           | same as above but with the first character uppercased                                +^ @!FILE@           | same as above but with the first character uppercased                                  
-^ @!FILE!@          | same as above but with all characters uppercased                                     +^ @!FILE!@          | same as above but with all characters uppercased                                       
-^ @USER@            | ID of user who is creating the page                                                  +^ @USER@            | ID of user who is creating the page                                                    
-^ @NAME@            | name of user who is creating the page                                                +^ @NAME@            | name of user who is creating the page                                                  
-^ @MAIL@            | mail address of user who is creating the page                                        +^ @MAIL@            | mail address of user who is creating the page                                          
-^ @DATE@            | date and time when edit session started                                              +^ @DATE@            | date and time when edit session started                                                
-@DATE@            | date and time when edit session started                                              | +^ %a %d-%m-%y etc.  | e.g. Thu 06-12-12. [[phpfn>strftime]] placeholders are replaced by page creation time  |
-%a %d-%m-%y etc.  | e.g. Thu 06-12-12. [[php>Strftime]] placeholders are replaced by page creation time  |+
  
  
plugin/newpagetemplate.1643820588.txt.gz · Last modified: 2022-02-02 17:49 by turnermm

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