Created
May 18, 2009 19:19
-
-
Save edavis10/113684 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# vendor/plugins/redmine_youtube/init.rb | |
# | |
require 'redmine' | |
require 'open-uri' | |
Redmine::Plugin.register :redmine_gist do | |
name 'Redmine YouTube plugin' | |
author 'Maxime Rousseaux-Bridle <[email protected]>' | |
description 'Allows a you tube video to be embeded' | |
version '0.0.1' | |
Redmine::WikiFormatting::Macros.register do | |
desc "Embed a you tube video" | |
macro :youtube do |obj, args| | |
%~ | |
<object width="425" height="344"> | |
<param name="movie" value="http://www.youtube.com/v/#{args[0]}=en&fs=1"></param> | |
<param name="allowFullScreen" value="true"></param> | |
<param name=\"allowscriptaccess\" value=\"always\"></param> | |
<embed src="http://www.youtube.com/v/#{args[0]}&hl=en&fs=1" type="application/x-shockwave-fla | |
sh" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed> | |
</object> | |
~ | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment