<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
One option is to use placeholders for the tile when you add the code
into the blocks - something like #TILE#. Then in page process you set
an array with the order your blocks are rendered:<br>
<br>
$blocks = array('header','left sidebar','right sidebar','bottom
sidebar');<br>
<br>
Now loop though the blocks and replace that token.<br>
<br>
$tileNo = 0;<br>
foreach ($blocks as $block){<br>
&nbsp; while ($pos = stripos($vars[$block],'tile=#TILE#'){<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $tileNo++;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $vars[$block] = substr_replace($vars[$block], $tileNo, $pos +
5, 6); //Change 6 to the length of your token<br>
&nbsp;&nbsp;&nbsp; }<br>
}<br>
<br>
<br>
If you are dealing with multiple themes where the block order can
change then the other option is to do this via output buffering. I used
this method for a client on a Wordpress MU site a few years ago.<br>
<br>
<pre class="moz-signature" cols="72">Jamie Holly
<a class="moz-txt-link-freetext" href="http://www.intoxination.net">http://www.intoxination.net</a> 
<a class="moz-txt-link-freetext" href="http://www.hollyit.net">http://www.hollyit.net</a></pre>
<br>
On 3/23/2010 9:22 AM, Ashraf Amayreh wrote:
<blockquote
 cite="mid:a53d1b3b1003230622x7ee02959x974e9455017b5c72@mail.gmail.com"
 type="cite">
  <div dir="ltr">What I need to do is pretty simple. Doubleclick is an
AD service that works by placing javascript snippets at various
locations in the page. I do that via blocks.<br>
  <br>
The javascript output contains an optional variable called tile that is
used in the doubleclick backend for various things. The tile should be
set on ads sequentially. so 1st banner that appears in HTML page should
have tile=1, 2nd banner should have tile=2 and so on till the last
banner inside the HTML.<br>
  <br>
If there's a better approach to implement this then I'm all open for
suggestions :)<br clear="all">
  <br>
-- <br>
Best Regards,<br>
Ashraf Amayreh<br>
CEO | O-Minds<br>
Cell. 962 78 8099997<br>
Tel. 962 6 5655150<br>
Fax. 962 6 5675150<br>
  <br>
  <a moz-do-not-send="true" href="http://o-minds.com">o-minds.com</a><br>
web development | web design<br>
user experience | branding design<br>
  </div>
</blockquote>
</body>
</html>