Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-20 09:39:02

elwario91
Member
Registered: 2007-07-06
Posts: 42

ied_replace: php code?

Hello!

Having some problems adding a php script, I ask for some help :)

My script is big and contains a lot of code…
The script is located on the root of my webserver and is named npc.php, I tried to include it but with problems :(
(Do not use textile)

This is what the article contains:

<txp:php>
include “npc.php”;
</txp:php>

But it shows the above code on the page with 2 smileys _
I use ied_replace to have smileys…

Can someone help me?

Thanks

(Edit: updated discussion topic. -Mary)

Last edited by Mary (2007-08-20 21:31:40)

Offline

#2 2007-08-20 10:10:11

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: ied_replace: php code?

What happens if you leave out ied_replace?

Offline

#3 2007-08-20 10:29:38

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: ied_replace: php code?

Have you checked your prefs to see if you have allowed the use of php in articles?

See Advanced Prefs in the textbook.


TXP Builders – finely-crafted code, design and txp

Offline

#4 2007-08-22 16:30:23

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ied_replace: php code?

Saw this topic has been moved!

I tried but couldn’t find how to go back to normal form…
With ied_replace you have to replace the body with a tag but what is the default tag?

Also I have a little question :)
Is it possible to create two sections, where one is naws and article, article uses the default txp tag and news uses the tag provided by ied_replace to have simels?

Thanks

Offline

#5 2007-08-22 16:35:06

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ied_replace: php code?

Ok, just saw that it was <txp:body />, I replaced and tried a phpinfo() function with this error:
Parse error: parse error, unexpected ‘<’ in /var/www/users/regnumfr/textpattern/publish/taghandlers.php(2745) : eval()’d code on line 1

This is the article content:
<txp:php>phpinfo();</txp:php>

Offline

#6 2007-08-24 07:40:27

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ied_replace: php code?

Can someone help me?

Offline

#7 2007-08-24 08:35:33

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: ied_replace: php code?

FAQ

Offline

#8 2007-08-24 12:47:42

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ied_replace: php code?

Hm, I don’t find the answer in the faq :(

Last edited by elwario91 (2007-08-24 12:48:00)

Offline

#9 2007-08-24 14:12:59

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ied_replace: php code?

Sorry I found my problem ;)

Is there a way to create a module for articles and news?
And then how to use the module news when an article is in category news and use the module article when an article is in category article, if possible?

Thanks

Offline

#10 2007-08-24 20:11:41

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: ied_replace: php code?

Please, is this possible?

Offline

#11 2007-08-24 20:28:39

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: ied_replace: php code?

uhhh what do you mean by creating a module for articles and news? are you referring to forms??? sounds like you’ll be using <txp:if_category> for whatever you’re trying to do.

also try starting another topic regarding this new issue if it doesnt have anything to do with the ied_replace plugin and php anymore…

Offline

#12 2007-08-25 03:01:08

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: ied_replace: php code?

The answer is in the FAQ I posted. Read it again. Carefully.

Offline

Board footer

Powered by FluxBB