MyBB Community Forums

Full Version: HTML
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
Make a MyCode for it
1) There's no need to enable HTML in your forums
2) Video MyCode exists in 1.6
(2010-08-29, 04:50 PM)Gaara Wrote: [ -> ]2) Video MyCode exists in 1.6
Yes, there is.

However there is a plugin called AdminHTML from MyBBSource that allows admins to post with html


How can I made this video embed, able to go onto a thread?(Not this sites)
<object width="640" height="353"><param name="movie" value="http://www.megavideo.com/v/362SF53672e79ceda13b05c570c6c6eade5ee081"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.megavideo.com/v/362SF53672e79ceda13b05c570c6c6eade5ee081" type="application/x-shockwave-flash" allowfullscreen="true" width="640" height="353"></embed></object>
Right, here's the solution to adding support for MegaVideo in the Video MyCode. Please note that I haven't tested this, but I'm sure this'll work.

Open up inc/class_parser.php.

Find this:
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]";
		}

Replace this with the following:
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]";
		}

Please get back to me asap if the following works, because I haven't tested it's compatibility.
you could just use
http://mods.mybb.com/archive/view/automedia
which will embed megavideo all you do is add the url in to the post for example http://www.megavideo.com/v/362SF53672e79...eade5ee081
but instead of the url you'll have the video