To create a new BBCode for adding video links, you will need to
create and
REPLACE the
$html = 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
(MegaVideo, megavideo, MEGAVIDEO) 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.
MegaVideo: Instructions with ($html Option 1.)
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="h**p://***.megavideo.com/v/' . $content . '.800360084.3" /><embed src="h**p://***.megavideo.com/v/' . $content . '.800360084.3" type="application/x-shockwave-flash" width="640" height="480"></embed></object><br /><a href="h**p://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]';
MegaVideo: (Option 2.) [megavideo]Tags[/megavideo]
$html = '<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="h**p://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="432" height="351"><param name="movie" value="h**p://wwwstatic.megavideo.com/ep_gr.swf?&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="h**p://wwwstatic.megavideo.com/ep_gr.swf?&v=' . $content . '&image=" type="application/x-shockwave-flash" pluginspage="h**p://***.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>';
TwitVideo: [twitvideo]Tags[/twitvideo]
$html = '<object width="425" height="344"><param name="movie" value="h**p://***.twitvid.com/player/' . $content . '"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="h**p://***.twitvid.com/player/' . $content . '" quality="high" allowscriptaccess="always" allowNetworking="all" allowfullscreen="true" wmode="transparent" height="344" width="425"></object>';
Atom: [atom]Tags[/atom]
$html = '<embed src="h**p://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>';
Xfire Video: [xfirevideo]Tags[/xfirevideo]
$html = '<embed id="VideoPlayback"src="h**p://media.xfire.com/swf/vplayer.swf?videoid=' . $content . '" style="width: 425px; height: 350px;" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash"></embed>';
Added by rixard: BLIP.TV & VIMEO
More Video Codes. h**p://***.phpbb3bbcodes.com/viewforum.php?f=26&start=25
Note: To convert pbpBB3 Video Codes to Icy Phoenix,
REPLACE {TEXT} with
' . $content . '