DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:xssnipper

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:xssnipper [2012-01-18 16:41] – [Configuration] 192.100.123.77plugin:xssnipper [2024-02-13 06:58] (current) Aleksandr
Line 1: Line 1:
-====== xssnipper Plugin ====== +====== xsSnipper Plugin ======
----- pluginnews ---- +
-headline: Plugins by same author +
-style: sameauthor +
-----+
  
 ---- plugin ---- ---- plugin ----
-description: Exctract a snippet of a file and publish it on your page.+description: Exctract a snippet of a file and publish it on your page
 author     : Taggic author     : Taggic
 email      : taggic@t-online.de  email      : taggic@t-online.de 
 type       : syntax type       : syntax
-lastupdate : 2012-01-18 +lastupdate : 2016-06-02 
-compatible : 2011-05-25+compatible : Rincewind, Angua
 depends    :  depends    : 
 conflicts  conflicts 
Line 23: Line 19:
 ---- ----
  
-====== Feature Overview ====== +===== Feature Overview ===== 
-This plugin delivers to your code output and style the following: +This is a very small and simple plugin to place defined snippets of a file onto your page or just output a code snipped with line numbering. 
-  * code snippets directly from files+ 
 +This plugin delivers following: 
 +  * code snippets directly from files or just copy-paste a code block
   * code line numbering   * code line numbering
   * direct link of commands to online descriptions (e.g. php.net)   * direct link of commands to online descriptions (e.g. php.net)
   * downloadable code blocks   * downloadable code blocks
   * css supported box style   * css supported box style
 +  * add code buttons to the Editor Toolbar
  
-====== Intro ====== +Demo: [[http://www.fristercons.de/fcon/doku.php?id=xssnipper:xssnipper]] 
-This is a very small and simple plugin to place defined snippets of a file onto your page+ 
-  +   
-__**Syntax:**__ \\  +====== Syntax ====== 
-The following syntax does apply: //%%{(xssnipper>%%[PATH],[from line],[to line],[code language] [code block file]%%)}%%// \\.+===== Case 1: Standard code snipped ===== 
 +The following syntax does apply: //%%{(xssnipper>%%**,**[start line]**,**[code language] [code block file] [slide]**,**[ code ]%%)}%%// \\  
 +where // [ code ] // is the snipped you want to show\\  
 + 
 +__**Syntax Example (no slide):**__\\  
 +  {(xssnipper>,1,php test, 
 +  // 1. check if $xssnipper['filepath'] exist, else error message 
 +     if(!file_exists($xssnipper['filepath'])) { 
 +        msg('file '.$xssnipper['filepath'].' not found',-1); 
 +        return false; 
 +     } 
 +  )} 
 +===== Case 2: Code snipped from file ===== 
 +The following syntax does apply: //%%{(xssnipper>%%[PATH],[from line],[to line],[code language] [code block file] [slide]%%)}%%// \\.
 ^Parameter ^Necessity ^ Meaning | ^Parameter ^Necessity ^ Meaning |
 | //[PATH]//  | mandatory  |specifies the file where content to be picked up | | //[PATH]//  | mandatory  |specifies the file where content to be picked up |
Line 41: Line 53:
 | //[to line]//  | optional   |defines the last line to be displayed, if empty it will be set to end of file; if further parameter will be given at least the colon separator to be written  | | //[to line]//  | optional   |defines the last line to be displayed, if empty it will be set to end of file; if further parameter will be given at least the colon separator to be written  |
 | //[code language]//  | optional   |tells code block/GeSHi what language file to be used for coloring, file extension of the [path] parameter will be used if empty    | //[code language]//  | optional   |tells code block/GeSHi what language file to be used for coloring, file extension of the [path] parameter will be used if empty   
-| //[code block file]//  | optional   |enables the download cod blocks feature and specifies the file name, if empty no downloadable code block provided  |+| //[code block file]//  | optional   |enables the download cod blocks feature and specifies the file name, if empty no downloadable code block provided. **(file name must not contain space character !)**  | 
 +| //[slide]//   | optional   |enables the view/hide (slide) function of the code block. Any value will switch on this function (e.g. 1 or on or slide). If set the code will be hidden initially. 
  
-Simply place the following syntax into the page markup: +Simply place syntax like following into your page markup: 
   {(xssnipper>./lib/plugins/xssnipper/plugin.info.txt,1,5,txt test.txt)}   {(xssnipper>./lib/plugins/xssnipper/plugin.info.txt,1,5,txt test.txt)}
      
Line 51: Line 65:
 {{http://img846.imageshack.us/img846/8528/xssnipperexample.jpg?nolink|output example}} {{http://img846.imageshack.us/img846/8528/xssnipperexample.jpg?nolink|output example}}
  
-Live demo examples can be found here: [[http://www.fristercons.de/fcon/doku.php?id=xssnipper:xssnipper#intro]]+FIXME Live demo examples can be found here: [[http://www.fristercons.de/fcon/doku.php?id=xssnipper:xssnipper#intro]]
  
  
 ===== Installation ===== ===== Installation =====
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. \\  +Search and install the plugin using the [[plugin:extension|Extension Manager]]. 
-Refer to [[Plugins|Plugins]] on how to install plugins manually.+
  
-Or just [[https://github.com/Taggic/xssnipper/archives/master|download]] and extract it as folder "xssnipper" into your “\lib\plugins” directory.+Alternatively, refer to [[:Plugins]] on how to install plugins manually. Or just [[https://github.com/Taggic/xssnipper/archives/master|download]] and extract it as folder "xssnipper" into your “\lib\plugins” directory.
  
-:!: **External requirements:**   
-  * none 
  
 ==== Changes ==== ==== Changes ====
-{{rss>http://github.com/feeds/Taggic/commits/xssnipper/master date}}+{{rss>https://github.com/Taggic/xssnipper/commits/master.atom date}}
  
 ==== Configuration ==== ==== Configuration ====
Line 74: Line 85:
  
 === ToDo/Wish List === === ToDo/Wish List ===
-Please let me know if there is a need to extend the functionality to paste code directly into the page syntax instead of loading from a file. \\  +Please let me know if there is a need to extend the functionality to paste code directly into the page syntax as alternative to loading from a file. \\  
-To do so you may use [[http://www.fristercons.de/fcon/doku.php?id=xssnipper:issuelist|xsSnipper IssueTracker]] or our [[http://www.fristercons.de/fcon/doku.php?id=contact|Contact form]].+To send us your wishes you may use [[http://www.fristercons.de/fcon/doku.php?id=xssnipper:issuelist|xsSnipper IssueTracker]] or our [[http://www.fristercons.de/fcon/doku.php?id=contact|Contact form]].
 ===== Sites using this Plugin ===== ===== Sites using this Plugin =====
 Feel free to add yours here: Feel free to add yours here:
plugin/xssnipper.1326901303.txt.gz · Last modified: 2012-01-18 16:41 by 192.100.123.77

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