- CSS-Klassen reduzieren und weiter vereinfachen
- Von TABLE auf DIV-Container umstellen
- AJAX einbinden
+- Klick-Smiley unterstuetzen:
+ + Dazu ist es noetig, dass alle vergueteten Klicks zentral gezaehlt werden
+ + Empfehlenswert ist hier ein Filter, der dies samt Gutschrift uebernimmt
- Hoere auf, "unfreie" Software zu verwenden und trete meiner Community bei.
- Kaempft gegen Softwarepatente! Das ist Teufelszeug!
// Expression call-back function for getting configuration data
// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again
function doExpressionConfig ($data) {
- // Read configuration
- $configValue = getConfig($data['matches'][4][$data['key']]);
-
// Default replacer is the config value itself
- $replacer = $configValue;
+ $replacer = '{DQUOTE} . getConfig(' . "'" . $data['matches'][4][$data['key']] . "'" . ') . {DQUOTE}';
// Is there a call-back function provided?
if (!empty($data['callback'])) {
// We need callback and extra_func: callback is really the call-back function, extra_func is our value
$replacer = $data['extra_func'];
+ // Is the extra_func empty and value set?
+ if ((empty($replacer)) && (isset($data['value']))) {
+ // Then use this
+ $replacer = $data['value'];
+ } // END - if
+
// Do we have a call-back? Should always be there!
if (!empty($data['callback'])) {
// Parse it through this function
if ($compiled === true) {
// Run the code
$eval = "\$GLOBALS['compiled_config'][\$uncompiled] = \"" . $GLOBALS['compiled_config'][$uncompiled] . "\";";
- //* DEBUG: */ print(__FUNCTION__.'['.__LINE__.']:<pre>' . str_replace('$', '$', htmlentities($eval)) . '</pre>');
+ /* DEBUG: */ print(__FUNCTION__.'['.__LINE__.']:<pre>' . str_replace('$', '$', htmlentities($eval)) . '</pre>');
eval($eval);
} // END - if
// Replace all matches
foreach ($matches[2] as $key => $cmd) {
// Init replacer/call-back variable
- $replacer = '';
- $callback = '';
+ $replacer = '';
+ $callback = '';
$extraFunction = '';
+ $value = '';
// Extract command and call-back
$cmdArray = explode(',', $cmd);
$cmd = $cmdArray[0];
- if (isset($cmdArray[1])) $callback = $cmdArray[1];
- if (isset($cmdArray[2])) $extraFunction = $cmdArray[2];
+
+ // Detect call-back function
+ if (isset($cmdArray[1])) {
+ // Call-back function detected
+ $callback = $cmdArray[1];
+ } // END - if
+
+ // Detect extra function
+ if (isset($cmdArray[2])) {
+ // Also detected
+ $extraFunction = $cmdArray[2];
+ } elseif (isset($matches[4][$key])) {
+ // Use this as value
+ $value = $matches[4][$key];
+ }
// Construct call-back function name for the command
$commandFunction = 'doExpression' . ucfirst(strtolower($cmd));
'mode' => $outputMode,
'code' => $code,
'callback' => $callback,
- 'extra_func' => $extraFunction
+ 'extra_func' => $extraFunction,
+ 'value' => $value
);
// Call it
$GLOBALS['output'] = '';
} // END - if
- // Transfer username
- $username = getMessage('USERNAME_UNKNOWN');
- if (isset($GLOBALS['username'])) $username = getUsername();
-
// Do we have HTML-Code here?
if (!empty($htmlCode)) {
// Yes, so we handle it as you have configured
// Evaluate the cache
eval(readTemplateCache($template));
} elseif (!isset($GLOBALS['template_eval'][$template])) {
- // Add more variables which you want to use in your template files
- $username = getUsername();
-
// Make all template names lowercase
$template = strtolower($template);
if ($constants === true) {
// BEFORE 0.2.1 : Language and data constants
// WITH 0.2.1+ : Only language constants
- $code = str_replace('{--', "\" . getMessage('", str_replace('--}', "') . \"", $code));
+ $code = str_replace('{--', "{DQUOTE} . getMessage('", str_replace('--}', "') . {DQUOTE}", $code));
// BEFORE 0.2.1 : Not used
// WITH 0.2.1+ : Data constants
- $code = str_replace('{!', "\" . constant('", str_replace('!}', "') . \"", $code));
+ $code = str_replace('{!', "{DQUOTE} . constant('", str_replace('!}', "') . {DQUOTE}", $code));
} // END - if
// Compile QUOT and other non-HTML codes
// Prepare output
// @TODO This can be easily moved out after the merge from EL branch to this is complete
$content = array(
- 'run_time' => translateComma($runTime),
+ 'run_time' => $runTime,
'sql_time' => translateComma(getConfig('sql_time') * 1000),
);
// Generate FQFN
$FQFN = generateCacheFqfn($template);
- // Replace username with a call
- $eval = str_replace('$username', '".getUsername()."', $eval);
-
// And flush it
writeToFile($FQFN, $eval, true);
} // END - if
<tr>
<td>
<div align="left" class="tiny">
- Hallo $username!
+ Hallo {%pipe,getUsername%}!
</div>
</td>
<td align="center" width="300" class="dashed tiny">
<tr>
<td>
<div align="left" class="medium">
- Hallo $username!
+ Hallo {%pipe,getUsername%}!
</div>
</td>
<td align="center" width="300" class="dashed tiny">
class="guest_header">{?MAIN_TITLE?}</a> - - -</big></strong>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
- <td width="200"><div class="guest_header">Hallo $username!</div></td>
+ <td width="200"><div class="guest_header">Hallo {%pipe,getUsername%}!</div></td>
<td align="center"><div class="guest_header">{?SLOGAN?}</div></td>
<td width="200" align="right"><div class="guest_header">$content[date_time]</div></td>
</tr>
<tr>
<td width="200">
<div class="guest_header">
- Hallo $username!
+ Hallo {%pipe,getUsername%}!
</div>
</td>
<td align="center">
<div class="bottom2">
<div align="left" class="pre">
Mit freundlichen Grüßen,<br />
- Ihr $username
+ Ihr {%pipe,getUsername%}
</div>
</div>
<ul class="show_timings_block">
<li class="show_timings_column" style="margin-left: 2px"><span class="show_timings_column">
{--SHOW_TIMINGS_RUNTIME--}
- <span class="show_timings_data">$content[run_time] {--SHOW_TIMINGS_SECS--}</span>
+ <span class="show_timings_data">{%pipe,translateComma=$content[run_time]%} {--SHOW_TIMINGS_SECS--}</span>
</span></li>
<li class="show_timings_column" style="margin-left: 2px"><span class="show_timings_column">
{--SHOW_TIMINGS_SQL_QUERIES--}
<strong>: : : Welcome to the administration's area : : :</strong>
<br />
-<div align="left" class="tiny">Hello $username !</div>
+<div align="left" class="tiny">Hello {%pipe,getUsername%} !</div>