MyBB Community Forums

Full Version: Video tests
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
YouTube with YouTube code


Vimeo with Vimeo code


YouTube with Vimeo code


Vimeo with YouTube code


EDIT:
That's weird.
How is that weird? Youtube and vimeo don't mix.

What you're seeing is simply because the "vimeo" protocol is similar to the youtube protocol in terms of the information we grab from it. But not vice versa.

Food for thought:
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]";
		}
		
		if(empty($id) || ($video == "yahoo" && empty($vid)))
		{
			return "[video={$video}]{$url}[/video]";
		}
		
		$id = htmlspecialchars_uni($id);
		
		eval("\$video_code = \"".$templates->get("video_{$video}_embed")."\";");
		
		return $video_code;
	}
Just cursious, because i know you must of thought of it, but deciced against it, Why not just a universal [video] tag ryan?
(2010-08-01, 12:44 AM)Mark.M Wrote: [ -> ]Just cursious, because i know you must of thought of it, but deciced against it, Why not just a universal [video] tag ryan?

domain name detection would have been a hassle since there are a bunch of variations of any major domain.
(2010-08-01, 12:45 AM)Ryan Gordon Wrote: [ -> ]
(2010-08-01, 12:44 AM)Mark.M Wrote: [ -> ]Just cursious, because i know you must of thought of it, but deciced against it, Why not just a universal [video] tag ryan?

domain name detection would have been a hassle since there are a bunch of variations of any major domain.

Ah i get it, like youtube.co.uk or youtube.ca. Of course. Toungue
Question - I have been reading all of the blogs/threads about adding video to my BB. I see there is a VIDEO icon on the right of this Posting. But I do not have it installed on mine. Do you know how I would add this? Seems like you know a lot around these issues. Smile
GW, are you running 1.6?
IPB has a universal video tag..