MyBB Community Forums

Full Version: [Template problem]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

This is how my 'postbits' coding looks:
<tr>
<td class="$altbg" width="155" valign="top" nowrap="nowrap" align="left"><a name="pid$post[pid]"></a>
<strong><span class="largetext">$post[profilelink]</span></strong><br />
<span class="smalltext">
$post[usertitle]<br />
$post[userstars]
$post[groupimage]<br />
$post[useravatar]<br />
$lang->postbit_posts $post[postnum]<br />
$lang->postbit_group $usergroup[title]<br />
$lang->postbit_joined $post[userregdate]<br />
$lang->postbit_status $post[onlinestatus]$post[replink]<br />
</span>
</td>
<td class="$altbg" width="100%" valign="top">
<table width="100%">
<tr><td class="trow">$post[posturl]$post[icon]<span class="smalltext"><strong> $post[subject]</strong></span>
<p>$post[message]</p>
$post[attachments]
$post[signature]
<div style="text-align: right; vertical-align: bottom;">
$post[editedmsg]
$post[iplogged]
</div>
</td></tr>
</table>
</td>
</tr>
<tr>
<td class="$altbg" height="18" nowrap="nowrap" align="center"><span class="smalltext">$post[postdate] $post[posttime]</span></td>
<td class="$altbg" width="100%" valign="middle" height="18">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr valign="bottom">
		<td align="left" ><span class="smalltext">$post[button_email]$post[button_pm]$post[button_www]$post[button_find]</span></td>
		<td align="right" nowrap="nowrap"><span class="smalltext">$post[button_edit]$post[button_quickdelete]$post[button_quote]$post[button_report]</span></td>
	</tr>
	</table>
</td>
</tr>
$seperator
<div align="center"><script type="text/javascript"><!--
google_ad_client = "pub-0999144055025567";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="5999635263";
google_page_url = document.location;
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "E26021";
google_color_url = "273444";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>

As you can see, I have Google Adsense in there. My problem is that for each post made in a thread, it's like the Adsense adds in another banner (ex. if a thread has 3 posts in it in all (including the topic starter's first post and two replies) it will show 3 Adsense banners, not one).

How can I fix this?
Why does it make one Adsense banner per post in each topic?
Is there any way I can do it by somehow altering the coding above?

Thank you so much in advance,
Andy
not really sure, cause i dont have the rest of the code with me, but you need to put the code somewhere else, if its there, it will repeat itself for as many posts their are. Maybe try to find the thread code, put it after there. That would put it after the thread, but then it wouldnt put it on the 2nd or any pages after the third.

Anways, hope I helped somehow, the way you have it now, you'll get banned from google because you can only have 3 google codes on a page Wink
Try the 'showthread' template in the 'Show Thread Templates' category.
I experimented a bit, but I ended up putting it in the 'showthread' template, now it looks a lot better.

Thanks Killaklown, Thanks Dennis!
Andy