PDA

View Full Version : Adsense below the last thread


Moparx
08 Dec 2005, 01:56
I made this to fill a request. This is designed to use the 234x60 Half Banner or 468 x 60 Banner.
At the moment it is set to display for guests and unconfirmed accounts only. You can change this by changing the is_member_of line.

1. Edit your FORUMDISPLAY Template and find:

<!-- end show no threads message -->
</if>

2. BELOW that add the following:
<if condition="is_member_of($bbuserinfo, 1,2)">
<tr>
<td class="alt1">
<img src="$stylevar[imgdir_statusicon]/thread_moved.gif" alt="" border="" />
</td>
<td class="alt2">&nbsp;</td>

<td class="alt1">
<div>
INSERT ADSENSE HERE
</div>
</td>

<td class="alt2 smallfont" align="center">Sponsored Link</td>

<td class="alt1" align="center"></td>
<td class="alt2" align="center"></td>
<if condition="$show['inlinemod']"><td class="alt1" align="center"></td></if>

</tr>
</if>

Stifler
08 Dec 2005, 03:31
very awesome idea. thanks for fulfilling the request, and whoever came up with it. this should get a lotta click thru's
thanks!~

The Chief
08 Dec 2005, 04:01
great idea, and works great!!

*clicks install :)

StarBuG
08 Dec 2005, 09:58
Thank you so much ;)

Hornstar
08 Dec 2005, 11:49
I want it to show for guest and resistered members and users awaiting email confirmation.

What would I change the conditional too, thanks

On a side note, what template is the one that would need to be modified to edit the bottom of the forum to put a banner there, as the navbar does the top, but i cant remember the other one.

Thanks if you can help me on these 2 questions.

rob30UK
08 Dec 2005, 12:35
I think it may be against google's AUP to have 'sponsored link' in that right column.

just put a dash (-) in each column as you have with a forum link on forum home.

StarBuG
08 Dec 2005, 15:42
I think it may be against google's AUP to have 'sponsored link' in that right column.

just put a dash (-) in each column as you have with a forum link on forum home.

Why would it be against Google TOS?

Snake
08 Dec 2005, 17:02
That's much better!

bold
08 Dec 2005, 17:46
if mods can see your ad

replace
<td class="alt1" align="center"></td>
<td class="alt2" align="center"></td>


with

<td class="alt1" align="center"></td>
<td class="alt2" align="center"></td>
<if condition="$show['inlinemod']"><td class="alt1" align="center"></td></if>


so you dont have a missing cell

Moparx
08 Dec 2005, 18:28
I think it may be against google's AUP to have 'sponsored link' in that right column.

just put a dash (-) in each column as you have with a forum link on forum home.

the phrase 'Sponsored link' is allowed.. as is 'Advertisement' ;)

Labeling Ads

Publishers may not label the ads with text other than "sponsored links" or "advertisements." This includes any text directly above our ads that could be confused with, or attempt to be associated with Google ads.
https://www.google.com/adsense/policies

Moparx
08 Dec 2005, 18:56
if mods can see your ad
<snip>
so you dont have a missing cell

haha.. thanks. i completely forgot to add that when i made this.
the thread has been updated.

I want it to show for guest and resistered members and users awaiting email confirmation.

What would I change the conditional too, thanks

change:
<if condition="$show['guest']">
to:
<if condition="is_member_of($bbuserinfo, 1,2,3)">

I have changed the modification to use is_member_of instead as it will be easier for those who want to use this on various usergroups.


On a side note, what template is the one that would need to be modified to edit the bottom of the forum to put a banner there, as the navbar does the top, but i cant remember the other one.

Thanks if you can help me on these 2 questions.
I believe you are referring to the footer template.

however, it is not advisable to put adsense in the navbar or footer templates unless you have a conditional set to hide the ads on non-content-based pages (such as newthread, your user control panel, etc). if you are showing the ads in non-content pages you are violating the Adsense guidelines.

dieselpowered
08 Dec 2005, 20:23
Has this been confirmed to work with "click for quick reply"?

This happened to be an issue with AJAX when using adsense and "click for quick reply" Quick reply would not work.

Moparx
08 Dec 2005, 22:05
Has this been confirmed to work with "click for quick reply"?

This happened to be an issue with AJAX when using adsense and "click for quick reply" Quick reply would not work.

this template mod does not show on showthread.

Hornstar
11 Dec 2005, 08:23
haha.. thanks. i completely forgot to add that when i made this.
the thread has been updated.



change:
<if condition="$show['guest']">
to:
<if condition="is_member_of($bbuserinfo, 1,2,3)">

I have changed the modification to use is_member_of instead as it will be easier for those who want to use this on various usergroups.



I believe you are referring to the footer template.

however, it is not advisable to put adsense in the navbar or footer templates unless you have a conditional set to hide the ads on non-content-based pages (such as newthread, your user control panel, etc). if you are showing the ads in non-content pages you are violating the Adsense guidelines.



Thankyou, and I may need to lookinto that conditional, as i Have a few adds that I put in my navbar that show on everypage, i may need to edit that before any of my advertisers find out ^^ thanks for the info

StarBuG
11 Dec 2005, 13:06
Suggestion
Would it be possible to also show this banner as last thread in a search result?

I think that would also be a nice place for a banner :D

ferreo
11 Dec 2005, 13:22
Very nice, installed! Is it possible to display this not at the end of the forumdisplay listing, but at the beginning? What would the resulting code look like then?

I believe the CTR would increase that way.

StarBuG
11 Dec 2005, 13:35
But most likely your members would hate it

ferreo
11 Dec 2005, 14:18
But most likely your members would hate it


Members would not get to see it, I have it set for unregistered or unconfirmed members only.

Moparx
12 Dec 2005, 00:52
Very nice, installed! Is it possible to display this not at the end of the forumdisplay listing, but at the beginning? What would the resulting code look like then?

I believe the CTR would increase that way.


add the code after the following:
</tr>
</if>
<if condition="$show['threads']">

ferreo
12 Dec 2005, 13:35
add the code after the following:
</tr>
</if>
<if condition="$show['threads']">


Fantastic, thank you Moparx!

Moparx
13 Dec 2005, 00:01
Suggestion
Would it be possible to also show this banner as last thread in a search result?

I think that would also be a nice place for a banner :D

Honestly, I am not sure if you would be allowed to add adsense to the search results (Its not allowed on the actual search page.. but one would think its allowed on the results).
Let me know if you find out because I have the code ready to post for you if it's allowed.

djmini
13 Dec 2005, 02:22
I can't get it to work at all.

Moparx
13 Dec 2005, 02:47
I can't get it to work at all.
did you follow the instructions exactly and set the proper usergroups you wanted?

djmini
13 Dec 2005, 03:41
apologies
<--newbie

is_member_of _Usergroup or (USERGROUP, 1,2)?

+<if+condition="is_member_of($bbuserinfo,+1,2)">

Moparx
13 Dec 2005, 04:16
apologies
<--newbie

is_member_of _Usergroup or (USERGROUP, 1,2)?

+<if+condition="is_member_of($bbuserinfo,+1,2)">

just like this:
<if condition="is_member_of($bbuserinfo, x,y)">
x & y are the numerical ids that correspond with your user groups.

croportal
20 Dec 2005, 23:13
i have gone to remove this and i got this error

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected '\"', expecting ']' in /home/hrportal/public_html/forum/includes/adminfunctions_template.php(3519) : eval()'d code on line 475

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Moparx
21 Dec 2005, 01:11
that means you left part of a conditional in the code. go through the template & make sure that <if condition="is_member_of($bbuserinfo, x,y)"> and </if> were properly removed.

Ryan McBain
06 Jan 2006, 17:02
How would I make it so the google ads show up after so many threads?

bashy
09 Jan 2006, 22:06
Hi

How would i do this so that when the size of the window gets made bigger or smaller the imagig changes size to match please, as this is making the forum too wide????

Regards

Bashy

Moparx
11 Jan 2006, 00:27
Hi

How would i do this so that when the size of the window gets made bigger or smaller the imagig changes size to match please, as this is making the forum too wide????

Regards

Bashy

if the ad unit you are currently using is too big, i suggest using a smaller one such as the 234x60 half banner

Sharg
11 Jan 2006, 10:31
Hi,
is there a variation of this hack so instead of having it displayed at the bottom, it would be displayed after XX threads starting from the top ?

Thanks,
Sharg

Moparx
29 Jan 2006, 03:57
Sorry for the late response. I'll see what I can come up with for you :)

SIINSI
04 Feb 2006, 17:46
Sorry for the late response. I'll see what I can come up with for you :)

Great addition, thank you. Random would be great too!!

M

rurbaniak
10 Feb 2006, 14:21
Is it possible to put this in the New Posts search?

tamborinegal
12 Feb 2006, 05:01
Installed...thanks Moparx! :)

I've placed it both above the first thread and below the last thread using the 468 x 60 Banner... it will be interesting to see how it goes.

Thanks again

Clancy

RichieBoy67
15 Feb 2006, 12:31
I would like to show it maybe in the missle of the thread list. How can this be achieved???

Keyser520
20 Feb 2006, 17:48
What code do I need if I want to install this on 3.5.3? Is it the same coding or do I change anything? I would like for the ad to show below the FIRST post of a thread and below the LAST post of a thread on each page.

Thanks

Moparx
20 Feb 2006, 19:01
What code do I need if I want to install this on 3.5.3? Is it the same coding or do I change anything? I would like for the ad to show below the FIRST post of a thread and below the LAST post of a thread on each page.

Thanks

yes. the code works on the entire 3.5.x series.

Keyser520
20 Feb 2006, 20:45
I did what you said, but the ads are not showing up anywhere. Here is my FORUMDISPLAY code

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$foruminfo[title_clean]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $vboptions[bbtitle]</title>
<if condition="$show['inlinemod']"><script type="text/javascript" src="clientscript/vbulletin_inlinemod.js"></script></if>
</head>
<body>
$header
$navbar

<if condition="$show['forumslist']">
<!-- sub-forum list -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="tcat" width="100%">$vbphrase[subforums]<span class="normal"> : $foruminfo[title]</span></td>
<if condition="$show['forumsearch']">
<td class="vbmenu_control" id="forumsearch.subforums" nowrap="nowrap"><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch.subforums"); </script></td>
</if>
</tr>
</table>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr align="center">
<td class="thead">&nbsp;</td>
<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="175">$vbphrase[last_post]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
<if condition="$vboptions[showmoderatorcolumn]">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
</thead>
$forumbits
</table>
<br />
<!-- / sub-forum list -->
</if>

<if condition="$show['threadslist']">
<!-- threads list -->

<form action="inlinemod.php" method="post" id="inlinemodform">
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="forumid" value="$forumid" />

<!-- controls above thread list -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<td class="smallfont"><if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
<if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
<!-- / controls above thread list -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="tcat" width="100%">$vbphrase[threads_in_forum]<span class="normal"> : $foruminfo[title]</span></td>
<td class="vbmenu_control" id="forumtools" nowrap="nowrap"><a href="$show[nojs_link]#goto_forumtools" rel="nofollow">$vbphrase[forum_tools]</a> <script type="text/javascript"> vbmenu_register("forumtools"); </script></td>
<if condition="$show['forumsearch']">
<td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script></td>
</if>
</tr>
</table>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" id="threadslist">
$announcebits
<if condition="$show['search_engine']">
<if condition="$show['threadicons']">
<td class="thead" colspan="2">&nbsp;</td>
<else />
<td class="thead">&nbsp;</td>
</if>
<td class="thead" width="100%">
<if condition="$show['threadratings']"><span style="float:$stylevar[right]">$vbphrase[rating]</span></if>
$vbphrase[thread] / $vbphrase[thread_starter]
</td>
<td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[last_post]</span></td>
<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[replies]</span></td>
<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[views]</span></td>
<else />
<tr>
<if condition="$show['threadicons']">
<td class="thead" colspan="2">&nbsp;</td>
<else />
<td class="thead">&nbsp;</td>
</if>
<td class="thead" width="100%">
<if condition="$show['threadratings']"><span style="float:$stylevar[right]"><a href="$sorturl&amp;order=desc&amp;sort=voteavg" rel="nofollow">$vbphrase[rating]</a> $sortarrow[voteavg]</span></if>
<a href="$sorturl&amp;order=asc&amp;sort=title" rel="nofollow">$vbphrase[thread]</a> $sortarrow[title] /
<a href="$sorturl&amp;order=asc&amp;sort=postusername" rel="nofollow">$vbphrase[thread_starter]</a> $sortarrow[postusername]
</td>
<td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=lastpost" rel="nofollow">$vbphrase[last_post]</a> $sortarrow[lastpost]</span></td>
<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=replycount" rel="nofollow">$vbphrase[replies]</a> $sortarrow[replycount]</span></td>
<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=views" rel="nofollow">$vbphrase[views]</a> $sortarrow[views]</span></td>

<if condition="$show['inlinemod']">
<if condition="$show['popups']">
<td class="vbmenu_control" id="imod" align="center" title="$vbphrase[moderation]"> <script type="text/javascript"> vbmenu_register('imod'); </script> </td>
<else />
<td class="thead" align="center">
<input type="checkbox" name="allbox" id="checkall_all" title="$vbphrase[check_uncheck_all]" onclick="inlineMod.check_all()" />
</td>
</if>
</if>
</tr>
</if>
<if condition="$show['threads']">
<!-- show threads -->
<if condition="$show['stickies']">
$threadbits_sticky
</if>
$threadbits
<!-- end show threads -->
<else />
<!-- show no threads message -->
<tr>
<td class="alt1" colspan="$foruminfo[bottomcolspan]" align="center">
<div style="padding: 16px">
<if condition="$show['noposts']"><strong>$vbphrase[no_posts_in_this_forum]</strong><else /><strong><phrase 1="$daysprune">$vbphrase[no_posts_last_x_days_forum]</phrase></strong><br />
<span class="smallfont">$vbphrase[try_controls_below_for_older_posts]</span></if>
</div>
</td>
</tr>
<!-- end show no threads message -->

<!-- START Keyser added code -->

<tr>
<td class="alt1">
<img src="$stylevar[imgdir_statusicon]/thread_moved.gif" alt="" border="" />
</td>
<td class="alt2">&nbsp;</td>

<td class="alt1">
<div>
<--! Google add -->
<script type="text/javascript"><!--
google_ad_client = "pub-8436755030314590";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al_s";
google_ad_channel ="";
google_color_border = "B4D0DC";
google_color_bg = "ECF8FF";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "6F6F6F";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<--! End Google add -->

</div>
</td>

<td class="alt2 smallfont" align="center">Sponsored Link</td>

<td class="alt1" align="center"></td>
<td class="alt2" align="center"></td>
<if condition="$show['inlinemod']"><td class="alt1" align="center"></td></if>

</tr>

<!-- END Keyser added code -->

</if>
</table>

<!-- controls below thread list -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="top">
<td class="smallfont"><if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
<if condition="$show['pagenav'] OR $show['inlinemod']">
<td align="$stylevar[right]">$pagenav
<if condition="$show['inlinemod']">
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap; float:$stylevar[right]">
<if condition="$show['pagenav']"><br /></if><strong>$vbphrase[moderation]</strong><br />
<select name="do">
<optgroup label="$vbphrase[option]">
<if condition="$show['deletethread']">
<option value="deletethread">$vbphrase[delete_threads]</option>
<option value="undeletethread">$vbphrase[undelete_threads]</option>
</if>
<if condition="$show['openthread']">
<option value="open">$vbphrase[open_threads]</option>
<option value="close">$vbphrase[close_threads]</option>
</if>
<if condition="$show['approvethread']">
<option value="approvethread">$vbphrase[approve_threads]</option>
<option value="unapprovethread">$vbphrase[unapprove_threads]</option>
</if>
<if condition="$show['movethread']">
<option value="stick">$vbphrase[stick_threads]</option>
<option value="unstick">$vbphrase[unstick_threads]</option>
<option value="movethread">$vbphrase[move_threads]</option>
<option value="mergethread">$vbphrase[merge_threads]</option>
</if>
</optgroup>
<optgroup label="____________________">
<option value="clearthread">$vbphrase[clear_thread_list]</option>
</optgroup>
</select><input type="submit" class="button" id="inlinego" value="$vbphrase[go]" />
</div>
<script type="text/javascript">
<!--
inlineMod = new vB_Inline_Mod('inlineMod', 'thread', 'inlinemodform', '$vbphrase[go_x]');
//-->
</script>
</if>
</td>
</if>
</tr>
</table>
<!-- / controls below thread list -->

</form>
<br />




<!-- Active Users in this Forum (and sub-forums) and Moderators -->

<form action="forumdisplay.php" method="get">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="f" value="$forumid" />
<input type="hidden" name="page" value="$pagenumber" />
<input type="hidden" name="pp" value="$perpage" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$vbphrase[display_options]</td>
<if condition="$show['activeusers']">
<td class="tcat">$vbphrase[currently_active_users]</td>
</if>
<if condition="$show['moderators']">
<td class="tcat">$vbphrase[moderators]</td>
</if>
</tr>
<tr>
<td class="thead"><phrase 1="$limitlower" 2="$limitupper" 3="$totalthreads">$vbphrase[showing_threads_x_to_y_of_z]</phrase></td>
<if condition="$show['activeusers']">
<td class="thead">$totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_y_guests]</phrase>)</td>
</if>
<if condition="$show['moderators']">
<td class="thead">$vbphrase[moderators] : $totalmods</td>
</if>
</tr>
<tr valign="top">
<td class="alt1">

<table cellpadding="0" cellspacing="1" border="0">
<tr>
<td class="smallfont" style="padding-right:6px">$vbphrase[sorted_by]</td>
<td><select name="sort">
<option value="title" $sort[title]>$vbphrase[thread_title]</option>
<option value="lastpost" $sort[lastpost]>$vbphrase[last_post_time]</option>
<option value="replycount" $sort[replycount]>$vbphrase[number_of_replies]</option>
<option value="views" $sort[views]>$vbphrase[number_of_views]</option>
<option value="postusername" $sort[postusername]>$vbphrase[thread_starter]</option>
<if condition="$show['threadratings']"><option value="voteavg" $sort[voteavg]>$vbphrase[thread_rating]</option></if>
</select></td>
<td class="smallfont" style="padding-right:6px; padding-left:12px">$vbphrase[sort_order]</td>
<td><select name="order">
<option value="asc" $order[asc]>$vbphrase[ascending]</option>
<option value="desc" $order[desc]>$vbphrase[descending]</option>
</select></td>
</tr>
<tr>
<td class="smallfont" style="padding-right:6px">$vbphrase[from_the]</td>
<td><select name="daysprune">
<option value="1" $daysprunesel[1]>$vbphrase[last_day]</option>
<option value="2" $daysprunesel[2]>$vbphrase[last_2_days]</option>
<option value="7" $daysprunesel[7]>$vbphrase[last_week]</option>
<option value="10" $daysprunesel[10]>$vbphrase[last_10_days]</option>
<option value="14" $daysprunesel[14]>$vbphrase[last_2_weeks]</option>
<option value="30" $daysprunesel[30]>$vbphrase[last_month]</option>
<option value="45" $daysprunesel[45]>$vbphrase[last_45_days]</option>
<option value="60" $daysprunesel[60]>$vbphrase[last_2_months]</option>
<option value="75" $daysprunesel[75]>$vbphrase[last_75_days]</option>
<option value="100" $daysprunesel[100]>$vbphrase[last_100_days]</option>
<option value="365" $daysprunesel[365]>$vbphrase[last_year]</option>
<option value="-1" $daysprunesel[all]>$vbphrase[beginning]</option>
</select></td>
<td colspan="2" align="$stylevar[right]"><input type="submit" class="button" value="$vbphrase[show_threads]" /></td>
</tr>
</table>

</td>
<if condition="$show['activeusers']">
<td class="alt1"><div class="smallfont">$activeusers</div></td>
</if>
<if condition="$show['moderators']">
<td class="alt1"><div class="smallfont">$moderatorslist&nbsp;</div></td>
</if>
</tr>
</table>

</form>
<!-- End Active Users in this Forum (and sub-forums) and Moderators -->

<if condition="$show['popups']">
<br />
<!-- popup menu contents -->


<!-- forum tools menu -->
<div class="vbmenu_popup" id="forumtools_menu" style="display:none">
<form action="moderator.php" method="post" name="forumadminform">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[forum_tools]<a name="goto_forumtools"></a></td></tr>
<if condition="$show['newthreadlink']"><tr><td class="vbmenu_option"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow">$vbphrase[post_a_new_thread]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread&amp;f=$foruminfo[forumid]" rel="nofollow">$vbphrase[mark_this_forum_read]</a></td></tr>
<tr><td class="vbmenu_option"><a href="subscription.php?$session[sessionurl]do=addsubscription&amp;f=$foruminfo[forumid]" rel="nofollow">$vbphrase[subscribe_to_this_forum]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]f=$foruminfo[parentid]" rel="nofollow">$vbphrase[view_parent_forum]</a></td></tr>
<if condition="$show['adminoptions']">
<tr>
<td class="thead">$vbphrase[admin_tools]<a name="goto_forumadmin"></a></td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<div><label for="fa_mpo"><input type="radio" name="do" id="fa_mpo" value="modposts" checked="checked" />$vbphrase[view_posts_queue]</label></div>
<div><label for="fa_mat"><input type="radio" name="do" id="fa_mat" value="modattach" />$vbphrase[view_attachment_queue]</label></div>
<div><label for="fa_mov"><input type="radio" name="do" id="fa_mov" value="move" />$vbphrase[massmove_threads]</label></div>
<div><label for="fa_prn"><input type="radio" name="do" id="fa_prn" value="prune" />$vbphrase[massprune_threads]</label></div>
<if condition="$show['addmoderator']">
<div><label for="fa_amd"><input type="radio" name="do" id="fa_amd" value="addmoderator" />$vbphrase[add_moderator]</label></div>
</if>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite" align="center">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="f" value="$forumid" />
<input type="submit" class="button" value="$vbphrase[perform_action]" />
</td>
</tr>
</if>
</table>
</form>
</div>
<!-- / forum tools menu -->

<!-- inline mod menu -->
<if condition="$show['inlinemod']">
<div class="vbmenu_popup" id="imod_menu" style="display:none" align="$stylevar[left]">
$threadadmin_imod_menu_thread
</div>
</if>
<!-- / inline mod menu -->

<!-- / popup menu contents -->
<else />
<!-- controls for non-popup browsers -->


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-top-width:0px">
<tr>
<td class="thead">$vbphrase[forum_tools]<a name="goto_forumtools"></a></td>
<td class="thead">$vbphrase[search_this_forum]<a name="goto_forumsearch"></a></td>
</tr>
<tr valign="top">
<!-- forum tools -->
<td class="alt1">
<div class="smallfont">
<div><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[mark_this_forum_read]" vspace="1" /> <a href="forumdisplay.php?$session[sessionurl]do=markread&amp;f=$foruminfo[forumid]" rel="nofollow">$vbphrase[mark_this_forum_read]</a></div>
<if condition="$show['member']"><div><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[subscription]" vspace="1" /> <a href="subscription.php?$session[sessionurl]do=addsubscription&amp;f=$foruminfo[forumid]" rel="nofollow">$vbphrase[subscribe_to_this_forum]</a></div></if>
<div><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[view_parent_forum]" vspace="1" /> <a href="forumdisplay.php?$session[sessionurl]f=$foruminfo[parentid]" rel="nofollow">$vbphrase[view_parent_forum]</a></div>
</div>
</td>
<!-- / forum tools -->

<!-- search this forum -->
<td class="alt1">
<form action="search.php" method="post">
<div class="smallfont">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="forumchoice[]" value="$forumid" />
<input type="hidden" name="childforums" value="1" />
<strong>$vbphrase[search_this_forum]</strong> :<br />
<input type="text" class="bginput" name="query" size="20" style="width:175px" />$gobutton<br />
<a href="search.php?$session[sessionurl]f=$forumid" rel="nofollow">$vbphrase[advanced_search]</a>
</div>
</form>
</td>
<!-- / search this forum -->
</tr>
</table>
<br />


<!-- / controls for non-popup browsers -->
</if>

<if condition="$show['ajax_js']">
<script type="text/javascript" src="clientscript/vbulletin_ajax_threadslist.js"></script>
<script type="text/javascript">
<!--
vB_AJAX_Threadlist_Init('threadslist');
//-->
</script>
</if>

<!-- ############## END THREADS LIST ############## -->
</if>

<if condition="$show['popups'] AND $show['forumsearch']">
<!-- forum search menu -->
<div class="vbmenu_popup" id="forumsearch_menu" style="display:none">
<form action="search.php" method="post">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_this_forum]<a name="goto_forumsearch"></a></td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="forumchoice[]" value="$forumid" />
<input type="hidden" name="childforums" value="1" />
<input type="text" class="bginput" name="query" size="20" />$gobutton<br />
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]f=$forumid" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
</table>
</form>
</div>
<!-- / forum search menu -->
</if>

<!-- icon key -->
<if condition="$show['threadslist']">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td><img src="$stylevar[imgdir_statusicon]/thread_new.gif" alt="$vbphrase[new_posts]" border="0" /></td>
<td class="smallfont">$vbphrase[new_posts]</td>
<if condition="$vboptions['usehotthreads']">
<td><img src="$stylevar[imgdir_statusicon]/thread_hot_new.gif" alt="<phrase 1="$vboptions[hotnumberposts]" 2="$vboptions[hotnumberviews]">$vbphrase[more_than_x_replies_or_y_views]</phrase>" border="0" /></td>
<td class="smallfont">$vbphrase[hot_thread_with_new_posts]</td>
<else />
<td colspan="2">&nbsp;</td>
</if>
</tr>
<tr>
<td><img src="$stylevar[imgdir_statusicon]/thread.gif" alt="$vbphrase[no_new_posts]" border="0" /></td>
<td class="smallfont">$vbphrase[no_new_posts]</td>
<if condition="$vboptions['usehotthreads']">
<td><img src="$stylevar[imgdir_statusicon]/thread_hot.gif" alt="<phrase 1="$vboptions[hotnumberposts]" 2="$vboptions[hotnumberviews]">$vbphrase[more_than_x_replies_or_y_views]</phrase>" border="0" /></td>
<td class="smallfont">$vbphrase[hot_thread_with_no_new_posts]</td>
<else />
<td colspan="2">&nbsp;</td>
</if>
</tr>
<tr>
<td><img src="$stylevar[imgdir_statusicon]/thread_lock.gif" alt="$vbphrase[closed_thread]" border="0" /></td>
<td class="smallfont">$vbphrase[thread_is_closed]</td>
<if condition="$show['dotthreads']">
<td><img src="$stylevar[imgdir_statusicon]/thread_dot.gif" alt="$vbphrase[thread_contains_a_message_written_by_you]" border="0" /></td>
<td class="smallfont">$vbphrase[you_have_posted_in_this_thread]</td>
<else />
<td colspan="2">&nbsp;</td>
</if>
</tr>
</table>
<else />
<table cellpadding="0" cellspacing="2" border="0" width="100%">
<tr valign="bottom">
<td>
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td><img src="$stylevar[imgdir_statusicon]/forum_new.gif" alt="$vbphrase[contains_new_posts]" border="0" /></td>
<td class="smallfont">&nbsp; $vbphrase[forum_contains_new_posts]</td>
</tr>
<tr>
<td><img src="$stylevar[imgdir_statusicon]/forum_old.gif" alt="$vbphrase[contains_no_new_posts]" border="0" /></td>
<td class="smallfont">&nbsp; $vbphrase[forum_contains_no_new_posts]</td>
</tr>
<tr>
<td><img src="$stylevar[imgdir_statusicon]/forum_old_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /></td>
<td class="smallfont">&nbsp; $vbphrase[forum_is_closed_for_posting]</td>
</tr>
</table>
</td>
</tr>
</table>
</if>
<!-- / icon key -->

<!-- forum rules & forum jump -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr valign="top">
<td width="100%">
<div class="smallfont">&nbsp;</div>
<if condition="$show['threadslist']">$forumrules</if>
</td>
<td>
$forumjump
<if condition="!$show['popups'] AND $show['adminoptions']">
<br />
<form action="moderator.php" method="get">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="f" value="$forumid" />
<div class="smallfont"><strong>$vbphrase[admin_tools]</strong> :</div>
<select name="do" onchange="this.form.submit();">
<optgroup label="$vbphrase[admin_tools]">
<option value="modposts" selected="selected">$vbphrase[view_posts_queue]</option>
<option value="modattach">$vbphrase[view_attachment_queue]</option>
<option value="move">$vbphrase[mass_move]</option>
<option value="prune">$vbphrase[mass_prune]</option>
<if condition="$show['addmoderator']">
<option value="addmoderator">$vbphrase[add_moderator]</option>
</if>
</optgroup>
</select>$gobutton
</form>
</if>
</td>
</tr>
</table>
<!-- / forum rules & forum jump -->

$footer
</body>
</html>


And you can look and see that it doesn't show up at all by going to the page at www.runeescape.com/Escape



also Where would I insert the code if I wanted to have it show after the LAST POST in a thread but BEFORE the footer?

Unexplained.tv
22 Feb 2006, 04:02
I tend to agree with some of the other posters, the code simply doesn't work.

Moparx
22 Feb 2006, 17:15
I did what you said, but the ads are not showing up anywhere. Here is my FORUMDISPLAY code
you added the code before </if> instead of after. If you fix that and it should work for you :)


also Where would I insert the code if I wanted to have it show after the LAST POST in a thread but BEFORE the footer?

depends on where you want it... you can put your adense code in two places :)
if you want it before the display options put it here:
</table>
<!-- / controls below thread list -->
INSERT ADSENSE HERE

if you want it RIGHT before the footer put it here:
<!-- / forum rules & forum jump -->
INSERT HERE
$footer

I tend to agree with some of the other posters, the code simply doesn't work.
The code works perfectly on every single board i use it on (all using vb3.5.x). Thus, I am inclined to believe you did something wrong instead.

If you have nothing further to had have a nice day, however.. if you seek assistance in getting it working on you own forum I will gladly help you.

Keyser520
22 Feb 2006, 19:45
I modified the code slightly so that there are items in every field. The ones that usual say numbers now have "---" in them.

<if condition="is_member_of($bbuserinfo, 1,2,3,4,5,6,7)">
<tr>
<td class="alt1">
<img src="$stylevar[imgdir_statusicon]/thread_moved.gif" alt="" border="" />
</td>
<td class="alt2"><img src="images/icons/icon1.gif" alt="" border="0" /></td>

<td class="alt1">
<div>

<script type="text/javascript"><!--
google_ad_client = "pub-8436755030314590";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al_s";
google_ad_channel ="";
google_color_border = "B4D0DC";
google_color_bg = "ECF8FF";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "6F6F6F";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


</div>
</td>

<td class="alt2 smallfont" align="center">Sponsored Link</td>

<td class="alt1" align="center">---</td>
<td class="alt2" align="center">---</td>
<if condition="$show['inlinemod']"><td class="alt1" align="center"></td></if>

</tr>
</if>

Any idea on how to make this show up as the second spot rather than as the last one?

tbaleno
23 Feb 2006, 01:22
I just signed up with gooogle adsense. When I put this code in I see nothing except the icon and the "sponsored"

Unexplained.tv
23 Feb 2006, 04:49
When I tried it, and I did it 100% exactly as stated in the code in the first post- I never saw anything. Not trying to bring down the mod- I just found it not working.... I went with the random generated code instead.

you added the code before </if> instead of after. If you fix that and it should work for you :)



depends on where you want it... you can put your adense code in two places :)
if you want it before the display options put it here:
</table>
<!-- / controls below thread list -->
INSERT ADSENSE HERE

if you want it RIGHT before the footer put it here:
<!-- / forum rules & forum jump -->
INSERT HERE
$footer


The code works perfectly on every single board i use it on (all using vb3.5.x). Thus, I am inclined to believe you did something wrong instead.

If you have nothing further to had have a nice day, however.. if you seek assistance in getting it working on you own forum I will gladly help you.

Moparx
23 Feb 2006, 05:18
I just signed up with gooogle adsense. When I put this code in I see nothing except the icon and the "sponsored"
Are you using an ad blocker?

When I tried it, and I did it 100% exactly as stated in the code in the first post- I never saw anything. Not trying to bring down the mod- I just found it not working.... I went with the random generated code instead.
There is no random placement code released for the forumdisplay (if thats what you mean) that I am aware of. Are you sure you aren't thinking of the random placement in the postbit mod?

tbaleno
23 Feb 2006, 05:51
Are you using an ad blocker?

Apparantly I was ;) Thanks. Mystery solved.

SIINSI
08 Mar 2006, 04:30
I'm pretty sure Adsense can be used on a search results page, care to post the code you were speaking of? :)

Thanks!

Miguel

Moparx
08 Mar 2006, 19:23
I'm pretty sure Adsense can be used on a search results page, care to post the code you were speaking of? :)

Thanks!

Miguel

someone else made it before I released mine.
i believe it is in the 'other modifications' forum

simonlorentsen
23 Mar 2006, 07:54
i am looking to have this come up as always the second post in all threads, how can i get this to work ?

appreciate any help :)

StarBuG
01 May 2006, 13:31
Is it possible to display the Ad after the Nth thread?

That would blend in much better.

And what about always displaying the current date instead of --- ?
Is that possible?

Help is appreciated

hozmay
01 May 2006, 17:20
thank you brother :)

Steven Gibbons
01 May 2006, 19:00
Thanks for this mod, im sure to install it, i have a mod similar to this on my forums.

Moparx
01 May 2006, 21:05
Is it possible to display the Ad after the Nth thread?

That would blend in much better.

And what about always displaying the current date instead of --- ?
Is that possible?

Help is appreciated

Edit the threadbit template.

At the top add:
<if condition="$GLOBALS[threadcount] == X AND in_array(THIS_SCRIPT, array('forumdisplay')) AND is_member_of($bbuserinfo, 1,2)">
<if condition="$GLOBALS[threadcount]++"></if>
<tr>
<td class="alt1">
<img src="$stylevar[imgdir_statusicon]/thread_moved.gif" alt="" border="" />
</td>
<td class="alt2">&nbsp;</td>

<td class="alt1">
<div>
INSERT ADSENSE HERE
</div>
</td>

<td class="alt2 smallfont" align="center">Sponsored Link</td>

<td class="alt1" align="center"></td>
<td class="alt2" align="center"></td>
<if condition="$show['inlinemod']"><td class="alt1" align="center"></td></if>

</tr>
<else />

<if condition="$GLOBALS[threadcount]++"></if>


</if>

Change X to the numerical value that you want

StarBuG
01 May 2006, 22:15
Thank you very much.

If anyone is interested in how I implemented (slightly modified) it here you go:

http://www.hiphop-battles.com/forum/forumdisplay.php?f=10

;)

StarBuG

ps: I contacted google if the implementation is within their guidlines. I will post their answer here after I recive it ;)

StarBuG
02 May 2006, 19:53
Ahh one more thing.

Would it also be possible to display the ad at a random location like a random number between 1-15 or so?

This would make it even better blended in and users could not get accustom to the location (banner blindness)

ps: Google answered and the placing was ok ;)

Moparx
04 May 2006, 04:03
ya, ill work on something for you.. should be pretty easy to do with a plugin

doozyj
13 May 2006, 08:18
Thank you very much.

If anyone is interested in how I implemented (slightly modified) it here you go:

http://www.hiphop-battles.com/forum/forumdisplay.php?f=10

;)

StarBuG

ps: I contacted google if the implementation is within their guidlines. I will post their answer here after I recive it ;)

Could you give me the code you used to insert it in. Sorry I am not to savvy with this.

Moparx
13 May 2006, 15:41
Could you give me the code you used to insert it in. Sorry I am not to savvy with this.
the code was in the post above his.

StarBuG
14 May 2006, 11:32
How is the random placement progressing?

nymyth
13 Jun 2006, 15:24
this is great.....however, is there anyway we can get rid of the other 2 <td> after it says "sponsered links"....??

Peace

SHalliday
10 Jul 2006, 22:50
Installed and working. Thanbk you for the great hack!

I do have one question. How can I prevent the ads from displaying in forums that are defined not to contain threads but instead contain only sub-forums? As it is now the ads display in these forums with no threads and look very much out of place. Any help and/or advise would be much appreciated. Again, thank you for the great hack!

Dumi
25 Jul 2006, 08:46
This code does not work in firefox, it displays in IE just fine tho. Any ideas why?

Moparx
25 Jul 2006, 13:20
This code does not work in firefox, it displays in IE just fine tho. Any ideas why?
It works perfectly in Firefox ;)
Do you have an adblocker installed?

Dumi
26 Jul 2006, 22:42
Nope, I'm currently running 3.5.4 and using firefox 1.5. Any suggestions?

Load this page in firefox and IE.

http://www.standoffforum.com/forumdisplay.php?f=7

Its a nice mod just cant get it to work with firefox. really wierd.

dapoling
28 Jul 2006, 05:03
I am wondering if the code could be edited to show below the last post instead of thread.
And if we can would adsense be better suited for post in each thread?

Moparx
30 Jul 2006, 16:18
It is odd.. could you how me your code Dumi?

@dapoling
do you mean have the adsense after the last post in showthread?
yes its possible. there should be some template mods here that will do that for you :)

crzy
14 Sep 2006, 21:46
how can we put adwer whole row.. i mean i want to merge advert cell and Sponsored Link cell so i can make big long row and put big advert.. any help appreciatived

thanks

wobbly
24 Sep 2006, 16:07
Is there a way to get this to work with the quick reply option as there is some sort of problem with 3.6.1. I have this working but no quick reply (You click it but it doesnt do anything along with multiquote)

BigJimTheLug
28 Nov 2006, 12:49
This code has been labeled a Google TOS violation in the case of my forum.
Those of you attempting to use this code, should really check with Google first!

here is my forum link (http://www.puremarketprofits.com) for those that need "solid proof!"

mykkal
01 Oct 2007, 21:48
Lets say I want adsense to show after the first 5 threads are shown? I don't want it to show first but rather down in the page a bit becuase we get a lot of posts and members scroll down all the time. I'm able to do that on the postbit legacy template where the leaderboard ad shows after ever 3rd post but i'm unsure how to do that in the FORUMSDISPLAY template.

Does anyone know how I can specify adsense to show after 5 threads?

glenbelt
02 Jul 2008, 12:03
Does this work on vBulletin 3.6.8?

I've added the code but can't get the advert to display...

StarBuG
02 Jul 2008, 18:05
Yes it does.

Recheck all your changes and your adsense code.
It can take up to 10minutes after creating a new adsense code for it to display.
If you are a new customer and your forum is not yet indexed by the adsense spider,
it can take up to one week for the first ads to show.