![]() |
Google AdSense (or other) after post...
I found this cod on vublletin.org and did some customization, I found this very useful and good place for ads.
Show a banner/ad after first (or somewhere else) post, show it to guests | register users | users with less then X posts... This is what I have: - It will show ad/banner after first post on every page (instead of just the first page) but only to guests. Admin CP -> Styles & Templates -> Style Manager -> ? ? -> Postbit Templates -> Edit postbit or postbit_legacy (depending on which layout you are using) Find: Code:
<!-- / post $post[postid] popup menu --> Code:
<if condition="$post[postcount] % $vboptions[maxposts] == 1 AND !$bbuserinfo[userid]"> Here are several other conditions you can use in the above code to show the banner in different places. Simply replace the first "if" statement. ...after the first post on every page (instead of just the first page): Code:
<if condition="$post[postcount] % $vboptions[maxposts] == 1"> Code:
<if condition="$post[postcount] == 1 AND !$bbuserinfo[userid]"> Code:
<if condition="$post[postcount] == 1 AND $GLOBALS[threadinfo][replycount] >= 2"> Code:
<if condition="$post[postcount] == 1 AND in_array($GLOBALS[forumid], array(X,Y,Z))"> Code:
<if condition="$post[postcount] % X == 0"> Code:
<if condition="$post['islastshown']"> Quote:
Code:
<if condition="$post[postcount] % $vboptions[maxposts] == 1 AND !$bbuserinfo[userid] AND in_array($GLOBALS[forumid], array(X,Y,Z))"> |
Nice one! Thank you. :D
|
If anyone use some custom code and want to share it let me know and I'll include it in first post.
|
how is this different then the other 8 billion ones already out there?
|
I don't know, this is something I was looking for and didn't found so I add it here, if there is thread same as this one, feel free to delete it (anyone who can)
|
Does vBAd management have something like this... doesn't it?
|
VBAd doesn't work for me, so I'm editing my templates for inserting ads
|
Can you add a screenshot ?
|
added! (it's only visible to guests).
|
added very handy tips
|
All times are GMT. The time now is 03:45 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|