Differences

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

Link to this comparison view

xssnipper:xssnipper [2012/06/22 19:46]
taggic [Case 2: Code snipped from a file]
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] [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. +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.  
-{(xssnipper>,1,php slide test,+ 
 +**Remark:** click on the red arrow to show/hide the code block 
 +{(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 44: Line 46:
    }    }
 )} )}
- + 
 +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 a file ===== ===== Case 2: Code snipped from a 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 66:
 | //<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 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 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>[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. Leave it blank (space character) to prevent it. |+| //<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 mark-up:  Simply place the following syntax into the page mark-up: 
Line 87: 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.1340387217.txt.gz · Last modified: 2014/04/30 09:30 (external edit)

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