Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:explugins [2018/12/13 12:54]
madsiur [Image Gallery]
wiki:explugins [2019/02/12 09:52] (current)
Line 4: Line 4:
 ===== Syntax ===== ===== Syntax =====
  
-A basic gallery can be added by selecting a [[https://​www.dokuwiki.org/​namespaces|namespace]] like this:+A basic gallery can be added by selecting a [[:​namespaces|namespace]] like this:
  
   {{gallery>:​namespace}}   {{gallery>:​namespace}}
Line 28: Line 28:
 E.g. instead of ''​%%http://​api.flickr.com/​services/​feeds/​photos_public.gne?​id=22019303@N00&​lang=en-us&​format=rss_200%%''​ use a shortened URL like ''​%%http://​bit.ly/​HurZM%%''​. E.g. instead of ''​%%http://​api.flickr.com/​services/​feeds/​photos_public.gne?​id=22019303@N00&​lang=en-us&​format=rss_200%%''​ use a shortened URL like ''​%%http://​bit.ly/​HurZM%%''​.
  
-Additionally,​ to have thumbnail creation correctly working you need to set [[https://​www.dokuwiki.org/​config:fetchsize|fetchsize]] big enough to get the remote images downloaded.+Additionally,​ to have thumbnail creation correctly working you need to set [[config:​fetchsize]] big enough to get the remote images downloaded.
  
 ==== Parameters ==== ==== Parameters ====
Line 41: Line 41:
 | ''​+//<​number>//'' ​             | ''​+0'' ​         | Skip the first number of images. Useful with the option above. | | ''​+//<​number>//'' ​             | ''​+0'' ​         | Skip the first number of images. Useful with the option above. |
 | ''​~//<​number>//'' ​             | ''​~0'' ​         | Add a pagination for the thumbnails displaying the number of given thumbnails per page. ''​0''​ disables pagination. Pagination is added through JavaScript - when no JavaScript is available all thumbnails are displayed | | ''​~//<​number>//'' ​             | ''​~0'' ​         | Add a pagination for the thumbnails displaying the number of given thumbnails per page. ''​0''​ disables pagination. Pagination is added through JavaScript - when no JavaScript is available all thumbnails are displayed |
-| ''​cache'' ​                     | enabled ​        | Usually the output of the created gallery is cached. When the images in your selected namespace change, you have to manually force an update of the gallery page's [[https://​www.dokuwiki.org/​caching|cache]]. To disable the cache for the page showing the gallery, set ''​nocache''​ as option. |+| ''​cache'' ​                     | enabled ​        | Usually the output of the created gallery is cached. When the images in your selected namespace change, you have to manually force an update of the gallery page's [[:​caching|cache]]. To disable the cache for the page showing the gallery, set ''​nocache''​ as option. |
 | ''​crop'' ​                      | disabled ​       | Make thumbnails the exact given thumbnail size big, cropping when needed. | | ''​crop'' ​                      | disabled ​       | Make thumbnails the exact given thumbnail size big, cropping when needed. |
 | ''​direct'' ​                    | disabled ​       | Link thumbnails with the bigger sized images not with their detail page | | ''​direct'' ​                    | disabled ​       | Link thumbnails with the bigger sized images not with their detail page |
Line 83: Line 83:
 If you want to show a title below the image using the parameter ''​showtitle''​ it may appear that the title shown is not as you expected (e.g. ''​einstein.jpg''​ instead of ''​Albert Einstein''​). If you want to show a title below the image using the parameter ''​showtitle''​ it may appear that the title shown is not as you expected (e.g. ''​einstein.jpg''​ instead of ''​Albert Einstein''​).
  
-If you want to adapt the image'​s subtitle shown in the gallery, you have to manipulate the EXIF Tag called ''​Headline''​. ​ This can be done with the [[https://​www.dokuwiki.org/​fullscreen_mediamanager|fullscreen media manager]]. ​ Alternatives include [[http://​owl.phy.queensu.ca/​~phil/​exiftool/​|ExifTool]] for which even a [[http://​u88.n24.queensu.ca/​~bogdan/​|Windows GUI]] exists to adapt the EXIF data to your needs. On //​Windows//,​ the small picture viewer [[http://​www.irfanview.com/​|IrfanView]] can also be used to change only IPTC values.+If you want to adapt the image'​s subtitle shown in the gallery, you have to manipulate the EXIF Tag called ''​Headline''​. ​ This can be done with the [[:fullscreen mediamanager|fullscreen media manager]]. ​ Alternatives include [[http://​owl.phy.queensu.ca/​~phil/​exiftool/​|ExifTool]] for which even a [[http://​u88.n24.queensu.ca/​~bogdan/​|Windows GUI]] exists to adapt the EXIF data to your needs. On //​Windows//,​ the small picture viewer [[http://​www.irfanview.com/​|IrfanView]] can also be used to change only IPTC values.
  
-Note that the EXIF-tags used for display can be changed. See [[https://​www.dokuwiki.org/​exif|EXIF and IPTC metadata]] for details. By default, the following tags are used:+Note that the EXIF-tags used for display can be changed. See [[:​exif|EXIF and IPTC metadata]] for details. By default, the following tags are used:
   * ''​IPTC:​Headline''​ for the title   * ''​IPTC:​Headline''​ for the title
   * ''​IPTC:​Caption-Abstract''​ for the description below the picture in lightbox-mode   * ''​IPTC:​Caption-Abstract''​ for the description below the picture in lightbox-mode
Line 98: Line 98:
 Uploading images is beyond the scope of this plugin. Do not request any features regarding this. Uploading images is beyond the scope of this plugin. Do not request any features regarding this.
  
-  * Use the [[https://​www.dokuwiki.org/​media_manager|media manager popup]] or [[https://​www.dokuwiki.org/​fullscreen_mediamanager|fullscreen media manager]] to upload multiple image at once with compatible browsers, otherwise one by one. +  * Use the [[:media manager|media manager popup]] or [[:fullscreen mediamanager|fullscreen media manager]] to upload multiple image at once with compatible browsers, otherwise one by one. 
-  * Use the [[https://​www.dokuwiki.org/​plugin:archiveupload|archiveupload]] plugin to upload multiple images in a Zip file +  * Use the [[plugin:​archiveupload]] plugin to upload multiple images in a Zip file 
-  * Upload the files manually via FTP to the ''​data/​media''​ directory. Keep in mind that image names need to be valid [[https://​www.dokuwiki.org/​pagename|pagenames]],​ all lowercase, no spaces or special chars!+  * Upload the files manually via FTP to the ''​data/​media''​ directory. Keep in mind that image names need to be valid [[:​pagenames]],​ all lowercase, no spaces or special chars!
   * Images previously rotated 90˚ and saved in that orientation no longer appear that way when used in dokuwiki.   * Images previously rotated 90˚ and saved in that orientation no longer appear that way when used in dokuwiki.
  
Line 106: Line 106:
 ==== Caching ==== ==== Caching ====
  
-The gallery output is cached by default. When you add pictures later, they may not show up in the gallery: add ''&​purge=true''​ to the end of the URL to clear the cache. See [[https://​www.dokuwiki.org/​caching|caching]] for details.+The gallery output is cached by default. When you add pictures later, they may not show up in the gallery: add ''&​purge=true''​ to the end of the URL to clear the cache. See [[:​caching]] for details.
  
 Optionally use the ''​nocache''​ parameter of the plugin (not recommended). Optionally use the ''​nocache''​ parameter of the plugin (not recommended).
Line 112: Line 112:
 ==== EXIF Data Problems ==== ==== EXIF Data Problems ====
  
-Problems with accessing [[https://​www.dokuwiki.org/​exif|EXIF or IPTC]] data in the images, should be reported as DokuWiki bugs and not for this plugin. All EXIF handling is in DokuWiki core. Currently EXIF Data is expected in UTF-8 encoding. ​+Problems with accessing [[:​exif|EXIF or IPTC]] data in the images, should be reported as DokuWiki bugs and not for this plugin. All EXIF handling is in DokuWiki core. Currently EXIF Data is expected in UTF-8 encoding. ​
  
 ==== Lightbox Problems ==== ==== Lightbox Problems ====
  
-When the lightbox mode doesn'​t work and instead images are simply opened in the same window, the JavaScript was not correctly loaded. This is most likely a Browser-Cache issue. Simply follow the steps described for fixing a similar problem with the [[https://​www.dokuwiki.org/​faq:toolbar|toolbar]]. Also make sure you don't have any conflicting plugin installed. You should **not** install any additional lightbox plugin.+When the lightbox mode doesn'​t work and instead images are simply opened in the same window, the JavaScript was not correctly loaded. This is most likely a Browser-Cache issue. Simply follow the steps described for fixing a similar problem with the [[faq:​toolbar]]. Also make sure you don't have any conflicting plugin installed. You should **not** install any additional lightbox plugin.
  
 ==== Images are not Resized ==== ==== Images are not Resized ====
Line 122: Line 122:
 There are different reasons why thumbnails are not created: There are different reasons why thumbnails are not created:
  
-  * libGD extension is missing => Install the extension or configure DokuWiki to use [[https://​www.dokuwiki.org/​config:​im_convert|imagemagick]]+  * libGD extension is missing => Install the extension or configure DokuWiki to use [[config:​im_convert|imagemagick]]
   * libGD extension is installed, but the source image size + overhead is larger than memory_limit set in php.ini => Lower the source image size or increase the memory_limit   * libGD extension is installed, but the source image size + overhead is larger than memory_limit set in php.ini => Lower the source image size or increase the memory_limit
  
Line 131: Line 131:
 ==== External Images are not Resized ==== ==== External Images are not Resized ====
  
-As written above, you need to increase the [[https://​www.dokuwiki.org/​config:fetchsize|fetchsize]] config option. Also make sure LibGD or ImageMagick are installed. +As written above, you need to increase the [[config:​fetchsize]] config option. Also make sure LibGD or ImageMagick are installed.
- +
-===== Demo Installations ===== +
- +
-Here are a few user provided examples of the gallery plugin in use: +
- +
-  * http://​adam.nz +
-  * http://​eolienne.f4jr.org/​medias/​start +
-  * http://​www.splitbrain.org/​blog/​2008-01/​04-new_york_impressions +
-  * http://​www.hemmerling.com/​doku.php/​en/​repository.html +
- +
- +
- +
-====== Discussion Plugin ====== +
- +
-===== Description ===== +
- +
-The Discussion plugin adds a discussion section after your wiki page for user comments. This is useful to separate page content and the discussion thereof and also, if you don't want to give normal users the right to edit the page but still want user contributed notes.  +
- +
-A second component of this plugin shows a list of all pages in a namespace with a discussion section (called discussion threads) ordered by most recent comments. This allows you to create a very simple discussion forum in your wiki. +
- +
-===== Components ===== +
- +
-==== Comments-section ==== +
-This is the main part of the plugin. By including the ''​%%~~DISCUSSION~~%%''​ instruction in your wiki page, a discussion section will be appended after the normal wiki page content. To turn it off again, use ''​%%~~DISCUSSION:​off~~%%''​. If you want to show the existing discussion but don't want to allow new comments / replies, use ''​%%~~DISCUSSION:​closed~~%%''​. +
-  ~~DISCUSSION~~ +
-  ~~DISCUSSION:​off~~ +
-  ~~DISCUSSION:​closed~~ +
- +
-A custom title can be appended after the separator %%|%%. +
-  ~~DISCUSSION|Custom Title String~~ +
-  ~~DISCUSSION:​closed|Custom Title String~~ +
- +
- +
- +
-After each comment in the discussion section there may be up to three buttons (depending on your rights): +
- +
-  * Reply: To reply to a comment (vs. commenting on the wiki page content), click the ''​Reply''​ button. The comment entry form will then be placed accordingly. +
-  * Edit: Registered users can edit their comments; admins can edit all comments. To remove a comment, just edit it, clear the text and save the empty comment -- like you would do with a wiki page. +
-  * Delete: Registered users and admin all comments. \\ //​Attention:​ If there are replies to a comment, removing it will also remove all replies!//​ +
-  * Hide / Show: Admins can deactivate and reactivate comments easily by this button. Hidden comments aren't shown to normal users and are displayed dimmed to admins. Registered users can only hide their own comments. +
- +
- +
-Of course, the whole DokuWiki [[:​wiki:​syntax|syntax]] can be used in comments as well. But there are problems with headers and footnotes as they may produce conflicting IDs and thus invalid XHTML. I'm looking for a way to either allow only a subset of the wiki syntax or automatically create unique IDs. +
- +
-==== Threads syntax==== +
-This displays a list of all pages of the given namespace with a discussion section. The list is sorted by the most recent comment. +
- +
-  {{threads>​[namespace]&​[count=n]&​[flags]&​skipempty}} +
- +
-^ [namespace] | the namespace for which you want a discussion thread list; '':''​ is the top namespace, ''​.''​ is the same namespace as the page lies in, ''​*''​ the whole wiki | required | +
-^ [count=n] | the number of discussions which should be displayed (valid values: n > 0) | optional | +
-^ [flags] | pagelist flags delimited by ''&'',​ see [[https://​www.dokuwiki.org/​plugin:​pagelist#​flags|flags]] | optional | +
-^ skipempty | Do not print discussions with no comments | optional | +
- +
- +
-Default a //new thread form// is shown below the list. See ''​threads_formposition''​ setting for moving it to the top of the list, or to disable this form. +
  
 ====== Video Share Plugin ====== ====== Video Share Plugin ======
 +[[https://​www.dokuwiki.org/​plugin:​vshare]]
  
 ===== Usage/​Syntax ===== ===== Usage/​Syntax =====
Line 268: Line 212:
 Additional sites can be added to the ''​sites.conf''​ file in the plugin directory. Video ID recognition patterns for the toolbar button are configured in ''​sites.js''​ Additional sites can be added to the ''​sites.conf''​ file in the plugin directory. Video ID recognition patterns for the toolbar button are configured in ''​sites.js''​
  
 +====== Wrap Plugin ======
  
- 
- 
- 
- 
-====== Wrap Plugin ====== 
  
 ===== One plugin to rule them all ===== ===== One plugin to rule them all =====
Line 284: Line 224:
 It potentially replaces a lot of other plugins and is IMHO the better alternative for many. It potentially replaces a lot of other plugins and is IMHO the better alternative for many.
  
 +It fully replaces: [[class]], [[clearfloat]],​ [[div_span_shorthand]],​ [[divalign2]],​ [[divalign]],​ [[emphasis]],​ [[hide]], [[important_paragraf]],​ [[importanttext]],​ [[lang]], [[ltr]], [[noprint]],​ [[pagebreak]],​ [[side_note]],​ [[tip]], [[wpre]]
 +
 +It partly replaces: [[box]], [[button]], [[color]], [[columns]],​ [[fontcolor]],​ [[fontfamily]],​ [[fontsize2]],​ [[fontsize]],​ [[highlight]],​ [[layout]], [[note]], [[styler]], [[tab]], [[tablewidth]],​ [[typography]]
  
  
 +===== Installation =====
 +
 +Search and install the plugin using the [[plugin:​extension|Extension Manager]]. Refer to [[:​Plugins]] on how to install plugins manually.
  
 ===== Syntax ===== ===== Syntax =====
Line 294: Line 240:
   </​WRAP>​   </​WRAP>​
   ​   ​
-  or+  ​**or**
   <block classes #id width :​language>​   <block classes #id width :​language>​
   "​big"​ content   "​big"​ content
Line 332: Line 278:
 The following classes are currently available: The following classes are currently available:
  
-{{ :plugin:wrap_plugin_example9.png?​300&​direct}}+{{ :plugin:wrap_plugin_example10.png?​300&​direct}}
  
 ^ class name  ^ description/​notes ​ ^ ^ class name  ^ description/​notes ​ ^
Line 340: Line 286:
 | **''​right''​** ​ | will let the container float right  | | **''​right''​** ​ | will let the container float right  |
 | **''​center''​** ​ | will position the container in the horizontal center of the page  | | **''​center''​** ​ | will position the container in the horizontal center of the page  |
-| **''​col2''​**..**''​col5''​** ​ | will show the text in multiple columns (2, 3, 4 or 5), only works in modern browsers (FirefoxChrome ​and Safari)  |+| **''​col2''​**..**''​col5''​** ​ | will show the text in multiple columns ​determined by their amount ​(2, 3, 4 or 5), only works in modern browsers (no IE9 and below) ​ | 
 +| **''​colsmall''​****''​colmedium''​**,​ **''​collarge''​** ​ | will also show the text in multiple columns but determined by their width (small, medium or large), only works in modern browsers (no IE9 and below)  |
 ^ __widths__ -- :!: **experimental**,​ might not work as expected, includes mobile support ​ || ^ __widths__ -- :!: **experimental**,​ might not work as expected, includes mobile support ​ ||
 | **''​half''​** ​ | fits two columns in a row, should be used in pairs  | | **''​half''​** ​ | fits two columns in a row, should be used in pairs  |
-| **''​third''​** ​ | fits three columns in a row, should be used in triplets ​ |+| **''​third''​** ​ | fits three or two columns in a row, should be used in triplets ​or together with ''​twothirds'' ​ | 
 +| **''​twothirds''​** ​ | fits two columns in a row when used together with ''​third'',​ one 1/3 wide and another 2/3 wide  |
 | **''​quarter''​** ​ | fits four columns in a row, should be used in quads  | | **''​quarter''​** ​ | fits four columns in a row, should be used in quads  |
 ^ __alignments__ -- similar to [[divalign]],​ [[columns]],​ [[styler]] -- :!: don't work with spans! ​ || ^ __alignments__ -- similar to [[divalign]],​ [[columns]],​ [[styler]] -- :!: don't work with spans! ​ ||
Line 379: Line 327:
 | **''​spoiler''​** ​ | shows white text on a white background, only to be revealed by highlighting it; similar to [[hide]] ​ | | **''​spoiler''​** ​ | shows white text on a white background, only to be revealed by highlighting it; similar to [[hide]] ​ |
 | **''​button''​** ​ | when wrapped around a link, styles it like a button ​ | | **''​button''​** ​ | when wrapped around a link, styles it like a button ​ |
 +| **''​tablewidth''​** ​ | sets widths of tables inside to whichever width the wrap gets, partly replaces [[tablewidth]] ​ |
 | **''​indent''​** ​ | indents the text, could be used instead of [[tab]] ​ | | **''​indent''​** ​ | indents the text, could be used instead of [[tab]] ​ |
 | **''​outdent''​** ​ | "​outdents"​ the text, could partly be used instead of [[outdent]] ​ | | **''​outdent''​** ​ | "​outdents"​ the text, could partly be used instead of [[outdent]] ​ |
 | **''​prewrap''​** ​ | wraps text inside pre-formatted code blocks, similar to [[wpre]] ​ | | **''​prewrap''​** ​ | wraps text inside pre-formatted code blocks, similar to [[wpre]] ​ |
- 
-All tables inside a column or box will always be 100% wide. This makes positioning and sizing tables possible and partly replaces [[tablewidth]]. 
  
 === Known restrictions === === Known restrictions ===
  
-  * WRAPs won'​t ​export ​in ODT format.+  * WRAPs export ​to ODT format ​but not everything works 100%
   * Round corners only work in modern browsers (no IE8 and below).   * Round corners only work in modern browsers (no IE8 and below).
   * Multiple columns only work in modern browsers (no IE9 and below).   * Multiple columns only work in modern browsers (no IE9 and below).
   * Width classes are experimental and only work in modern browsers (no IE8 and below).   * Width classes are experimental and only work in modern browsers (no IE8 and below).
-  * Normal DokuWiki Headlines used to not work and a work-around was added. Now that headlines do work, the work-around is not needed anymore but kept for backwards-compatibility. The following syntax would produce two different kinds of emulated headlines inside any of the columns or boxes/notes:+  * Normal DokuWiki Headlines used to not work and a work-around was added. Now that headlines do work, the work-around is not needed anymore but kept for backwards-compatibility. It was deprecated in version 2018-04-22 and disabled by default. They can be enabled by using the ''​emulatedHeadlines''​ [[#​configuration_options|config option]]. The following syntax would then produce two different kinds of emulated headlines inside any wrap:
     * %%//**__Big Underlined Headline__**//​%% (They will look a bit different in safety notes.)     * %%//**__Big Underlined Headline__**//​%% (They will look a bit different in safety notes.)
     * %%//**Small Headline**//​%%     * %%//**Small Headline**//​%%
Line 401: Line 348:
 ==== Widths ==== ==== Widths ====
  
-You can set any valid widths on any uppercase %%<​WRAP>​%% container: ''​%,​ px, em, ex, pt, pc, cm, mm, in''​. Just set the width before or after or with the classes, e.g.+You can set any valid widths on any uppercase %%<​WRAP>​%% container: ''​%,​ px, em, rem, ex, ch, vw, vh, pt, pc, cm, mm, in''​. Just set the width before or after or with the classes, e.g.
   <WRAP someclass 50% anotherclass>​...   <WRAP someclass 50% anotherclass>​...
 All except percentages will be reduced to have the maximum width available on smaller screens. All except percentages will be reduced to have the maximum width available on smaller screens.
  
-You can also use the width keywords ''​half'',​ ''​third''​ and ''​quarter''​. To work correctly they need another wrap around them. E.g.+You can also use the width keywords ''​half'',​ ''​third'',​ ''​twothirds''​ and ''​quarter''​. To work correctly they need another wrap around them. E.g.
   <WRAP group>   <WRAP group>
     <WRAP half column>​...</​WRAP>​     <WRAP half column>​...</​WRAP>​
Line 433: Line 380:
  
 ^ Option ​ ^ Description ​ ^ Default value ^ ^ Option ​ ^ Description ​ ^ Default value ^
-|''​noPrefix'' ​ | Which (comma separated) class names should be excluded from being prefixed with "​wrap_"​ | tabs, group | +|''​noPrefix'' ​ | Which (comma separated) class names should be excluded from being prefixed with "​wrap_" ​ (* and ? wildcards allowed) ​| tabs, group | 
-|''​restrictedClasses''​ | restrict ​usage of plugin to these (comma separated) classes | //(empty)// | +|''​restrictedClasses''​ | Restrict ​usage of plugin to these (comma separated) classes ​(* and ? wildcards allowed) ​| //(empty)// | 
-|''​restrictionType'' ​ | restriction ​type, specifies if classes above shall be included or excluded | 0 |+|''​restrictionType'' ​ | Restriction ​type, specifies if classes above shall be included or excluded | 0 |
 |''​syntaxDiv'' ​ | Which syntax should be used in the toolbar picker for block wraps? | WRAP (other choices: div, block) | |''​syntaxDiv'' ​ | Which syntax should be used in the toolbar picker for block wraps? | WRAP (other choices: div, block) |
 |''​syntaxSpan'' ​ | Which syntax should be used in the toolbar picker for inline wraps? | wrap (other choices: span, inline) | |''​syntaxSpan'' ​ | Which syntax should be used in the toolbar picker for inline wraps? | wrap (other choices: span, inline) |
 |''​darkTpl'' ​ | Optimise colours for dark templates? | 0 | |''​darkTpl'' ​ | Optimise colours for dark templates? | 0 |
 +|''​emulatedHeadlines'' ​ | Use emulated headings? (deprecated) | 0 |
  
 ===== ODT Support ===== ===== ODT Support =====
 +
 +FIXME There have been more updates to the Wrap as well as the ODT plugin, so more stuff works. The below should be updated with what works and what doesn'​t.
  
 Since version 2015-06-13 the Wrap plugin supports exporting most of its functionality/​styling to ODT when using at least version 2015-06-29 of the [[odt|ODT Plugin]]. By default, Wrap syntax will be exported to ODT using '​print'​ CSS styles. This means the exported Wrap elements will look the same when printing a wiki page. If you want to have the ODT exported Wrap elements look like displayed in the browser (i.e. with '​screen'​ CSS styles), then use the following ODT plugin configuration settings: Since version 2015-06-13 the Wrap plugin supports exporting most of its functionality/​styling to ODT when using at least version 2015-06-29 of the [[odt|ODT Plugin]]. By default, Wrap syntax will be exported to ODT using '​print'​ CSS styles. This means the exported Wrap elements will look the same when printing a wiki page. If you want to have the ODT exported Wrap elements look like displayed in the browser (i.e. with '​screen'​ CSS styles), then use the following ODT plugin configuration settings:
Line 471: Line 421:
   * "​simple centered box" creates a standard box (60% wide, centered)   * "​simple centered box" creates a standard box (60% wide, centered)
   * "info, tip, important, alert, help, download, todo box" creates specifically themed boxes (also 60% wide, centered)   * "info, tip, important, alert, help, download, todo box" creates specifically themed boxes (also 60% wide, centered)
-  * "clear floats"​ creates a ''​%%<​WRAP clear></WRAP>​%%''​+  * "clear floats"​ creates a ''​%%<​WRAP clear/>​%%''​
   * "​especially emphasised, highlighted,​ less significant"​ creates the respective marks   * "​especially emphasised, highlighted,​ less significant"​ creates the respective marks
  
Line 484: Line 434:
  
 Since version 2010-03-14 you have the possibility to exclude certain class names from being prefixed with "​wrap_"​. Just add a comma separated list of class names into the config option "​noPrefix"​ in the configuration manager. Since version 2010-03-14 you have the possibility to exclude certain class names from being prefixed with "​wrap_"​. Just add a comma separated list of class names into the config option "​noPrefix"​ in the configuration manager.
- 
-==== Examples ==== 
- 
-in style.css 
- 
-<code css> 
-.dokuwiki div.wrap_note{ /* added */ 
-    background-color:​ #eee; 
-    color: #000; 
-    padding: .5em .5em .5em .5em; 
-    margin-bottom:​ 1em; 
-    overflow: hidden; 
-} 
-</​code>​ 
- 
-call in DW-page: 
-  <WRAP note>​...</​WRAP>​ 
- 
-Here are some [[plugin:​wrap:​extensions|useful wrap extensions]] created by users of this plugin. 
-==== Add former typography classes ==== 
- 
-The old typography classes were removed in version 2011-05-15. If you need something similar, use the [[Block]] plugin instead. Or you can use your own and copy them to your own user styles (see [[#Extend with custom styles|above]]). 
- 
-===== How to use the helper ===== 
- 
-From version 2011-05-15 on the plugin includes a helper plugin which you can use to add classes, width and lang/dir to any other plugin. 
- 
-==== Example how to get just one kind of attribute ==== 
- 
-<code php> 
-// get lang from wrap helper plugin 
-$lang = '';​ 
-if(!plugin_isdisabled('​wrap'​)) { 
-    $wrap = plugin_load('​helper',​ '​wrap'​);​ 
-    $attr = $wrap->​getAttributes($data);​ 
-    if($attr['​dir'​]) $lang = ' lang="'​.$attr['​lang'​].'"​ xml:​lang="'​.$attr['​lang'​].'"​ dir="'​.$attr['​dir'​].'"';​ 
-} 
- 
-// add lang to your plugin'​s output 
-$renderer->​doc .= '<​span '​.$lang.'​ class="​foo">';​ 
-</​code>​ 
- 
-''​getAttributes()''​ expects the string with "​classes #id width :​language"​. It returns an array with 
-  * ''​$attr['​class'​]'':​ CSS class(es) 
-  * ''​$attr['​id'​]'':​ CSS ID 
-  * ''​$attr['​width'​]'':​ width 
-  * ''​$attr['​lang'​]''​ and ''​$attr['​dir'​]'':​ language and text direction 
- 
-==== Example how to get all attributes ==== 
- 
-<code php> 
-// get attributes from wrap helper plugin 
-$attr = '';​ 
-if(!plugin_isdisabled('​wrap'​)) { 
-    $wrap = plugin_load('​helper',​ '​wrap'​);​ 
-    $attr = $wrap->​buildAttributes($data,​ '​additionalClass'​);​ 
-} 
- 
-// add those attributes to your plugin'​s output 
-$renderer->​doc .= '<​div '​.$attr.'">';​ 
-</​code>​ 
- 
-''​buildAttributes()''​ expects the same string as above ("​classes #id width :​language"​) and an optional string for additional classes, in case your plugin has CSS classes of its own which it needs to reuse. It returns a string with all the attributes prepared for HTML. 
- 
- 
-===== Development ===== 
- 
-==== Done ==== 
- 
-[[https://​github.com/​selfthinker/​dokuwiki_plugin_wrap/​commits/​master.atom|{{http://​img529.imageshack.us/​img529/​5725/​feedm.png?​16x16 |Recent commits to Wrap Plugin (RSS feed)}}]] 
-{{rss>​https://​github.com/​selfthinker/​dokuwiki_plugin_wrap/​commits/​master.atom date}} 
- 
-==== Localization ==== 
- 
-You can help me with translations and [[http://​translate.dokuwiki.org/​plugin/​wrap|update the language files]]. There are two files to translate: 
- 
-  * [[https://​github.com/​selfthinker/​dokuwiki_plugin_wrap/​blob/​master/​lang/​en/​lang.php|lang/​en/​lang.php]] is for the explaining titles on the picker images. 
-  * [[https://​github.com/​selfthinker/​dokuwiki_plugin_wrap/​blob/​master/​lang/​en/​settings.php|lang/​en/​settings.php]] is for the configuration options. 
- 
-===== Credits ===== 
- 
-  * The code reuses parts of the [[box]] plugin by [[chris@jalakai.co.uk|Christopher Smith]]. 
-  * The ODT support was implemented by [[https://​github.com/​LarsGit223|LarsDW223]]. 
-  * The images for the notes are taken from the [[http://​schollidesign.deviantart.com/​art/​Human-O2-Iconset-105344123|Human-O2 icon set]]. 
-  * The toolbar uses images from the [[http://​www.famfamfam.com/​lab/​icons/​silk/​|Silk Icon Set]] and the [[http://​www.damieng.com/​icons/​silkcompanion|Silk Companion Icon Set]]. 
-  * Thanks to [[https://​github.com/​selfthinker/​dokuwiki_plugin_wrap/​contributors|all contributors]]. 
- 
-===== Discussion ===== 
- 
-Before reporting any issues (bugs or requests), please first take a look at the [[faq:​pluginproblems|FAQ on plugin problems]]. 
-You can report any issues either on the [[https://​github.com/​selfthinker/​dokuwiki_plugin_wrap/​issues|Issue Tracker]] or on the separate [[.:​wrap:​discussion]] page. 
  
 ====== PageList Plugin ====== ====== PageList Plugin ======
 +[[https://​www.dokuwiki.org/​plugin:​pagelist]]
  
 ===== Description ===== ===== Description =====
Line 608: Line 468:
 | ''​showfirsthl''​ ^ ''​firsthl''​ | show the first headline ^ ''​nofirsthl''​ | show the page name | | ''​showfirsthl''​ ^ ''​firsthl''​ | show the first headline ^ ''​nofirsthl''​ | show the page name |
 | ''​rsort/​sort'' ​       ^ ''​nosort'' ​   | no sortation of pages ^ ''​rsort/​sort''​ | sorts the pages (reverse) alphabetically by pagename | | ''​rsort/​sort'' ​       ^ ''​nosort'' ​   | no sortation of pages ^ ''​rsort/​sort''​ | sorts the pages (reverse) alphabetically by pagename |
-| ''​showdiff'' ​       ^ ''​missing'' ​   | no displaying of differences column ^ ''​showdiff''​ | displays the differences column with the diff icon linking to the corresponding diff page for each row |+| ''​showdiff'' ​       ^ ''​nodiff'' ​   | no displaying of differences column ^ ''​showdiff''​ | displays the differences column with the diff icon linking to the corresponding diff page for each row 
 +| ''​image'' ​       ^ ''​noimage'' ​   | show image of the page ^ ''​image''​ | needs [[pageimage|Pageimage Plugin]] installed. Can either be defined on page or image with same name as page will be used |
  
 ==== Example ==== ==== Example ====
Line 631: Line 492:
 ^ ''​sort'' ​    | Sorts the pages alphabetically by pagename | ^ ''​sort'' ​    | Sorts the pages alphabetically by pagename |
 ^ ''​showdiff''​ | Displays a differences column with the diff icon linking to the corresponding diff page for each row | ^ ''​showdiff''​ | Displays a differences column with the diff icon linking to the corresponding diff page for each row |
 +^ ''​showimage''​ | Shows/hides the image column (requires the [[pageimage|Pageimage Plugin]] |
 ===== Helper Plugin ===== ===== Helper Plugin =====
  
Line 656: Line 517:
 </​code>​ </​code>​
  
-===== Bugs Feature Requests ​=====+====== newpagetemplate plugin ====== 
 +[[https://​www.dokuwiki.org/​plugin:​newpagetemplate]] 
 + 
 +===== Description ===== 
 + 
 +This plugin loads into the edit window a template specified in the $_REQUEST “newpagetemplate” parameter. Effectively,​ this means that you can invoke a template, similar to the namespace template pages, either in the URL or in a POST form coded to create a new page.  
 + 
 +The [[plugin:​openas]] plugin and the [[plugin:​addnewpage]] plugin provide techniques which support the ''​newpagetemplate''​ plugin. The [[plugin:​openas]] plugin includes a simple method of creating a form designed for use with the ''​newpagetemplate''​ plugin, making it possible for each user to assign unique values to the template'​s variables. 
 + 
 +===== Usage ===== 
 + 
 +If a new page is created with the URL: 
 +  doku.php?​id=:​mynewpage&​do=edit&​rev=&​newpagetemplate=:​pagetemplates:​yourtemplate&​newpagevars=@HI@,​Howdy! 
 +then the '':​pagetemplates:​yourtemplate''​ page is pasted into the edit window. ​ If the "​standardreplace"​ configuration option is true, then the substitutions noted below are performed. ​ If the "​userreplace"​ configuration option is true, then you can also replace ''​@HI@''​ with ''​Howdy!'',​ as this substitution was passed in newpagevars. ​ The format for newpagevars is: 
 +   ​newpagevars=key,​value;​key2,​value2;​key3,​value3;​ 
 +See [[#​configuration_options]] and [[#​substitutions]] for a description of the standard and user replacements. 
 + 
 +===Example of syntax for a template page== 
 +If you create a template page ''​yourtemplate''​ with this markup in '':​pagetemplates:''​ 
 + 
 +  This page is: @ID@ 
 +     
 +  @HI@ @NAME@ 
 + 
 +And if you paste the above URL into your browser'​s location bar, you will get a page in your browser that looks something like this: 
 + 
 +  This page is: mynewpage 
 +    
 +  Howdy! Joe 
 + 
 +''​@ID@''​ is one of the '​standardreplace'​ macros and ''​@HI@''​ is a '​userreplace'​ marcro. 
 +    
 +=== How to create a link using wiki syntax=== ​   
 +Is it possible to use standard wiki-link syntax for this? For eg. like: 
 + 
 +  [[:​mynewpage?​do=edit&​rev=&​newpagetemplate=:​pagetemplates:​homepagetemplate&​newpagevars=@HI@,​Howdy!|New page with template]] ​  
 + 
 +Yes, you can do this. But you will have to substitute some url-encoded characters. ​ In particular, the comma must be represented as ''​%2c''​. So this would give you: 
 + 
 +  &​newpagevars=@HI@%2CHowdy 
 + 
 +You may find with use that there are others. 
  
-Please report bugs or feature requests at the [[https://​github.com/​dokufreaks/​plugin-pagelist/​issues|Bug tracker]].+==== Substitutions ====
  
-===== Further Resources =====+As with the ''​_template.txt''​ [[:​namespace_templates|namespace templates]],​ the following variables are replaced in your template.
  
-  * [[https://​github.com/​dokufreaks/​plugin-pagelist/​tree/​master|Git Repository]] +^ @ID@              | full ID of the page                                                                  ​
-  ​* [[https://​github.com/​dokufreaks/​plugin-pagelist/​issues|Bug Tracker]]+^ @NS@              | namespace of the page                                                                | 
 +^ @PAGE@ ​           | page name (ID without namespace and underscores replaced by spaces) ​                 | 
 +^ @!PAGE@ ​          | same as above but with the first character uppercased ​                               | 
 +^ @!!PAGE@ ​         | same as above but with the first character of all words uppercased ​                  | 
 +^ @!PAGE!@ ​         | same as above but with all characters uppercased ​                                    | 
 +^ @FILE@ ​           | page name (ID without namespace, underscores kept as is)                             | 
 +^ @!FILE@ ​          | same as above but with the first character uppercased ​                               | 
 +^ @!FILE!@ ​         | same as above but with all characters uppercased ​                                    | 
 +^ @USER@ ​           | ID of user who is creating the page                                                  | 
 +^ @NAME@ ​           | name of user who is creating the page                                                | 
 +^ @MAIL@ ​           | mail address of user who is creating the page                                        | 
 +^ @DATE@ ​           | date and time when edit session started ​                                             | 
 +^ @DATE@ ​           | date and time when edit session started ​                                             | 
 +| %a %d-%m-%y etc.  | e.g. Thu 06-12-12. [[php>​Strftime]] placeholders are replaced by page creation time  |
  
-===== Changes ===== 
  
-{{rss>​https://​github.com/​dokufreaks/​plugin-pagelist/​commits/​master.atom date author}}+===== Configuration Options ===== 
 +^ userreplace ​       | Replace user defined macros as explained above in [[#​usage]] ​                                          | 
 +^ standardreplace ​   | Replace standard macros as listed above in [[#​substitutions]] ​                                         | 
 +^ prettytitles ​      | Replace underscores with spaces in the following standard macros %%@!PAGE@, @!!PAGE@,​@!PAGE!@%% ​       | 
 +| skip_unset_macros ​ | Remove macros which have no substitution values, so that they don't appear in the newly created page |
  
 +The ''​prettytitles''​ patch was contributed by  Matthias Bannach.
  • wiki/explugins.txt
  • Last modified: 7 months ago
  • (external edit)