Page 1 of 1

AdsInPosts

PostPosted: Fri Mar 02, 2007 4:32 pm
Author: dan0042
Your phpBB Version: 2.0.
phpBB Type: Standard phpBB
MODs: No
Your knowledge: Beginner
Board URL: [url]http://[/url]

PHP Version:
MySQL Version:


What was done before the problem appeared?



What was done to try to solve the problem?




De.scription and Message

#############################################################################################################
## MOD Title: Adverts In Posts
## MOD Author: Dale Rodgers < http://www.tntboards.com
## MOD De.scription: Automatically displays an advert in a topic as a post.
## MOD Version : 1.3.7
##
## Installation Level : Easy
##
## Installation Time : ~30 Secs
##
## Files To Edit : viewtopic.php
##
##
## Included Files : None
##
##
############################################################################################################
## For Security Purposes, Please Check: http://www.phpbbhacks.com/allhacks.php for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbbhacks.com/allhacks.php
############################################################################################################
## Author Notes:
## This MOD was made to have adverts on your forum without ruining the design or looking nasty.
##
## - Abilty to change the advert
## - Ability to change how many ads are displayed per topic
############################################################################################################
## Other Notes:
## You need to replace Ad Code Here with your ad code.
############################################################################################################
############################################################################################################
## MOD History:
##
##
## 2005-02-06 - Version 1.3.7
## - First release of the MOD
##
##
############################################################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
############################################################################################################


#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------
#
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
$row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$num ++;

#
#-----[ FIND ]------------------------------------------
#
'U_POST_ID' => $postrow[$i]['post_id'])
);

#
#-----[ AFTER, ADD ]------------------------------------------
#
if($i == $ad_after)
{
$row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$num ++;

$mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#ad';
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'POST_DATE' => $post_date,
'POST_SUBJECT' => 'Advertisement',
'MINI_POST_IMG' => $mini_post_img,
'POSTER_NAME' => 'Advertisement',
'POSTER_RANK' => 'Advertiser',
'MESSAGE' => '<div>Ad code here</div>',
'L_MINI_POST_ALT' => $mini_post_alt,
'U_MINI_POST' => $mini_post_url,
'U_POST_ID' => 'ad')
);
}

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

PostPosted: Fri Mar 02, 2007 11:42 pm
Author: tekguru
Intriguing - any examples of it in action anywhere?

PostPosted: Sat Mar 03, 2007 6:13 am
Author: dan0042

PostPosted: Thu Mar 08, 2007 1:54 pm
Author: ZacFields
That's the inline banner mod I was asking about! I believe this modification worked in 1.4.0 but for some reason it doesn't work at all in 1.4.1.

It places an advertisment under the first post in every topic. Adsense works okay on it, but for some reason it has trouble getting relevant ads there, but if you have paid advertisers like my site does, it's the best spot on a forum to have a banner.

Zac

Re: AdsInPosts

PostPosted: Sat Jun 23, 2007 7:55 am
Author: jomasaco
I put this on my forum and works fine.
[code]http]

PostPosted: Mon Oct 08, 2007 10:00 am
Author: DarkGizmo
"jomasaco";p="26784" wrote:I put this on my forum and works fine.
[code]http]

Link isn't workin, someone else got this mod working? i could really use some help with this mod

Re: AdsInPosts

PostPosted: Sun Mar 02, 2008 9:32 am
Author: jomasaco
Ok, an print screen

[flash=,:117wjr2d]http://i26.tinypic.com/5d7128.gif[/flash:117wjr2d]

BTW the code for ads must be html