Useful Links

How to use flash with the Joomla! banner module Print E-mail
(12 votes, average 4.50 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!

 

UPDATE:

To keep the click counting, just put this link as destination URL:
http://www.YOURSITE.COM/index.php?option=com_banners&task=click&bid=X

Replace the final X with the ID of your banner
McAndrews
Thanks Pedro for the tip and sorry for the late update :)


Comments (70)
  • 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?

  • Craig Gers  - Possible Solution

    Hi There

    I hope that these comments help you.

    I had the same problem. I followed all the prompts and instructions as per above.

    What I did to solve the problem was as follows. I am using Joomla 1.5.23.

    I noticed from the Joomla Banner Manual / Pages online that you need to have a mod_banners Module installed.

    - login
    - Extension -> Module Manager
    - If you don't have a Type = 'mod_banners' create one.


    Once I created this it worked. You can fiddle the settings e.g. the placement of the banner etc. Specify Target - Parent Window with Browser Nav,Banner Client and Category.

    Check that the module is enabled and Tada!

  • 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 :)

  • grace  - two windows in Firefox

    I had the same problem in Firefox. To fix it, when using getURL within the flash document, delete the link (a href...) from the html.

  • 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 :)

  • Zoster  - Not working

    I've tried this special code for flash in core Joomla banner component, but it stil not working. The banner module shows nithing!
    I made a custom module with the code and it works excellent.
    But I don't have click counting now and I dont know what to do. I have one big and sirious client for payed banner, but I have no click count :(
    Can anybody help me?!
    I'm using Joomla 1.5.20 and TelineIII template...

  • Paul  - Centering flash banner

    hi
    its work perfect but have the problem with the centering.
    my flash banner is 700 px and my home is 1000 px.
    now its on the left site and not in the middle of the page.
    did someone have the solution?
    thks
    pascal

  • Nakis

    You're welcome :)
    Try to create a div and place your flash banner code inside and then use CSS to center it.
    Here's the code:

    HTML

    Code:
    <[div id ="flashbanner">

    flash banner code here

    <]/div>

    Delete the [ ] characters :)

    CSS

    Code:

    #flashbanner {
    width: 1000px;
    margin-left: auto;
    margin-right: auto;
    }


  • paul  - Doesen t work

    thks for the code but its doesent works :angry:
    i put the css code also in the general css and ie7 but eer the ame pb. its left orriented.
    also the url click doesnt work.

    i find this code thats works but wenn i click in the banner nothing happend also

    i hope i can you your ode complety
    regards
    paul

  • Rudi  - Flash banner link does not work in IE

    Hi,

    Thanks for offering this very useful step by step instruction.
    Everything works , except for the (external)destination URL when the banner is clicked. Works fine in Firefox, but not in IE8. What is wrong with it?
    www.moctezuma.be

  • Nakis

    I believe IE8 has "issues" in general. For me it works but I get that notice at the bottom left corner that the page has errors. And sometimes IE crashes. I can't figure it out...

  • paul  - re: Doesen t work
    paul wrote:
    thks for the code but its doesent works :angry:
    i put the css code also in the general css and ie7 but eer the ame pb. its left orriented.
    also the url click doesnt work.

    i find this code thats works but wenn i click in the banner nothing happend also

    i hope i can you your ode complety
    regards
    paul


    oups the code is











  • paul

    i dont see the copy and past code. here the link.
    why doese this code orking and your not fot me? i use a ARTISTEER template is this the source f the problem?
    Paul

  • paul  - re:
    paul wrote:
    i dont see the copy and past code. here the link.
    why doese this code orking and your not fot me? i use a ARTISTEER template is this the source f the problem?
    Paul


    http://docs.joomla.org/Flash_Banner

  • Nakis

    I haven't used Artisteer but it seems that your editor strips the HTML code. Look to that direction to resolve your issue...

  • Rudi  - Tried your code.Firefox=OK but still refuses to wo

    Hi Paul, I used the code exactly as posted on
    http://docs.joomla.org/Flash_Banner. However the problem is still there:Click works on Firefox but not on IE. I am not exactly an IE fanatic, but survey shows IE is still used by 70% of professional users in B.

    Any clue?


    www.moctezuma.be

  • Nakis

    Ηi. I had a quick look and I saw a couple of differences in the code you use.
    The plugin related info is different. ie. codebase, flash version etc. Use the exact code above and give it a try...

  • Gavin Bass  - flash with the Joomla! banner module

    hello i have put the flash banner on my web page put i dont seet on Google Chrome can any one help

  • Nakis

    If it works with other browsers. then you should check the compatibility issues/requirements for chrome.
    More technical details would be helpful.
    Be sure to follow exactly the steps above.

  • PRA  - Link to code is broken ?

    Hello,

    The link to the code sample seems to be broken.
    Could you check it ?

    Thanks a lot,

    PRA.

  • Nakis

    Of course it's broken ;) it's an example.
    Replace it with the path to your file.

  • PRA  - Code sample

    Hello Nakis,

    Thanks for the reply. When I read this line in you post :
    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
    I thought you had placed some piece of code in clear text somewhere I could find it. Does it mean that I have to reproduce the code from the image or do i miss something ?

    Thanks, PRA.

  • Nakis

    It seems that you skipped the "How to use it" section above ;)

  • PRA  - Code sample

    Hello Nakis,

    Thank you for your patience.

    I did read the "How to use it" section.
    I understand very well that to let the code work I have to modify the URl's in the custom code of the banner.
    But could you please copy the sample code in your reply to this post ? Otherwise, do I have to zoom the image to decrypt what you wrote as custom code and retype it ?
    Or do I miss something else ?
    I'm very sorry, I use to read technical posts on different forums but in this case, I can't use your sample since I don't find the sample code in plain text, I just see a picture.

    Thanks a lot !
    PRA.

  • Nakis

    The code is in plain text, in this txt file:
    http://www.nakis-s.info/images/stories/joomla_flash_banner_code.txt

  • Pedro bó  - Improvements

    To keep the click counting, just put this link as destination URL:
    http://www.YOURSITE.COM/index.php?option=com_banners&task=click&bid=X< /p>

    Replace the final X with the ID of your banner

    McAndrews

  • craig  - a little clarification

    Hi,
    for those of us who are slightly handicapped, could you explain further? Is that extra code added within the CUSTOM BANNER CODE section? Or in the Click URL section? if the former, a complete example of the Custom Banner Code would be awesome.
    thanks for creating a solution.
    :D

  • koko

    hi,

    ist this working? i am kinda testing this extra code for the clicking for about 4 hours already and i am still could not get it to work.

    help would very much appreciated.

    cheers

  • Anonymous

    thank you. it works well

  • ra j chandel  - Flash bannner

    plz send me video link of insert flash in hesder image
    thanks

  • Ankur  - Excellent

    :D Excellent work... Keep it up ...
    thanks

  • Nakis

    You're welcome :)

  • Julie  - Thank YOU!

    Dear Nakis,

    You are my new best friend. :)

    Thanks for saving me even more headache.

    Peace.

  • Julie  - Alas...

    I may have to put that "Best Friend" status on hold. :x I'm having IE issues (I know, who isn't?). For some reason the banner in IE is showing MUCH smaller than in FF or Chrome, though the size is correctly stated. Also, I'm having the issue where "extra" shows outside the stage area of the flash. (I don't know if there's a running name for that issue. I assume it's a known problem.)

    Any thoughts?

  • Nakis

    Julie I have had IE issues as well, which I didn't manage to solve. I just left things as they were...
    Still, for size issues check the relevant properties and try changing the size to something a lot different (smaller or larger) and see what happens.
    Sorry I can't help any more...

  • Julie

    If I made it any smaller, I'd need a microscope. ;) No luck or changes with that experiment. I didn't go digging in my css, though. I suspect it might have something to do with recent flash upgrades. Maybe. I opted to convert the offending flash files into gif animations. Still, maybe one day IE will get its act together and I'll be able to use your fix. Regardless, thanks for sharing your work.

  • Anonymous  - This did not work at all

    This is bullshit and absolutely does not work...on any browser.

  • Nakis

    This bullshit obviously worked for some, so start wondering what you're doing wrong ;)

  • zaid  - One Issue

    Great work and thanks for the info. But I have only one question.

    I have tried everything and checked everything. All is as you said.

    The link to another URL is not working, Please let me know if you have a solution. I have Joomla 1.5

  • Nakis

    Check if you have errors in your code or some sort of flash "blocker" (I use flashblobk for example).

    Sorry I can't help you more...

  • Antóinio Valente  - works but not clicks!!!

    Dear friend,
    your solution worked to disply swf. Thank you!
    However clicks are not counted...
    Is there a solution?

  • Nakis

    You're welcome :)
    I don't know any solution for the clicks issue... sorry

  • Faniso  - Awesome!

    Check Pedro bó - Improvements solution dated 2010-12-29 18:19:20

    This part is important. When you have the destination url, as Pedro instructed, and you want to link to an external URL, put the URL in the "Click URL:" field. Count plus click redirection.

    Thanks Pedro. :D :D

  • craig  - Question

    Hi,
    could you explain further? What code do we remove from the CUSTOM BANNER CODE section?
    A complete example of the Custom Banner Code would be awesome.
    thanks for helping with a solution.
    :D

  • aisha  - replacing banner with swf

    to all of u .
    It is my first time and plz i cant understand first step can any body help me. :(

  • Nakis

    Aisha the first step applies to the code quoted right above it.
    Hope this helps... :)

  • Faniso  - Yeeei! Thanks so much.

    :D

    I got stuck there for a second but it worked out. Thanks so much hey.

  • ahmad nuruddin  - FLASH BANNER TEM{LATE JOOMLA

    :) I m still don't know how to use in... http://bkd.grobogan.go.id/ it is a simple template which admin adding flash header...please share how to make it...( tutorial ) thank you so,...

  • Nakis

    Ahmad this tutorial is for the joomla banner component and not for the page header.
    To change the page header create an html module with the content you want and place it to the header position of your template.

  • Agustin  - Great

    It solved all my problems!!

    I have used The Flash Module but give me problems with the linking, but using this tutorial I have the banner and the linking working great, A big thanks and a question.


    Is there some way to link the banner to another site and keep the click counter?
    Txs

  • Nikos Alafodimos  - transparent wmode

    To solve the problem with the flash banner shows in front of a drop-down menu, instead of:

    I v' replaced "opaque" with "transparent" so the code now is:

    so the menu now shows in front of flash banner.

  • Nikos Alafodimos  - transparent wmode (with the code)

    Sorry for the double post. I wrote the code right into the text box, so I'm posting again.

    To solve the problem with the flash banner shows in front of a drop-down menu, instead of:

    Code:


    I v' replaced "opaque" with "transparent" so the code now is:

    Code:


    so the menu now shows in front of flash banner.

  • Nikos Alafodimos  - transparent wmode (with code)

    Sorry for the double post. I wrote the code right into the text box, so I'm posting again.

    To solve the problem with the flash banner shows in front of a drop-down menu, instead of:
    param name="wmode" value="opaque"
    I v' replaced "opaque" with "transparent" so the code now is:
    param name="wmode" value="transparent"
    so the menu now shows in front of flash banner.

  • Robert  - Adobe Flash Issue

    I tried this on a Joomla 1.7.3 site but it is displaying an Adobe Flash upgrade requirement notice. I upgraded to Adobe Flash 11 but it still displays this message. I took a screen shot of it but apparently you do not allow images to be attached to posts here. HELP!

  • Sangita oza  - swf file upload problam

    swf file upload zoomla but Warning: Invalid CRT parameters detected in C:\wamp\www\wizwedding\libraries\joomla\utilit ies\date.php on line 250 php error plz help me

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
Fair
13°C, Windchill: 13°C
Wind: 24 kph NE
Humidity: 54%
Visibility: 0 km
pressure: 1,018 mb falling
Sunrise: 6:41 am
Sunset: 5:21 pm
Mon
Partly Cloudy
Hi: 17°C, Low: 11°C
Tue
AM Rain
Hi: 17°C, Low: 10°C
Joomla Templates by Joomlashack