YouTube user macro

Name YouTube User Macro
Version 1.0
Product Versions 2.*
Author(s) Menso Heus
Homepage menso ( a ) xs4all.nl
Price Free
License
JavaDocs  
IssueTracking  
Download JAR  
Download Source  

Description/Features

Allows users to easily embed YouTube videos within Confluence

Installation

This is a user macro, which means you will need to add it manually to your User Macro's in the administration screen.

  1. Go to the System Administration screen
  2. Click on the 'User Macros' link in the left menu under 'Configuration'
  3. Select 'Create a User Macro'
  4. Name the macro 'youtube'
  5. Check the 'Macro has a body' box
  6. Paste the following into the text area and press 'Save':
    <object width="425" height="350">
    <param name="movie" value="http://www.youtube.com/v/$body"></param>
    <param name="wmode" value="transparent"></param>
    <embed src="http://www.youtube.com/v/$body" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350" readonly=true></embed>
    </object>
    




Usage

The macro needs the YouTube videocode in order to display the video. So, for example:

YouTube video URL http://www.youtube.com/watch?v=sIsYDWD1lgA
Video code (last part of URL) sIsYDWD1lgA
Tag to display video {youtube}sIsYDWD1lgA{youtube}

Examples

Version History

Open Issues



Screenshots



Labels

plugin plugin Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 05, 2007

    Jack Pinette says:

    Hilarious! I added a basically identical user macro to my installation a few we...

    Hilarious! I added a basically identical user macro to my installation a few weeks ago. Great minds think alike, at least about simple things such as this I guess.

  2. Jul 11, 2007

    Dominic Lovell [CustomWare Asia Pacific] says:

    I just used the {HTML} tags which works just as well to embed my youtube vids to...

    I just used the {HTML} tags which works just as well to embed my youtube vids to a page. Nice work tho!

    1. Oct 04, 2007

      Jens Schumacher says:

      Since the HTML macro can be a security risk and open up your Confluence for scri...

      Since the HTML macro can be a security risk and open up your Confluence for scripting attacks we usually recommend to disable the macro and use a user macro instead. The above is a great example of how to use the usermacros to insert custom html into a page.

      1. Jun 24, 2008

        JK Collins says:

        Would this statement "open up your Confluence for scripting attacks" also be tru...

        Would this statement "open up your Confluence for scripting attacks" also be true for Confluence Wiki's contained 100% behind a firewall?

        (I have a couple of users who put YouTube videos on their personal pages via the HTML tags)

  3. Jun 22, 2008

    ido says:

    Hi , We have confluence over https and when I use this user macro inside a wiki...

    Hi ,

    We have confluence over https and when I use this user macro inside a wiki page it give Security warning.
    What can I do to avoid this message ?

    1. Jun 22, 2008

      David Peterson [CustomWare] says:

      I don't think there is anything you can do about it - YouTube doesn't run on HTT...

      I don't think there is anything you can do about it - YouTube doesn't run on HTTPS, so no matter what way you embed it, you'll always get the warning...

    2. Sep 08, 2008

      Douglas Boyle says:

      If the warning is about displaying unsecured data on the page with the secured d...

      If the warning is about displaying unsecured data on the page with the secured data there is an option that can be switch in IE to prevent the prompt, but nothing systemically within confluence.

  4. Mar 13

    Rico Zuñiga says:

    You can also use the {flash} macro like so: {flash:url=http://www.youtube.com/...

    You can also use the {flash} macro like so:

    {flash:url=http://www.youtube.com/v/BtrFZmZjalE&color1=0xb1b1b1&color2=0xcfcfcf&hl=en&feature=player_embedded&fs=1|width=425|height=344}
    

    replace the url property with your YouTube video URL.