Differences

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

Link to this comparison view

xssnipper:xssnipper [2012/06/22 13:45]
taggic [Case 1: Standard code snipped]
xssnipper:xssnipper [2014/10/14 17:55] (current)
taggic [Case 1: Standard code snipped]
Line 8: Line 8:
 |Author  |Taggic  | |Author  |Taggic  |
 |Last update  |2012-06-22  | |Last update  |2012-06-22  |
-|DW compatible  |2011-05-25 (Rincewind)  |+|DW compatible  |2011-05-25 (Rincewind), 2011-11-10 (Angua)  |
 |Depends  |none  | |Depends  |none  |
 |Conflicts  |none  | |Conflicts  |none  |
Line 36: Line 36:
 ====== Syntax ====== ====== Syntax ======
 ===== Case 1: Standard code snipped ===== ===== Case 1: Standard code snipped =====
-The following syntax does apply: <tab2>//<color blue>%%{(xssnipper>%%**,**[start line]**,**</color><color grey>[code language] [slider] [code block file]</color> <color blue>**,**[code]%%)}%%</color>// \\  +The following syntax does apply: <tab2>//<color blue>%%{(xssnipper>%%**,**[start line]**,**</color><color grey>[code language] [code block file] [slider]</color> <color blue>**,**[code]%%)}%%</color>// where //<color grey>[code language] [code block file] [slider]</color>// are optional and //<color blue>[code]</color>// is the snipped you want to show.  
-where //<color grey>,[code language] [code block file] [slider]</color>// are optional \\  + 
-and //<color blue>[code]</color>// is the snipped you want to show. +**Remark:** click on the red arrow to show/hide the code block 
-{(xssnipper>,1,php slide test,+{(xssnipper>,1,php test slide ,
 // 1. check if $xssnipper['filepath'] exist, else error message // 1. check if $xssnipper['filepath'] exist, else error message
    if(!file_exists($xssnipper['filepath'])) {    if(!file_exists($xssnipper['filepath'])) {
Line 46: Line 46:
    }    }
 )} )}
-  + 
-===== Case 2: Code snipped from file =====+The following Syntax was used for upper example: 
 +<code> 
 +{(xssnipper>,1,php test slide, 
 +// 1. check if $xssnipper['filepath'] exist, else error message 
 +   if(!file_exists($xssnipper['filepath'])) { 
 +      msg('file '.$xssnipper['filepath'].' not found',-1); 
 +      return false; 
 +   } 
 +)} 
 +</code> 
 +===== Case 2: Code snipped from file =====
 The following syntax does apply: <tab2>//<color blue>%%{(xssnipper>%%[PATH],[from line],[to line]</color><color grey>,[code language] [code block file] [slider]</color><color blue>%%)}%%</color>//. The following syntax does apply: <tab2>//<color blue>%%{(xssnipper>%%[PATH],[from line],[to line]</color><color grey>,[code language] [code block file] [slider]</color><color blue>%%)}%%</color>//.
  
Line 54: Line 64:
 | //<color blue>[from line]</color>//  | optional   |defines the first line to be displayed, if empty it will be set to zero; if further parameter will be given at least the colon separator to be written  | | //<color blue>[from line]</color>//  | optional   |defines the first line to be displayed, if empty it will be set to zero; if further parameter will be given at least the colon separator to be written  |
 | //<color blue>[to line]</color>//    | 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  | | //<color blue>[to line]</color>//    | 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  |
-| //<color blue>[code language]</color>//   | optional   |tells code block/GeSHi what language file to be used for coloring, file extension of the [path] parameter will be used if empty   |  +| //<color blue>[code language]</color>//   | optional   |tells code block/GeSHi what language file to be used for colouring, file extension of the [path] parameter will be used if empty   |  
-| //<color blue>[code block file]</color>//   | optional   |enables the download cod blocks feature and specifies the file name, if empty no downloadable code block provided \\ //<color blue>(file name must not contain space character !)</color>//  |+| //<color blue>[code block file]</color>//   | optional   |enables the download code blocks feature and specifies the file name, if empty no downloadable code block provided //<color blue>(file name must not contain space character !)</color>//  |
 | //<color blue>[slider]</color>//   | 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. | | //<color blue>[slider]</color>//   | 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 the following syntax into the page mark-up:  
-  {(xssnipper>./lib/plugins/xssnipper/plugin.info.txt,1,15,txt test.txt)}+  {(xssnipper>./lib/plugins/xssnipper/plugin.info.txt,1,15,txt  test.txt)}
  
 This should deliver lines 1 to 15 as plain text (downloadable as test.txt file) from the current plugin info file as follows: This should deliver lines 1 to 15 as plain text (downloadable as test.txt file) from the current plugin info file as follows:
-{(xssnipper>./lib/plugins/xssnipper/plugin.info.txt,1,15,txt test.txt)}+{(xssnipper>./lib/plugins/xssnipper/plugin.info.txt,1,15,txt  test.txt)}
  
 You see the output stops before line 15 was reached beacuse end of file reached.  You see the output stops before line 15 was reached beacuse end of file reached. 
Line 89: Line 99:
  
 ==== Configuration ==== ==== Configuration ====
-none necessary+  * none
  
-=== Change Log ===+==== Major Changes Log ====
 ^  Date   ^ Changes  ^ ^  Date   ^ Changes  ^
-next | <tab2>- code line numbering \\ <tab2>- stylesheet support \\ <tab2>- direct use of GeSHi syntax highlighting \\ <tab2>- optional parameter to shorten syntax line \\ <tab2>- BugFix: start/end lines of snippets corrected \\ <tab2> =) downloadable code blocks <del>just brocken</del> bug fixed  |+2012-06-22 | <tab2>- slide feature to show/hide the code details | 
 +| 2012-01-18 | <tab2>- code line numbering \\ <tab2>- stylesheet support \\ <tab2>- direct use of GeSHi syntax highlighting \\ <tab2>- optional parameter to shorten syntax line \\ <tab2>- BugFix: start/end lines of snippets corrected \\ <tab2> =) downloadable code blocks <del>just brocken</del> bug fixed  |
 | 2011-12-21  | <tab2>- Initial release  | | 2011-12-21  | <tab2>- Initial release  |
  
xssnipper/xssnipper.txt · Last modified: 2014/10/14 17:55 by taggic

This Wiki is hosted and ruled by Policies of Frister Consultancy Services.
By using this wiki you accept these rules. -> Impressum