Problems creating an extension

Author Message

Valenti salas

Wednesday 15 December 2004 3:18:57 am

hello,

I'm creating my own etension and I'm with a question:

I'm using the tutorial in ez.no with the helloworld example.
I'm trying to change the 'hello world' string to show the results of phpadsnew:
if(@include(getenv('DOCUMENT_ROOT').'/ezpublish-3.4.2/extension/phpadsnew/phpadsnew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:1', 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}

but I don't know how to put it in the helloword function example to return the banner generated.

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 19 2025 00:25:30
Script start
Timing: Jan 19 2025 00:25:30
Module start 'layout'
Timing: Jan 19 2025 00:25:30
Module start 'content'
Timing: Jan 19 2025 00:25:31
Module end 'content'
Timing: Jan 19 2025 00:25:31
Script end

Main resources:

Total runtime0.8791 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 588.0391152.6406
Module start 'layout' 0.00830.0041 740.679739.4766
Module start 'content' 0.01250.8651 780.1563400.5000
Module end 'content' 0.87750.0015 1,180.65638.1484
Script end 0.8791  1,188.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4229160.0002
Check MTime0.00130.1470160.0001
Mysql Total
Database connection0.00150.169910.0015
Mysqli_queries0.831294.5526460.0181
Looping result0.00050.0577440.0000
Template Total0.837695.320.4188
Template load0.00290.329420.0014
Template processing0.834794.947020.4173
Template load and register function0.00020.018410.0002
states
state_id_array0.00110.129410.0011
state_identifier_array0.00170.195920.0009
Override
Cache load0.00230.2656130.0002
Sytem overhead
Fetch class attribute can translate value0.00090.104810.0009
Fetch class attribute name0.00070.079810.0007
XML
Image XML parsing0.00020.022910.0002
class_abstraction
Instantiating content class attribute0.00000.000610.0000
General
dbfile0.00080.0868100.0001
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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0003 secs