Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-13 14:53:40

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

php in articles

hey

I am trying to write some php functions for txp. I want to control these functions via cms meaning that each script is included in an article but I am having trouble getting this to work.

I made 2 articles. First includes: <txp:php>phpinfo();</txp:php> which works fine.

Second article contains <txp:php>echo(“foobar”);</txp:php> which returns the following error:

Parse error: syntax error, unexpected ‘&’ in /textpattern/publish/taghandlers.php(2811) : eval()’d code on line 1

why wouldn’t this script work? I copied the script into one of the pages and it works. It just doesn’t seem to work within the article… I turned the use of php in articles an pages on!

please help :)


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

#2 2008-04-13 15:00:55

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

Re: php in articles

ahhhhh … i turned off textile … working now … the only problem left ist that the output of the php script is not positioned within the articles content but way below????

Last edited by markusfalk (2008-04-13 15:11:15)


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

#3 2008-04-13 17:50:37

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: php in articles

With textile turned on did you try notextile. <txp:php>echo("foobar");</txp:php>?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Online

#4 2008-04-14 13:39:34

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

Re: php in articles

It’s working now. I turned off textile for the body and only include the php-files from outer txp. It worked with the content within the right position – seems this was only some sort of cache problem

thanks everyone :)


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

Board footer

Powered by FluxBB