KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

smarty.php 7.3KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <?php
  2. /*************************************************************************************
  3. * smarty.php
  4. * ----------
  5. * Author: Alan Juden (alan@judenware.org)
  6. * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2004/07/10
  9. *
  10. * Smarty template language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2004/11/27 (1.0.0)
  15. * - Initial Release
  16. *
  17. * TODO
  18. * ----
  19. *
  20. *************************************************************************************
  21. *
  22. * This file is part of GeSHi.
  23. *
  24. * GeSHi is free software; you can redistribute it and/or modify
  25. * it under the terms of the GNU General Public License as published by
  26. * the Free Software Foundation; either version 2 of the License, or
  27. * (at your option) any later version.
  28. *
  29. * GeSHi is distributed in the hope that it will be useful,
  30. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. * GNU General Public License for more details.
  33. *
  34. * You should have received a copy of the GNU General Public License
  35. * along with GeSHi; if not, write to the Free Software
  36. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  37. *
  38. ************************************************************************************/
  39. $language_data = array (
  40. 'LANG_NAME' => 'Smarty',
  41. 'COMMENT_SINGLE' => array(),
  42. 'COMMENT_MULTI' => array('{*' => '*}'),
  43. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  44. 'QUOTEMARKS' => array("'", '"'),
  45. 'ESCAPE_CHAR' => '\\',
  46. 'KEYWORDS' => array(
  47. 1 => array(
  48. '$smarty', 'now', 'const', 'capture', 'config', 'section', 'foreach', 'template', 'version', 'ldelim', 'rdelim',
  49. 'foreachelse', 'include', 'include_php', 'insert', 'if', 'elseif', 'else', 'php',
  50. 'sectionelse', 'is_cached',
  51. ),
  52. 2 => array(
  53. 'capitalize', 'count_characters', 'cat', 'count_paragraphs', 'count_sentences', 'count_words', 'date_format',
  54. 'default', 'escape', 'indent', 'lower', 'nl2br', 'regex_replace', 'replace', 'spacify', 'string_format',
  55. 'strip', 'strip_tags', 'truncate', 'upper', 'wordwrap',
  56. ),
  57. 3 => array(
  58. 'counter', 'cycle', 'debug', 'eval', 'html_checkboxes', 'html_image', 'html_options',
  59. 'html_radios', 'html_select_date', 'html_select_time', 'html_table', 'math', 'mailto', 'popup_init',
  60. 'popup', 'textformat'
  61. ),
  62. 4 => array(
  63. '$template_dir', '$compile_dir', '$config_dir', '$plugins_dir', '$debugging', '$debug_tpl',
  64. '$debugging_ctrl', '$autoload_filters', '$compile_check', '$force_compile', '$caching', '$cache_dir',
  65. '$cache_lifetime', '$cache_handler_func', '$cache_modified_check', '$config_overwrite',
  66. '$config_booleanize', '$config_read_hidden', '$config_fix_newlines', '$default_template_handler_func',
  67. '$php_handling', '$security', '$secure_dir', '$security_settings', '$trusted_dir', '$left_delimiter',
  68. '$right_delimiter', '$compiler_class', '$request_vars_order', '$request_use_auto_globals',
  69. '$error_reporting', '$compile_id', '$use_sub_dirs', '$default_modifiers', '$default_resource_type'
  70. ),
  71. 5 => array(
  72. 'append', 'append_by_ref', 'assign', 'assign_by_ref', 'clear_all_assign', 'clear_all_cache',
  73. 'clear_assign', 'clear_cache', 'clear_compiled_tpl', 'clear_config', 'config_load', 'display',
  74. 'fetch', 'get_config_vars', 'get_registered_object', 'get_template_vars',
  75. 'load_filter', 'register_block', 'register_compiler_function', 'register_function',
  76. 'register_modifier', 'register_object', 'register_outputfilter', 'register_postfilter',
  77. 'register_prefilter', 'register_resource', 'trigger_error', 'template_exists', 'unregister_block',
  78. 'unregister_compiler_function', 'unregister_function', 'unregister_modifier', 'unregister_object',
  79. 'unregister_outputfilter', 'unregister_postfilter', 'unregister_prefilter', 'unregister_resource'
  80. ),
  81. 6 => array(
  82. 'name', 'file', 'scope', 'global', 'key', 'once', 'script',
  83. 'loop', 'start', 'step', 'max', 'show', 'values', 'value', 'from', 'item'
  84. ),
  85. 7 => array(
  86. 'eq', 'neq', 'ne', 'lte', 'gte', 'ge', 'le', 'not', 'mod'
  87. ),
  88. 8 => array(
  89. // some common php functions
  90. 'isset', 'is_array', 'empty', 'count', 'sizeof'
  91. )
  92. ),
  93. 'SYMBOLS' => array(
  94. '/', '=', '==', '!=', '>', '<', '>=', '<=', '!', '%'
  95. ),
  96. 'CASE_SENSITIVE' => array(
  97. GESHI_COMMENTS => false,
  98. 1 => false,
  99. 2 => false,
  100. 3 => false,
  101. 4 => false,
  102. 5 => false,
  103. 6 => false,
  104. 7 => false,
  105. 8 => false
  106. ),
  107. 'STYLES' => array(
  108. 'KEYWORDS' => array(
  109. 1 => 'color: #0600FF;', //Functions
  110. 2 => 'color: #008000;', //Modifiers
  111. 3 => 'color: #0600FF;', //Custom Functions
  112. 4 => 'color: #804040;', //Variables
  113. 5 => 'color: #008000;', //Methods
  114. 6 => 'color: #6A0A0A;', //Attributes
  115. 7 => 'color: #D36900;', //Text-based symbols
  116. 8 => 'color: #0600FF;' //php functions
  117. ),
  118. 'COMMENTS' => array(
  119. 'MULTI' => 'color: #008080; font-style: italic;'
  120. ),
  121. 'ESCAPE_CHAR' => array(
  122. 0 => 'color: #000099; font-weight: bold;'
  123. ),
  124. 'BRACKETS' => array(
  125. 0 => 'color: #D36900;'
  126. ),
  127. 'STRINGS' => array(
  128. 0 => 'color: #ff0000;'
  129. ),
  130. 'NUMBERS' => array(
  131. 0 => 'color: #cc66cc;'
  132. ),
  133. 'METHODS' => array(
  134. 1 => 'color: #006600;'
  135. ),
  136. 'SYMBOLS' => array(
  137. 0 => 'color: #D36900;'
  138. ),
  139. 'SCRIPT' => array(
  140. 0 => '',
  141. 1 => 'color: #808080; font-style: italic;',
  142. 2 => 'color: #009000;'
  143. ),
  144. 'REGEXPS' => array(
  145. 0 => 'color: #00aaff;'
  146. )
  147. ),
  148. 'URLS' => array(
  149. 1 => 'http://smarty.php.net/{FNAMEL}',
  150. 2 => 'http://smarty.php.net/{FNAMEL}',
  151. 3 => 'http://smarty.php.net/{FNAMEL}',
  152. 4 => 'http://smarty.php.net/{FNAMEL}',
  153. 5 => 'http://smarty.php.net/{FNAMEL}',
  154. 6 => '',
  155. 7 => 'http://smarty.php.net/{FNAMEL}',
  156. 8 => ''
  157. ),
  158. 'OOLANG' => true,
  159. 'OBJECT_SPLITTERS' => array(
  160. 1 => '.'
  161. ),
  162. 'REGEXPS' => array(
  163. // variables
  164. 0 => '\$[a-zA-Z][a-zA-Z0-9_]*'
  165. ),
  166. 'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
  167. 'SCRIPT_DELIMITERS' => array(
  168. 0 => array(
  169. '{' => '}'
  170. ),
  171. 1 => array(
  172. '<!--' => '-->',
  173. ),
  174. 2 => array(
  175. '<' => '>'
  176. )
  177. ),
  178. 'HIGHLIGHT_STRICT_BLOCK' => array(
  179. 0 => true,
  180. 1 => false,
  181. 2 => false
  182. ),
  183. 'PARSER_CONTROL' => array(
  184. 'KEYWORDS' => array(
  185. 'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\#;>|^])",
  186. 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-&])"
  187. )
  188. )
  189. );
  190. ?>