How to display banners in contents using phpAdsNew

Author Message

Geraud Schmit

Wednesday 02 November 2005 3:53:27 pm

Hi,

I think I have read all the post talking about banners, ezpublish and phpAdsNew. And I didn't find an answer to my question.

I am using phpAdsNew (with remote invocation code) to display banners in my ezpublish sites. I include the code in my templates and everything works fine so far.

Now, I would like to include banners in my contents (not in the template) because it is too static (I mean : the banner always shows up at the same place which is in general before the content or after the content).

For example, if I publish an article which is quite long, i would like to add a banner anywhere in the middle of the text (using an embed xml tag may be).

Is it possible ? How could I do this ?

Thanks
Geraud

Bruce Morrison

Wednesday 02 November 2005 6:39:31 pm

Hi Geraud

I think you will need to define a custom tag and place the remote invocation code in the template for the custom tag.

See http://ez.no/products/ez_publish_cms/documentation/customization/components/datatypes/ezxmltext/custom_tags for info on custom tags

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Ekkehard Dörre

Thursday 03 November 2005 12:55:28 am

Hi,

Bruce's way or you can place the template operator in e.g. article.tpl between intro and body so you have the banner after the teaser and you can choose the keyword banner function in phpAdsNew and keywords in template operator.

Advantage: You can change the banner via phpadsnew centrally and not in old articles.

Greetings, ekke

Extension phpadsnew ( PubSVN ):
http://ez.no/community/forum/developer/phpadsnew_extension

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Geraud Schmit

Thursday 03 November 2005 3:43:12 pm

Thanks Bruce & Ekke,

I am going to dig into Bruce's solution I think.
Because it is a very flexible one and it can be used without modifying any template.

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

Main resources:

Total runtime0.6170 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.2813152.6406
Module start 'layout' 0.00590.0040 741.921939.4766
Module start 'content' 0.00990.6056 781.3984591.7656
Module end 'content' 0.61550.0015 1,373.164112.1250
Script end 0.6170  1,385.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.6317160.0002
Check MTime0.00140.2269160.0001
Mysql Total
Database connection0.00070.114310.0007
Mysqli_queries0.558490.5014620.0090
Looping result0.00070.1121600.0000
Template Total0.583794.620.2919
Template load0.00230.380920.0012
Template processing0.581494.226920.2907
Template load and register function0.00020.026110.0002
states
state_id_array0.00110.172110.0011
state_identifier_array0.00090.146920.0005
Override
Cache load0.00200.3257300.0001
Sytem overhead
Fetch class attribute can translate value0.00090.153630.0003
Fetch class attribute name0.00130.213460.0002
XML
Image XML parsing0.00130.211030.0004
class_abstraction
Instantiating content class attribute0.00000.002660.0000
General
dbfile0.00230.3764220.0001
String conversion0.00000.001240.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs