plugin:command
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:command [2012-06-30 18:25] – [Modification History] 95.152.216.241 | plugin:command [2023-12-10 01:27] (current) – [Command Plugin] nerun | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : martyn.eggleton@gmail.com | email : martyn.eggleton@gmail.com | ||
type : syntax | type : syntax | ||
- | lastupdate : 2012-06-30 | + | lastupdate : 2012-02-13 |
- | compatible : | + | compatible : !Hogfather, !Igor, !Jack Jackrum |
depends | depends | ||
conflicts | conflicts | ||
similar | similar | ||
- | tags : extension, command, | + | tags : extension, command, |
- | downloadurl: | + | downloadurl: |
- | bugtracker : http:// | + | bugtracker : https:// |
- | sourcerepo : http:// | + | sourcerepo : https:// |
donationurl: | donationurl: | ||
---- | ---- | ||
+ | :!: WARNING: This plugin hasn't been updated since 2012 and is not compatible with the current version of Dokuwiki. | ||
===== Overview ===== | ===== Overview ===== | ||
- | The **Command Syntax Plugin** implements an extensible syntax. | + | The **Command Syntax Plugin** implements an extensible syntax. |
An extension of the plugin is called a **command**. | An extension of the plugin is called a **command**. | ||
Line 47: | Line 48: | ||
</ | </ | ||
- | The [[plugin:Date/Time]] command (command name '' | + | The [[Date/ |
The Command Plugin also provides a way to add endless new features to the DokuWiki syntax without overcrowding the syntax space. This helps reduce both user confusion and conflicts among syntaxes. People familiar with the syntax for any one command will understand the general syntax of all the other commands. | The Command Plugin also provides a way to add endless new features to the DokuWiki syntax without overcrowding the syntax space. This helps reduce both user confusion and conflicts among syntaxes. People familiar with the syntax for any one command will understand the general syntax of all the other commands. | ||
Line 53: | Line 54: | ||
===== Modification History ===== | ===== Modification History ===== | ||
- | This is essentially the work of [[http:// | + | This is essentially the work of [[http:// |
* 2005/8/25 --- Created. [[http:// | * 2005/8/25 --- Created. [[http:// | ||
Line 60: | Line 61: | ||
* 2005/8/29 --- Fixed failure to load extension for pre-cached data. [[http:// | * 2005/8/29 --- Fixed failure to load extension for pre-cached data. [[http:// | ||
* 2005/9/3 --- Fixed RSS feed by changing hsc() to htmlspecialchars(). [[http:// | * 2005/9/3 --- Fixed RSS feed by changing hsc() to htmlspecialchars(). [[http:// | ||
- | * 2012/6/30 --- Moved hosting to github [[http://www.stretchyboy.co.uk|Martyn Eggleton]] | + | * 2012/2/13 --- Moved hosting to github [[https://github.com/stretchyboy|Martyn Eggleton]] |
===== Installation ===== | ===== Installation ===== | ||
+ | Search and install the plugin using the [[plugin: | ||
- | When you install the plugin you get only one demo command. This command is the [[plugin:Date/Time]] command introduced in the [[# | + | When you install the plugin you get only one demo command. This command is the [[Date/ |
- | + | ||
- | < | + | |
- | + | ||
- | :!: **Unfortunately, | + | |
- | + | ||
- | This zip file contains the following directories and files: | + | |
- | + | ||
- | < | + | |
- | /command/ | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | </ | + | |
To install other commands, follow the installation instructions given for the command. Every command consists of at least one file place in the extensions directory ''/ | To install other commands, follow the installation instructions given for the command. Every command consists of at least one file place in the extensions directory ''/ | ||
Line 90: | Line 74: | ||
Every command occurs somewhere on the page. When the command is executed, it is replaced with the result of the command. | Every command occurs somewhere on the page. When the command is executed, it is replaced with the result of the command. | ||
- | However, when you insert the command, you have to decide what is to happen around the command. | + | However, when you insert the command, you have to decide what is to happen around the command. |
< | < | ||
Line 124: | Line 108: | ||
- Command names are not case-sensitive, | - Command names are not case-sensitive, | ||
- Parameter values are strongly constrained to minimize parsing interference with other plugin syntaxes. | - Parameter values are strongly constrained to minimize parsing interference with other plugin syntaxes. | ||
- | - [[DokuWiki]] does not parse the content of a command. | + | - [[:DokuWiki]] does not parse the content of a command. |
If the BNF is too confusing, you can learn the syntax by looking at the examples in the [[# | If the BNF is too confusing, you can learn the syntax by looking at the examples in the [[# | ||
- | The resulting syntax looks much like a hybrid between a URL query and a function call. This is for consistency with other DokuWiki syntaxes that use URL queries to provide parameters, such as the [[syntax#images_and_other_files|image syntax]] and the [[plugin:gallery|gallery plugin]], and also to suggest the command-like nature of the syntax. | + | The resulting syntax looks much like a hybrid between a URL query and a function call. This is for consistency with other DokuWiki syntaxes that use URL queries to provide parameters, such as the [[:wiki:syntax#images and other files|image syntax]] and the [[gallery|gallery plugin]], and also to suggest the command-like nature of the syntax. |
- | Command syntax is intentionally similar to the syntax of the [[plugin:Div/Span Shorthand]] plugin. | + | Command syntax is intentionally similar to the syntax of the [[Div/Span Shorthand]] plugin. Div/Span shorthand is useful for creating renderings of parsed text, provided you can use CSS to do it. |
===== Extensions ===== | ===== Extensions ===== | ||
Line 148: | Line 132: | ||
That's it, you're done. You don't need to worry about the syntax at all. All you have to do is implement behavior according to the indicated embedding mode (if it differs between the modes), examine the parameters and content as necessary, and perform the action and/or return replacement text. | That's it, you're done. You don't need to worry about the syntax at all. All you have to do is implement behavior according to the indicated embedding mode (if it differs between the modes), examine the parameters and content as necessary, and perform the action and/or return replacement text. | ||
- | You may prefer to simply copy ''/ | + | You may prefer to simply copy ''/ |
The base class '' | The base class '' |
plugin/command.1341073535.txt.gz · Last modified: 2012-06-30 18:25 by 95.152.216.241