CUSTOMIZATION - Adding Video BBCode And Buttons To The Editor.
Article |
CUSTOMIZATION - Adding Video BBCode And Buttons To The Editor.
|
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 . '
Edited by novice programmer, Sun 06 Sep, 2009 15:41: Changed the post title to make it fit on the Docs section Edited by Guest, Tue 08 Sep, 2009 01:23: Changed the title a little bit. ;) |
Inactive User [ Sun 06 Sep, 2009 01:33 ]
|
|
Sponsors
|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
CUSTOMIZATION - Adding Video BBCode And Buttons To The Editor.
Comments |
Re: [DOC - IP V1.3*] Add Video BBCode And Buttons To The Editor. (Walkthrough)
|
Thanks for this post!!!! I knew about adding the bbcode parsing, but not how to add the button and the javascript..
Thanks!!
|
Danielc [ Sun 06 Sep, 2009 14:52 ]
|
|
Re: [DOC - IP V1.3*] Add Video BBCode And Buttons To The Editor. (Walkthrough)
|
Great one!
I will move it to the docs section and add the tag on the title
For the historical records, the original title was:
[DOC - IP V1.3*] Add Video BBCode And Buttons To The Editor. (Walkthrough)
|
novice programmer [ Sun 06 Sep, 2009 15:37 ]
|
|
Re: CUSTOMIZATION - Add Video BBCode And Buttons To The Editor. (Walkthrough)
|
Thanks!,
Can I add the Blip.tv and Vimeo html codes at this post?
BLIP.TV
elseif ($tag === 'blip')
{
$width = in_array($width, $width_array) ? $width : '425';
$height = in_array($height, $height_array) ? $height : '350';
$html = '<object width="' . $width . '" height="' . $height . '"><param name="movie" value="http://blip.tv/play/' . $content . '"></param><embed style="width:' . $width . 'px; height:' . $height . 'px;" type="application/x-shockwave-flash" src="http://blip.tv/play/' . $content . '"quality="best" bgcolor="#f8f8f8" allowscriptaccess="always" allowfullscreen="true" ></embed></object><br /><a href="http://blip.tv/play/' . $content . '" target="_blank">Link</a><br />';
}
VIMEO
elseif ($tag === 'vimeo')
{
$width = in_array($width, $width_array) ? $width : '425';
$height = in_array($height, $height_array) ? $height : '350';
$html = '<object width="' . $width . '" height="' . $height . '"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=' . $content . '&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=' . $content . '&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="' . $width . '" height="' . $height . '"></embed></object><br /><a href="http://vimeo.com/moogaloop.swf?clip_id=' . $content . '" target="_blank">Link</a><br />';
}
|
rixard [ Mon 07 Sep, 2009 06:47 ]
|
|
Re: CUSTOMIZATION - How To Add Video BBCode And Buttons To The Editor
|
Thanks rixard, of course you can add extra video bbCode here.
I've just added yours (Linked) to the first post, plus added some more codes and a link to about 90 more video codes.
|
Inactive User [ Mon 07 Sep, 2009 13:55 ]
|
|
Re: CUSTOMIZATION - How To Add Video BBCode And Buttons To The Editor
|
Great tutorial and very detailed.
As always, good work.
|
Chaotic [ Mon 07 Sep, 2009 17:46 ]
|
|
Re: CUSTOMIZATION - How To Add Video BBCode And Buttons To The Editor
|
Aw shucks!
|
Inactive User [ Tue 08 Sep, 2009 01:11 ]
|
|
Re: CUSTOMIZATION - How To Add Video BBCode And Buttons To The Editor
|
Aw shucks!
LOL... thanks for the guide...
looking at bbcode mods so this will come in handy
|
DWho [ Wed 09 Sep, 2009 22:23 ]
|
|
Re: CUSTOMIZATION - Adding Video BBCode And Buttons To The Editor.
|
Yeah! Mike, phpbb3bbcodes.com has certainly got some interesting bbCodes on offer, and I particularly am going to have a look at the one that forms columns.
Looks like we will need a BBCODE tag in the docs section if I start running amok.
|
Inactive User [ Wed 09 Sep, 2009 23:35 ]
|
|
Re: CUSTOMIZATION - Adding Video BBCode And Buttons To The Editor.
|
We hope you start a BBcode DOC.
because some off us are really in need of them.
|
spydie [ Thu 10 Sep, 2009 00:22 ]
|
|
Re: CUSTOMIZATION - Adding Video BBCode And Buttons To The Editor.
|
Off Topic spydie: [View Post] We hope you start a BBcode DOC.
because some off us are really in need of them.
Something like this maybe?
h**p://***.icyphoenix.com/viewtopic.php?f=4&t=1604
|
Inactive User [ Thu 10 Sep, 2009 00:32 ]
|
|
Re: CUSTOMIZATION - Adding Video BBCode And Buttons To The Editor.
|
yep. something alike.
but with codeĀ“s that actualy work with icy 1.3
and some new ones
|
spydie [ Thu 10 Sep, 2009 11:40 ]
|
|
Re: CUSTOMIZATION - Adding Video BBCode And Buttons To The Editor.
|
includes/bbcode.php lists all of the available internal BBcodes for IP mostly in CAPS "// SIZE and // ALIGN" etc. Why don't you or someone else check them out against the Glossary and see if there are any of them missing?
Any new ones that are added for IP belong in the DOCS section, and I may suggest to MG that we could / may need a BBCODE prefix for those additions. Meanwhile there aren't enough docs to warrant it.
So there's nothing stopping anyone else from writing some; and if language is the problem - - - - - - - - - I'll spell-check them etc, for anyone who asks me to, before they release them.
|
Inactive User [ Thu 10 Sep, 2009 13:34 ]
|
|
|
Was this topic useful?
Was this topic useful?
|
Page 1 of 1
|
|
|