Recently came accross this problem a client was having. SWF Banners weren’t clicking through neither were impressions been tracked from the Joomla: Banner Manager module, If your have having this problem do the following..
Go to and edit:
/modules/mod_banners/helper.php
Replace:
$html = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" border=\"0\" width=\"$width\" height=\"$height\">
<param name=\"movie\" value=\"$imageurl\"><embed src=\"$imageurl\" loop=\"false\" pluginspage=\"http://www.macromedia.com/go/get/flashplayer\" type=\"application/x-shockwave-flash\" width=\"$width\" height=\"$height\"></embed>
</object>";
With:
/* Old Flash Code
$html = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" border=\"0\" width=\"$width\" height=\"$height\">
<param name=\"movie\" value=\"$imageurl\"><embed src=\"$imageurl\" loop=\"false\" pluginspage=\"http://www.macromedia.com/go/get/flashplayer\" type=\"application/x-shockwave-flash\" width=\"$width\" height=\"$height\"></embed>
</object>";
*/
//HW: BOF New Flash Code that works with Clickthroughs, AND does not hide menus etc (WMODE)
$clickurl = $item->clickurl;
$html_flash = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" border=\"0\" width=\"$width\" height=\"$height\">
<param name=\"movie\" value=\"$imageurl\">
<param name=\"wmode\" value=\"opaque\">
<embed src=\"$imageurl\" pluginspage=\"http://www.macromedia.com/go/get/flashplayer\" type=\"application/x-shockwave-flash\" width=\"$width\" height=\"$height\" wmode=\"opaque\"></embed>
</object>";
if ($clickurl != '') { //Add a GIF based clickthrough IF there is a link supplied in the 'Click url' for this banner in the banner manager.
$html = '<div style="position:relative;z-index:1;" style="background:#fff;">'; //Add the banner clickthrough
$html .= $html_flash;
$html .= '<a href="'.$link.'" target="_blank" style="display:block;position:absolute;width:'.$width.'px;height:'.$height.'px;z-index:9999;top:0px;left:0px;border:none;background:none;"><img src="images/spacer.gif" style="width:'.$width.'px;height:'.$height.'px;" alt="Banner Campaign" /></a> '; //replace this with the path to your spacer.gif (needs to be a transparent PNG/GIF).
$html .= '</div>';
} else { //Otherwise use the orignal code, so that the flash banner still goes to the right place... (instead of a blank page!)
$html .= $html_flash;
}
//HW: EOF New Flash Code that works with Clickthroughs, AND does not hide menus etc (WMODE)
Now upload a transparent Spacer GIF/PNG to the following location, or point the above code to the desired location of choice:
images/spacer.gif
That’s it your good to go!
Tags: 1.5, Banner Manager, Banners, click throughs, impressions, Joomla, SWF















i have a 350×200 and 728×90 flash banners on my site, i changed what you mentioned above and it works! thankyou, the only problem is there is text displaying in both the banners in the top left hand corner that reads ‘Banner Campaign’, how do i get rid of this?
cheers,
Brenton
Brendon that’s because you don’t have the transparent gif uploaded.
“Now upload a transparent Spacer GIF/PNG to the following location, or point the above code to the desired location of choice:”
Then it will replace that text – don’t remove it manually – you need to add the gif or the banners wont click through.
Thank you very very much – i’ve been searching for such solution for hours, tested other Banner managements but Joomla’s own is still the best (free) one for me.
Except for the incomplete flash implementation.
With your mod it absolutely does what it should.
Klickable flash banners and statistics as well.
For the feature:
An interesting feature would be to implement a switch if the link will open a new site or open local (a href=self). So you could flash-promote site-based content without leaving the window.
Any suggestions?
Best regards from germany
Rene
@rene – no worries, glad it helped.
sure you could add this feature to the ‘mod’ but would need to add quite abit of extra functionality – an easy hack would be to just add a if statement inside that code snippet section inside –
to check if the page is on a certain area or url (via javascript) then add the self/blank paramaters that way..
cheers