Include PHP Script into EZ

Author Message

Badii Bouteraa

Thursday 02 March 2006 10:44:08 am

Hello,
excuse me for my English :)

I added a new operator of template to be able to include files php in ez. (I have many forms with several stages of recording to integrate in the pages ez and I préferé to use php rather than ez: it is the simpler) new operator of template walk well and I can include scripts php without problem but I have small troubles, when I filled and that I validate the form it makes the recording in the base of data but does not take into account the message of confirmation of inscription of the form

ez takes into account only one alone action in my file php; just insertion but I does not take into account tests it after insertion to be able to post the message of confirmation

you have an idea ?

Badi

Łukasz Serwatka

Thursday 02 March 2006 11:35:10 pm

Hi Badii,

Instead including php files in templates, better is create new module where you have full control on the input and the output. Data from your form you can pass to your module, then validate and do some action with them. You can of course use templates for output presentation from your module.

Good tutorial how to create new module you can find here:
http://ez.no/products/ez_publish/documentation/development/extensions/module/hello_world

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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 18 2025 16:17:00
Script start
Timing: Jan 18 2025 16:17:00
Module start 'layout'
Timing: Jan 18 2025 16:17:00
Module start 'content'
Timing: Jan 18 2025 16:17:00
Module end 'content'
Timing: Jan 18 2025 16:17:00
Script end

Main resources:

Total runtime0.6334 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 589.0313152.6250
Module start 'layout' 0.00510.0029 741.656339.4453
Module start 'content' 0.00800.6236 781.1016533.7813
Module end 'content' 0.63160.0018 1,314.88288.1641
Script end 0.6334  1,323.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5204160.0002
Check MTime0.00120.1963160.0001
Mysql Total
Database connection0.00070.111810.0007
Mysqli_queries0.583992.1815540.0108
Looping result0.00050.0831520.0000
Template Total0.599494.620.2997
Template load0.00220.345720.0011
Template processing0.597194.272120.2986
Template load and register function0.00020.028710.0002
states
state_id_array0.00080.121710.0008
state_identifier_array0.00130.203920.0006
Override
Cache load0.00150.2430160.0001
Sytem overhead
Fetch class attribute can translate value0.00080.129420.0004
Fetch class attribute name0.00130.200540.0003
XML
Image XML parsing0.00260.402720.0013
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00400.6370240.0002
String conversion0.00000.001240.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs