2010-07-30, 12:37 PM
Hi
I have created a number of pages in PHP Melody and a plugin (nearly) to show videos inside the MyBB forum for example:
Shrek Trailer Video Embed
The problem I have is making preg replace in the plugin file accept any url in this string:
If I can get the above to work I can add it to the plugin downloads.
Regards
Bluesplayer
I have this sorted now:
I have created a number of pages in PHP Melody and a plugin (nearly) to show videos inside the MyBB forum for example:
Shrek Trailer Video Embed
The problem I have is making preg replace in the plugin file accept any url in this string:
$message = preg_replace("#\[phpmelody\]<---any url put here--->\[/phpmelody\]#", "<iframe src='<---same url outputed here--->' width='645' height='432' scrolling='no'></iframe>", $message);
return $message;
If I can get the above to work I can add it to the plugin downloads.
Regards
Bluesplayer
I have this sorted now:
$message = preg_replace("#\[phpmelody\](.*?)\[/phpmelody\]#i", "<iframe src='$1' width='645' height='432' scrolling='no'></iframe>", $message);
return $message;