To include php file in ezpublish-4.3.0-full-version

Author Message

Romeo Antony

Tuesday 15 June 2010 12:15:18 am

how do I put php file in ezpublish-4.3.0-full-version

I added PHPOperatorList[marksPHPinsert]=marksPHPinsert in templete.ini

then I put follweing code in bottom part of eztemplateautoload.php

function marksPHPinsert ($file)
{
$file = fopen ($file, "r" );
while (!feof ($file))
{
$output .= fgets ($file, 4096);
}
fclose ($file);
return ($output);
}

Is this is the same way we set up an operator to inlude php files in this ezpublish-4.3.0-full-version, or is it different. Any ideas will be helpfull

Thanks in advance

Mark Simon

Tuesday 15 June 2010 5:06:19 am

Hi Romeo,

the PHPOperatorList in template.ini is only for operators of the PHP script language
as strip_tags() or rsort(..)

For own PHP functions you usualy write own template operators.
Take a Look at theDocumentation:

http://ez.no/ezpublish/documentation/development/extensions/template_operator

www.all2e.com

Romeo Antony

Tuesday 15 June 2010 7:47:59 am

Thank you Mark, I will try it right now.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.