|
Page 1 of 1
|
Inactive User
|
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. ;) |
#1 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.
|
|
Danielc
Joined: August 2006
Posts: 248
Location:
|
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!!
|
#2 Sun 06 Sep, 2009 14:52 |
|
novice programmer
Joined: June 2007
Posts: 1030
Location:
|
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)
|
#3 Sun 06 Sep, 2009 15:37 |
|
rixard
Joined: September 2008
Posts: 9
|
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 />';
}
|
#4 Mon 07 Sep, 2009 06:47 |
|
Inactive User
|
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.
|
#5 Mon 07 Sep, 2009 13:55 |
|
Chaotic
Joined: January 2008
Posts: 1369
Location: Georgia
|
Re: CUSTOMIZATION - How To Add Video BBCode And Buttons To The Editor
Great tutorial and very detailed.
As always, good work.
____________ | Icy Phoenix ColorizeIt! |
Bipolar Disorder - Not good for you and definitely not good for everyone else.
|
#6 Mon 07 Sep, 2009 17:46 |
|
Inactive User
|
Re: CUSTOMIZATION - How To Add Video BBCode And Buttons To The Editor
Aw shucks!
|
#7 Tue 08 Sep, 2009 01:11 |
|
DWho
Joined: August 2006
Posts: 1307
Location: hampshire
|
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
____________ Mods and themes for Icy Phoenix 1.3
IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
|
#8 Wed 09 Sep, 2009 22:23 |
|
Inactive User
|
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.
|
#9 Wed 09 Sep, 2009 23:35 |
|
spydie
Joined: December 2008
Posts: 1796
Location: In the Boxes
|
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.
____________ Out of Order
|
#10 Thu 10 Sep, 2009 00:22 |
|
Inactive User
|
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
|
#11 Thu 10 Sep, 2009 00:32 |
|
spydie
Joined: December 2008
Posts: 1796
Location: In the Boxes
|
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
____________ Out of Order
|
#12 Thu 10 Sep, 2009 11:40 |
|
Inactive User
|
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.
|
#13 Thu 10 Sep, 2009 13:34 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
Similar Topics
Similar Topics
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|