[MOD] Видео таг (Video BBCode) в phpbb2

#Автор: NTT Team (www.nguontrithuc.com)
#Email на автора: bambi29_5@yahoo.com
#Версия: phpBB2.0.5 или phpBB2.0.6 (работи на последната версия - тествано е)
#Превод: koko92_national (kosio_hr@kh-computers.com)
#Мод: Видео таг
#Описание: Добавя Видео таг за вашия windows media player plugin, wma, wmv, DAT... се поддържат.
#Ниво на инсталация: много лесно
#Време на инсталация: 2 минути, но то си зависи от вас.
#Файлове за промяна: bbcode.tpl, bbcode.php, posting.php, lang_main.php, posting_body.tpl


#
#-----[ Отвори ]------------------------------------------
#
includes/bbcode.php
#
#-----[ Намери ]------------------------------------------
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#----[ След това добави ]-----------------------------------------
#
//www.nguontrithuc.com
$bbcode_tpl['video'] = str_replace('{URL}', '\\1', $bbcode_tpl['video']);
#
#-----[ Намери ]------------------------------------------
#
// [email]user@domain.tld[/email] code..
$patterns[5] = "#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[5] = $bbcode_tpl['email'];
#
#----[ След това добави ]-----------------------------------------
#
#
//[ video ]and[ /video ]for videoing audio.
$patterns[6] = "#\[video:$uid\](.*?)\[/video:$uid\]#si";
$replacements[6] = $bbcode_tpl['video'];
#
#-----[ Намери ]------------------------------------------
#
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\](http(s)?://)([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\[/img\]#si", "[img:$uid]\\1\\3[/img:$uid]", $text);
#
#----[ След това добави ]-----------------------------------------
#
//[ video]image_url_here[/video ]code..
$text = preg_replace("#\[video\](([a-z]+?)://([^, \n\r]+))\[/video\]#si", "[video:$uid]\\1[/video:$uid]", $text);
#
#-----[ Отвори ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ Намери ]------------------------------------------
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->

#
#----[ След това добави ]-----------------------------------------
#
<!-- BEGIN video --><object id="wmp" width=300 height=300 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0"
standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="FileName" value="{URL}">
<param name="ShowControls" value="1">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="1">
<param name="AutoSize" value="1">
<param name="autoplay" value="0">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp"
src="{URL}" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 autoplay=0 visible=1 animationatstart=0 transparentatstart=1 loop=0 height=300 width=300>
</embed>
</object><!-- END video -->


#
#-----[ Отвори ]------------------------------------------
#
posting.php
#
#-----[ Намери ]------------------------------------------
#
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
#
#-----[ След това добави ]------------------------------------------
#
'L_BBCODE_Z_HELP' => $lang['bbcode_z_help'],
#
#-----[ Отвори ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ Намери ]------------------------------------------
#
$lang['bbcode_f_help'] = "Font size: [size=x-small]small text[/size]";
#
#-----[ След това добави ]------------------------------------------
#
$lang['bbcode_z_help'] = "Video online: [video]http://link_of_video[/video]";
#
#-----[ Отвори ]------------------------------------------
#
templates/xxx/posting_body.tpl
#
#-----[ Намери ]------------------------------------------
#
f_help = "{L_BBCODE_F_HELP}";
#
#-----[ След това добави ]------------------------------------------
#
z_help = "{L_BBCODE_Z_HELP}";

#
#-----[ Намери ]------------------------------------------
#
bbtags = new Array('','','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','
','
','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');
#
#-----[ Замести с ]------------------------------------------
#
bbtags = new Array('','','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','
','
','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[video]','[/video]');

#
#-----[ Намери ]------------------------------------------
#
<td><span class="genmed"><input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" /></span></td>
#
#-----[ След това добави ]------------------------------------------
#
<td><span class="genmed"><input type="button" class="button" accesskey="z" name="addbbcode18" value="Video" style="width: 50px" onClick="bbstyle(18)" onMouseOver="helpline('z')" /></span></td>


Урока е преведен от мен и забранявам неговото преписване!


/ Трябва да сте регистриран за да напишете коментар /