UBB.Dev
Posted By: annoyedman Trying to put "banner" ad on left side... - 12/19/2007 5:33 PM
Hi, and thanks in advance for any help. I did try to search for previous posts on this topic and couldn't find any specific references. Also, I know some very basic PHP stuff, but I'm no genius at at. That being said....

Here is what I am trying to accomplish: Our forum has the "Who's Online," "Newest Members," etc., boxes configured to appear in the left column. I have created a new custom portal island called "Ad Placement." (The ad is a vertical strip, 160px x 600px.) When I go to add specific content to that island, I call it up, using the "Edit Custom Portal Island" function. The code displayed there is:
Code
/* PHP CODE HERE, IF NECESSARY */

/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF
EOF;
/* DO NOT CHANGE THE LINE ABOVE */
I have tried adding my html below the last line of that code. That html reads:
Code
        <!-- Start My Ad Hack -->
<table width="100%" class="t_outer" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" class="t_inner" cellpadding="0" cellspacing="1">
<tr>
<td class="lefttdheader">
Ad Placement
</td>
</tr>
<tr>
<td class="leftalt-1">
<map name="MY_AD">
<area href="url of advertiser" ALT="advertiser name" COORDS="0,492,160,515">
</map>
<img src="images/banner_ads/imagename.jpg" ALT="Advertiser Banner Ad" USEMAP="#MY_AD" WIDTH="160" HEIGHT="600">
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- End My Ad Hack -->
The problem is that by adding that html there, on submission I get the following PHP error: "Parse error: parse error, unexpected '<' in /home/content/t/r/i/username/html/cache_builders/custom/portal_box_1.php on line 8". I have tried to remove that "<", and I still get a PHP error.

I've tried editing %%48^486^486F04FC%%portal_box_1.tpl.php by adding the html in there, and also I have tried editing portal_box_1.tpl through the admin function by adding the html, and nothing works.

Can someone please tell me, in terms that a PHP neophyte can understand, what I need to do to make this thing happen? Thanks for your help.

Welcome smile

You need to put your html between this line:

$body = <<


and this line:
EOF;

Example:

$body = <<

EOF;
Cool, thanks. I'll give it a try.
FYI, that worked. Thanks again.
Glad it worked for ya smile
© UBB.Developers