DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:pagemod

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:pagemod [2019-04-02 15:10] floriousplugin:pagemod [2024-01-20 07:55] (current) Aleksandr
Line 7: Line 7:
 type       : syntax type       : syntax
 lastupdate : 2014-11-10 lastupdate : 2014-11-10
-compatible : 2016-06-26, Detritus, Hrun, Ponder Stibbons+compatible : 2016-06-26, Detritus, Hrun, Ponder Stibbons, Greebo, Hogfather, Igor
 depends    : bureaucracy depends    : bureaucracy
 conflicts  conflicts 
Line 24: Line 24:
 Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
-\\ 
-\\ 
  
 ===== Overview ===== ===== Overview =====
Line 53: Line 51:
  
 That's it. That's it.
-\\ +
-\\+
  
 ===== Usage ===== ===== Usage =====
-\\+
  
 ==== Form Syntax ==== ==== Form Syntax ====
Line 77: Line 74:
     * Relative pageids, which are solved with respect to current page (e.g. ''.:neighbourpage'')     * Relative pageids, which are solved with respect to current page (e.g. ''.:neighbourpage'')
     * **_self** to denote the same page as the form     * **_self** to denote the same page as the form
-  * ''pagemod_id'' : If using multiple pagemod enclosures in a page, this is to identify which enclosure to fill and include in the page. +  * ''pagemod_id'' : If using multiple pagemod enclosures in a page, this is to identify which enclosure to fill and include in the page. **NOTE: the ''pagemod_id'' value cannot include a dash character ("-"). A dash character will break the ''<pagemod>...</pagemod>'' section such that it will render as mere text and not function. The underscore character ("_") works.** 
-\\+
        
 ==== Template Syntax ==== ==== Template Syntax ====
  
 Defining a pagemod template is done within a page with the following code: Defining a pagemod template is done within a page with the following code:
 +
 <code> <code>
 <pagemod <pagemod_id> <params>> <pagemod <pagemod_id> <params>>
Line 93: Line 91:
 Some other wiki text around, that is visible again. Some other wiki text around, that is visible again.
 </code> </code>
 +
 Or an real example for adding rows to a table: Or an real example for adding rows to a table:
 +
 <code> <code>
 Some more text, and a table with as last row the pagemod placeholder. Some more text, and a table with as last row the pagemod placeholder.
Line 106: Line 106:
  
 The pagemod enclosure starts with: The pagemod enclosure starts with:
-<code> + 
-<pagemod <pagemod_id> <params>> +  <pagemod <pagemod_id> <params>> 
-</code>+
 where the following is true: where the following is true:
  
-  * ''pagemod_id'' : This is the id of the pagemod.  The form has an pagemod_id, it will modify all the pagemod enclosures with the same id.+  * ''pagemod_id'' : This is the id of the pagemod. The form has an pagemod_id, it will modify all the pagemod enclosures with the same id.
   * ''params'' : params are separated by '','' and can be one of the following:   * ''params'' : params are separated by '','' and can be one of the following:
     * ''output_after'' : indicates that the output of the translation must come after the rewrite of the pagemod enclosure, the default is to output before the rewrite     * ''output_after'' : indicates that the output of the translation must come after the rewrite of the pagemod enclosure, the default is to output before the rewrite
Line 120: Line 120:
   </pagemod>   </pagemod>
  
-and the contents are not shown when the wiki page is viewed.  Converting of the contents of the pagemod enclosure is done with the [[plugin:bureaucracy]] plugin's replacements function. So similar patterns are available. +and the contents are not shown when the wiki page is viewed. Converting of the contents of the pagemod enclosure is done with the [[plugin:bureaucracy]] plugin's replacements function. So similar patterns are available. 
-\\+
  
 ===Meta variables=== ===Meta variables===
 +
 The meta variable are some extra variables for the pagemod plugin. The meta variables values are generated by the plugin at runtime. They are the following: The meta variable are some extra variables for the pagemod plugin. The meta variables values are generated by the plugin at runtime. They are the following:
  
Line 137: Line 138:
  
 New meta information tag requests should be sent to me for implementation. New meta information tag requests should be sent to me for implementation.
-\\+
  
 ==== Incrementing number (by 1) ==== ==== Incrementing number (by 1) ====
Line 148: Line 149:
   *  Both of them has auto incrementing counter on each succesfull submit.   *  Both of them has auto incrementing counter on each succesfull submit.
  
-<file>+<code>
 number "One" number "One"
 number "Two" ++ number "Two" ++
Line 155: Line 156:
 number "Fifth" 000 number "Fifth" 000
 number "Sixth" ++ 000 number "Sixth" ++ 000
-</file>+</code> 
  
-\\ 
 ==== Upload ==== ==== Upload ====
-For the moment,  //2019-04-02 14:53// the pagemod upload do not work right of the box. it needs the patpatch offered here:+ 
 +For the moment, //2019-04-02 14:53// the pagemod upload do not work right of the box. it needs the patpatch offered here:
  
 [[https://github.com/BaselineIT/dokuwiki-pagemod/blob/891b6465a4b2a1db1d548611cc2584b49ec815c1/helper/pagemod.php]] [[https://github.com/BaselineIT/dokuwiki-pagemod/blob/891b6465a4b2a1db1d548611cc2584b49ec815c1/helper/pagemod.php]]
- 
- 
  
 **On the same page example:** **On the same page example:**
  
-<file>+<code>
 <form> <form>
 action pagemod _self add_sale action pagemod _self add_sale
Line 214: Line 214:
 submit "Salveaza" submit "Salveaza"
 </form> </form>
-</file> +</code>
- +
-\\+
  
-<file>+<code>
 <sortable r2> <sortable r2>
 ^ Nr.  ^ Data Automata  ^ Date Manuala  ^ Supplier  ^ Our Cost (Single)  ^ Rotile?  ^ Quantity Ordered  ^ Upload  ^ ^ Nr.  ^ Data Automata  ^ Date Manuala  ^ Supplier  ^ Our Cost (Single)  ^ Rotile?  ^ Quantity Ordered  ^ Upload  ^
Line 225: Line 223:
 </pagemod> </pagemod>
 </sortable> </sortable>
-</file+</code
-\\ + 
-\\+--- [[user>florious|Florin C.]] //2019-04-02 15:10//
  
-\\ 
-\\ 
  
 ===== FAQ ===== ===== FAQ =====
Line 249: Line 245:
 To update the plugin, click "Update" in the Admin/Plugins section of your DokuWiki. To update the plugin, click "Update" in the Admin/Plugins section of your DokuWiki.
  
-\\ 
-\\ 
  
 === Manual installation of previous version === === Manual installation of previous version ===
Line 268: Line 262:
 ===== Bugs and feature requests===== ===== Bugs and feature requests=====
  
-The pagemod plugin is strong related with the bureaucracy plugin. For general questions and issues see also the [[bureaucracy|Bureaucracy plugin]] wiki page and the [[https://github.com/splitbrain/dokuwiki-plugin-bureaucracy/issues|Bureaucracy issue tracker]].+The pagemod plugin is strongly intertwined with the bureaucracy plugin. For general questions and issues see also the [[bureaucracy|Bureaucracy plugin]] wiki page and the [[https://github.com/splitbrain/dokuwiki-plugin-bureaucracy/issues|Bureaucracy issue tracker]].
  
 Please report issues and requests for Pagemod Plugin at https://github.com/rendezz/dokuwiki-pagemod/issues Please report issues and requests for Pagemod Plugin at https://github.com/rendezz/dokuwiki-pagemod/issues
  
-QUESTION: Can pagemod be triggerd conditionaly? Let's say there is a form with a yesno field. Could pagemod be called only when the yesno field is checked? +QUESTION: Can pagemod be triggered conditionally? Let's say there is a form with a yesno field. Could pagemod be called only when the yesno field is checked? 
-\\ +
-\\+
  
 ==== Problem and solution ==== ==== Problem and solution ====
Line 287: Line 280:
   <             //Allow for the substitution os elements of the page name   <             //Allow for the substitution os elements of the page name
   <             $page_to_modify = $this->replace($page_to_modify);   <             $page_to_modify = $this->replace($page_to_modify);
-\\ +
-\\+
  
 ===== Example usecases ===== ===== Example usecases =====
Line 299: Line 291:
   * Extending an existing table   * Extending an existing table
   * Adding additional list items   * Adding additional list items
 +
  
 ==== Minimalistic Guestbook ==== ==== Minimalistic Guestbook ====
  
 I used this plugin for a minimalistic guestbook. Although my wiki can be edited by everyone, I think visitors would be more willing to leave a message through a little form. See http://windhoff.net/wiki/playground/playground how it works. An javascript based alternative to this is the [[plugin:disqus|plugin:disqus]]. I used this plugin for a minimalistic guestbook. Although my wiki can be edited by everyone, I think visitors would be more willing to leave a message through a little form. See http://windhoff.net/wiki/playground/playground how it works. An javascript based alternative to this is the [[plugin:disqus|plugin:disqus]].
-<file>+ 
 +<code>
 ======Guestbook===== ======Guestbook=====
 +
 ===== New Comment ===== ===== New Comment =====
 +
 <form> <form>
 action pagemod _self add_comment action pagemod _self add_comment
Line 314: Line 310:
 submit submit
 </form> </form>
-\\ 
-\\ 
  
 ===== Comments ===== ===== Comments =====
 +
 <pagemod add_comment output_after> <pagemod add_comment output_after>
 //@@meta.date.format.r@@:// //@@meta.date.format.r@@://
Line 323: Line 318:
 |<nowiki>@@Comment@@</nowiki> || |<nowiki>@@Comment@@</nowiki> ||
 </pagemod> </pagemod>
-</file+</code
- --- //M. 2010/04/02//+--- //M. 2010/04/02//
plugin/pagemod.1554210607.txt.gz · Last modified: 2019-04-02 15:10 by florious

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