2010-08-29, 04:48 PM
Trying to embed video onto forums. But I cant, I know I have to enable HTML but I dont want to make that to everyone. Can you make it for just certain people have it?
(2010-08-29, 04:50 PM)Gaara Wrote: [ -> ]2) Video MyCode exists in 1.6Yes, there is.
switch($video)
{
case "dailymotion":
list($id, ) = split("_", $path[2], 1); // http://www.dailymotion.com/video/fds123_title-goes-here
break;
case "googlevideo":
$id = $input['docid']; // http://video.google.com/videoplay?docid=fds123
break;
case "metacafe":
$id = $path[2]; // http://www.metacafe.com/watch/fds123/title_goes_here/
$title = htmlspecialchars_uni($path[3]);
break;
case "myspacetv":
$id = $input['videoid']; // http://myspacetv.com/index.cfm?fuseaction=vids.individual&videoid=fds123
break;
case "yahoo":
$id = $path[3]; // http://video.yahoo.com/watch/fds123/abc567
$vid = htmlspecialchars_uni($path[2]);
break;
case "vimeo":
$id = $path[1]; // http://vimeo.com/fds123
break;
case "youtube":
if($fragments[0])
{
$id = str_replace('!v=', '', $fragments[0]); // http://www.youtube.com/watch#!v=fds123
}
else
{
$id = $input['v']; // http://www.youtube.com/watch?v=fds123
}
break;
default:
return "[video={$video}]{$url}[/video]";
}
switch($video)
{
case "dailymotion":
list($id, ) = split("_", $path[2], 1); // http://www.dailymotion.com/video/fds123_title-goes-here
break;
case "googlevideo":
$id = $input['docid']; // http://video.google.com/videoplay?docid=fds123
break;
case "metacafe":
$id = $path[2]; // http://www.metacafe.com/watch/fds123/title_goes_here/
$title = htmlspecialchars_uni($path[3]);
break;
case "myspacetv":
$id = $input['videoid']; // http://myspacetv.com/index.cfm?fuseaction=vids.individual&videoid=fds123
break;
case "yahoo":
$id = $path[3]; // http://video.yahoo.com/watch/fds123/abc567
$vid = htmlspecialchars_uni($path[2]);
break;
case "vimeo":
$id = $path[1]; // http://vimeo.com/fds123
break;
case "youtube":
if($fragments[0])
{
$id = str_replace('!v=', '', $fragments[0]); // http://www.youtube.com/watch#!v=fds123
}
else
{
$id = $input['v']; // http://www.youtube.com/watch?v=fds123
}
break;
case "megavid":
$id = $input['videoid']; // http://www.megavideo.com/?v=fsd123
break;
default:
return "[video={$video}]{$url}[/video]";
}