plugin:snippets
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:snippets [2018-05-28 19:57] – [Installation] Klap-in | plugin:snippets [2024-05-31 14:05] (current) – created 151.13.80.146 | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : turnermm02@shaw.ca | email : turnermm02@shaw.ca | ||
type : Action, Syntax | type : Action, Syntax | ||
- | lastupdate : 2018-05-21Â | + | lastupdate : 2022-10-07Â |
- | compatible : 2009-12-25, 2010-11-07, 2011-05-25, Angua, Weatherwax, Binky, Ponder Stibbons, Hrun,detritus, "Elenor | + | compatible : Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor |
depends | depends | ||
conflicts | conflicts | ||
- | similar | + | similar |
- | tags : editing, toolbar, shortcut | + | tags : editing, toolbar, shortcut, snippets, macro |
downloadurl: | downloadurl: | ||
bugtracker : https:// | bugtracker : https:// | ||
Line 24: | Line 25: | ||
The snippets plugin makes it possible to create a collection of re-usable texts, or '' | The snippets plugin makes it possible to create a collection of re-usable texts, or '' | ||
The plugin adds a new button to the editor toolbar. | The plugin adds a new button to the editor toolbar. | ||
- | {{ https:// | + | {{ https:// |
The button opens a pop-up window that lists the snippet pages. The list is defined on a standard [[# | The button opens a pop-up window that lists the snippet pages. The list is defined on a standard [[# | ||
- | ** Updatable Snippets ** \\ | + | **Updatable Snippets**\\ |
In the plugin' | In the plugin' | ||
- | |||
- | |||
In addition, this upgrade accepts DokuWiki namespace templates as snippets. | In addition, this upgrade accepts DokuWiki namespace templates as snippets. | ||
Line 40: | Line 39: | ||
For the original snippets page with comments and download url, see [[plugin: | For the original snippets page with comments and download url, see [[plugin: | ||
- | **IMPORTANT: | + | **IMPORTANT: |
==== PHP versions prior to 5.3 ==== | ==== PHP versions prior to 5.3 ==== | ||
Line 46: | Line 45: | ||
If you are using a version of PHP prior to 5.3 you will get an error message that looks something like this: | If you are using a version of PHP prior to 5.3 you will get an error message that looks something like this: | ||
unexpected T_FUNCTION in . . ./ | unexpected T_FUNCTION in . . ./ | ||
- | In this case download an alternative package, which supports earlier versions of PHP:\\Â | + | In this case download an alternative package, which supports earlier versions of PHP:Â |
- | https:// | + | \\ https:// |
- | This version is not kept up-to-date. | + | \\ This version is not kept up-to-date. |
==== Internet Explorer ==== | ==== Internet Explorer ==== | ||
+ | |||
An issue with IE 11 has been detected where the snippets' | An issue with IE 11 has been detected where the snippets' | ||
* https:// | * https:// | ||
+ | ===== Usage ===== | ||
- | ===== Usage ===== | ||
Create your snippets and then add them as an unordered list of links to the '' | Create your snippets and then add them as an unordered list of links to the '' | ||
< | < | ||
- | * [[snippet_1|]]Â | + | |
- | | + | * [[snippet_2|General Instructions]]Â |
- | | + | * [[snippet_3|Valid Users]] |
</ | </ | ||
However, if your snippet is derived from a namespace template, then you must use a special form of link which is described below in the section on using [[# | However, if your snippet is derived from a namespace template, then you must use a special form of link which is described below in the section on using [[# | ||
Line 66: | Line 66: | ||
Clicking on the snippets' | Clicking on the snippets' | ||
- | {{ https:// | + | {{ https:// |
In the left-hand pane of the pop-up is the list of links derived from the '' | In the left-hand pane of the pop-up is the list of links derived from the '' | ||
Line 74: | Line 74: | ||
When the '' | When the '' | ||
- | The header markup looks like this: '' | + | The header markup looks like this: '' |
===== How the updates are processed ===== | ===== How the updates are processed ===== | ||
+ | |||
The plugin keeps a database that records the associations between snippets and the pages where they are embedded; in addition the meta file for each page containing snippets keeps a record of each snippet and its timestamp. | The plugin keeps a database that records the associations between snippets and the pages where they are embedded; in addition the meta file for each page containing snippets keeps a record of each snippet and its timestamp. | ||
There are two ways that snippets are updated: | There are two ways that snippets are updated: | ||
- When a page with a revised snippet is opened for revision, the revised snippet will automatically replace the old version in the editing window. | - When a page with a revised snippet is opened for revision, the revised snippet will automatically replace the old version in the editing window. | ||
- | - When a snippet is revised, a table will appear at the bottom of its page with a listing of the pages that have used the snippet. \\ | + | - When a snippet is revised, a table will appear at the bottom of its page with a listing of the pages that have used the snippet. \\ {{ https:// |
For more details about the snippets plugin internals, see [[plugin: | For more details about the snippets plugin internals, see [[plugin: | ||
==== Admin: Metadata Clean-Up Tool ==== | ==== Admin: Metadata Clean-Up Tool ==== | ||
+ | |||
On the Administration Page, there is a tool which enables you to reconcile any differences between the information in the database and the content on the wiki pages. | On the Administration Page, there is a tool which enables you to reconcile any differences between the information in the database and the content on the wiki pages. | ||
- | |||
- | |||
===== Inserting Comments into Snippets ===== | ===== Inserting Comments into Snippets ===== | ||
Line 102: | Line 102: | ||
</ | </ | ||
</ | </ | ||
- | |||
===== Namespace Templates as Snippets ===== | ===== Namespace Templates as Snippets ===== | ||
Line 109: | Line 108: | ||
Namespace templates can be used as snippets. | Namespace templates can be used as snippets. | ||
- | | + | |
- | - Alternatively, | + | - Alternatively, |
In both cases the dummy file is used as the link in the snippets listing and when the link is clicked, the snippet is inserted into your page. There is one circumstance in which the contents of a dummy page is not ignored. | In both cases the dummy file is used as the link in the snippets listing and when the link is clicked, the snippet is inserted into your page. There is one circumstance in which the contents of a dummy page is not ignored. | ||
- | The following is a schematic for entering these snippets into the links on the [[# | + | The following is a schematic for entering these snippets into the links on the [[# |
< | < | ||
[[templ_admin|admin data]] | [[templ_admin|admin data]] | ||
Line 132: | Line 131: | ||
- '' | - '' | ||
- '' | - '' | ||
- | - '' | + | - '' |
The dummy pages themselves are not changed. | The dummy pages themselves are not changed. | ||
Line 139: | Line 138: | ||
==== Replacement Patterns ==== | ==== Replacement Patterns ==== | ||
+ | |||
Any replacement patterns that refer to page names, files and Dokuwiki ID's must have their '' | Any replacement patterns that refer to page names, files and Dokuwiki ID's must have their '' | ||
Line 152: | Line 152: | ||
The other replacement patterns remain the same, '' | The other replacement patterns remain the same, '' | ||
- | |||
===== Configuration Options ===== | ===== Configuration Options ===== | ||
- | |||
^ Option | ^ Option | ||
Line 170: | Line 168: | ||
**userreplace**: | **userreplace**: | ||
- | | + | |
When these macros are found in the template, they will be replaced by their replacement values. If a user-defined '' | When these macros are found in the template, they will be replaced by their replacement values. If a user-defined '' | ||
- | | + | |
| | ||
**skip_unset_macros**: | **skip_unset_macros**: | ||
Line 180: | Line 178: | ||
Replace outdated snippets in this Old Revision? Yes No | Replace outdated snippets in this Old Revision? Yes No | ||
- | Â | + | |
- | + | ||
===== Change Log ===== | ===== Change Log ===== | ||
+ | |||
{{rss> | {{rss> | ||
plugin/snippets.1527530259.txt.gz · Last modified: 2018-05-28 19:57 by Klap-in