https://www.icyphoenix.com/viewtopic.php?f=4&t=6428&p=44061#p44061
-----------------------------------
Lopalong
Sun 06 Sep, 2009 01:33

CUSTOMIZATION - Adding Video BBCode And Buttons To The Editor.
-----------------------------------
To create a new BBCode for adding video links, you will need to [i][b]create[/b][/i] and [b][i][u]REPLACE[/u][/i][/b] the [b]$html =[/b] Code for the video format you are trying to add, and also create two icons for the editor.

Copy your icons as megavideo.gif and megvideo1.gif to /images/bbcb_mg/gif/*.gif

Then replace all of the [b](MegaVideo, megavideo, MEGAVIDEO)[/b] words or parts of words here with the name of the video format you are going to use - Then follow the instructions to install it.

[b]MegaVideo: Instructions with ($html Option 1.)[/b]
[spoiler][code linenumbers=false]Open : includes/bbcb_mg.php

Find:

	'L_BBCB_MG_YOUTUBE' => $lang['bbcb_mg_youtube'],


After Add:

	'L_BBCB_MG_MEGAVIDEO' => $lang['bbcb_mg_megavideo'],

Find: 

	'L_YOUTUBE_HELP' => $lang['s_youtube_help'],

After Add: 

	'L_MEGAVIDEO_HELP' => $lang['s_megavideo_help'],


Open : includes/bbcode.php

Find: 

		'youtube'		=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),

After Add: 

		'megavideo'		=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),

Find: 

($tag === 'youtube')

Inline After Add: (Note the leading space)

 || ($tag === 'megavideo')

Find:

				elseif ($tag === 'googlevideo')

Before Add:

				elseif ($tag === 'megavideo') 
				{ 
				$html = '<object width="640" height="480"><param name="movie" value="http://www.megavideo.com/v/' . $content . '.800360084.3" /><embed src="http://www.megavideo.com/v/' . $content . '.800360084.3" type="application/x-shockwave-flash" width="640" height="480"></embed></object><br /><a href="http://megavideo.com/?v=' . $content . '" target="_blank">Link</a><br />'; 
				}

Open: templates/common/js/bbcb_mg.js

Find:

var youtube = 0;

After Add:

var megavideo = 0;

Find:

'[youtube]','[/youtube]',

After Add:

'[megavideo]','[/megavideo]',

Find:

function BBCyoutube()
{
	var FoundErrors = '';
	var enterURL = prompt(s_youtube_insert, s_id_insert_tip);
	if (!enterURL)
	{
		FoundErrors += s_id_insert_error;
	}
	if (FoundErrors)
	{
		alert(s_gen_error + FoundErrors);
		return;
	}
	var ToAdd = "[youtube]" + enterURL + "[/youtube]";
	PostWrite(ToAdd);
}

After Add:

function BBCmegavideo()
{
  var FoundErrors = ''; 
  var enterURL = prompt(s_megavideo_insert, s_id_insert_tip); 
  if (!enterURL) 
  { 
    FoundErrors += s_id_insert_error; 
  } 
  if (FoundErrors) 
  { 
    alert(s_gen_error + FoundErrors); 
    return; 
  } 
  var ToAdd = "[megavideo]"+enterURL+"[/megavideo]"; 
  PostWrite(ToAdd); 
}

Open:

templates/default/bbcb_mg.tpl

Find:

					<a href="javascript:BBCyoutube()"><img src="{BBCB_MG_IMG_PATH}youtube{BBCB_MG_IMG_EXT}" name="youtube" onmouseover="helpline('youtube')" alt="{L_BBCB_MG_YOUTUBE}" title="{L_BBCB_MG_YOUTUBE}" class="bbimages" /></a>

After Add:

					<a href="javascript:BBCmegavideo()"><img src="{BBCB_MG_IMG_PATH}megavideo{BBCB_MG_IMG_EXT}" name="megavideo" onmouseover="helpline('megavideo')" alt="{L_BBCB_MG_MEGAVIDEO}" title="{L_BBCB_MG_MEGAVIDEO}" class="bbimages" /></a>

Open: language/lang_english/lang_bbcb_mg.php

Find:

	'bbcb_mg_youtube' => 'YouTube',

After Add:

	'bbcb_mg_megavideo' => 'MegaVideo',

Find:

$js_lang['s_youtube_insert'] = 'Please write YouTube file ID';

After Add:

$js_lang['s_megavideo_insert'] = 'Please write Megavideo file ID';

Find:

$js_lang['s_youtube_help'] = 'Insert YouTube video file: [youtube]YouTube ID[/youtube]';

After Add:

$js_lang['s_megavideo_help'] = 'Insert MegaVideo video file: [megavideo]MegaVideo ID[/megavideo]';[/code][/spoiler]


[b]MegaVideo: (Option 2.)[/b] [megavideo]Tags[/megavideo]
[spoiler][code linenumbers=false]					$html = '<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="432" height="351"><param name="movie"  value="http://wwwstatic.megavideo.com/ep_gr.swf?&amp;v=' . $content . '&image=" /><param name="play" value="false" />
<param name="loop" value="false" /><param name="quality" value="high" />
<param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" />
<embed src="http://wwwstatic.megavideo.com/ep_gr.swf?&amp;v=' . $content . '&image=" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"  width="432" height="351" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object>';[/code][/spoiler]


[b]TwitVideo:[/b] [twitvideo]Tags[/twitvideo]
[spoiler][code linenumbers=false]					$html = '<object width="425" height="344"><param name="movie" value="http://www.twitvid.com/player/' . $content . '"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.twitvid.com/player/' . $content . '" quality="high" allowscriptaccess="always" allowNetworking="all" allowfullscreen="true" wmode="transparent" height="344" width="425"></object>';[/code][/spoiler]


[b]Atom:[/b] [atom]Tags[/atom]
[spoiler][code linenumbers=false]					$html = '<embed src="http://media.mtvnservices.com/mgid:hcx:content:atom.com:' . $content . '" type="application/x-shockwave-flash" wmode="window" width="425" height="354" allowFullscreen="true" flashvars="autoPlay=false"></embed>';[/code][/spoiler]


[b]Xfire Video:[/b] [xfirevideo]Tags[/xfirevideo]
[spoiler][code linenumbers=false]					$html = '<embed id="VideoPlayback"src="http://media.xfire.com/swf/vplayer.swf?videoid=' . $content . '" style="width: 425px; height: 350px;" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash"></embed>';[/code][/spoiler]

[b]Added by rixard:[/b] [url=http://icyphoenix.com/viewtopic.php?p=44074#p44074][b]BLIP.TV & VIMEO[/b]


[b]More Video Codes.[/b] http://www.phpbb3bbcodes.com/viewforum.php?f=26&start=25

[b]Note:[/b] To convert pbpBB3 Video Codes to Icy Phoenix, [b][i][u]REPLACE[/u][/i][/b] [b]{TEXT}[/b] with [b]' . $content . '[/b]


