Log in

View Full Version : Advert after last post (islastshown) - AJAX problem


Lexserv
07-14-2007, 10:33 AM
Below is the code I have to to my postbit_legacy template in order to add an advert after the last post. The problem is that when people use the quick reply feature (AJAX), the advert posts for the second time. It's removed after I refresh my browser. I was wondering if there's a fix for this duplication problem?


<!-- google start -->
<if condition="$post['islastshown']">
<div style="padding-top: 6px;"></div>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">&nbsp;</td>
</tr>
<tr valign="top">
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<div id="postmenu_$post[postid]"><a class="bigusername" href="#">YourSite.com</a></div>
<div class="smallfont">Related Links</div>
</td>
<td class="alt1" id="td_post_$post[postid]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-left: 0px">
<if condition="$show['messageicon'] OR $post['title']">
<div class="smallfont">
&nbsp;
</div>
<hr size="1" style="border-top: 1px #ff6e45 dotted"; />
</if>

<!-- message -->
<div id="post_message_$post[postid]">
<table>
<tr>
<td align="center">
Advert 1
</td>
&nbsp;
<td align="center">
Advert 2
</td>
</tr>
</table>
</div>
<!-- / message -->
</td>
</tr>
</table>
</if>
<!-- google end -->

Any help would be greatly appreciated.