Share » Forums » Setup & design » bannerrotation

bannerrotation

bannerrotation

Friday 21 October 2005 5:05:22 am - 3 replies

Author Message

Mark Marsiglio

Friday 21 October 2005 5:36:14 am

I have read on the forums about some who have integrated phpadsnew with eZ publish.

If you just wanted to rotate ads at random and did not need to track or prioritize, you could simply use the shuffle operator (contributions) to randomly select one of the ads in a folder in the media section.

Code like:


{set-block scope=root variable=cache_ttl}0{/set-block}
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td>
{* Grab some of the banners and randomize the order. *}
{let children=fetch(content,
				list, 
				hash( parent_node_id,	380, sort_by,array(priority,true())))|shuffle}
{* LOOP: For each banner... *}
{section name=Child loop=$children max=3}{* Display a max of 3 banners using attribute_view_gui. *}
<div>
<a href="{$Child:item.data_map.url.content}">
{attribute_view_gui attribute=$Child:item.data_map.image}
</a>
</div>
{* End of loop. *}{/section}{* End of namespace. *}{/let}</td>
</tr></table>

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

tom d.

Friday 21 October 2005 8:08:15 am

hi mark,

unfortunatly i have to track (for customers)... but maybe it helps for a while.

thanx a lot!

tom

Xavier Dutoit

Saturday 22 October 2005 10:18:11 am

Have a look at the contrib section, there is an integration between ez and phpads.

X+

http://www.sydesy.com

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu