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