[ABD] Ad Management 1.0.1

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
indepndent
Registered User
Posts: 129
Joined: Mon Feb 13, 2006 4:47 am

Re: [BETA] Ad Management

Post by indepndent »

pollos wrote:
indepndent wrote:OK this works now thanks however the banner is not centered on the subsilver2 template. Any suggestions on how to fix this?
Great MOD!
<div align="center">"Ad code goes here" </div>

thanks it is alot of recoding work but I think I figured it out with that bit of code.

Hopefully in the next version the author puts that correct coding for subsilver2 because in the viewtopicbody coding it was wrong. It was fine for overall header and footer though.

Thanks again
supermanun
Registered User
Posts: 24
Joined: Sat Mar 29, 2008 1:26 am

Re: [BETA] Ad Management

Post by supermanun »

for some reason the ads after first post dont work for me
anyone else have this same problem?


thank you
billab0nx
Registered User
Posts: 31
Joined: Tue Feb 26, 2008 10:30 am

Re: [BETA] Ad Management

Post by billab0nx »

Has it finalized yet ?
indepndent
Registered User
Posts: 129
Joined: Mon Feb 13, 2006 4:47 am

Re: [BETA] Ad Management

Post by indepndent »

Can this be modified with some sort of code so that I can have ads elsewhere in a space that I created? For instance I have added a side bar to put ads into. Can this mod be adjusted for more areas of where to show the code? Maybe ad_code7 or something like that? Also can we have an option to automatically rotate a certain number of banners in one of the predefined locations? Finally is there a way to count how many times an HTML ad has shown?

Thank You!
MikeeCO
Registered User
Posts: 9
Joined: Fri Apr 28, 2006 5:18 am

Date is not correct when editing ad

Post by MikeeCO »

I really like this mod. I just upgraded to 2.0 when I updated to phpbb 3.0.1 as I my ads stopped running.

I am using mod_ads_ 0_2_0 on phpbb 3.0.1 and when I edit an ad that was previously created the dates are not the dates that were saved when the ad was created. Have you seen this problem? Does anyone have a solution?

I was also wondering if it is still possible to do text ads with 2.0 or do all the ads need to be an image? It appears that they are all images.

Thanks,
Mike
MikeeCO
Registered User
Posts: 9
Joined: Fri Apr 28, 2006 5:18 am

views (impressions) not incrementing

Post by MikeeCO »

The number of impressions is not incrementing. The number of clicks is incrementing correctly. Any ideas? I checked the database and the views is still 0 for all ads inspite of them all being shown many times.

Thanks,
Mike
MikeeCO
Registered User
Posts: 9
Joined: Fri Apr 28, 2006 5:18 am

Re: Date is not correct when editing ad

Post by MikeeCO »

MikeeCO wrote:I am using mod_ads_ 0_2_0 on phpbb 3.0.1 and when I edit an ad that was previously created the dates are not the dates that were saved when the ad was created. Have you seen this problem? Does anyone have a solution?
It appears that every time I edit an ad both dates are on day less than they were previously.
indepndent
Registered User
Posts: 129
Joined: Mon Feb 13, 2006 4:47 am

Re: [BETA] Ad Management

Post by indepndent »

Hi,

I am trying to use this with Openx ad management which would allow me to rotate ads. however the invocation code given by the program is a php script. Can this be combined with this mod so that I can pick where the ads should be and have this code make them rotate?

Thnaks
lonepare
Registered User
Posts: 66
Joined: Wed Jan 16, 2008 8:20 am
Location: Nottingham
Contact:

Re: [BETA] Ad Management

Post by lonepare »

Okay I have upgraded to phpBB 3.01 and upgraded via an update..... which went well considering the amount of modifications I have made... that said I'm having a problem with the Ad Management mod.... for some reason this part of the code within includes/functions.php

Code: Select all

// Start output Ad
	$adID = '';
	$forum_id = isset($f) ? $f : 0;
	$sql = "SELECT a.code, a.ad_id, a.position, a.type, a.image, a.url, a.height, a.width
		FROM " . AD_TABLE ." a, " . USER_GROUP_TABLE . " g
		WHERE (a.max_views >= a.views OR a.max_views = '0')
		AND (FIND_IN_SET(" .$forum_id. ", a.show_forums) > 0 OR a.show_all_forums = '1')
		AND g.user_id = " . $user->data['user_id'] . "
		AND FIND_IN_SET(g.group_id, a.groups)
		AND FIND_IN_SET(" . $user->data['user_rank'] . ", a.ranks)
		AND a.start_time < " . time() . "
		AND a.end_time > " . time() . "
		AND (a.clicks <= a.max_clicks OR a.max_clicks = '0')
		ORDER BY rand()";
	$result = $db->sql_query($sql);
			
	while($row = $db->sql_fetchrow($result))
	{
		if ($row['type'] == 2)
		{
			$adcode[$row['position']] = '<a href="' . $phpbb_root_path . 'adclick.' . $phpEx . '?id=' . $row['ad_id'] . '"><img src="' . $row['image'] . '" height="' . $row['height'] . '" width="' . $row['width'] . '" alt="" /></a>';
		}
		else
		{
			$adcode[$row['position']] = html_entity_decode($row['code']);
		}
		$adID[$row['position']]['ID'] = $row['ad_id'];
	}
	$db->sql_freeresult($result);
	
	// update views for every Ad
	for ($i = 1; $i <= 6; $i++)
	{
		if (isset($adID[$i]['ad_id']))
		{
			$db->sql_query('UPDATE ' . AD_TABLE . ' SET views = views +1 WHERE ad_id = ' . $adID[$i]['ad_id']);
		}
	}
	// End output Ad
Went missing in the update, so I added code again in right place and now recieve

Code: Select all

General Error
SQL ERROR [ mysqli ]

Unknown column 'a.ad_id' in 'field list' [1054]

SQL

SELECT a.code, a.ad_id, a.position, a.type, a.image, a.url, a.height, a.width FROM phpbb_ad a, phpbb_user_group g WHERE (a.max_views >= a.views OR a.max_views = '0') AND (FIND_IN_SET(0, a.show_forums) > 0 OR a.show_all_forums = '1') AND g.user_id = 2 AND FIND_IN_SET(g.group_id, a.groups) AND FIND_IN_SET(1, a.ranks) AND a.start_time < 1207734195 AND a.end_time > 1207734195 AND (a.clicks <= a.max_clicks OR a.max_clicks = '0') ORDER BY rand()

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: includes/functions.php
LINE: 3460
CALL: dbal_mysqli->sql_query()

FILE: portal.php
LINE: 258
CALL: page_header()
i've since removed only that part of the code and site is functional but I have no ads.... any ideas please..
Regards Micheal

EDIT//// Okay my fault and partly mod authors as in instructions update for 2007-03-22- Version 0.2.0.... I had only installed 2008 did not think a new verson was out and changes had been made to mysql have now updated sql and all is okay... ...... :D
Lone Parent community at http://www.lone-parents.net a phpBB Forum
ZerBox
Registered User
Posts: 19
Joined: Sun Feb 03, 2008 1:44 pm

Re: [BETA] Ad Management

Post by ZerBox »

Will it be possible to insert a code again? As 3 of my 4 ads is provided by a code I have had to removed almost all of my ads when upgrading to the last version of this mod..
i3luechaos
Registered User
Posts: 74
Joined: Wed Jan 17, 2007 6:25 pm

Re: [BETA] Ad Management

Post by i3luechaos »

Is it possible to merge includes/functions.php for the ad management w/ the arcade I have installed?

My code now

Code: Select all

	// The following assigns all _common_ variables that may be used at any point in a template.
	if (!isset($arcade))
	{
		$user->add_lang('mods/arcade');
		$template->assign_var('U_ARCADE', append_sid("{$phpbb_root_path}arcade.$phpEx"));
	}

	$template->assign_vars(array(
Code that needs installed:
FIND:

Code: Select all

	// The following assigns all _common_ variables that may be used at any point in a template.
	$template->assign_vars(array(
Replace with:

Code: Select all

	// Start output Ad
	$adID = '';
	$forum_id = isset($f) ? $f : 0;
	$sql = "SELECT a.code, a.ad_id, a.position, a.type, a.image, a.url, a.height, a.width
		FROM " . AD_TABLE ." a, " . USER_GROUP_TABLE . " g
		WHERE (a.max_views >= a.views OR a.max_views = '0')
		AND (FIND_IN_SET(" .$forum_id. ", a.show_forums) > 0 OR a.show_all_forums = '1')
		AND g.user_id = " . $user->data['user_id'] . "
		AND FIND_IN_SET(g.group_id, a.groups)
		AND FIND_IN_SET(" . $user->data['user_rank'] . ", a.ranks)
		AND a.start_time < " . time() . "
		AND a.end_time > " . time() . "
		AND (a.clicks <= a.max_clicks OR a.max_clicks = '0')
		ORDER BY rand()";
	$result = $db->sql_query($sql);
			
	while($row = $db->sql_fetchrow($result))
	{
		if ($row['type'] == 2)
		{
			$adcode[$row['position']] = '<a href="' . $phpbb_root_path . 'adclick.' . $phpEx . '?id=' . $row['ad_id'] . '"><img src="' . $row['image'] . '" height="' . $row['height'] . '" width="' . $row['width'] . '" alt="" /></a>';
		}
		else
		{
			$adcode[$row['position']] = html_entity_decode($row['code']);
		}
		$adID[$row['position']]['ID'] = $row['ad_id'];
	}
	$db->sql_freeresult($result);
	
	// update views for every Ad
	for ($i = 1; $i <= 6; $i++)
	{
		if (isset($adID[$i]['ad_id']))
		{
			$db->sql_query('UPDATE ' . AD_TABLE . ' SET views = views +1 WHERE ad_id = ' . $adID[$i]['ad_id']);
		}
	}
	// End output Ad


	// The following assigns all _common_ variables that may be used at any point in a template.
	$template->assign_vars(array(
		'AD_CODE1'  => isset($adcode[1]) ? $adcode[1] : '',
		'AD_CODE2'  => isset($adcode[2]) ? $adcode[2] : '',
		'AD_CODE3'  => isset($adcode[3]) ? $adcode[3] : '',
		'AD_CODE4'  => isset($adcode[4]) ? $adcode[4] : '',
		'AD_CODE5'  => isset($adcode[5]) ? $adcode[5] : '',
		'AD_CODE6'  => isset($adcode[6]) ? $adcode[6] : '',






Don't know if I can just take the arcade code out, replace the code, then add the arcade code back in w/o any problems. Thanks.
csp4.0
Registered User
Posts: 56
Joined: Tue Feb 26, 2008 5:32 am
Location: Holy Terra
Contact:

Re: [BETA] Ad Management

Post by csp4.0 »

csp4.0 wrote:When I added both modules (HTML_ads, and BANNER_ads) I get this error when trying to access the modules:

Code: Select all

General Error
Language file ads.php couldn't be opened.
I changed the ads.php CHMOD to 777 but it still shows that error, doesn't matter what module that I go in (HTML_ads, or BANNER_ads) but it still shows that error...

Help anyone?
Don't worry about it, fixed issue, re-uploaded files...

EDIT: Still need help, BANNER_ADS still shows same error... Please help people! :|

MORE EDITS: I installed this on phpBB3.0.1 to those that might want to know... Also now both modes (HTML_AD and BANNER_AD) are showing the cannot be opened error, ads.php is CHMOD at 777, but still nothing...

Anyone?
csp4.0
Registered User
Posts: 56
Joined: Tue Feb 26, 2008 5:32 am
Location: Holy Terra
Contact:

Re: [BETA] Ad Management

Post by csp4.0 »

csp4.0 wrote:
csp4.0 wrote:When I added both modules (HTML_ads, and BANNER_ads) I get this error when trying to access the modules:

Code: Select all

General Error
Language file ads.php couldn't be opened.
I changed the ads.php CHMOD to 777 but it still shows that error, doesn't matter what module that I go in (HTML_ads, or BANNER_ads) but it still shows that error...

Help anyone?
Don't worry about it, fixed issue, re-uploaded files...

EDIT: Still need help, BANNER_ADS still shows same error... Please help people! :|

MORE EDITS: I installed this on phpBB3.0.1 to those that might want to know... Also now both modes (HTML_AD and BANNER_AD) are showing the cannot be opened error, ads.php is CHMOD at 777, but still nothing...

Anyone?
Bump? Can anyone please help me!
dirtchamber
Registered User
Posts: 13
Joined: Tue Jan 22, 2008 10:16 am

Re: [BETA] Ad Management

Post by dirtchamber »

Weird...everything seems to be fine with the installation, I got the mod in the ACP, set the add, but nothing shows up in posts. :( Again, I got no errors and stuff, but also no ads. What could it be?
nicotine
Registered User
Posts: 7
Joined: Sun Jan 29, 2006 4:31 am

Re: [BETA] Ad Management

Post by nicotine »

weighting would be a nice touch... :mrgreen:
Locked

Return to “[3.0.x] Abandoned MODs”