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?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 09:46:36
Script start
Timing: Jan 19 2025 09:46:36
Module start 'layout'
Timing: Jan 19 2025 09:46:36
Module start 'content'
Timing: Jan 19 2025 09:46:37
Module end 'content'
Timing: Jan 19 2025 09:46:37
Script end

Main resources:

Total runtime1.1589 sec
Peak memory usage4,096.0000 KB
Database Queries75

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.1484152.6250
Module start 'layout' 0.00560.0031 741.773439.4297
Module start 'content' 0.00881.1485 781.2031707.9141
Module end 'content' 1.15720.0016 1,489.117216.1875
Script end 1.1588  1,505.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2850160.0002
Check MTime0.00130.1125160.0001
Mysql Total
Database connection0.00070.061310.0007
Mysqli_queries1.089594.0149750.0145
Looping result0.00090.0783730.0000
Template Total1.129597.520.5648
Template load0.00180.152020.0009
Template processing1.127797.312820.5639
Template load and register function0.00030.021910.0003
states
state_id_array0.00080.070310.0008
state_identifier_array0.00060.048920.0003
Override
Cache load0.00150.1322420.0000
Sytem overhead
Fetch class attribute can translate value0.00130.112150.0003
Fetch class attribute name0.00180.1526110.0002
XML
Image XML parsing0.00250.216650.0005
class_abstraction
Instantiating content class attribute0.00000.0022110.0000
General
dbfile0.00150.1288350.0000
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs