DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:textinsert

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:textinsert [2020-07-26 03:27] – [TextInsert Plugin] turnermmplugin:textinsert [2022-08-30 01:16] (current) – compatible Igor 82.64.33.11
Line 7: Line 7:
 type       : syntax type       : syntax
 lastupdate : 2019-10-03 lastupdate : 2019-10-03
-compatible : Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun,detritus,"Elenor Of Tsort" ,Greebo, Hogfather+compatible : Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun,detritus,"Elenor Of Tsort" ,Greebo, Hogfather, Igor
 depends    :  depends    : 
 conflicts  conflicts 
Line 25: Line 25:
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
 +
  
 This plugin provides an administrative panel where you enter macro names and their substitution texts.  These are saved in the meta directory (in ''meta/macros/macros.ser''). In farms, you can choose to have a database for each animal (see: [[#configuration_and_settings]]). You can save individual words, and strings of text, including lengthy paragraphs.  The substitutions accept html, quotation marks and other punctuation.  The macro names can accept spaces, dots, underscores and hyphens.    This plugin provides an administrative panel where you enter macro names and their substitution texts.  These are saved in the meta directory (in ''meta/macros/macros.ser''). In farms, you can choose to have a database for each animal (see: [[#configuration_and_settings]]). You can save individual words, and strings of text, including lengthy paragraphs.  The substitutions accept html, quotation marks and other punctuation.  The macro names can accept spaces, dots, underscores and hyphens.   
Line 38: Line 39:
  
 **Note**: The underscore is required. **Note**: The underscore is required.
 +==== Basic Syntax ==== 
 +     #@MACRO_NAME@# 
 ==== Macro Inclusions ==== ==== Macro Inclusions ====
  
Line 71: Line 73:
 There is a configuration option which governs whether or not standard namespace macros are accepted.  It is set to true by default. There is a configuration option which governs whether or not standard namespace macros are accepted.  It is set to true by default.
  
-=== _ID_: Pseudo Namespace Macro for Sidebars===+=== _ID_ and _NS_: Pseudo Namespace Macros for Sidebars===
  
-When used in a sidebar the standard namespace macro ''ID'' resolves to the id of the sidebar page.  To get the id of the currently displayed page, use instead ''_ID_''.  This macro can also be used for [[#macro_inclusions]]. So, for instance if you wanted to display the result as a wiki link, you could do this:+When used in a sidebar the standard namespace macro ''ID'' resolves to the id of the sidebar page.  To get the id of the currently displayed page, use instead ''_ID_'', of the currently displayed namespace ''_NS_''.  These macros can also be used for [[#macro_inclusions]]. So, for instance if you wanted to display the result as a wiki link, you could do this:
  
 <code html> <code html>
Line 79: Line 81:
 </code> </code>
  
-If you use ''_ID_'' in your sidebar, then you must also insert the ''%%~~NOCACHE~~%%'' macro into the page so that the ID updates with each change of page.   See [[wiki:syntax#control_macros]].    +If you use ''_ID_'' or ''_NS_'' in your sidebar, then you must also insert the ''%%~~NOCACHE~~%%'' macro into the page so that the ID updates with each change of page.   See [[wiki:syntax#control_macros]].    
  
 ==== Example of Multi Paragraph Text Block ==== ==== Example of Multi Paragraph Text Block ====
plugin/textinsert.1595726867.txt.gz · Last modified: 2020-07-26 03:27 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