Some (not sooo important) Questions
Posted: Thu 28. Dec 2006, 09:45
Hi,
I have two questions. Maybe someone has an answer...
The RT {SPACER} works in 1.2.8 only in templates, not in content.
In 1.2.6 it was working in content also. Does anybody know, where I can change that in the code?
I have a template with php-code. Something like:
[PHP]
if(blablabla)
{
include(blablabla);
}
else
{
echo 'aldfalflalal<br>
{CONTENT}';
}
[/PHP]
Now the linebreaks <br> or <br />, which are inside the PHP-Tags are lost. I found and changed this in the 'front.func.inc.php':
function include_int_phpcode($string) {
// return the PHP code
$s = html_despecialchars($string[1]);
$s = str_replace('<br>', "\n", $s);
$s = str_replace('<br />', "\n", $s);
ob_start();
eval($s.";");
$return = ob_get_contents();
ob_end_clean();
return $return;
}
For what is this good to replace the linebreaks into '\n'?
Thank you for your help.
Grüzli - Andi
I have two questions. Maybe someone has an answer...
The RT {SPACER} works in 1.2.8 only in templates, not in content.
In 1.2.6 it was working in content also. Does anybody know, where I can change that in the code?
I have a template with php-code. Something like:
[PHP]
if(blablabla)
{
include(blablabla);
}
else
{
echo 'aldfalflalal<br>
{CONTENT}';
}
[/PHP]
Now the linebreaks <br> or <br />, which are inside the PHP-Tags are lost. I found and changed this in the 'front.func.inc.php':
function include_int_phpcode($string) {
// return the PHP code
$s = html_despecialchars($string[1]);
$s = str_replace('<br>', "\n", $s);
$s = str_replace('<br />', "\n", $s);
ob_start();
eval($s.";");
$return = ob_get_contents();
ob_end_clean();
return $return;
}
For what is this good to replace the linebreaks into '\n'?
Thank you for your help.
Grüzli - Andi