diff options
Diffstat (limited to 'demos/quickstart/protected/controls/Highlighter/geshi')
6 files changed, 1218 insertions, 0 deletions
diff --git a/demos/quickstart/protected/controls/Highlighter/geshi/css.php b/demos/quickstart/protected/controls/Highlighter/geshi/css.php new file mode 100644 index 00000000..28e4bf18 --- /dev/null +++ b/demos/quickstart/protected/controls/Highlighter/geshi/css.php @@ -0,0 +1,178 @@ +<?php +/************************************************************************************* + * css.php + * ------- + * Author: Nigel McNie (oracle.shinoda@gmail.com) + * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) + * Release Version: 1.0.7.5 + * CVS Revision Version: $Revision: 1.7 $ + * Date Started: 2004/06/18 + * Last Modified: $Date: 2005/10/22 07:52:59 $ + * + * CSS language file for GeSHi. + * + * CHANGES + * ------- + * 2004/11/27 (1.0.3) + * - Added support for multiple object splitters + * 2004/10/27 (1.0.2) + * - Changed regexps to catch "-" symbols + * - Added support for URLs + * 2004/08/05 (1.0.1) + * - Added support for symbols + * 2004/07/14 (1.0.0) + * - First Release + * + * TODO (updated 2004/11/27) + * ------------------------- + * * Improve or drop regexps for class/id/psuedoclass highlighting + * * Re-look at keywords - possibly to make several CSS language + * files, all with different versions of CSS in them + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + + +$language_data = array ( + 'LANG_NAME' => 'CSS', + 'COMMENT_SINGLE' => array(1 => '@'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'aqua', 'azimuth', 'background-attachment', 'background-color', + 'background-image', 'background-position', 'background-repeat', + 'background', 'black', 'blue', 'border-bottom-color', 'border-bottom-style', + 'border-bottom-width', 'border-left-color', 'border-left-style', + 'border-left-width', 'border-right', 'border-right-color', + 'border-right-style', 'border-right-width', 'border-top-color', + 'border-top-style', 'border-top-width','border-bottom', 'border-collapse', + 'border-left', 'border-width', 'border-color', 'border-spacing', + 'border-style', 'border-top', 'border', 'caption-side', + 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset', + 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display', + 'elevation', 'empty-cells', 'float', 'font-family', 'font-size', + 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', + 'font-weight', 'font', 'height', 'letter-spacing', 'line-height', + 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', + 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin', + 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height', + 'min-width', 'orphans', 'outline', 'outline-color', 'outline-style', + 'outline-width', 'overflow', 'padding-bottom', 'padding-left', + 'padding-right', 'padding-top', 'padding', 'page', 'page-break-after', + 'page-break-before', 'page-break-inside', 'pause-after', 'pause-before', + 'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', + 'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation', + 'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration', + 'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi', + 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows', + 'width', 'word-spacing', 'z-index', 'bottom', 'left' + ), + 2 => array( + 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid', + 'baseline', 'behind', 'below', 'bidi-override', 'blink', 'block', 'bold', 'bolder', 'both', + 'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', + 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive', + 'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double', + 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded', + 'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia', + 'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher', + 'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline', + 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana', + 'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low', + 'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace', + 'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize', + 'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline', + 'pointer', 'portrait', 'purple', 'px', + 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards', + 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square', + 'static', 'status-bar', 'super', 'sw-resize', + 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent', + 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url', + 'visible', + 'w-resize', 'wait', 'white', 'wider', + 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', + 'yellow', 'yes' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', ':', ';' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #a1a100;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #cc00cc;', + 1 => 'color: #6666ff;', + 2 => 'color: #3333ff;', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '\#[a-zA-Z0-9\-]+\s+\{', + 1 => '\.[a-zA-Z0-9\-]+\s', + 2 => ':[a-zA-Z0-9\-]+\s' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?>
\ No newline at end of file diff --git a/demos/quickstart/protected/controls/Highlighter/geshi/html.php b/demos/quickstart/protected/controls/Highlighter/geshi/html.php new file mode 100644 index 00000000..e5683b8c --- /dev/null +++ b/demos/quickstart/protected/controls/Highlighter/geshi/html.php @@ -0,0 +1,254 @@ +<?php +/************************************************************************************* + * html4strict.php + * --------------- + * Author: Nigel McNie (oracle.shinoda@gmail.com) + * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) + * Release Version: 1.0.7.5 + * CVS Revision Version: $Revision: 1.5 $ + * Date Started: 2004/07/10 + * Last Modified: $Date: 2005/10/22 07:52:59 $ + * + * HTML 4.01 strict language file for GeSHi. + * + * CHANGES + * ------- + * 2004/11/27 (1.0.3) + * - Added support for multiple object splitters + * 2004/10/27 (1.0.2) + * - Added support for URLs + * 2004/08/05 (1.0.1) + * - Added INS and DEL + * - Removed the background colour from tags' styles + * 2004/07/14 (1.0.0) + * - First Release + * + * TODO (updated 2004/11/27) + * ------------------------- + * * Check that only HTML4 strict attributes are highlighted + * * Eliminate empty tags that aren't allowed in HTML4 strict + * * Split to several files - html4trans, xhtml1 etc + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'HTML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('<!--' => '-->'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + ), + 2 => array( + '<a>', '<abbr>', '<acronym>', '<address>', '<applet>', + '<a', '<abbr', '<acronym', '<address', '<applet', + '</a>', '</abbr>', '</acronym>', '</address>', '</applet>', + '</a', '</abbr', '</acronym', '</address', '</applet', + + '<base>', '<basefont>', '<bdo>', '<big>', '<blockquote>', '<body>', '<br>', '<button>', '<b>', + '<base', '<basefont', '<bdo', '<big', '<blockquote', '<body', '<br', '<button', '<b', + '</base>', '</basefont>', '</bdo>', '</big>', '</blockquote>', '</body>', '</br>', '</button>', '</b>', + '</base', '</basefont', '</bdo', '</big', '</blockquote', '</body', '</br', '</button', '</b', + + '<caption>', '<center>', '<cite>', '<code>', '<colgroup>', '<col>', + '<caption', '<center', '<cite', '<code', '<colgroup', '<col', + '</caption>', '</center>', '</cite>', '</code>', '</colgroup>', '</col>', + '</caption', '</center', '</cite', '</code', '</colgroup', '</col', + + '<dd>', '<del>', '<dfn>', '<dir>', '<div>', '<dl>', '<dt>', + '<dd', '<del', '<dfn', '<dir', '<div', '<dl', '<dt', + '</dd>', '</del>', '</dfn>', '</dir>', '</div>', '</dl>', '</dt>', + '</dd', '</del', '</dfn', '</dir', '</div', '</dl', '</dt', + + '<em>', + '<em', + '</em>', + '</em', + + '<fieldset>', '<font>', '<form>', '<frame>', '<frameset>', + '<fieldset', '<font', '<form', '<frame', '<frameset', + '</fieldset>', '</font>', '</form>', '</frame>', '</frameset>', + '</fieldset', '</font', '</form', '</frame', '</frameset', + + '<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>', '<head>', '<hr>', '<html>', + '<h1', '<h2', '<h3', '<h4', '<h5', '<h6', '<head', '<hr', '<html', + '</h1>', '</h2>', '</h3>', '</h4>', '</h5>', '</h6>', '</head>', '</hr>', '</html>', + '</h1', '</h2', '</h3', '</h4', '</h5', '</h6', '</head', '</hr', '</html', + + '<iframe>', '<ilayer>', '<img>', '<input>', '<ins>', '<isindex>', '<i>', + '<iframe', '<ilayer', '<img', '<input', '<ins', '<isindex', '<i', + '</iframe>', '</ilayer>', '</img>', '</input>', '</ins>', '</isindex>', '</i>', + '</iframe', '</ilayer', '</img', '</input', '</ins', '</isindex', '</i', + + '<kbd>', + '<kbd', + '&t;/kbd>', + '</kbd', + + '<label>', '<legend>', '<link>', '<li>', + '<label', '<legend', '<link', '<li', + '</label>', '</legend>', '</link>', '</li>', + '</label', '</legend', '</link', '</li', + + '<map>', '<meta>', + '<map', '<meta', + '</map>', '</meta>', + '</map', '</meta', + + '<noframes>', '<noscript>', + '<noframes', '<noscript', + '</noframes>', '</noscript>', + '</noframes', '</noscript', + + '<object>', '<ol>', '<optgroup>', '<option>', + '<object', '<ol', '<optgroup', '<option', + '</object>', '</ol>', '</optgroup>', '</option>', + '</object', '</ol', '</optgroup', '</option', + + '<param>', '<pre>', '<p>', + '<param', '<pre', '<p', + '</param>', '</pre>', '</p>', + '</param', '</pre', '</p', + + '<q>', + '<q', + '</q>', + '</q', + + '<samp>', '<script>', '<select>', '<small>', '<span>', '<strike>', '<strong>', '<style>', '<sub>', '<sup>', '<s>', + '<samp', '<script', '<select', '<small', '<span', '<strike', '<strong', '<style', '<sub', '<sup', '<s', + '</samp>', '</script>', '</select>', '</small>', '</span>', '</strike>', '</strong>', '</style>', '</sub>', '</sup>', '</s>', + '</samp', '</script', '</select', '</small', '</span', '</strike', '</strong', '</style', '</sub', '</sup', '</s', + + '<table>', '<tbody>', '<td>', '<textarea>', '<text>', '<tfoot>', '<thead>', '<th>', '<title>', '<tr>', '<tt>', + '<table', '<tbody', '<td', '<textarea', '<text', '<tfoot', '<tfoot', '<thead', '<th', '<title', '<tr', '<tt', + '</table>', '</tbody>', '</td>', '</textarea>', '</text>', '</tfoot>', '</thead', '</tfoot', '</th>', '</title>', '</tr>', '</tt>', + '</table', '</tbody', '</td', '</textarea', '</text', '</tfoot', '</tfoot', '</thead', '</th', '</title', '</tr', '</tt', + + '<ul>', '<u>', + '<ul', '<u', + '</ul>', '</ul>', + '</ul', '</u', + + '<var>', + '<var', + '</var>', + '</var', + + '>', '<' + ), + 3 => array( + 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', + 'background', 'bgcolor', 'border', + 'cellpadding', 'cellspacing', 'char', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', + 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', + 'enctype', + 'face', 'for', 'frame', 'frameborder', + 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', + 'id', 'ismap', + 'label', 'lang', 'language', 'link', 'longdesc', + 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', + 'name', 'nohref', 'noresize', 'noshade', 'nowrap', + 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', + 'profile', 'prompt', + 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', + 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', + 'tabindex', 'target', 'text', 'title', 'type', + 'usemap', + 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', + 'width' + ) + ), + 'SYMBOLS' => array( + '/', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + 0 => 'color: #00bbdd;', + 1 => 'color: #ddbb00;', + 2 => 'color: #009900;' + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => 'http://december.com/html/4/element/{FNAME}.html', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<!DOCTYPE' => '>' + ), + 1 => array( + '&' => ';' + ), + 2 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false, + 2 => true + ) +); + +?>
\ No newline at end of file diff --git a/demos/quickstart/protected/controls/Highlighter/geshi/javascript.php b/demos/quickstart/protected/controls/Highlighter/geshi/javascript.php new file mode 100644 index 00000000..1a17e1e7 --- /dev/null +++ b/demos/quickstart/protected/controls/Highlighter/geshi/javascript.php @@ -0,0 +1,146 @@ +<?php
+/*************************************************************************************
+ * javascript.php
+ * --------------
+ * Author: Ben Keen (ben.keen@gmail.com)
+ * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.7.5 + * CVS Revision Version: $Revision: 1.5 $
+ * Date Started: 2004/06/20
+ * Last Modified: $Date: 2005/10/22 07:52:59 $
+ *
+ * JavaScript language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'JAVASCRIPT',
+ 'COMMENT_SINGLE' => array(1 => '//'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
+ 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
+ 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
+ 'while', 'write', 'with'
+ ),
+ 2 => array(
+ 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
+ 'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
+ 'protected', 'public', 'super', 'true', 'use', 'var'
+ ),
+ 3 => array(
+
+ // common functions for Window object
+ 'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
+ 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
+ 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
+ 'stop',
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false,
+ 2 => false,
+ 3 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #000066; font-weight: bold;',
+ 2 => 'color: #003366; font-weight: bold;',
+ 3 => 'color: #000066;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #009900; font-style: italic;',
+ 'MULTI' => 'color: #009900; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #3366CC;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #CC0000;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ 0 => 'color: #0066FF;'
+ ),
+ 'SCRIPT' => array(
+ 0 => '',
+ 1 => '',
+ 2 => '',
+ 3 => ''
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ 0 => "/.*/([igm]*)?" // matches js reg exps
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
+ 'SCRIPT_DELIMITERS' => array(
+ 0 => array(
+ '<script type="text/javascript">' => '</script>'
+ ),
+ 1 => array(
+ '<script language="javascript">' => '</script>'
+ )
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ 0 => true,
+ 1 => true
+ )
+);
+
+?>
\ No newline at end of file diff --git a/demos/quickstart/protected/controls/Highlighter/geshi/php.php b/demos/quickstart/protected/controls/Highlighter/geshi/php.php new file mode 100644 index 00000000..e78ec47c --- /dev/null +++ b/demos/quickstart/protected/controls/Highlighter/geshi/php.php @@ -0,0 +1,348 @@ +<?php +/************************************************************************************* + * php.php + * -------- + * Author: Nigel McNie (oracle.shinoda@gmail.com) + * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) + * Release Version: 1.0.7.5 + * CVS Revision Version: $Revision: 1.6 $ + * Date Started: 2004/06/20 + * Last Modified: $Date: 2005/10/22 07:52:59 $ + * + * PHP language file for GeSHi. + * + * CHANGES + * ------- + * 2004/11/25 (1.0.3) + * - Added support for multiple object splitters + * - Fixed &new problem + * 2004/10/27 (1.0.2) + * - Added URL support + * - Added extra constants + * 2004/08/05 (1.0.1) + * - Added support for symbols + * 2004/07/14 (1.0.0) + * - First Release + * + * TODO (updated 2004/07/14) + * ------------------------- + * * Make sure the last few function I may have missed + * (like eval()) are included for highlighting + * * Split to several files - php4, php5 etc + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'PHP', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'include', 'require', 'include_once', 'require_once', + 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', + 'endif', 'switch', 'case', 'endswitch', + 'return', 'break', 'continue' + ), + 2 => array( + 'null', '__LINE__', '__FILE__', + 'false', '<?php', '?>', '<?', + '<script language', '</script>', + 'true', 'var', 'default', + 'function', 'class', 'new', '&new', + '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION', + 'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR', + 'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR', + 'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT', + 'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE', + 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR', + 'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL' + ), + 3 => array( + 'zlib_get_coding_type','zend_version','zend_logo_guid','yp_order','yp_next', + 'yp_match','yp_master','yp_get_default_domain','yp_first','yp_errno','yp_err_string', + 'yp_cat','yp_all','xml_set_unparsed_entity_decl_handler','xml_set_start_namespace_decl_handler','xml_set_processing_instruction_handler','xml_set_object', + 'xml_set_notation_decl_handler','xml_set_external_entity_ref_handler','xml_set_end_namespace_decl_handler','xml_set_element_handler','xml_set_default_handler','xml_set_character_data_handler', + 'xml_parser_set_option','xml_parser_get_option','xml_parser_free','xml_parser_create_ns','xml_parser_create','xml_parse_into_struct', + 'xml_parse','xml_get_error_code','xml_get_current_line_number','xml_get_current_column_number','xml_get_current_byte_index','xml_error_string', + 'wordwrap','wddx_serialize_vars','wddx_serialize_value','wddx_packet_start','wddx_packet_end','wddx_deserialize', + 'wddx_add_vars','vsprintf','vprintf','virtual','version_compare','var_export', + 'var_dump','utf8_encode','utf8_decode','usort','usleep','user_error', + 'urlencode','urldecode','unserialize','unregister_tick_function','unpack','unlink', + 'unixtojd','uniqid','umask','uksort','ucwords','ucfirst', + 'uasort','trim','trigger_error','touch','token_name','token_get_all', + 'tmpfile','time','textdomain','tempnam','tanh','tan', + 'system','syslog','symlink','substr_replace','substr_count','substr', + 'strval','strtr','strtoupper','strtotime','strtolower','strtok', + 'strstr','strspn','strrpos','strrev','strrchr','strpos', + 'strncmp','strncasecmp','strnatcmp','strnatcasecmp','strlen','stristr', + 'stripslashes','stripcslashes','strip_tags','strftime','stream_wrapper_register','stream_set_write_buffer', + 'stream_set_timeout','stream_set_blocking','stream_select','stream_register_wrapper','stream_get_meta_data','stream_filter_prepend', + 'stream_filter_append','stream_context_set_params','stream_context_set_option','stream_context_get_options','stream_context_create','strcspn', + 'strcoll','strcmp','strchr','strcasecmp','str_word_count','str_shuffle', + 'str_rot13','str_replace','str_repeat','str_pad','stat','sscanf', + 'srand','sqrt','sql_regcase','sprintf','spliti','split', + 'soundex','sort','socket_writev','socket_write','socket_strerror','socket_shutdown', + 'socket_setopt','socket_set_timeout','socket_set_option','socket_set_nonblock','socket_set_blocking','socket_set_block', + 'socket_sendto','socket_sendmsg','socket_send','socket_select','socket_recvmsg','socket_recvfrom', + 'socket_recv','socket_readv','socket_read','socket_listen','socket_last_error','socket_iovec_set', + 'socket_iovec_free','socket_iovec_fetch','socket_iovec_delete','socket_iovec_alloc','socket_iovec_add','socket_getsockname', + 'socket_getpeername','socket_getopt','socket_get_status','socket_get_option','socket_create_pair','socket_create_listen', + 'socket_create','socket_connect','socket_close','socket_clear_error','socket_bind','socket_accept', + 'sleep','sizeof','sinh','sin','similar_text','shuffle', + 'show_source','shmop_write','shmop_size','shmop_read','shmop_open','shmop_delete', + 'shmop_close','shm_remove_var','shm_remove','shm_put_var','shm_get_var','shm_detach', + 'shm_attach','shell_exec','sha1_file','sha1','settype','setlocale', + 'setcookie','set_time_limit','set_socket_blocking','set_magic_quotes_runtime','set_include_path','set_file_buffer', + 'set_error_handler','session_write_close','session_unset','session_unregister','session_start','session_set_save_handler', + 'session_set_cookie_params','session_save_path','session_register','session_regenerate_id','session_name','session_module_name', + 'session_is_registered','session_id','session_get_cookie_params','session_encode','session_destroy','session_decode', + 'session_cache_limiter','session_cache_expire','serialize','sem_remove','sem_release','sem_get', + 'sem_acquire','rtrim','rsort','round','rmdir','rewinddir', + 'rewind','restore_include_path','restore_error_handler','reset','rename','register_tick_function', + 'register_shutdown_function','realpath','readlink','readgzfile','readfile','readdir', + 'read_exif_data','rawurlencode','rawurldecode','range','rand','rad2deg', + 'quotemeta','quoted_printable_decode','putenv','proc_open','proc_close','printf', + 'print_r','prev','preg_split','preg_replace_callback','preg_replace','preg_quote', + 'preg_match_all','preg_match','preg_grep','pow','posix_uname','posix_ttyname', + 'posix_times','posix_strerror','posix_setuid','posix_setsid','posix_setpgid','posix_setgid', + 'posix_seteuid','posix_setegid','posix_mkfifo','posix_kill','posix_isatty','posix_getuid', + 'posix_getsid','posix_getrlimit','posix_getpwuid','posix_getpwnam','posix_getppid','posix_getpid', + 'posix_getpgrp','posix_getpgid','posix_getlogin','posix_getgroups','posix_getgrnam','posix_getgrgid', + 'posix_getgid','posix_geteuid','posix_getegid','posix_getcwd','posix_get_last_error','posix_errno', + 'posix_ctermid','pos','popen','pi','phpversion','phpinfo', + 'phpcredits','php_uname','php_sapi_name','php_logo_guid','php_ini_scanned_files','pg_update', + 'pg_untrace','pg_unescape_bytea','pg_tty','pg_trace','pg_setclientencoding','pg_set_client_encoding', + 'pg_send_query','pg_select','pg_result_status','pg_result_seek','pg_result_error','pg_result', + 'pg_query','pg_put_line','pg_port','pg_ping','pg_pconnect','pg_options', + 'pg_numrows','pg_numfields','pg_num_rows','pg_num_fields','pg_meta_data','pg_lowrite', + 'pg_lounlink','pg_loreadall','pg_loread','pg_loopen','pg_loimport','pg_loexport', + 'pg_locreate','pg_loclose','pg_lo_write','pg_lo_unlink','pg_lo_tell','pg_lo_seek', + 'pg_lo_read_all','pg_lo_read','pg_lo_open','pg_lo_import','pg_lo_export','pg_lo_create', + 'pg_lo_close','pg_last_oid','pg_last_notice','pg_last_error','pg_insert','pg_host', + 'pg_getlastoid','pg_get_result','pg_get_pid','pg_get_notify','pg_freeresult','pg_free_result', + 'pg_fieldtype','pg_fieldsize','pg_fieldprtlen','pg_fieldnum','pg_fieldname','pg_fieldisnull', + 'pg_field_type','pg_field_size','pg_field_prtlen','pg_field_num','pg_field_name','pg_field_is_null', + 'pg_fetch_row','pg_fetch_result','pg_fetch_object','pg_fetch_assoc','pg_fetch_array','pg_fetch_all', + 'pg_exec','pg_escape_string','pg_escape_bytea','pg_errormessage','pg_end_copy','pg_delete', + 'pg_dbname','pg_copy_to','pg_copy_from','pg_convert','pg_connection_status','pg_connection_reset', + 'pg_connection_busy','pg_connect','pg_cmdtuples','pg_close','pg_clientencoding','pg_client_encoding', + 'pg_cancel_query','pg_affected_rows','pfsockopen','pclose','pathinfo','passthru', + 'parse_url','parse_str','parse_ini_file','pack','overload','output_reset_rewrite_vars', + 'output_add_rewrite_var','ord','openssl_x509_read','openssl_x509_parse','openssl_x509_free','openssl_x509_export_to_file', + 'openssl_x509_export','openssl_x509_checkpurpose','openssl_x509_check_private_key','openssl_verify','openssl_sign','openssl_seal', + 'openssl_public_encrypt','openssl_public_decrypt','openssl_private_encrypt','openssl_private_decrypt','openssl_pkey_new','openssl_pkey_get_public', + 'openssl_pkey_get_private','openssl_pkey_free','openssl_pkey_export_to_file','openssl_pkey_export','openssl_pkcs7_verify','openssl_pkcs7_sign', + 'openssl_pkcs7_encrypt','openssl_pkcs7_decrypt','openssl_open','openssl_get_publickey','openssl_get_privatekey','openssl_free_key', + 'openssl_error_string','openssl_csr_sign','openssl_csr_new','openssl_csr_export_to_file','openssl_csr_export','openlog', + 'opendir','octdec','ob_start','ob_list_handlers','ob_implicit_flush','ob_iconv_handler', + 'ob_gzhandler','ob_get_status','ob_get_level','ob_get_length','ob_get_flush','ob_get_contents', + 'ob_get_clean','ob_flush','ob_end_flush','ob_end_clean','ob_clean','number_format', + 'nl_langinfo','nl2br','ngettext','next','natsort','natcasesort', + 'mysql_unbuffered_query','mysql_thread_id','mysql_tablename','mysql_table_name','mysql_stat','mysql_selectdb', + 'mysql_select_db','mysql_result','mysql_real_escape_string','mysql_query','mysql_ping','mysql_pconnect', + 'mysql_numrows','mysql_numfields','mysql_num_rows','mysql_num_fields','mysql_listtables','mysql_listfields', + 'mysql_listdbs','mysql_list_tables','mysql_list_processes','mysql_list_fields','mysql_list_dbs','mysql_insert_id', + 'mysql_info','mysql_get_server_info','mysql_get_proto_info','mysql_get_host_info','mysql_get_client_info','mysql_freeresult', + 'mysql_free_result','mysql_fieldtype','mysql_fieldtable','mysql_fieldname','mysql_fieldlen','mysql_fieldflags', + 'mysql_field_type','mysql_field_table','mysql_field_seek','mysql_field_name','mysql_field_len','mysql_field_flags', + 'mysql_fetch_row','mysql_fetch_object','mysql_fetch_lengths','mysql_fetch_field','mysql_fetch_assoc','mysql_fetch_array', + 'mysql_escape_string','mysql_error','mysql_errno','mysql_dropdb','mysql_drop_db','mysql_dbname', + 'mysql_db_query','mysql_db_name','mysql_data_seek','mysql_createdb','mysql_create_db','mysql_connect', + 'mysql_close','mysql_client_encoding','mysql_affected_rows','mysql','mt_srand','mt_rand', + 'mt_getrandmax','move_uploaded_file','money_format','mktime','mkdir','min', + 'microtime','method_exists','metaphone','memory_get_usage','md5_file','md5', + 'mbsubstr','mbstrrpos','mbstrpos','mbstrlen','mbstrcut','mbsplit', + 'mbregex_encoding','mberegi_replace','mberegi','mbereg_search_setpos','mbereg_search_regs','mbereg_search_pos', + 'mbereg_search_init','mbereg_search_getregs','mbereg_search_getpos','mbereg_search','mbereg_replace','mbereg_match', + 'mbereg','mb_substr_count','mb_substr','mb_substitute_character','mb_strwidth','mb_strtoupper', + 'mb_strtolower','mb_strrpos','mb_strpos','mb_strlen','mb_strimwidth','mb_strcut', + 'mb_split','mb_send_mail','mb_regex_set_options','mb_regex_encoding','mb_preferred_mime_name','mb_parse_str', + 'mb_output_handler','mb_language','mb_internal_encoding','mb_http_output','mb_http_input','mb_get_info', + 'mb_eregi_replace','mb_eregi','mb_ereg_search_setpos','mb_ereg_search_regs','mb_ereg_search_pos','mb_ereg_search_init', + 'mb_ereg_search_getregs','mb_ereg_search_getpos','mb_ereg_search','mb_ereg_replace','mb_ereg_match','mb_ereg', + 'mb_encode_numericentity','mb_encode_mimeheader','mb_detect_order','mb_detect_encoding','mb_decode_numericentity','mb_decode_mimeheader', + 'mb_convert_variables','mb_convert_kana','mb_convert_encoding','mb_convert_case','max','mail', + 'magic_quotes_runtime','ltrim','lstat','long2ip','log1p','log10', + 'log','localtime','localeconv','linkinfo','link','levenshtein', + 'lcg_value','ksort','krsort','key_exists','key','juliantojd', + 'join','jewishtojd','jdtounix','jdtojulian','jdtojewish','jdtogregorian', + 'jdtofrench','jdmonthname','jddayofweek','is_writeable','is_writable','is_uploaded_file', + 'is_subclass_of','is_string','is_scalar','is_resource','is_real','is_readable', + 'is_object','is_numeric','is_null','is_nan','is_long','is_link', + 'is_integer','is_int','is_infinite','is_float','is_finite','is_file', + 'is_executable','is_double','is_dir','is_callable','is_bool','is_array', + 'is_a','iptcparse','iptcembed','ip2long','intval','ini_set', + 'ini_restore','ini_get_all','ini_get','ini_alter','in_array','import_request_variables', + 'implode','image_type_to_mime_type','ignore_user_abort','iconv_set_encoding','iconv_get_encoding','iconv', + 'i18n_mime_header_encode','i18n_mime_header_decode','i18n_ja_jp_hantozen','i18n_internal_encoding','i18n_http_output','i18n_http_input', + 'i18n_discover_encoding','i18n_convert','hypot','htmlspecialchars','htmlentities','html_entity_decode', + 'highlight_string','highlight_file','hexdec','hebrevc','hebrev','headers_sent', + 'header','gzwrite','gzuncompress','gztell','gzseek','gzrewind', + 'gzread','gzputs','gzpassthru','gzopen','gzinflate','gzgetss', + 'gzgets','gzgetc','gzfile','gzeof','gzencode','gzdeflate', + 'gzcompress','gzclose','gregoriantojd','gmstrftime','gmmktime','gmdate', + 'glob','gettype','gettimeofday','gettext','getservbyport','getservbyname', + 'getrusage','getrandmax','getprotobynumber','getprotobyname','getopt','getmyuid', + 'getmypid','getmyinode','getmygid','getmxrr','getlastmod','getimagesize', + 'gethostbynamel','gethostbyname','gethostbyaddr','getenv','getdate','getcwd', + 'getallheaders','get_resource_type','get_required_files','get_parent_class','get_object_vars','get_meta_tags', + 'get_magic_quotes_runtime','get_magic_quotes_gpc','get_loaded_extensions','get_included_files','get_include_path','get_html_translation_table', + 'get_extension_funcs','get_defined_vars','get_defined_functions','get_defined_constants','get_declared_classes','get_current_user', + 'get_class_vars','get_class_methods','get_class','get_cfg_var','get_browser','fwrite', + 'function_exists','func_num_args','func_get_args','func_get_arg','ftruncate','ftp_systype', + 'ftp_ssl_connect','ftp_size','ftp_site','ftp_set_option','ftp_rmdir','ftp_rename', + 'ftp_rawlist','ftp_quit','ftp_pwd','ftp_put','ftp_pasv','ftp_nlist', + 'ftp_nb_put','ftp_nb_get','ftp_nb_fput','ftp_nb_fget','ftp_nb_continue','ftp_mkdir', + 'ftp_mdtm','ftp_login','ftp_get_option','ftp_get','ftp_fput','ftp_fget', + 'ftp_exec','ftp_delete','ftp_connect','ftp_close','ftp_chdir','ftp_cdup', + 'ftok','ftell','fstat','fsockopen','fseek','fscanf', + 'frenchtojd','fread','fputs','fpassthru','fopen','fnmatch', + 'fmod','flush','floor','flock','floatval','filetype', + 'filesize','filepro_rowcount','filepro_retrieve','filepro_fieldwidth','filepro_fieldtype','filepro_fieldname', + 'filepro_fieldcount','filepro','fileperms','fileowner','filemtime','fileinode', + 'filegroup','filectime','fileatime','file_get_contents','file_exists','file', + 'fgetss','fgets','fgetcsv','fgetc','fflush','feof', + 'fclose','ezmlm_hash','extract','extension_loaded','expm1','explode', + 'exp','exif_thumbnail','exif_tagname','exif_read_data','exif_imagetype','exec', + 'escapeshellcmd','escapeshellarg','error_reporting','error_log','eregi_replace','eregi', + 'ereg_replace','ereg','end','easter_days','easter_date','each', + 'doubleval','dngettext','dl','diskfreespace','disk_total_space','disk_free_space', + 'dirname','dir','dgettext','deg2rad','defined','define_syslog_variables', + 'define','decoct','dechex','decbin','debug_zval_dump','debug_backtrace', + 'deaggregate','dcngettext','dcgettext','dba_sync','dba_replace','dba_popen', + 'dba_optimize','dba_open','dba_nextkey','dba_list','dba_insert','dba_handlers', + 'dba_firstkey','dba_fetch','dba_exists','dba_delete','dba_close','date', + 'current','ctype_xdigit','ctype_upper','ctype_space','ctype_punct','ctype_print', + 'ctype_lower','ctype_graph','ctype_digit','ctype_cntrl','ctype_alpha','ctype_alnum', + 'crypt','create_function','crc32','count_chars','count','cosh', + 'cos','copy','convert_cyr_string','constant','connection_status','connection_aborted', + 'compact','closelog','closedir','clearstatcache','class_exists','chunk_split', + 'chr','chown','chop','chmod','chgrp','checkdnsrr', + 'checkdate','chdir','ceil','call_user_method_array','call_user_method','call_user_func_array', + 'call_user_func','cal_to_jd','cal_info','cal_from_jd','cal_days_in_month','bzwrite', + 'bzread','bzopen','bzflush','bzerrstr','bzerror','bzerrno', + 'bzdecompress','bzcompress','bzclose','bindtextdomain','bindec','bind_textdomain_codeset', + 'bin2hex','bcsub','bcsqrt','bcscale','bcpow','bcmul', + 'bcmod','bcdiv','bccomp','bcadd','basename','base_convert', + 'base64_encode','base64_decode','atanh','atan2','atan','assert_options', + 'assert','asort','asinh','asin','arsort','array_walk', + 'array_values','array_unshift','array_unique','array_sum','array_splice','array_slice', + 'array_shift','array_search','array_reverse','array_reduce','array_rand','array_push', + 'array_pop','array_pad','array_multisort','array_merge_recursive','array_merge','array_map', + 'array_keys','array_key_exists','array_intersect_assoc','array_intersect','array_flip','array_filter', + 'array_fill','array_diff_assoc','array_diff','array_count_values','array_chunk','array_change_key_case', + 'apache_setenv','apache_response_headers','apache_request_headers','apache_note','apache_lookup_uri','apache_get_version', + 'apache_child_terminate','aggregation_info','aggregate_properties_by_regexp','aggregate_properties_by_list','aggregate_properties','aggregate_methods_by_regexp', + 'aggregate_methods_by_list','aggregate_methods','aggregate','addslashes','addcslashes','acosh', + 'acos','abs','_','echo', 'print', 'global', 'static', 'exit', 'array', 'empty', + 'eval', 'isset', 'unset', 'die', 'list' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.php.net/{FNAME}', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => '::' + ), + 'REGEXPS' => array( + 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*", + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<?php' => '?>' + ), + 1 => array( + '<?' => '?>' + ), + 2 => array( + '<%' => '%>' + ), + 3 => array( + '<script language="php">' => '</script>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ) +); + +?>
\ No newline at end of file diff --git a/demos/quickstart/protected/controls/Highlighter/geshi/prado.php b/demos/quickstart/protected/controls/Highlighter/geshi/prado.php new file mode 100644 index 00000000..95759a87 --- /dev/null +++ b/demos/quickstart/protected/controls/Highlighter/geshi/prado.php @@ -0,0 +1,147 @@ +<?php +/************************************************************************************* + * xml.php + * ------- + * Author: Nigel McNie (oracle.shinoda@gmail.com) + * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) + * Release Version: 1.0.7.5 + * CVS Revision Version: $Revision: 1.7 $ + * Date Started: 2004/09/01 + * Last Modified: $Date: 2005/10/22 07:52:59 $ + * + * XML language file for GeSHi. Based on the idea/file by Christian Weiske + * + * CHANGES + * ------- + * 2004/11/27 (1.0.1) + * - Added support for multiple object splitters + * 2004/10/27 (1.0.0) + * - First Release + * + * TODO (updated 2004/11/27) + * ------------------------- + * * Check regexps work and correctly highlight XML stuff and nothing else + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'XML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('<!--' => '-->', '<!' => '!>'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array(), + 'COMMENTS' => array( + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + 0 => 'color: #00bbdd;', + 1 => 'color: #ddbb00;', + 2 => 'color: #339933;', + 3 => 'color: #009900;' + ), + 'REGEXPS' => array( + 0 => 'color: #000066;', + 1 => 'font-weight: bold; color: black;', + 2 => 'font-weight: bold; color: black;', + ) + ), + 'URLS' => array( + 1 => '', + 2 => 'http://december.com/html/4/element/{FNAME}.html', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => '((<)(com:)([a-z0-9\\\.]+)(\s*))', + GESHI_REPLACE => '\\2<a class="api" href="link_to_api?\\4">\\3\\4</a>\\5', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 1 => array( + GESHI_SEARCH => '(</com:[a-z0-9\-]+\s*>)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => '(</?prop:?([a-z0-9_]+)>)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<!DOCTYPE' => '>' + ), + 1 => array( + '&' => ';' + ), + 2 => array( + '<![CDATA[' => ']]>' + ), + 3 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false, + 2 => false, + 3 => true + ) +); + +?>
\ No newline at end of file diff --git a/demos/quickstart/protected/controls/Highlighter/geshi/xml.php b/demos/quickstart/protected/controls/Highlighter/geshi/xml.php new file mode 100644 index 00000000..682ca3db --- /dev/null +++ b/demos/quickstart/protected/controls/Highlighter/geshi/xml.php @@ -0,0 +1,145 @@ +<?php +/************************************************************************************* + * xml.php + * ------- + * Author: Nigel McNie (oracle.shinoda@gmail.com) + * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) + * Release Version: 1.0.7.5 + * CVS Revision Version: $Revision: 1.7 $ + * Date Started: 2004/09/01 + * Last Modified: $Date: 2005/10/22 07:52:59 $ + * + * XML language file for GeSHi. Based on the idea/file by Christian Weiske + * + * CHANGES + * ------- + * 2004/11/27 (1.0.1) + * - Added support for multiple object splitters + * 2004/10/27 (1.0.0) + * - First Release + * + * TODO (updated 2004/11/27) + * ------------------------- + * * Check regexps work and correctly highlight XML stuff and nothing else + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'XML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('<!--' => '-->'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + 0 => 'color: #00bbdd;', + 1 => 'color: #ddbb00;', + 2 => 'color: #339933;', + 3 => 'color: #009900;' + ), + 'REGEXPS' => array( + 0 => 'color: #000066;', + 1 => 'font-weight: bold; color: black;', + 2 => 'font-weight: bold; color: black;', + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => '(((xml:)?[a-z\-]+))(=)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '\\4' + ), + 1 => array( + GESHI_SEARCH => '(</?[a-z0-9_]*(>)?)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => '((/)?>)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<!DOCTYPE' => '>' + ), + 1 => array( + '&' => ';' + ), + 2 => array( + '<![CDATA[' => ']]>' + ), + 3 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false, + 2 => false, + 3 => true + ) +); + +?>
\ No newline at end of file |