PDA

View Full Version : Advertising location template issue



johnfl68
Mon 17th Dec '07, 3:48pm
Hello:

I have been using the following postbit code:


<if condition="$post[postcount] % $vboptions[maxposts] == 1">
<div style="padding: $stylevar[cellpadding]px 0px 0px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
<script type="text/javascript" src="/js/728x90.js"></script>
</td>
</tr>
</table>
</div>
</if>If I use as is in the ad_showthread_firstpost template it doesn't show up as it did before, the cell size no longer matches the rest of the page as it did.

See the attached images (adold and adnew) (yes I know they are from different sites, only one is running the new beta, but gives you an idea of how the cells no longer align.

Any suggestions to fix this would be appreciated!

Thanks!

John

Zachery
Mon 17th Dec '07, 3:58pm
Its because its not in the $spacer area

Use

$spacer_open

at the top of the plugin and

$spacer_close at the bottom.

johnfl68
Mon 17th Dec '07, 4:16pm
Thanks!

That almost fixes it - the sides are fine now, but the "Sponsored Links" cell is still right on top of the thread cell beneath it, there is no separation at all between them.

Any ideas?

Thanks again for the help!

John

Zachery
Mon 17th Dec '07, 4:18pm
Image?

Mez
Mon 17th Dec '07, 4:22pm
<if condition="$post[postcount] % $vboptions[maxposts] == 1">
<div style="padding: $stylevar[cellpadding]px 0px 0px 0px; margin-botom: $stylevar[cellpadding]px;">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
<script type="text/javascript" src="/js/728x90.js"></script>
</td>
</tr>
</table>
</div>
</if>

Zachery
Mon 17th Dec '07, 4:32pm
Make it easy why don't you :p

johnfl68
Mon 17th Dec '07, 4:36pm
Sorry, the spacing that I was talking about along the bottom of the "Sponsored Links" cell didn't change from the earlier image (even though the sides changed to what they should be), so I didn't post another.

I just tried the change from Martin (I assume there should be 2 t's in bottom).

The spacing is what I would expect, however it seems to be taking on the page background color, and not the page color.

See the attached image:

Suggestions?

Thanks!

John

johnfl68
Mon 17th Dec '07, 4:43pm
Also, does the ad_showthread_firstpost template take into account already the postcount conditional? Is it doing this twice?

I assume the Advertising locations were meant to help from havening to add extra code, so I don't know what these are adding (or not adding) to the page, so if there are things that are redundant and can be removed, it would be nice to know.

Thanks!

John

Mez
Mon 17th Dec '07, 4:44pm
oh, ok, I get it


<if condition="$post[postcount] % $vboptions[maxposts] == 1">
<div style="padding: $stylevar[cellpadding]px 0px $stylevar[cellpadding]px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
<script type="text/javascript" src="/js/728x90.js"></script>
</td>
</tr>
</table>
</div>
</if>

Though you shouldn't need the <if>

Mez
Mon 17th Dec '07, 4:45pm
Also, does the ad_showthread_firstpost template take into account already the postcount conditional? Is it doing this twice?

ad_showthread_firstpost shows after the first post, so yes, the conditional isn't needed

Mez
Mon 17th Dec '07, 4:46pm
Make it easy why don't you :p

Why not ;)

johnfl68
Mon 17th Dec '07, 4:51pm
Ok, this seems to be like it was:



$spacer_open

<div style="padding: $stylevar[cellpadding]px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]"

cellspacing="$stylevar[cellspacing]" border="0" width="100%"

align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">

<script type="text/javascript" src="/js/728x90.js"></script>

</td>
</tr>
</table>

</div>

$spacer_closeAnd all is well - for now.

Thanks for all the help!

John

Note: the line that says:
<script type="text/javascript" src="/js/728x90.js"></script>
should be replaced with your own banner code