Version : Genoa 0.6.22
I have on my website 2 languages, which I would like to select.
Inside my index.tpl is the following part.
<!-- IF {PHP.usr.lang} == "en" -->
<h2>About My website</h2>
{PAGE_TEXT_ID_23}
<!-- ENDIF -->
<!-- IF {PHP.usr.lang} == "nl" -->
<h2>Over mijn website</h2>
{PAGE_TEXT_ID_22}
<!-- ENDIF -->
Where it goes wrong is when i have two {PAGE_TEXT_ID_xx} in there....
Then the index times out...
The PAGETEXTBYIDN plugin does something like this:
It starts something like this:
$currenttpl = file_get_contents($mskin);
if (strpos($currenttpl, "{PAGE_TEXT_ID_")==true)// if tag exist on page
{
unset($p_match);
preg_match_all("#\{(PAGE_TEXT_ID_(\d*?))\}#", $currenttpl, $p_match);
It ends like this inside a loop that loops through all found tags:
// Assign tag
$t->assign($p_tag, $page_html);
My best guess:
I am guessing it goes wrong with the assign inside the Template...
I think because I use an conditional TAG based on language <!-- IF {PHP.usr.lang} == "en" -->
and the fact that this plugin uses file_get_contents($mskin) to get the tags.... (which do not care about IF THEN statements)
How do I fix this ??????????????