I have tried to use the FAQ Snippet from Etomite. I am getting the following result...
Parse error: parse error, unexpected T_STRING in /home/mail2gro/public_html/manager/includes/document.parser.class.inc.php(661) : eval()’d code on line 2
___
Does anyone know if this Snippet is working in MODx?
Richard
ModX should be fully backwards compadible with Etomite. Which TP are you running?
-
☆ A M B ☆
- 24,524 Posts
That’s the problem; and also the snippet author not following recommended coding practices.
Line 2:
$output = "<script type="text/javascript"> ...
Either you have the quotes in the output string escaped with a backslash ( \"text/javascript\" ) or you use single quotes, either for the outer level or the inner level of quotes:
$output = "<script type='text/javascript'> ...
Looking at the code in this snippet, the author used every variation possible!
I changed to the other FAQ snippet: NeatFAQ
and it works fine.
Richard
Snippets made for 0.6.1 and 2 do not work all the time on Mod-X there are some new api calls that Mod-X does not support