Joomla (1.5) Banner Manager, SWF Banners Click Throughs and Impressions aren’t been tracked

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!

Vote in HexoSearch

Tags: , , , , , ,

4 Responses to “Joomla (1.5) Banner Manager, SWF Banners Click Throughs and Impressions aren’t been tracked”

  1. Brenton says:

    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

  2. kurt grung says:

    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:”

    images/spacer.gif
    

    Then it will replace that text – don’t remove it manually – you need to add the gif or the banners wont click through.

  3. Waschtrommel says:

    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

  4. kurt grung says:

    @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 –

    /modules/mod_banners/helper.php
    

    to check if the page is on a certain area or url (via javascript) then add the self/blank paramaters that way..

    cheers

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

  • Categories

  • Recent Comments

  • Recent Posts

  • Tumblr

  • Flickr Recent Photos

    cherry tree woodstonja_gravestonesPockey Chimp FlavourAUTO FTW! :)darkdaystayouttiger kittenbirdofpreyfirst photo i took with my 1000dself_portrait_02
  • XFIRE (wkly hrs pld)

  • Last.FM

  • Tags

    .MP4 Actionscript Action Script Advertising AS2 AS3 backtrack BT4 bug Call of Duty capcom centOS cpanel crossdomain Eyeblaster eyeblaster HD f4v Flash h264 HD high definition Install internet explorer Linux load loadMovie MIME MIME Types MW2 Nazi Zombies pc PHP ports preloader release date rich media shared objects Stage SWF SWFOBJECT torrents Video video/mp4 VMware win7