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?

eZ debug

Timing: Jan 19 2025 07:14:29
Script start
Timing: Jan 19 2025 07:14:29
Module start 'content'
Timing: Jan 19 2025 07:14:30
Module end 'content'
Timing: Jan 19 2025 07:14:30
Script end

Main resources:

Total runtime1.4260 sec
Peak memory usage4,096.0000 KB
Database Queries212

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.9297180.8438
Module start 'content' 0.00631.2471 769.7734712.9922
Module end 'content' 1.25340.1725 1,482.7656340.4609
Script end 1.4259  1,823.2266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.2870210.0002
Check MTime0.00160.1095210.0001
Mysql Total
Database connection0.00080.057010.0008
Mysqli_queries1.340193.97622120.0063
Looping result0.00210.14722100.0000
Template Total1.391897.620.6959
Template load0.00200.143320.0010
Template processing1.389897.459520.6949
Template load and register function0.00020.013210.0002
states
state_id_array0.00090.061410.0009
state_identifier_array0.00360.255120.0018
Override
Cache load0.00180.1231420.0000
Sytem overhead
Fetch class attribute can translate value0.00160.111860.0003
Fetch class attribute name0.00200.1381110.0002
XML
Image XML parsing0.00270.191660.0005
class_abstraction
Instantiating content class attribute0.00000.0033110.0000
General
dbfile0.00530.3724460.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs