Banner Manager v1.4
Changes of previous code to make it compatible with osCommerce 2.2MS2.
Based on Banner Manager v1.2 by Linda McGrath
Legend: 
Download

Report
Full Package.
This is combination of Banner Manager 1.5b + Flash ad support.
This mod is designed to correct a problem when, after installing Banner Manager 1.5b and then Faaliyet's Flash (SWF) support modification, some banner ads on click do not pop a new window with the ad content, but rather use the current window.
This minor modification corrects that problem. Only one line of code change is required.
-------------------------------
Contrib: Banner Ads (original contrib by Priest Reynolds) with Support for Flash Ads (mod by faaliyet)
Change: Correct problem where ad not opening in new browser window
Affected file(s):
banner.php (catalog/includes/functions/)
-------------------------------
*** Installation Instructions ****
Find this line (approx. line 120):
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
Replace with:
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
**** END ****
Full package file included for your convenience.
****************************************************IF YOU HAVE INSTALLED CONTRIBUTION "FLASH BANNERS" THAN**************************************************
Open catalog/includes/functions/banner.php file
Find:
if ($banner['banners_html_text']) {
$banner_string = $banner['banners_html_text'];
} else {
// WebMakers.com Added: Banner Manager
if ( $banner['banners_open_new_windows'] =='1' ) {
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
} else {
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
}
}
And Replace With:
if (tep_not_null($banner['banners_html_text'])) {
$banner_string = $banner['banners_html_text'];
} else {
// WebMakers.com Added: Banner Manager
if ( $banner['banners_open_new_windows'] =='1' ) {
if ( substr($banner['banners_image'], -3, 3) == 'swf' ) {
$size = getimagesize(DIR_WS_IMAGES . $banner['banners_image']);
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . mm_output_flash_movie( $banner['banners_title'], DIR_WS_IMAGES . $banner['banners_image'] , $size[0] , $size[1]) . '</a>';
} else {
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
}
} else {
if ( substr($banner['banners_image'], -3, 3) == 'swf' ) {
$size = getimagesize(DIR_WS_IMAGES . $banner['banners_image']);
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . mm_output_flash_movie( $banner['banners_title'], DIR_WS_IMAGES . $banner['banners_image'] , $size[0] , $size[1]) . '</a>';
} else {
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
}
}
}
******************************************************AND IF YOU WANT TO RUN SQL QUERY USING WITH PHPMYADMIN*************************************************
THIS WAY IS EASIER:
ALTER TABLE banners ADD banners_open_new_windows tinyint(1) DEFAULT '1' NOT NULL;
ALTER TABLE banners ADD banners_on_ssl tinyint(1) DEFAULT '1' NOT NULL;
NOT LIKE THIS:
##########################################################
#Field: banners_open_new_windows tinyint(1) Default 1 #
#Field: banners_on_ssl tinyint(1) Default 1 #
##########################################################
(And if you want to use more banner groups than modify your sql query like "ALTER TABLE banners MODIFY banners_group varchar(10);" (10 or more!).)
That's All...
(No file included into zip file.)
strange typo erro in the languages , missing quotes between the variable in define
Based on the previous version, with no major changes. Just added the linking to the language files, which was not existing in v1.4.
Changed
catalog/includes/boxes/column_banner.php added
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_BANNER_MANAGER);
also in README.TXT document included notes on changing the filenames.php file.
Banner Manager v1.4
Changes of previous code to make it compatible with osCommerce 2.2MS2.
Based on Banner Manager v1.2 by Linda McGrath (oscommerce@WebMakers.com)