FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » YouTube on FUDforum
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
YouTube on FUDforum [message #38734] Sat, 25 August 2007 07:52 Go to next message
ron4 is currently offline  ron4   Netherlands
Messages: 17
Registered: July 2007
Karma: 0
Junior Member
Hi Ilia,

I was wondering whether it is possible to embed YouTube videos into a post.
I noticed it can be done by turning on HTML code, but is there another way?

How can I make such a tag?

thanks very much!

Ron
Re: YouTube on FUDforum [message #38755 is a reply to message #38734] Sun, 26 August 2007 16:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I would not recommend allowing HTML posting as that is a major security hole for your forum, since HTML allows just about anything. If you want to add a new tag you need to edit the post_proc.inc.t and add url[/youtube] tag. You can use existing tags as a reference point.

FUDforum Core Developer
Re: YouTube on FUDforum [message #38780 is a reply to message #38755] Mon, 27 August 2007 19:00 Go to previous messageGo to next message
ron4 is currently offline  ron4   Netherlands
Messages: 17
Registered: July 2007
Karma: 0
Junior Member
Will a url tag allow me to embed the YouTube video in posts?

Re: YouTube on FUDforum [message #38781 is a reply to message #38780] Mon, 27 August 2007 23:04 Go to previous messageGo to next message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
No, it will only link to the video.

FUDforum Core Developer
Re: YouTube on FUDforum [message #38788 is a reply to message #38781] Tue, 28 August 2007 18:27 Go to previous messageGo to next message
ron4 is currently offline  ron4   Netherlands
Messages: 17
Registered: July 2007
Karma: 0
Junior Member
Hi Ilia,

I would like to make a [youtube] tag with the following code. This will embed a YouTube movie:

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="http://www.youtube.com/v/{param}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>

Then the {param} is filled in by the user in the structure {param}[/youtube].

I am quite new to FUDforum, could you please help me out with realising this tag?

thanks so mcuh!

regards
Ron
Re: YouTube on FUDforum [message #40807 is a reply to message #38788] Sun, 13 April 2008 20:42 Go to previous messageGo to next message
Jaems is currently offline  Jaems   Denmark
Messages: 27
Registered: February 2007
Karma: 0
Junior Member
I got a YouTube embed to work in FUDcode by tweaking existing tags and drinking lots of coffee. Edit post_proc.inc.t to include the following lines:


This goes with the other replacements:
/* Start YouTubeReplace */
	while (preg_match('!<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/([^"]+)"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/(.*?)" type="application/x-shockwave-flash" wmode="transparent"
width="425" height="355"></embed></object>!s', $fudml, $res)) {
			$fudml = str_replace($res[0], '[youtube]'.$res[2].'[/youtube]',$fudml);
	}
/* End YouTubeReplace */



This goes with the other cases
/* Start YouTubeCase*/
				case 'youtube':
					$url = substr($str, $epos+1, ($cpos-$epos)-1);
					$end_tag[$cpos] = '" type="application/x-shockwave-flash" wmode="transparent" 
width="425" height="355"></embed></object>';
					$ostr .= '<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/'.$url.'"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/';
					break;
/*End YouTubeCase */


I can't guarantee that some of that code isn't extraneous, since it is very reverse engineered. But it does work.


jnote.org
FUD version 2.7.7, Apache

[Updated on: Wed, 11 June 2008 22:21]

Report message to a moderator

Re: YouTube on FUDforum [message #159401 is a reply to message #40807] Sat, 30 May 2009 20:22 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
FUDforum 2.8.1 and higher ships with a Youtube plugin that can be activated from the Plugin Manager admin control panel.
Re: YouTube on FUDforum [message #159796 is a reply to message #159401] Thu, 25 June 2009 19:04 Go to previous messageGo to next message
thebugnut is currently offline  thebugnut   Canada
Messages: 87
Registered: June 2005
Karma: 0
Member
I activated the YouTube link in the control panel but I don't see the link anywhere.
Re: YouTube on FUDforum [message #159797 is a reply to message #159796] Thu, 25 June 2009 19:14 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
What link are you referring to?

PS: See documentation at http://cvs.prohost.org/index.php/Youtube.plugin
Re: YouTube on FUDforum [message #159798 is a reply to message #159797] Thu, 25 June 2009 19:18 Go to previous messageGo to next message
thebugnut is currently offline  thebugnut   Canada
Messages: 87
Registered: June 2005
Karma: 0
Member
How can I add a button so that this can be done the same way you add a linked image? I need to make sure that my users can do this easily.

Re: YouTube on FUDforum [message #159799 is a reply to message #159798] Thu, 25 June 2009 19:24 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You can add them to "fud_code_icons" in post_common.tmpl
Re: YouTube on FUDforum [message #159802 is a reply to message #159799] Thu, 25 June 2009 19:32 Go to previous messageGo to next message
thebugnut is currently offline  thebugnut   Canada
Messages: 87
Registered: June 2005
Karma: 0
Member
So first I need to create an icon and place it in the same folder as the other ones? Then what?

Here is the Code from that template...
<tr class="RowStyleA"><td class="GenText nw">{MSG: post_format_tools}</td><td>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td>
<table cellspacing="1" cellpadding="2" class="FormattingToolsBG">
<tr>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_bold}" accesskey="b" href="javascript: insertTag(document.post_form.msg_body, \'[B]\', \'[/B]\');"><img alt="" src="{THEME_IMAGE_ROOT}/b_bold.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_italics}" accesskey="i" href="javascript: insertTag(document.post_form.msg_body, \'[I]\', \'[/I]\');"><img alt="" src="{THEME_IMAGE_ROOT}/b_italic.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_underline}" accesskey="u" href="javascript: insertTag(document.post_form.msg_body, \'[U]\', \'[/U]\');"><img alt="" src="{THEME_IMAGE_ROOT}/b_underline.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_align_left}" href="javascript: insertTag(document.post_form.msg_body, \'[ALIGN=left]\', \'[/ALIGN]\');"><img alt="" src="{THEME_IMAGE_ROOT}/b_aleft.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_align_center}" href="javascript: insertTag(document.post_form.msg_body, \'[ALIGN=center]\', \'[/ALIGN]\');"><img alt="" src="{THEME_IMAGE_ROOT}/b_acenter.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_align_right}" href="javascript: insertTag(document.post_form.msg_body, \'[ALIGN=right]\', \'[/ALIGN]\');"><img alt="" src="{THEME_IMAGE_ROOT}/b_aright.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_link}" accesskey="w" href="javascript: url_insert();"><img alt="" src="{THEME_IMAGE_ROOT}/b_url.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_email}" accesskey="e" href="javascript: email_insert();"><img alt="" src="{THEME_IMAGE_ROOT}/b_email.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_image}" accesskey="m" href="javascript: image_insert();"><img alt="" src="{THEME_IMAGE_ROOT}/b_image.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_nlist}" accesskey="l" href="javascript: window_open(\'{TEMPLATE: fud_code_icons_lnk1}\', \'listmaker\', 350, 350);"><img alt="" src="{THEME_IMAGE_ROOT}/b_numlist.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_blist}" href="javascript: window_open(\'{TEMPLATE: fud_code_icons_lnk2}\', \'listmaker\', 350, 350);"><img alt="" src="{THEME_IMAGE_ROOT}/b_bulletlist.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_quote}" accesskey="q" href="javascript: insertTag(document.post_form.msg_body, \'[QUOTE]\', \'[/QUOTE]\');"><img alt="" src="{THEME_IMAGE_ROOT}/b_quote.gif" /></a></td>
<td class="FormattingToolsCLR"><a title="{MSG: post_common_code}" accesskey="c" href="javascript: insertTag(document.post_form.msg_body, \'[CODE]\', \'[/CODE]\');"><img alt="" src="{THEME_IMAGE_ROOT}/b_code.gif" /></a></td>
</tr>
</table>
</td>
<td>&nbsp;&nbsp;
<select name="fnt_size" onchange="insertTag(document.post_form.msg_body, \'[SIZE=\'+document.post_form.fnt_size.options[this.selectedIndex].value+\']\', \'[/SIZE]\'); document.post_form.fnt_size.options[0].selected=true">
<option value="" selected="selected">{MSG: post_size}</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
</select>
<select name="fnt_color" onchange="insertTag(document.post_form.msg_body, \'[COLOR=\'+document.post_form.fnt_color.options[this.selectedIndex].value+\']\', \'[/COLOR]\'); document.post_form.fnt_color.options[0].selected=true">
<option value="">{MSG: post_color}</option>
<option value="skyblue" style="color:skyblue">Sky Blue</option>
<option value="royalblue" style="color:royalblue">Royal Blue</option>
<option value="blue" style="color:blue">Blue</option>
<option value="darkblue" style="color:darkblue">Dark Blue</option>
<option value="orange" style="color:orange">Orange</option>
<option value="orangered" style="color:orangered">Orange Red</option>
<option value="crimson" style="color:crimson">Crimson</option>
<option value="red" style="color:red">Red</option>
<option value="firebrick" style="color:firebrick">Firebrick</option>
<option value="darkred" style="color:darkred">Dark Red</option>
<option value="green" style="color:green">Green</option>
<option value="limegreen" style="color:limegreen">Lime Green</option>
<option value="seagreen" style="color:seagreen">Sea Green</option>
<option value="deeppink" style="color:deeppink">Deep Pink</option>
<option value="tomato" style="color:tomato">Tomato</option>
<option value="coral" style="color:coral">Coral</option>
<option value="purple" style="color:purple">Purple</option>
<option value="indigo" style="color:indigo">Indigo</option>
<option value="burlywood" style="color:burlywood">Burly Wood</option>
<option value="sandybrown" style="color:sandybrown">Sandy Brown</option>
<option value="sienna" style="color:sienna">Sienna</option>
<option value="chocolate" style="color:chocolate">Chocolate</option>
<option value="teal" style="color:teal">Teal</option>
<option value="silver" style="color:silver">Silver</option>
</select>
<select name="fnt_face" onchange="insertTag(document.post_form.msg_body, \'[FONT=\'+document.post_form.fnt_face.options[this.selectedIndex].value+\']\', \'[/FONT]\'); document.post_form.fnt_face.options[0].selected=true">
<option value="">{MSG: post_font}</option>
<option value="Arial" style="font-family:Arial">Arial</option>
<option value="Times" style="font-family:Times">Times</option>
<option value="Courier" style="font-family:Courier">Courier</option>
<option value="Century" style="font-family:Century">Century</option>
</select>
</td></tr></table></td></tr>

Re: YouTube on FUDforum [message #159804 is a reply to message #159802] Thu, 25 June 2009 19:35 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
This should help: http://fudforum.org/forum/index.php?t=msg&th=4222
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Main Navigation Names
Next Topic: Adding pages to "watch"
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 22:38:15 GMT 2024

Total time taken to generate the page: 0.02583 seconds