|
1 <?php |
|
2 /************************************************************************************* |
|
3 * typoscript.php |
|
4 * -------- |
|
5 * Author: Jan-Philipp Halle (typo3@jphalle.de) |
|
6 * Copyright: (c) 2005 Jan-Philipp Halle (http://www.jphalle.de/) |
|
7 * Release Version: 1.0.8.2 |
|
8 * Date Started: 2005/07/29 |
|
9 * |
|
10 * TypoScript language file for GeSHi. |
|
11 * |
|
12 * CHANGES |
|
13 * ------- |
|
14 * 2008/07/11 (1.0.8) |
|
15 * - Michiel Roos <geshi@typofree.org> Complete rewrite |
|
16 * 2005/07/29 (1.0.0) |
|
17 * - First Release |
|
18 * |
|
19 * TODO (updated 2004/07/14) |
|
20 * ------------------------- |
|
21 * <things-to-do> |
|
22 * |
|
23 ************************************************************************************* |
|
24 * |
|
25 * This file is part of GeSHi. |
|
26 * |
|
27 * GeSHi is free software; you can redistribute it and/or modify |
|
28 * it under the terms of the GNU General Public License as published by |
|
29 * the Free Software Foundation; either version 2 of the License, or |
|
30 * (at your option) any later version. |
|
31 * |
|
32 * GeSHi is distributed in the hope that it will be useful, |
|
33 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
35 * GNU General Public License for more details. |
|
36 * |
|
37 * You should have received a copy of the GNU General Public License |
|
38 * along with GeSHi; if not, write to the Free Software |
|
39 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
40 * |
|
41 ************************************************************************************/ |
|
42 |
|
43 $language_data = array ( |
|
44 'LANG_NAME' => 'TypoScript', |
|
45 'COMMENT_SINGLE' => array(1 => '//'), |
|
46 'COMMENT_MULTI' => array('/*' => '*/'), |
|
47 'COMMENT_REGEXP' => array(2 => '/(?<!(#|\'|"))(?:#(?!(?:[a-fA-F0-9]{6}|[a-fA-F0-9]{3}))[^\n#]+|#{2}[^\n#]+|#{7,999}[^\n]+)/'), |
|
48 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
|
49 'QUOTEMARKS' => array(), |
|
50 'ESCAPE_CHAR' => '', |
|
51 'KEYWORDS' => array( |
|
52 // Conditions: http://documentation.typo3.org/documentation/tsref/conditions/ |
|
53 1 => array( |
|
54 'browser', 'compatVersion', 'dayofmonth', 'dayofweek', 'device', |
|
55 'globalString', 'globalVars', 'hostname', 'hour', |
|
56 'ip', 'language', 'loginUser', 'loginuser', 'minute', |
|
57 'month', 'PIDinRootline', 'PIDupinRootline', |
|
58 'system', 'treelevel', 'useragent', 'userFunc', |
|
59 'usergroup', 'version' |
|
60 ), |
|
61 |
|
62 // Functions: http://documentation.typo3.org/documentation/tsref/functions/ |
|
63 2 => array( |
|
64 'addParams', 'encapsLines', 'filelink', 'HTMLparser', |
|
65 'HTMLparser_tags', 'if', 'imageLinkWrap', |
|
66 'imgResource', 'makelinks', 'numRows', 'parseFunc', |
|
67 'select', 'split', 'stdWrap', 'tableStyle', 'tags', |
|
68 'textStyle', 'typolink' |
|
69 ), |
|
70 |
|
71 // Toplevel objects: http://documentation.typo3.org/documentation/tsref/tlo-objects/ |
|
72 3 => array( |
|
73 'CARRAY', 'CONFIG', 'CONSTANTS', 'FE_DATA', 'FE_TABLE', 'FRAME', |
|
74 'FRAMESET', 'META', 'PAGE', 'plugin' |
|
75 ), |
|
76 |
|
77 // Content Objects (cObject) : http://documentation.typo3.org/documentation/tsref/cobjects/ |
|
78 4 => array( |
|
79 'CASE', 'CLEARGIF', 'COA', 'COA_INT', 'COBJ_ARRAY', 'COLUMNS', |
|
80 'CONTENT', 'CTABLE', 'EDITPANEL', 'FILE', 'FORM', |
|
81 'HMENU', 'HRULER', 'HTML', 'IMAGE', 'IMGTEXT', |
|
82 'IMG_RESOURCE', 'LOAD_REGISTER', 'MULTIMEDIA', |
|
83 'OTABLE', 'PHP_SCRIPT', 'PHP_SCRIPT_EXT', |
|
84 'PHP_SCRIPT_INT', 'RECORDS', 'RESTORE_REGISTER', |
|
85 'SEARCHRESULT', 'TEMPLATE', 'TEXT', 'USER', |
|
86 'USER_INT' |
|
87 ), |
|
88 |
|
89 // GIFBUILDER toplevel link: http://documentation.typo3.org/documentation/tsref/gifbuilder/ |
|
90 5 => array( |
|
91 'GIFBUILDER', |
|
92 ), |
|
93 |
|
94 // GIFBUILDER: http://documentation.typo3.org/documentation/tsref/gifbuilder/ |
|
95 // skipped fields: IMAGE, TEXT |
|
96 // NOTE! the IMAGE and TEXT field already are linked in group 4, they |
|
97 // cannot be linked twice . . . . unfortunately |
|
98 6 => array( |
|
99 'ADJUST', 'BOX', 'CROP', 'EFFECT', 'EMBOSS', |
|
100 'IMGMAP', 'OUTLINE', 'SCALE', 'SHADOW', |
|
101 'WORKAREA' |
|
102 ), |
|
103 |
|
104 // MENU Objects: http://documentation.typo3.org/documentation/tsref/menu/ |
|
105 7 => array( |
|
106 'GMENU', 'GMENU_FOLDOUT', 'GMENU_LAYERS', 'IMGMENU', |
|
107 'IMGMENUITEM', 'JSMENU', 'JSMENUITEM', 'TMENU', |
|
108 'TMENUITEM', 'TMENU_LAYERS' |
|
109 ), |
|
110 |
|
111 // MENU common properties: http://documentation.typo3.org/documentation/tsref/menu/common-properties/ |
|
112 8 => array( |
|
113 'alternativeSortingField', 'begin', 'debugItemConf', |
|
114 'imgNameNotRandom', 'imgNamePrefix', |
|
115 'itemArrayProcFunc', 'JSWindow', 'maxItems', |
|
116 'minItems', 'overrideId', 'sectionIndex', |
|
117 'showAccessRestrictedPages', 'submenuObjSuffixes' |
|
118 ), |
|
119 |
|
120 // MENU item states: http://documentation.typo3.org/documentation/tsref/menu/item-states/ |
|
121 9 => array( |
|
122 'ACT', 'ACTIFSUB', 'ACTIFSUBRO', 'ACTRO', 'CUR', 'CURIFSUB', |
|
123 'CURIFSUBRO', 'CURRO', 'IFSUB', 'IFSUBRO', 'NO', |
|
124 'SPC', 'USERDEF1', 'USERDEF1RO', 'USERDEF2', |
|
125 'USERDEF2RO', 'USR', 'USRRO' |
|
126 ), |
|
127 ), |
|
128 |
|
129 // Does not include '-' because of stuff like htmlTag_langKey = en-GB and |
|
130 // lib.nav-sub |
|
131 'SYMBOLS' => array( |
|
132 0 => array( |
|
133 '|', |
|
134 '+', '*', '/', '%', |
|
135 '!', '&&', '^', |
|
136 '<', '>', '=', |
|
137 '?', ':', |
|
138 '.' |
|
139 ), |
|
140 1 => array( |
|
141 '(', ')', '{', '}', '[', ']' |
|
142 ) |
|
143 ), |
|
144 'CASE_SENSITIVE' => array( |
|
145 GESHI_COMMENTS => false, |
|
146 1 => true, |
|
147 2 => true, |
|
148 3 => true, |
|
149 4 => true, |
|
150 5 => true, |
|
151 6 => true, |
|
152 7 => true, |
|
153 8 => true, |
|
154 9 => true |
|
155 ), |
|
156 'STYLES' => array( |
|
157 'KEYWORDS' => array( |
|
158 1 => 'color: #ed7d14;', |
|
159 2 => 'font-weight: bold;', |
|
160 3 => 'color: #990000; font-weight: bold;', |
|
161 4 => 'color: #990000; font-weight: bold;', |
|
162 5 => 'color: #990000; font-weight: bold;', |
|
163 6 => 'color: #990000; font-weight: bold;', |
|
164 7 => 'color: #990000; font-weight: bold;', |
|
165 8 => 'font-weight: bold;', |
|
166 9 => 'color: #990000; font-weight: bold;', |
|
167 ), |
|
168 'COMMENTS' => array( |
|
169 1 => 'color: #aaa; font-style: italic;', |
|
170 2 => 'color: #aaa; font-style: italic;', |
|
171 'MULTI' => 'color: #aaa; font-style: italic;' |
|
172 ), |
|
173 'STRINGS' => array( |
|
174 0 => 'color: #ac14aa;' |
|
175 ), |
|
176 'NUMBERS' => array( |
|
177 0 => 'color: #cc0000;' |
|
178 ), |
|
179 'METHODS' => array( |
|
180 1 => 'color: #0000e0; font-weight: bold;', |
|
181 2 => 'color: #0000e0; font-weight: bold;' |
|
182 ), |
|
183 'BRACKETS' => array( |
|
184 0 => 'color: #009900;' |
|
185 ), |
|
186 'SYMBOLS' => array( |
|
187 0 => 'color: #339933; font-weight: bold;', |
|
188 // Set this to the same value as brackets above |
|
189 1 => 'color: #009900; font-weight: bold;' |
|
190 ), |
|
191 'REGEXPS' => array( |
|
192 0 => 'color: #009900;', |
|
193 1 => 'color: #009900; font-weight: bold;', |
|
194 2 => 'color: #3366CC;', |
|
195 3 => 'color: #000066; font-weight: bold;', |
|
196 4 => 'color: #ed7d14;', |
|
197 5 => 'color: #000066; font-weight: bold;', |
|
198 6 => 'color: #009900;', |
|
199 7 => 'color: #3366CC;' |
|
200 ), |
|
201 'ESCAPE_CHAR' => array( |
|
202 ), |
|
203 'SCRIPT' => array( |
|
204 ) |
|
205 ), |
|
206 'URLS' => array( |
|
207 1 => 'http://documentation.typo3.org/documentation/tsref/conditions/{FNAME}/', |
|
208 2 => 'http://documentation.typo3.org/documentation/tsref/functions/{FNAME}/', |
|
209 3 => 'http://documentation.typo3.org/documentation/tsref/tlo-objects/{FNAME}/', |
|
210 4 => 'http://documentation.typo3.org/documentation/tsref/cobjects/{FNAME}/', |
|
211 5 => 'http://documentation.typo3.org/documentation/tsref/gifbuilder/', |
|
212 6 => 'http://documentation.typo3.org/documentation/tsref/gifbuilder/{FNAME}/', |
|
213 7 => 'http://documentation.typo3.org/documentation/tsref/menu/{FNAME}/', |
|
214 8 => 'http://documentation.typo3.org/documentation/tsref/menu/common-properties/', |
|
215 9 => 'http://documentation.typo3.org/documentation/tsref/menu/item-states/' |
|
216 ), |
|
217 'OOLANG' => false, |
|
218 'OBJECT_SPLITTERS' => array( |
|
219 ), |
|
220 'REGEXPS' => array( |
|
221 // Constant |
|
222 0 => array( |
|
223 GESHI_SEARCH => '(\{)(\$[a-zA-Z_\.]+[a-zA-Z0-9_\.]*)(\})', |
|
224 GESHI_REPLACE => '\\2', |
|
225 GESHI_MODIFIERS => '', |
|
226 GESHI_BEFORE => '\\1', |
|
227 GESHI_AFTER => '\\3' |
|
228 ), |
|
229 |
|
230 // Constant dollar sign |
|
231 1 => array( |
|
232 GESHI_SEARCH => '(\$)([a-zA-Z_\.]+[a-zA-Z0-9_\.]*)', |
|
233 GESHI_REPLACE => '\\1', |
|
234 GESHI_MODIFIERS => '', |
|
235 GESHI_BEFORE => '', |
|
236 GESHI_AFTER => '\\2' |
|
237 ), |
|
238 |
|
239 // xhtml tag |
|
240 2 => array( |
|
241 GESHI_SEARCH => '(<[a-zA-Z\!\/].*?>)', |
|
242 GESHI_REPLACE => '\\1', |
|
243 GESHI_MODIFIERS => 's', |
|
244 GESHI_BEFORE => '', |
|
245 GESHI_AFTER => '' |
|
246 ), |
|
247 |
|
248 // extension keys / tables: (static|user|ttx|tx|tt|fe)_something[_something] |
|
249 3 => array( |
|
250 GESHI_SEARCH => '(plugin\.|[^\.]\b)((?:static|user|ttx|tx|tt|fe)(?:_[0-9A-Za-z_]+?)\b)', |
|
251 GESHI_REPLACE => '\\2', |
|
252 GESHI_MODIFIERS => '', |
|
253 GESHI_BEFORE => '\\1', |
|
254 GESHI_AFTER => '' |
|
255 ), |
|
256 |
|
257 // conditions and controls |
|
258 4 => array( |
|
259 GESHI_SEARCH => '(\[)(globalVar|global|end)\b', |
|
260 GESHI_REPLACE => '\\2', |
|
261 GESHI_MODIFIERS => 'i', |
|
262 GESHI_BEFORE => '\\1', |
|
263 GESHI_AFTER => '' |
|
264 ), |
|
265 |
|
266 // lowlevel setup and constant objects |
|
267 5 => array( |
|
268 GESHI_SEARCH => '([^\.\$-\{]\b)(cObj|field|config|content|file|frameset|includeLibs|lib|page|plugin|register|resources|sitemap|sitetitle|styles|temp|tt_content|tt_news|types|xmlnews)\b', |
|
269 GESHI_REPLACE => '\\2', |
|
270 GESHI_MODIFIERS => '', |
|
271 GESHI_BEFORE => '\\1', |
|
272 GESHI_AFTER => '' |
|
273 ), |
|
274 |
|
275 // markers |
|
276 6 => array( |
|
277 GESHI_SEARCH => '(###[^#]+###)', |
|
278 GESHI_REPLACE => '\\1', |
|
279 GESHI_MODIFIERS => '', |
|
280 GESHI_BEFORE => '', |
|
281 GESHI_AFTER => '' |
|
282 ), |
|
283 |
|
284 // hex color codes |
|
285 7 => array( |
|
286 GESHI_SEARCH => '(#[a-fA-F0-9]{6}\b|#[a-fA-F0-9]{3}\b)', |
|
287 GESHI_REPLACE => '\\1', |
|
288 GESHI_MODIFIERS => '', |
|
289 GESHI_BEFORE => '', |
|
290 GESHI_AFTER => '' |
|
291 ) |
|
292 ), |
|
293 'STRICT_MODE_APPLIES' => GESHI_NEVER, |
|
294 'SCRIPT_DELIMITERS' => array( |
|
295 ), |
|
296 'HIGHLIGHT_STRICT_BLOCK' => array( |
|
297 ), |
|
298 ); |
|
299 |
|
300 ?> |