The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
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 ![]() |
#2
|
||||
|
||||
![]()
Don't know if this will work, but...
open includes/class_postbit.php, find this: Code:
function construct_postbit(&$post) { Code:
static $post_counter; if(!isset($post_counter)) { $post_counter = 0; } else { $post_counter ++; } |
#3
|
|||
|
|||
![]() Quote:
|
#4
|
|||
|
|||
![]()
You can add this in your postbit or postbit_legacy..
This is the easy way ![]() Code:
<if condition="$post[postcount] == 1"> <table class="tborder" cellpadding="6" cellspacing="0" border="0" width="100%" align="center"> <tr> <td class="thead" align="left">-- Sponsored Links --</td> </tr> <tr> <td class="alt1" align="center"> Here you ads code </td> </tr> </table> </if> |
#5
|
||||
|
||||
![]()
Doh. If I only knew about $post['postcount'] variable...
![]() |
#6
|
|||
|
|||
![]()
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? |
#7
|
||||
|
||||
![]()
Try <if condition="($post[postcount] % 2) == 0">
|
#8
|
|||
|
|||
![]()
You rock.. one last question how to check last post .. thanks again for your reply
i got it.. <if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))"> |
#9
|
|||
|
|||
![]()
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! |
#10
|
|||
|
|||
![]()
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']))"> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|