Page 1 of 1

Some (not sooo important) Questions

Posted: Thu 28. Dec 2006, 09:45
by wingover
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

Posted: Wed 3. Jan 2007, 07:23
by flip-flop
Hi Andi,
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 can´t confirm this. For me it is working in V1.2.8/9.
I have a template with php-code. Something like: .....

... For what is this good to replace the linebreaks into '\n'?
I don´t know, only O.G. can answer this question.

Regards Knut

Posted: Sun 14. Jan 2007, 16:35
by wingover
Hallo flip-flop,

I have changed the order of some lines in the 'content.func.inc.php'.

If in the template the 'show_content' reptag is used, things like {SPACER} and [ID num]link[/ID] doesnt work, because the 'show_content' replacement is after the replacement of the other tags.

I moved this lines before the replacement-lines of the reptags:

// {SHOW_CONTENT:MODE,id[,id[,...]]}
if( ! ( strpos($content["all"],'{SHOW_CONTENT:')===false ) ) {
$content["all"] = preg_replace('/\{SHOW_CONTENT:(.*?)\}/e', 'showSelectedContent("$1");', $content["all"]);
}


Grüzli - Andi