Auto Sub Plugin
Plugin designed to substitute links (or any other formatting) for wiki-words and non-wiki-words alike.
Macros
Gives the ability to do substitution of text in a wiki document, which may include things like:
- Automatic formatting of keywords
- Automatic linking of keywords
- Translation of keywords
AUTOSUB{...} -- define text substitutions for wiki pages
- Parameters:
Parameter | Description | Default |
name | Text to auto-replace | none, required parameter |
fmtMacro | Replacement text. May be a wiki macro, however, the wiki macro being substituted may not encorporate other macros. If this is done, the wiki will complain to the administrator. | none - no substitution |
AUTOSUBS -- Generate a table of all known links/substitutions
- Syntax:
%AUTOSUBS%
-
%AUTOSUBS%
generates a table in place containing all links/substitutions known to this plug-in, which are only those in the topic page in which this macro appears and any included topics.
NOAUTOSUB{...} -- disable a text substitution for a wiki page
- Parameters:
Parameter | Description | Default |
name | Text to auto-replace | none, required parameter |
If a link/substitution has been defined for the text specified by the "name" parameter, this will prevent that text from being substituted in the page on which this macro is used.
This may be useful if, for example, a list of AUTOSUB macros is used on a topic being included on a page where the including topic does not want the substitution to be made.
AutoSubPlugin Settings
You can override the default settings as documented in
preferences. These preferences can be set in your
SitePreferences, or in WebPreferences, or in individual topics.
Preference |
Use to |
Default |
AUTOSUBPLUGIN_DEBUG |
Enable debugging output, which is stored in files in the plug-in's work area on the server and is not accessible via the web |
0 |
AUTOSUBPLUGIN_PROTECTED |
Specify HTML or HTML-style tags to be protected from substitutions by this plug-in |
"pre noautolink dot verbatim plantuml" |
If the protected tags value is changed, it is
strongly recommended that
pre
and
noautolink
remain in the list, at the beginning and in that order.
Examples
Examples can be found in
AutoSubPluginExamples.
Plugin Installation Instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Installation
Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available in
configure
, then you can still install manually from the command-line. See
http://foswiki.org/Support/ManuallyInstallingExtensions for more help.
Dependencies
No dependencies.
Known Bugs
None.
TODO
Plugin Info
Change History: |
|
13 Aug 2015 |
1.0.0 Initial release. |