[MODDB] Inline Banner Ad

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
bbus3r
Registered User
Posts: 158
Joined: Sat Apr 16, 2005 2:10 pm

Post by bbus3r »

geocator wrote:
bbus3r wrote:
geocator wrote:More than likley the image path is not correct, can you give me a link please.


hmmm ... i copied the same path that the default phpbb logo points to. Does it matter what size the logo is?

PM sent.

TIA

You did not do the tpl modification corectly. The ad stuff goes before <!-- END postrow --> not after.




thanks for pointing me to the right place. :oops:

it works. now i can see why people like this mod.
Beth
Registered User
Posts: 248
Joined: Mon May 19, 2003 10:57 pm

Post by Beth »

I get the following at the top of my page....but I don't have the code in my overall_header.tpl that the instructions call for putting it after.

Is there somewhere else in that file I could put it that would eliminate this problem?
td.inlineadtitle { background-color: #; border: #; border-style: solid; border-width: 1px; } td.inlinead { background-color: #; border: #; border-style: solid; border-width: 1px; text-align: center; }
geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator »

Then you put the code in the css file for your template.
Beth
Registered User
Posts: 248
Joined: Mon May 19, 2003 10:57 pm

Post by Beth »

Gotcha geocater...thanks!
Great mod, BTW.
megablastadmin
Registered User
Posts: 193
Joined: Tue Aug 31, 2004 9:53 am
Contact:

Post by megablastadmin »

hi buddy
thanks for this mod

i got a wierd problem

after doing everythng
including, sql update, editing, uploading and updating

when i enter some forum IDs in ad config in ACP,
and set some other options

it updated other options
but it didnot updated the exclude forum
i checked the sql table too
it didnot updated it there
then i had to manually edit it using phpmyadmin
then it workd
but it still shows blank in ACP in exclude forum

why so ?
megablastadmin
Registered User
Posts: 193
Joined: Tue Aug 31, 2004 9:53 am
Contact:

Post by megablastadmin »

got the answer from earlier posts

thanks
cha_rles
Registered User
Posts: 1
Joined: Mon Jul 04, 2005 10:47 am

Post by cha_rles »

Sorry for asking this question but it seems that there is no instruction on how to install this mod.
spica
Registered User
Posts: 8
Joined: Fri Sep 03, 2004 2:40 pm

Post by spica »

Will the MOD be able to place the ads into the text box of the 2nd post so that it'll look just like another post?
megablastadmin
Registered User
Posts: 193
Joined: Tue Aug 31, 2004 9:53 am
Contact:

Post by megablastadmin »

install instructions r in the txt file

spica;>
it dont put ad in text box of 2nd post

but it puts it above the 2nd post
which also looks like another post
mcg321
Registered User
Posts: 22
Joined: Mon Apr 11, 2005 2:55 am

Post by mcg321 »

In IE, the AdSense ad is being off-set to the right and making a horizontal scrollbar which is really frustrating. It only happens for the posts...the forum is http://www.ffspiral.com/forum/index.php, but the index is fine.

Please help!!
geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator »

mcg321 wrote: In IE, the AdSense ad is being off-set to the right and making a horizontal scrollbar which is really frustrating. It only happens for the posts...the forum is http://www.ffspiral.com/forum/index.php, but the index is fine.

Please help!!

Displays fine for me in firefox and IE.
mcg321
Registered User
Posts: 22
Joined: Mon Apr 11, 2005 2:55 am

Post by mcg321 »

I had to change my banner from the 728x90 to one size down. The scrollbar was turning away too many visitors so I couldn't wait around for a fix. Thanks anyway.
kilmanjaro
Registered User
Posts: 2
Joined: Mon Jul 11, 2005 4:30 am

Post by kilmanjaro »

I've think I've read through the entire post and first I'd like to thank the author - great mod! I think this was asked before, but I couldn't find the answer. I've got the ads displaying exactly as needed, but I'm wondering: Is there any way to put the ad both after the first and after last post? Thanks!

Edit: I've also had some issues with the ads displaying. Most of the time the ad populates correctly, but occasionally it displays 'Your banner code goes here'. Any help on this would be appreciated as well.
geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator »

kilmanjaro wrote: Is there any way to put the ad both after the first and after last post?

No, there is no way to know exactley when the last post is so you cant put in a number, I might look at an option like this in a later version though.
kilmanjaro wrote: Edit: I've also had some issues with the ads displaying. Most of the time the ad populates correctly, but occasionally it displays 'Your banner code goes here'. Any help on this would be appreciated as well.

You probably did not delete the defualt banner in the banner code area.
Desert Dancer
Registered User
Posts: 3
Joined: Mon Jul 11, 2005 2:55 pm
Location: Germany
Contact:

What's wrong here?

Post by Desert Dancer »

Hello!

I tried to install the mod, followed the instruction, but I always get the error message "unexpected $ in .... viewtopic.php at line 1676".

Code: Select all

// Again this will be handled by the templating
	// code at some point
	//
	if($i == 0)  
   {  
       $row_color = ( !($num_post % 2) ) ? $theme['td_color1'] : $theme['td_color2'];  
       $row_class = ( !($num_post % 2) ) ? $theme['td_class1'] : $theme['td_class2'];  
        $inline_ad_code = '';
	if (($i == $board_config['ad_after_post'] - 1) || (($board_config['ad_every_post'] != 0) && ($i + 1) % $board_config['ad_every_post'] == 0))
   	{
   		$display_ad = true;
   	}
   	else
   	{
   		$display_ad = false;
   	}
   	//This if statement should keep server processing down a bit
   	if ($display_ad)
   	{
		if ($board_config['ad_who'] == 'all' || ($board_config['ad_who'] == 'guest' && $userdata['user_id'] == -1) || ($board_config['ad_who'] == 'reg' && $userdata['user_id'] != -1))
   		{
   			$display_ad = true;
   		}
   		else
   		{
   			$display_ad = false;
   		}
   		$ad_no_forums = explode(",", $board_config['ad_no_forums']);
		for ($a=0; $a < count($ad_no_forums); $a++){
			if ($forum_id == $ad_no_forums[$a]){
				$display_ad = false;
				break;	
			}
		}
		if ($board_config['ad_no_groups'] != '')
		{
		$ad_no_groups = explode(",", $board_config['ad_no_groups']);
   		$sql = "SELECT 1
   				FROM " . USER_GROUP_TABLE . "
   				WHERE user_id=" . $userdata['user_id'] . " AND (group_id=0";
   		for ($a=0; $a < count($ad_no_groups); $a++){
			$sql .= " OR group_id=" . $ad_no_groups[$a];
   		}
   		$sql .= ")";
   		if ( !($result = $db->sql_query($sql)) )
   		{
			message_die(GENERAL_ERROR, 'Could not query ad information', '', __LINE__, __FILE__, $sql);
   		}
   		if ($row = $db->sql_fetchrow($result)){
   			$display_ad = false;
   		}
		}
		if (($board_config['ad_post_threshold'] != '') &&($userdata['user_posts'] >= $board_config['ad_post_threshold']))
		{
			$display_ad = false;	
		}
   	}
   	//check once more, for server performance
   	
   	if ($display_ad)
   	{
   		$sql = "SELECT a.ad_code
				FROM " . ADS_TABLE . " a";
   		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not query ad information', '', __LINE__, __FILE__, $sql);
		}
		$adRow = array();
		while( $row = $db->sql_fetchrow($result) )
		{
			$adRow[] = $row;
		}
		$adindex = rand(1, $db->sql_numrows($result)) - 1;
		$db->sql_freeresult($result);
   		$inline_ad_code = $adRow[$adindex]['ad_code'];
   	}


	//Online/Offline

Code: Select all

'DELETE_IMG' => $delpost_img,
		'DELETE' => $delpost,
		'L_SPONSOR' => $lang['Sponsor'],
		'INLINE_AD' => $inline_ad_code,
		'USER_WARNINGS' => $user_warnings,
		'CARD_IMG' => $card_img


Code: Select all

'U_B_CARD' => $b_card_img,
		'S_CARD' => append_sid("card.".$phpEx),
		'U_POST_ID' => $postrow[$i]['post_id'])
	);
if ($display_ad){
		if (!$board_config['ad_old_style'] && $display_ad)
		{
			$template->assign_block_vars('postrow.switch_ad',array());
		}
		else
		{
			$template->assign_block_vars('postrow.switch_ad_style2',array());
		}
	}
	display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']);
}


Any idea?

Desert Dancer
Locked

Return to “[2.0.x] MODs in Development”