Matthias Englert wrote:
>Is it correct that midgard does not touch element-tags which are
>embedded in PHP?
>
>i.e. <? echo "[header]"; ?> would produce [header] as output, right?
>
>If the answer is yes, I have big trouble with midgrd lite because
>midgard lite does not take care about php sections. In this situation
>Asgard will not work with midgard lite. Alan, help! :-)
>Does anybody know a good solution? How to make a ereg/preg on a string
>except in php-sections. I could spend some time to implement a function
>but I'm pretty sure the function would be very slow. :-)
>
I got caught with that too, Since this doesnt happen very often, a
little kludge in order:)
have a look at midgard_config - it fudges 2 snippets for nadmin.. -
var $problem_snippets = array(
"new"=>"problem",
"edit_function"=>"problem"
);
dont forget that the mgd_template is only run once, and then caches the
result - so you will have to delete the cache files if you make changes
like this..
-- the real fix could be to check if a page contained <? and <[xxx]> if so
change the 'advanced' parser that does
preg_match "(<?|?>)" into an array and then replace mgd_snippet in
the php bits and <[xxx]> in the html bits.
the speed should not be to bad, as its all cached anyway..
regards
alan
>
>
>Matthias
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]