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

Home » FUDforum » How To » YouTube on FUDforum
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: YouTube on FUDforum [message #40807 is a reply to message #38788] Sun, 13 April 2008 20:42 Go to previous messageGo to previous message
Jaems is currently offline  Jaems   Denmark
Messages: 27
Registered: February 2007
Karma:
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

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Main Navigation Names
Next Topic: Adding pages to "watch"
Goto Forum:
  

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

Current Time: Thu Nov 21 23:44:50 GMT 2024

Total time taken to generate the page: 0.04158 seconds