// Compiling code
registerFilter('compile_code', 'COMPILE_CONFIG');
- registerFilter('compile_code', 'COMPILE_EXTENSION');
+ registerFilter('compile_code', 'COMPILE_EXPRESSION_CODE');
// Generic extension update filters
registerFilter('extension_update', 'UPDATE_EXTENSION_DATA');
return $GLOBALS['compiled_config'][$uncompiled];
}
-// Filter for compiling extension data
-function FILTER_COMPILE_EXTENSION ($code) {
- // Compile {%cmd=some_value%} to get extension data
- // Support cmd is:
- // - version -> getExtensionVersion() call
+// Filter for compiling expression code
+function FILTER_COMPILE_EXPRESSION_CODE ($code) {
+ // Compile {%cmd=some_value%} to get expression code snippets
+ // See switch() command below for supported commands
preg_match_all('/\{%(([a-zA-Z0-9-_,]+)(=([^\}]+)){0,1})*%\}/', $code, $matches);
//* DEBUG: */ print('<pre>'.print_r($matches, true).'</pre>');
$code = str_replace($matches[0][$key], $configValue, $code);
break;
+ case 'filter':
+ // Run the filter and insert result
+ $code = str_replace($matches[0][$key], runFilterChain($matches[4][$key]), $code);
+ break;
+
default:
// Unsupported command detected
debug_report_bug('Command=' . $cmd . ', callback=' . $callback . ', extra=' . $extraFunction . ' is unsupported.');
'ADMIN_REG_LOGIN' => "Geben Sie einen Loginnamen ein",
'ADMIN_REG_PASS1' => "Vergeben Sie ein Passwort",
'ADMIN_REG_PASS2' => "Passwort wiederholen",
+ 'ADMIN_NO_PASS' => "Kein Passwort eingegeben!",
'CLEAR_FORM' => "Nochmal eingeben",
'ADMIN_REG_SUBMIT' => "Admin-Account erstellen",
'ADMIN_NO_LOGIN' => "Sie haben keinen Loginnamen eingegeben.",