Pour utiliser le flash avec os6tm_banner_manager il existe cette contrib:
http://addons.oscommerce.com/info/3009Voici tout ce qu'il faut avoir :
http://addons.oscommerce.com/info/2511En fait il faut uploader les deux fichiers (AC_ActiveX.js-AC_RunActiveContent.js ) à la racine de la boutique.
- Dans catalog/includes/functions/html_output.php rajouter juste avant le dernier ?> :
Code
///// output a flash movie - by ManMachine
function mm_output_flash_movie($name, $movie, $width = '' , $height = '' , $background = '' , $parameters = '') {
if(tep_not_null($width)) {
$movie_width = 'width="'.$width.'"';
}
if(tep_not_null($height)) {
$movie_height = 'height="'.$height.'"';
}
if(tep_not_null($parameters)) {
$flash_movie = $movie . '?' . $parameters;
} else {
$flash_movie = $movie;
}
//fix ie 1 :: begins
$flash = '<script src="AC_RunActiveContent.js" type="text/javascript"></script>' . "\n";
$flash .= '<script type="text/javascript">AC_FL_RunContent(
\'codebase\',\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\',
\'width\',\' '. $width .'\',
\'height\',\' '. $height .'\',
\'quality\',\'high\',
\'pluginspage\',\'http://www.macromedia.com/go/getflashplayer\',
\'movie\',\' '. $movie .'\' );' . "\n";
$flash .= '</script>' . "\n";
$flash .= '<noscript><EM>' . "\n";
//fix ie 1 :: ends
$flash .= '<object type="application/x-shockwave-flash" data="'. $movie .'" '. $movie_width .' '. $movie_height.'>'."\n";
$flash .= '<param name="movie" value="'.$flash_movie.'" />' . "\n";
if(tep_not_null($background)) {
$flash .= '<param name="bgcolor" value="#'.$background.'" />' . "\n";
} else {
$flash .= '<param name="wmode" value="transparent">' . "\n";
}
$flash .= '</object>' . "\n\n";
//fix ie 2 :: begins
$flash .= '</EM></noscript><EM>' . "\n";
//fix ie 2 :: ends
return $flash;
return $flash;
}
- Dans catalog/includes/functions/banner.php remplacer :
vers la ligne 84:
Code
if (is_array($identifier)) {
$banner = $identifier;
} else {
$banner_query = tep_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . (int)$identifier . "'");
Par :
Code
if (tep_not_null($banner['banners_html_text'])) {
$banner_string = $banner['banners_html_text'];
} 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>';
http://addons.oscommerce.com/info/2511