Implementing eZ3 extensions

Author Message

Tony Wood

Tuesday 22 April 2003 10:26:48 am

Hi,

Could you point me in the right direction to add an extension to eZ. I need to be able to get php variables to and from a php into a template. The info is coming from a SOAP client, this stuff is written, just simple pear client calls.

I have looked at SDK, but cannot see what i need to get going with this.
Please can you point me in the right direction.

tia

tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Sergiy Pushchin

Wednesday 23 April 2003 12:43:15 am

I think you can use template fetch function. Create your own module. Can be empty one. There (in module folder) you create two files [your_module_name]functioncollection.php and function_definition.php similar to files in content or shop module. There you can define functions you need. After that they will be aviable in template with.
fetch('your_module','your_function',hash(your params here))

Tony Wood

Wednesday 23 April 2003 1:23:39 am

Thanks, I'll give it a whirl.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Alessandro Ranellucci

Wednesday 23 April 2003 2:55:01 pm

Wow! That's what I was looking for!

Sebastian Sprenger

Wednesday 01 October 2003 6:09:27 am

Hi!
Sounds really good, but I have this problem:
In file function_definition.php you have to define
[...]
'call_method' => array(
'include_file' => 'ezcontentfunctioncollection.php',
'class' => 'eZContentFunctionCollection',
'method' => 'fetchRandomObject' ), [...]

How to include ezcontentfunctioncollection.php?? I tried several paths, but there's always an error ("Failed opening 'ezcontentfunctioncollection.php' for inclusion...).
The file is located in /extensions/functions/modules/functions/. Any help out there...?
Thanks, Sebastian

Paul Forsyth

Wednesday 01 October 2003 7:41:23 am

You are very close. Try:

include_file' => 'extensions/functions/modules/functions/ezcontentfunctioncollection.php'

Ez knows where 'extensions' is, so you just need to complete the path.

Paul

Sebastian Sprenger

Thursday 02 October 2003 1:31:21 am

Thanks, this works!!
Sebastian

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 10:28:29
Script start
Timing: Jan 18 2025 10:28:29
Module start 'layout'
Timing: Jan 18 2025 10:28:29
Module start 'content'
Timing: Jan 18 2025 10:28:29
Module end 'content'
Timing: Jan 18 2025 10:28:29
Script end

Main resources:

Total runtime0.8589 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.0053 587.9141152.6250
Module start 'layout' 0.00540.0026 740.539139.4453
Module start 'content' 0.00790.8493 779.9844692.5625
Module end 'content' 0.85720.0016 1,472.546916.1641
Script end 0.8589  1,488.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3760160.0002
Check MTime0.00130.1558160.0001
Mysql Total
Database connection0.00080.094210.0008
Mysqli_queries0.796792.7568750.0106
Looping result0.00080.0956730.0000
Template Total0.825896.120.4129
Template load0.00220.256020.0011
Template processing0.823695.886220.4118
Template load and register function0.00010.012610.0001
states
state_id_array0.00100.118410.0010
state_identifier_array0.00120.136220.0006
Override
Cache load0.00190.2190390.0000
Sytem overhead
Fetch class attribute can translate value0.00040.050150.0001
Fetch class attribute name0.00140.159890.0002
XML
Image XML parsing0.00170.197250.0003
class_abstraction
Instantiating content class attribute0.00000.0023100.0000
General
dbfile0.00090.1039220.0000
String conversion0.00000.001140.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs