Forums / Developer / Implementing eZ3 extensions

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

eZ debug

Timing: Jan 18 2025 02:49:50
Script start
Timing: Jan 18 2025 02:49:50
Module start 'content'
Timing: Jan 18 2025 02:49:50
Module end 'content'
Timing: Jan 18 2025 02:49:50
Script end

Main resources:

Total runtime0.0129 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 587.9141180.8359
Module start 'content' 0.00620.0030 768.750097.8672
Module end 'content' 0.00920.0037 866.617274.7031
Script end 0.0129  941.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002116.1444120.0002
Check MTime0.00107.4541120.0001
Mysql Total
Database connection0.00075.718610.0007
Mysqli_queries0.002720.507040.0007
Looping result0.00000.309520.0000
Template Total0.003426.210.0034
Template load0.00064.659310.0006
Template processing0.002821.496310.0028
Override
Cache load0.00043.275710.0004
General
dbfile0.00032.3711100.0000
String conversion0.00000.070030.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs