Useful Links

How to use flash with the Joomla! banner module Print E-mail
(3 votes, average 5.00 out of 5)
Wednesday, 21 October 2009 22:48

Like yourself, I tried to use a flash banner with the Banners component of Joomla!.

And, as you probably know by now, I found out that this wasn't possible; or at least, it wasn't a matter of just selecting a flash file (SWF) instead of an image file (JPG, GIF, PNG).
Joomla! (current version is 1.5.14) doesn't support flash (SWF) files in the Banners component.

OK, there are extensions that do so, but they don't provide the same functionality as the Banners component (clicks count, having different clients, categories, banners etc).
Any extension with similar functionality that I found was either commercial or without all those features that the Banners component has.

After searching on the internet for a couple of hours, I found the solution in Joomla!'s documentation.
I tried it and it worked, but the page created wasn't validating according to the W3 standards.

After some trial and error I came up with this code, which validates as XHTML 1.0 Transitional.




How to use it

    First Step
  • Change http://www.DESTINATION_URL.com/ to the URL that you want the user to get to after clicking the banner.
  • Change the title of the link.
  • Change http://www.absolute_path_to.swf (2 instances) to the path that you have uploaded the SFW file (normally http://www.yourdomain.com/images/banners/flash_file.swf).
  • If you omit one of the 2 dimensions, that dimension will be proportional to the one that you have entered. I don't know how this is possible, but it works ;)
  • If no dimension is entered, the flash movie dimensions will be used.
  • The parameter target="_blank" opens the link to a new browser window; if omitted the current browser window will be used.


Second Step
  1. Login to your Joomla! account.Login to your Joomla! account
  2. Go to the Banners component.Go to the Banners component
  3. Select the banner for which you want to use the flash file, or create a new one.Select or create the banner
  4. Fill-in all the necessary fields and instead of selecting an image, paste this code to the Custom Banner Code section and click the Save button.Fill-in all necessary fields and paste the code in the Custom Banner Code section

I hope that this works out for you too.
Good luck!

Comments (16)
  • Anonymous

    This is great!!! Thank you very much!Respect!!

  • Nakis  - re:

    You're welcome :)
    Let's hope that this will be included in the new features of 1.6...

  • mfugaj

    that is great.. really great..
    1 thing, links are not working for me.. any idea?

  • silteq  - great

    link doesn't work in ie
    what can i do?

  • Nakis  - RE:

    I have followed the same steps, I just tested and it works in Firefox, IE and Chrome.
    Sorry but I can't think of any reason why it doesn't work for you...

  • lui  - thanks

    I have been looking for this for a good couple of hours, this is fantastic and works well

    than you

  • Nakis  - RE:

    You're welcome :)

  • lui  - IE problem

    for some reason this is not working in IE and also a 404 error page opens along with the destination url in firefox?

    is there another setting that needs to be implemented?

  • Nakis  - RE:

    The settings related to banners are those shown in the screenshot.
    The only reason that I can think of, is the target="_blank" setting in conjunction with a popup blocker.
    It's been a while since I've set this up, but it still works. I have tried Firefox, IE8 and Chrome, all latest versions.

    Also, double check the code that you need to change.

  • lui  - IE problem

    Hi

    The issue was on the flash btn itself. I found that if you do not put any code on the flash banner it did not work. But if I did use the getURL function then it wld work in IE, but cause two windows to open in Firefox

    thanks

  • Nakis  - RE:

    I'm glad you worked this out :)

  • Saskia

    I'm looking for hours for a solution with flash banner.
    I found the Flash Module, but this one doesn't support a link to a new url.

    Than I came up on your tutorial, however, I'm working with Joomla 1.0.15 (this month I will change to 1.6), the Banner component in 1.0.15 you have to select an image! If I choose a regular image, still the code doesnot work.

    Can you help?

    Thanks anyway for this tutorial

  • Nakis  - RE:

    Sorry Saskia but I think I cannot help you. I have only used 1.5.* and never 1.0.*.
    I'm relatively new to joomla ;)

  • Anonymous

    it work perfect and it was easy to implement, it work for me on my first try. joomla 1.5. Thank you guys

  • Sergio Fonseca

    EXCELENTE, EXCELENTE very good job, it work perfect and it was easy to implement. Congratulations

  • Nakis  - RE:

    Thanks :)

Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.
 

Limassol Weather

Now
Partly Cloudy
24°C, Windchill: 24°C
Wind: 16 kph NW
Humidity: 78%
Visibility: 0 km
pressure: 1,009 mb steady
Sunrise: 6:25 am
Sunset: 7:05 pm
Wed
Clear
Hi: 33°C, Low: 25°C
Thu
Sunny
Hi: 33°C, Low: 25°C
Joomla Templates by Joomlashack