Home arrow Hacks arrow Flash banner reloaded
joomla_commpow_sm.png JoomlaTips.org is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla! logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
 
Flash banner reloaded PDF Print E-mail
User Rating: / 0
PoorBest 


Okay, now you're happy, you can add and use flash banners in to the standard banners component in Joomla, using this tip , but what a heck! The links you carefully set up in the background aren't showing up at all. What you can do about?

Well... you have couple of choices. For instance you can build - or hire someone to build for you - some flash banners to have the links incorporated in them. Or... you can hack in again!

Hope, you allready tried the previous hack, and that works. Now all you need to do is to open in your preferred editor the file modules/mod_banners.php and at about line 85 change this:

} else if (eregi("\.swf$", $banner->imageurl)) {

$imageurl = "$mosConfig_live_site/images/banners/".$banner->imageurl;

echo "<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=\"5\">

<param name=\"movie\" value=\"$imageurl\"><embed xsrc=\"$imageurl\" loop=\"false\" pluginspage=\"http://www.macromedia.com/go/get/flashplayer\" type=\"application/x-shockwave-flash\"></embed></object>";

}


to this (if you want the link specified in the admin to be on top of your flash banner):

} else if (eregi("\.swf$", $banner->imageurl)) {
$imageurl = "$mosConfig_live_site/images/banners/".$banner->imageurl;
$link = sefRelToAbs( 'index.php?option=com_banners&task=click&bid='. $banner->bid );
$getflashinfo = @getimagesize( $imageurl );
echo '
<a href="'.$link.'" target="_blank" style="display:block;position:absolute;width:'.$getflashinfo[0].'px;height:'.$getflashinfo[1].'px;z-index:999;"></a>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'.$getflashinfo[0].'" height="'.$getflashinfo[1].'" style="position:relative;z-index:0;">
<param name="movie" value="'.$imageurl.'" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<embed src="'.$imageurl.'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'.$getflashinfo[0].'" height="'.$getflashinfo[1].'" style="position:relative;z-index:1;"></embed>
</object>';
}
And enjoy the result!
And don't forget to redirect your "thankyou"s for the tip to the joomlaworks.gr site's owner and maintainer, Fotis Evangelou.


Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Joomla Free PHP
plugin by VivoCiti.com
 
< Prev   Next >
Quantcast