![]() |
adsense in first post
Hello,
I am wondering, if anyone here can tell me how to add adsense code in first post at the bottom.. just like this http://www.talkgold.com/forum//r152221-.html I just would like to know template name.. :) it would be really good.. if i can add this after every second post too :D |
Don't know if this will work, but...
open includes/class_postbit.php, find this: Code:
function construct_postbit(&$post) Code:
static $post_counter; |
Quote:
|
You can add this in your postbit or postbit_legacy..
This is the easy way ;) Code:
<if condition="$post[postcount] == 1"> |
Doh. If I only knew about $post['postcount'] variable... :)
|
thanks it works perfect but when i used this <if condition="fmod($post[postcount],2) == 0"> it gave me this error
The following template conditional expression contains function calls: With a few exceptions, function calls are not permitted in template conditional expressions. Please go back and re-write this expression. can any one suggest how to display adsense after every second post? |
Try <if condition="($post[postcount] % 2) == 0">
|
Quote:
i got it.. <if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))"> |
Hi there!
This one rocks. I searched throughout the net and find this. Thanks. How can we implement this code for each page of a thread? Because it is only valid for the first post of a thread. Thanks! |
this will work for first and last page of every post
<if condition="(($post[postcount] % $vboptions[maxposts] == 1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))"> |
All times are GMT. The time now is 09:52 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:
|