Forums / Setup & design / php code in content ?

php code in content ?

Author Message

Benoit G

Thursday 26 May 2005 7:54:31 am

I read some topic about it, but I can't find anything which fit whith my need.

I need to insert into content a complexe php code:

1. First content generate form from XML file (php script need to find url of the xml file, can use a variable)

2. When you validate first form a 2sd content should show result who calculate whith last form.

I know, it's not easy, but in don't want build a spesific module to do this.

I have read 2 articles about this but I find it too hard, and very unusable.

If no content compoment can anser my need, have you alt solution or somethink like this would be release in short time ?

Sory for my poor english, I hope to be clear enough

J-A Eberhard

Thursday 26 May 2005 9:22:28 am

I don't know exactly what you want to achieve but an easy way to include php scripts in eZ template is to use the <iframe> tag.
JAE

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Benoit G

Friday 27 May 2005 2:22:39 am

think you :)

I will try to find some doc about iframe

Marko Žmak

Friday 27 May 2005 7:36:17 am

This is how you use IFRAME:

<IFRAME SRC="script.php" TITLE="My Frame">
<!-- Alternate content browsers that don't support the IFRAME tag -->

<B>Some alternative content</B>
...
</IFRAME>

Also try searching IFRAME on Google for detailed specifications.

Notice:

If you use the .htaccess file in the root of eZ, accessing php files may be denied so check this file if you can't access your php scripts.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Benoit G

Monday 30 May 2005 6:14:09 am

iframe doesn't solve my issue.

For more explanation, I need compoment where I can write php code, like I can do in drupal ? (www.drupal.org).

In drupal when you write page content you have 3 options: pure HTML, filtred HTML and php code. The last option is my choise.

This solution have some constraint who doesn't block for my ussage.

Is it possible in ezPublish ?

Thank you for help :)

Kristian Hole

Monday 30 May 2005 6:45:35 am

Hi

Yes, you can use PHP. That is usually done by creating a module. Check this tutorial out:

http://ez.no/ez_publish/documentation/development/extensions/building_an_ez_publish_module

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Jianjun Hu

Saturday 07 July 2007 8:27:16 pm

Useful!
Thanks!

OnlyBlue

☆..·°∴°.☆°°.☆°.
°∴ °☆ .·enjoy star° .·★°∴°
∴°.°★ .·°
  ミ☆°∴°.★☆° ∴·°
°.☆° .·∴° 

Is it a pleasure after all to practice in due time what one has learnt?