1 | 1 | simandl | <?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 | 3 | simandl | * Release Version: 1.0.8.3 |
8 | 1 | simandl | * 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 | | | |
40 | | | $language_data = array ( |
41 | | | 'LANG_NAME' => 'Smarty', |
42 | | | 'COMMENT_SINGLE' => array(), |
43 | | | 'COMMENT_MULTI' => array('{*' => '*}'), |
44 | | | 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
45 | | | 'QUOTEMARKS' => array("'", '"'), |
46 | | | 'ESCAPE_CHAR' => '\\', |
47 | | | 'KEYWORDS' => array( |
48 | | | 1 => array( |
49 | | | '$smarty', 'now', 'const', 'capture', 'config', 'section', 'foreach', 'template', 'version', 'ldelim', 'rdelim', |
50 | 3 | simandl | 'foreachelse', 'include', 'include_php', 'insert', 'if', 'elseif', 'else', 'php', |
51 | | | 'sectionelse', 'is_cached', |
52 | 1 | simandl | ), |
53 | | | 2 => array( |
54 | | | 'capitalize', 'count_characters', 'cat', 'count_paragraphs', 'count_sentences', 'count_words', 'date_format', |
55 | | | 'default', 'escape', 'indent', 'lower', 'nl2br', 'regex_replace', 'replace', 'spacify', 'string_format', |
56 | | | 'strip', 'strip_tags', 'truncate', 'upper', 'wordwrap', |
57 | | | ), |
58 | | | 3 => array( |
59 | 3 | simandl | 'counter', 'cycle', 'debug', 'eval', 'html_checkboxes', 'html_image', 'html_options', |
60 | 1 | simandl | 'html_radios', 'html_select_date', 'html_select_time', 'html_table', 'math', 'mailto', 'popup_init', |
61 | | | 'popup', 'textformat' |
62 | | | ), |
63 | | | 4 => array( |
64 | | | '$template_dir', '$compile_dir', '$config_dir', '$plugins_dir', '$debugging', '$debug_tpl', |
65 | | | '$debugging_ctrl', '$autoload_filters', '$compile_check', '$force_compile', '$caching', '$cache_dir', |
66 | | | '$cache_lifetime', '$cache_handler_func', '$cache_modified_check', '$config_overwrite', |
67 | | | '$config_booleanize', '$config_read_hidden', '$config_fix_newlines', '$default_template_handler_func', |
68 | | | '$php_handling', '$security', '$secure_dir', '$security_settings', '$trusted_dir', '$left_delimiter', |
69 | | | '$right_delimiter', '$compiler_class', '$request_vars_order', '$request_use_auto_globals', |
70 | | | '$error_reporting', '$compile_id', '$use_sub_dirs', '$default_modifiers', '$default_resource_type' |
71 | | | ), |
72 | | | 5 => array( |
73 | | | 'append', 'append_by_ref', 'assign', 'assign_by_ref', 'clear_all_assign', 'clear_all_cache', |
74 | | | 'clear_assign', 'clear_cache', 'clear_compiled_tpl', 'clear_config', 'config_load', 'display', |
75 | 3 | simandl | 'fetch', 'get_config_vars', 'get_registered_object', 'get_template_vars', |
76 | 1 | simandl | 'load_filter', 'register_block', 'register_compiler_function', 'register_function', |
77 | | | 'register_modifier', 'register_object', 'register_outputfilter', 'register_postfilter', |
78 | | | 'register_prefilter', 'register_resource', 'trigger_error', 'template_exists', 'unregister_block', |
79 | | | 'unregister_compiler_function', 'unregister_function', 'unregister_modifier', 'unregister_object', |
80 | | | 'unregister_outputfilter', 'unregister_postfilter', 'unregister_prefilter', 'unregister_resource' |
81 | | | ), |
82 | | | 6 => array( |
83 | 3 | simandl | 'name', 'file', 'scope', 'global', 'key', 'once', 'script', |
84 | 1 | simandl | 'loop', 'start', 'step', 'max', 'show', 'values', 'value', 'from', 'item' |
85 | | | ), |
86 | | | 7 => array( |
87 | | | 'eq', 'neq', 'ne', 'lte', 'gte', 'ge', 'le', 'not', 'mod' |
88 | | | ), |
89 | | | 8 => array( |
90 | | | // some common php functions |
91 | | | 'isset', 'is_array', 'empty', 'count', 'sizeof' |
92 | | | ) |
93 | | | ), |
94 | | | 'SYMBOLS' => array( |
95 | | | '/', '=', '==', '!=', '>', '<', '>=', '<=', '!', '%' |
96 | | | ), |
97 | | | 'CASE_SENSITIVE' => array( |
98 | | | GESHI_COMMENTS => false, |
99 | | | 1 => false, |
100 | | | 2 => false, |
101 | | | 3 => false, |
102 | | | 4 => false, |
103 | | | 5 => false, |
104 | | | 6 => false, |
105 | | | 7 => false, |
106 | | | 8 => false |
107 | | | ), |
108 | | | 'STYLES' => array( |
109 | | | 'KEYWORDS' => array( |
110 | | | 1 => 'color: #0600FF;', //Functions |
111 | | | 2 => 'color: #008000;', //Modifiers |
112 | | | 3 => 'color: #0600FF;', //Custom Functions |
113 | | | 4 => 'color: #804040;', //Variables |
114 | | | 5 => 'color: #008000;', //Methods |
115 | | | 6 => 'color: #6A0A0A;', //Attributes |
116 | | | 7 => 'color: #D36900;', //Text-based symbols |
117 | | | 8 => 'color: #0600FF;' //php functions |
118 | | | ), |
119 | | | 'COMMENTS' => array( |
120 | | | 'MULTI' => 'color: #008080; font-style: italic;' |
121 | | | ), |
122 | | | 'ESCAPE_CHAR' => array( |
123 | | | |
124 | | | ), |
125 | | | 'BRACKETS' => array( |
126 | | | |
127 | | | ), |
128 | | | 'STRINGS' => array( |
129 | | | |
130 | | | ), |
131 | | | 'NUMBERS' => array( |
132 | | | |
133 | | | ), |
134 | | | 'METHODS' => array( |
135 | | | 1 => 'color: #006600;' |
136 | | | ), |
137 | | | 'SYMBOLS' => array( |
138 | | | |
139 | | | ), |
140 | | | 'SCRIPT' => array( |
141 | | | |
142 | | | 1 => 'color: #808080; font-style: italic;', |
143 | | | 2 => 'color: #009000;' |
144 | | | ), |
145 | | | 'REGEXPS' => array( |
146 | | | |
147 | | | ) |
148 | | | ), |
149 | | | 'URLS' => array( |
150 | | | 1 => 'http://smarty.php.net/{FNAMEL}', |
151 | | | 2 => 'http://smarty.php.net/{FNAMEL}', |
152 | | | 3 => 'http://smarty.php.net/{FNAMEL}', |
153 | | | 4 => 'http://smarty.php.net/{FNAMEL}', |
154 | | | 5 => 'http://smarty.php.net/{FNAMEL}', |
155 | | | 6 => '', |
156 | | | 7 => 'http://smarty.php.net/{FNAMEL}', |
157 | | | 8 => '' |
158 | | | ), |
159 | | | 'OOLANG' => true, |
160 | | | 'OBJECT_SPLITTERS' => array( |
161 | | | 1 => '.' |
162 | | | ), |
163 | | | 'REGEXPS' => array( |
164 | | | // variables |
165 | | | |
166 | | | ), |
167 | | | 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, |
168 | | | 'SCRIPT_DELIMITERS' => array( |
169 | | | |
170 | | | '{' => '}' |
171 | | | ), |
172 | | | 1 => array( |
173 | | | '<!--' => '-->', |
174 | | | ), |
175 | | | 2 => array( |
176 | | | '<' => '>' |
177 | | | ) |
178 | | | ), |
179 | | | 'HIGHLIGHT_STRICT_BLOCK' => array( |
180 | | | |
181 | | | 1 => false, |
182 | | | 2 => false |
183 | | | ), |
184 | | | 'PARSER_CONTROL' => array( |
185 | | | 'KEYWORDS' => array( |
186 | | | 'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\#;>|^])", |
187 | | | 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-&])" |
188 | | | ) |
189 | | | ) |
190 | | | ); |
191 | | | |
192 | | | ?> |