0

I was noticing your use of adsense ads in the showthread template. That has to be one of the best locations I have seen. Where and how did you place it so it only shows up once after the first post? I would love to use this if you don't mind sharing.

11
Contributors
16
Replies
18
Views
12 Years
Discussion Span
Last Post by tsnany115
0

If you're using vBulletin 3, go into the Style Manager for the style you wish to edit. The change will be made in either the postbit or postbit_legacy template, depending upon which one you use. (User info on top vs. user info on left).

The very bottom of the template should say:

<if condition="$show['spacer']"><if condition="!$post['islastshown']"></div></if>$spacer_close</if>
<!-- / post #$post[postid] -->

Directly above this, add:

<if condition="$post[postcount]==1">
<!-- text advertising -->
Google AdSense here
<!-- / text advertising -->
</if>

Of course, it can be customized via HTML and CSS as I have done to have a background, etc.

0

If you're using vBulletin 3, go into the Style Manager for the style you wish to edit. The change will be made in either the postbit or postbit_legacy template, depending upon which one you use. (User info on top vs. user info on left).

The very bottom of the template should say:

<if condition="$show['spacer']"><if condition="!$post['islastshown']"></div></if>$spacer_close</if>
<!-- / post #$post[postid] -->

Directly above this, add:

<if condition="$post[postcount]==1">
<!-- text advertising -->
Google AdSense here
<!-- / text advertising -->
</if>

Of course, it can be customized via HTML and CSS as I have done to have a background, etc.

What about doing this on the second or susequent pages of a thread, would it be something like this (assuming I have 10 post a page) :

<if condition="$post[postcount]==1 || 11 || 21">

0

No. It would be

<if condition="$post[postcount]==1 || $post[postcount]==11 || $post[postcount]==21">
0

are you getting a respectable ctr from it, keep in mind that specifics are not allowed and I know this.

0
<if condition="$post[postcount]==1 || $post[postcount]==11 || $post[postcount]==21">

This code as is will work for upto page 2? Or for upto any page number?

Instead of using adsense, how do you code it for banners?

thanks,
007

p.s. which link in this vbulletin control panel allows me add my signature?
i tried all of them but can't find it. :(

0

The above code would work for the first three pages - the ad would show after the first post (page 1), after the eleventh post (page 2), and after the twenty-first post (page 3). You might be able to use some modular (remainder) division to make it work for an infinite number of pages. I'm not so sure if the vBulletin templating system supports mod division (%), but it's worth a shot ...

<if condition=="$post[postcount] % 10==1">advertising here</if>

Basically, this means to show the ad code if when you divide the number of the current post by ten, you get a remainder of one. In other words, when you do the division 1 divided by 10, you get 0 remainder 1, so you show the ad. Similarily, when you do 21 divided by 10, you get 1 remainder 1, so again show the ad. You see how this will work for an infinite number of pages.

To answer your second question, there is a ten post minimum on DaniWeb before you have access to forum signatures. Only two more posts to go, 007!

0

To display them to guests only just do

<if condition=="$post[postcount]==1 AND !$bbuserinfo[userid]">
0

I don't see AdSense in showthread on this forum, nor Adsense on this site -- sorry, am I missing something here? Thanks! Hey, GREAT site Dani and all. Amazingly helpful!

0

In the old version of DaniWeb (pre-April) we had some areas of the site reserved for AdSense, such as below the first and last posts of a thread. However, AdSense is now rotated with the other ad spots :)

0

This is an interesting discussion. thank you for sharing

Edited by Dani: Spam plugs removed

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.