953,979 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Adsense ads in showthread

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.

1EightT
Newbie Poster
7 posts since Aug 2004
Reputation Points: 10
Solved Threads: 0
 

The founder of this site made it herself; you should just go to www.vbulletin.org and request for it there.

Gary King
PHP/vBulletin Guru
Team Colleague
417 posts since Nov 2003
Reputation Points: 53
Solved Threads: 5
 

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:
[php]

cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 
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: [php]
dcallan
Newbie Poster
3 posts since Jan 2005
Reputation Points: 10
Solved Threads: 0
 

No. It would be

<if condition="$post[postcount]==1 || $post[postcount]==11 || $post[postcount]==21">
cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

This is a nice hack.

ArunK
Light Poster
49 posts since Jun 2004
Reputation Points: 11
Solved Threads: 0
 

Thank you. :)

cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

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

dcallan
Newbie Poster
3 posts since Jan 2005
Reputation Points: 10
Solved Threads: 0
 

great hack, i love vBulletin more and more :)

Gandalf
Newbie Poster
13 posts since Jan 2005
Reputation Points: 10
Solved Threads: 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. :(

007
Newbie Poster
8 posts since Feb 2005
Reputation Points: 10
Solved Threads: 1
 

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!

cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

do the ads display to guests only ?

TheWebJunkie
Newbie Poster
8 posts since Mar 2005
Reputation Points: 11
Solved Threads: 0
 

To display them to guests only just do

<if condition=="$post[postcount]==1 AND !$bbuserinfo[userid]">
cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

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!

aZooZa
Newbie Poster
1 post since May 2005
Reputation Points: 10
Solved Threads: 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 :)

cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

Adsense ads in showthread listings are really simple to setup and appear quickly in the index.

seooptimization
Newbie Poster
4 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

This is an interesting discussion. thank you for sharing

tsnany115
Newbie Poster
1 post since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You