INCLUDE ADSENSE (OR) ANOTHER ADS IN BETWEEN POSTS OF A THREAD for XMB 1.9.11
____________________________________________________________________________
Hack by Vamsee
contribution : Mouser(special thanks :) )
Licensed under GPL,
For working hack, check any thread in : http://www.astrogle.com/discus
FEEL FREE TO EDIT THIS HACK TO SUIT YOUR BOARD'S DESIGN AND REQUIREMENTS
____________________________________________________________
STEPS TO INCLUDE 'ADSENSE' IN BETWEEN POSTS OF A THREAD
1. create new template : viewthread_adsense
COPY and Place YOUR ADSENSE or any other ADCODE HERE
|
2. edit viewthread.php
FIND
$tmoffset = ($timeoffset * 3600) + ($addtime * 3600);
while($post = $db->fetch_array($querypost)) {
REPLACE WITH
$tmoffset = ($timeoffset * 3600) + ($addtime * 3600);
$counter = 0;
while($post = $db->fetch_array($querypost)) {
$counter++;
Find :
eval('$posts .= "'.template('viewthread_post').'";');
Add above/below;
if ( in_array($counter, $ADDnum) ) {
eval('$posts .= "'.template('viewthread_adsense').'";');
}
AND ADD THIS LINE AT THE TOP of the 'viewthread.php'
$ADDnum = array(2 , 6 , 12);
_________________________________________________________
THATS IT !!!!
you will start seeing adsense running in all your threads after posts 2,6,12 etc.
NOTE : You can adjust the ads placement by altering the numbers 2,6,12.
Adsense will not display more than 3 ads per page, so it was limited to 3 ads per page view here.