BB-код для вставки музыки (MP3)

Angry Bird

Пользователь
#1
Описание: Этот мод добавляет BB-код для вставки музыки в формате MP3.
Автор: Angry Bird
Сложность: легко

Установка:

1. Открыть файл /includes/bbcode.php

Найти:

PHP:
'#\[pre\](.*?)\[/pre\]#isu'                              => '<pre class="post-pre">$1</pre>',
Вставить после:

PHP:
'#\[mp3\](.*?)\[/mp3\]#isu'                                => '<object type="application/x-shockwave-flash" data="http://'.$_SERVER['HTTP_HOST'].'/player.swf" height="70" width="470"><param name="wmode" value="transparent" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="movie" value="http://'.$_SERVER['HTTP_HOST'].'/player.swf" /><param name="FlashVars" value="way=$1&amp;swf=http://'.$_SERVER['HTTP_HOST'].'/player.swf&amp;w=470&amp;h=70&amp;time_seconds=164&amp;autoplay=0&amp;q=&amp;skin=white&amp;volume=70&amp;comment=" /></object>',
2. Открыть файл /templates/default/posting_editor.tpl

Найти:

HTML:
<input type="button" value="{L_CODE}" name="codeCode" title="{L_CODE_TITLE}" style="width: 43px;" />
Вставить после:
HTML:
<input type="button" value="MP3" name="codeMp3" title="Вставить музыку в формате MP3 (Ctrl+M)" style="width: 43px;" />
Найти:

Код:
bbcode.addTag("codeUrl", "url", "/url", "W", ctrl);
Вставить после:

Код:
bbcode.addTag("codeMp3", "mp3", "/mp3", "M", ctrl);
3. Закачать в корень сайта файл player.swf (Архив с файлом во вложениях)

Проверка:

Нужен любой MP3 файл.

Вставляем в тему/комментарий:

Код:
[mp3]Ссылка на MP3[/mp3]
Также вы можете нажать кнопку "MP3" или нажать сочетание клавиш Ctrl+M.

Скриншот:

 

Вложения

dimka3210

Пользователь
#7
Angry Bird, если есть такое рвение к bb-кодам, то попробуй сделать тег video который будет поддерживать много хостингов, для начала rutube, youtube, vimeo ну и ещё чё нить. определять что именно за ссылка внутри, куда ведёт, как её распарсить. Вот это будет реально полезно. Если возникнут проблемы с кодом, пиши, поможет. Вот это реально полезная работа будет.
 

Wertos

Заблокирован
#8
dimka3210, да я даже решение уже выложил готовое...
PHP:
function getMediaThumb($id, $type = '')
{
  switch ($type) {
    case 'vimeo':
      $xml = simplexml_load_file('http://vimeo.com/api/v2/video/'.$id.'.xml');
      return (string) $xml->video->thumbnail_small;
    break;
    case 'rutube':
      $xml = simplexml_load_file(rawurlencode('http://rutube.ru/api/video/'.$id.'/?format=xml'));
      return (string) $xml->thumbnail_url;
    break;
    case 'xyu':
      $arg1 = mb_substr($id, 0, 2);
      $arg2 = mb_substr($id, 2, 2);
      $img_src = "http://cdn-i2.xyu.tv/{$arg1}/{$arg2}/{$id}/160x120/0000000001.jpg";
      return (string) $img_src;
    break;
    case 'red':
      $xml = simplexml_load_file('http://api.redtube.com/?data=redtube.Videos.getVideoById&video_id='.$id.'&output=xml&thumbsize=small','SimpleXMLElement', LIBXML_NOCDATA);
      $img_ary = array();
      foreach ($xml->thumbs as $item) {
        $img_ary[] = object2array($item[0]);
      }
      return (string) $img_ary[0]['thumb'][0];
    break;
    case 'xhamster':
      return 'images/xhm_no_th.jpg';
    break;
    default:
      return 'images/no_th.jpg';
  }
}
function parseMedia($text)
{
  $img_src = 'images/no_th.jpg';
  $rand = make_rand_str(10);
// Start parse and replase YouTube
  $patterns = '~
        https?://        # Required scheme. Either http or https.
        (?:[0-9A-Z-]+\.)? # Optional subdomain.
        (?:              # Group host alternatives.
          youtu\.be/      # Either youtu.be,
        | youtube\.com    # or youtube.com followed by
          \S*            # Allow anything up to VIDEO_ID,
          [^\w\-\s]      # but char before ID is non-ID char.
        )                # End host alternatives.
        ([\w\-]{11})      # $1: VIDEO_ID is exactly 11 chars.
        (?=[^\w\-]|$)    # Assert next char is non-ID or EOS.
        (?!              # Assert URL is not pre-linked.
          [?=&+%\w]*      # Allow URL (query) remainder.
          (?:            # Group pre-linked alternatives.
            [\'"][^<>]*>  # Either inside a start tag,
          | </a>          # or inside <a> element text contents.
          )              # End recognized pre-linked alts.
        )                # End negative lookahead assertion.
        [?=&+%\w-]?(.*?)? # Consume any URL (query) remainder.
        ~ix';
  $replacements = '<img id="ytimg_\\1_'.$rand.'" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="http://img.youtube.com/vi/\\1/3.jpg" /><div style="display: none;" id="ytdiv_\\1_'.$rand.'"><object width="640" height="360"><param name="movie" value="http://www.youtube.com/v/\\1"></param><embed src="http://www.youtube.com/v/\\1" type="application/x-shockwave-flash" width="640" height="360"></embed></object><br /><a href="#" class="small bold" onclick="$(\'#ytdiv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#ytimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase YouTube
 
// Start parse and replase vimeo
  $patterns_vimeo = '~https?:\/\/(?:[\w]+\.)*vimeo\.com(?:[\/\w]*\/videos?)?\/([0-9]+)[^\s]*~ix';
  if(preg_match($patterns_vimeo, $text, $out)) $img_src = getMediaThumb($out[1], 'vimeo');
  $patterns = '~https?:\/\/(?:[\w]+\.)*vimeo\.com(?:[\/\w]*\/videos?)?\/([0-9]+)[^\s]*~ix';
  $replacements = '<img id="viimg_\\1_'.$rand.'" width="120px" height="90px" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="'.$img_src.'" /><div style="display: none;" id="vidiv_\\1_'.$rand.'"><iframe src="http://player.vimeo.com/video/\\1?byline=0&amp;portrait=0&amp;badge=0" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe><br /><a href="#" class="small bold" onclick="$(\'#vidiv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#viimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase vimeo 
 
// Start parse and replase rutube
  $patterns_rutube = '~https?:\/\/(?:[\w]+\.)*rutube\.ru/video/([A-Za-z0-9-_]{5,40})/~ix';
  if(preg_match($patterns_rutube, $text, $out)) $img_src = getMediaThumb($out[1], 'rutube');
  $patterns = '~https?:\/\/(?:[\w]+\.)*rutube\.ru/video/([A-Za-z0-9-_]{5,40})/~ix';
  $replacements = '<img id="ruimg_\\1_'.$rand.'" width="120px" height="90px" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="'.$img_src.'" /><div style="display: none;" id="rudiv_\\1_'.$rand.'"><iframe width="640" height="360" src="http://rutube.ru/video/embed/\\1" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen scrolling="no"></iframe><br /><a href="#" class="small bold" onclick="$(\'#rudiv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#ruimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase rutube
 
// Start parse and replase xyu.tv
  $patterns_xuy = '~https?:\/\/(?:[\w]+\.)*xyu\.tv/video/([0-9]{1,10})(.*)~ix';
  if(preg_match_all($patterns_xuy, $text, $out, PREG_SET_ORDER)) $img_src = getMediaThumb($out[0][1], 'xyu');
  $patterns = '~https?:\/\/(?:[\w]+\.)*xyu\.tv/video/([0-9]{1,10})(.*)~ix';
  $replacements = '<img id="xyimg_\\1_'.$rand.'" width="120px" height="90px" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="'.$img_src.'" /><div style="display: none; id="xydiv_\\1_'.$rand.'""><iframe width="640" height="360" src="http://xuy.tv/embed/?id=\\1&autoplay=0&color=white&related=0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen scrolling="no"></iframe><br /><a href="#" class="small bold" onclick="$(\'#xydiv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#xyimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase xyu.tv
 
// Start parse and replase redtube.com
  $patterns_red = '~https?:\/\/(?:[\w]+\.)*redtube\.com/([0-9]{1,7})(.*)~ix';
  if(preg_match_all($patterns_red, $text, $out, PREG_SET_ORDER)) $img_src = getMediaThumb($out[0][1], 'red');
  $patterns = '~https?:\/\/(?:[\w]+\.)*redtube\.com/([0-9]{1,7})(.*)~ix';
  $replacements = '<img id="reimg_\\1_'.$rand.'" width="120px" height="90px" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="'.$img_src.'" /><div style="display: none;" id="rediv_\\1_'.$rand.'"><object height="360" width="640"><param name="allowfullscreen" value="true"><param name="AllowScriptAccess" value="always"><param name="movie" value="http://embed.redtube.com/player/"><param name="FlashVars" value="id=\\1&style=redtube&autostart=false"><embed src="http://embed.redtube.com/player/?id=\\1&style=redtube" allowfullscreen="true" AllowScriptAccess="always" flashvars="autostart=false" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" height="360" width="640" /></object><br /><a href="#" class="small bold" onclick="$(\'#rediv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#reimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase redtube.com
 
// Start parse and replase xhamster.com
  $patterns_xhm = '~https?:\/\/(?:[\w]+\.)*xhamster\.com/movies/([0-9]{1,10})/?(.*?)~ix';
  if(preg_match_all($patterns_xhm, $text, $out, PREG_SET_ORDER)) $img_src = getMediaThumb($out[0][1], 'xhamster');
  $patterns = '~https?:\/\/(?:[\w]+\.)*xhamster\.com/movies/([0-9]{1,10})/?(.*)~ix';
  $replacements = '<img id="xhimg_\\1_'.$rand.'" width="120px" height="90px" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="'.$img_src.'" /><div style="display: none;" id="xhdiv_\\1_'.$rand.'"><iframe width="640" height="360" src="http://xhamster.com/xembed.php?video=\\1" frameborder="0" scrolling="no"></iframe><br /><a href="#" class="small bold" onclick="$(\'#xhdiv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#xhimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase xhamster.com
 
  return $text;
}
 

Angry Bird

Пользователь
#9
dimka3210, да я даже решение уже выложил готовое...
PHP:
function getMediaThumb($id, $type = '')
{
  switch ($type) {
    case 'vimeo':
      $xml = simplexml_load_file('http://vimeo.com/api/v2/video/'.$id.'.xml');
      return (string) $xml->video->thumbnail_small;
    break;
    case 'rutube':
      $xml = simplexml_load_file(rawurlencode('http://rutube.ru/api/video/'.$id.'/?format=xml'));
      return (string) $xml->thumbnail_url;
    break;
    case 'xyu':
      $arg1 = mb_substr($id, 0, 2);
      $arg2 = mb_substr($id, 2, 2);
      $img_src = "http://cdn-i2.xyu.tv/{$arg1}/{$arg2}/{$id}/160x120/0000000001.jpg";
      return (string) $img_src;
    break;
    case 'red':
      $xml = simplexml_load_file('http://api.redtube.com/?data=redtube.Videos.getVideoById&video_id='.$id.'&output=xml&thumbsize=small','SimpleXMLElement', LIBXML_NOCDATA);
      $img_ary = array();
      foreach ($xml->thumbs as $item) {
        $img_ary[] = object2array($item[0]);
      }
      return (string) $img_ary[0]['thumb'][0];
    break;
    case 'xhamster':
      return 'images/xhm_no_th.jpg';
    break;
    default:
      return 'images/no_th.jpg';
  }
}
function parseMedia($text)
{
  $img_src = 'images/no_th.jpg';
  $rand = make_rand_str(10);
// Start parse and replase YouTube
  $patterns = '~
        https?://        # Required scheme. Either http or https.
        (?:[0-9A-Z-]+\.)? # Optional subdomain.
        (?:              # Group host alternatives.
          youtu\.be/      # Either youtu.be,
        | youtube\.com    # or youtube.com followed by
          \S*            # Allow anything up to VIDEO_ID,
          [^\w\-\s]      # but char before ID is non-ID char.
        )                # End host alternatives.
        ([\w\-]{11})      # $1: VIDEO_ID is exactly 11 chars.
        (?=[^\w\-]|$)    # Assert next char is non-ID or EOS.
        (?!              # Assert URL is not pre-linked.
          [?=&+%\w]*      # Allow URL (query) remainder.
          (?:            # Group pre-linked alternatives.
            [\'"][^<>]*>  # Either inside a start tag,
          | </a>          # or inside <a> element text contents.
          )              # End recognized pre-linked alts.
        )                # End negative lookahead assertion.
        [?=&+%\w-]?(.*?)? # Consume any URL (query) remainder.
        ~ix';
  $replacements = '<img id="ytimg_\\1_'.$rand.'" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="http://img.youtube.com/vi/\\1/3.jpg" /><div style="display: none;" id="ytdiv_\\1_'.$rand.'"><object width="640" height="360"><param name="movie" value="http://www.youtube.com/v/\\1"></param><embed src="http://www.youtube.com/v/\\1" type="application/x-shockwave-flash" width="640" height="360"></embed></object><br /><a href="#" class="small bold" onclick="$(\'#ytdiv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#ytimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase YouTube
 
// Start parse and replase vimeo
  $patterns_vimeo = '~https?:\/\/(?:[\w]+\.)*vimeo\.com(?:[\/\w]*\/videos?)?\/([0-9]+)[^\s]*~ix';
  if(preg_match($patterns_vimeo, $text, $out)) $img_src = getMediaThumb($out[1], 'vimeo');
  $patterns = '~https?:\/\/(?:[\w]+\.)*vimeo\.com(?:[\/\w]*\/videos?)?\/([0-9]+)[^\s]*~ix';
  $replacements = '<img id="viimg_\\1_'.$rand.'" width="120px" height="90px" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="'.$img_src.'" /><div style="display: none;" id="vidiv_\\1_'.$rand.'"><iframe src="http://player.vimeo.com/video/\\1?byline=0&amp;portrait=0&amp;badge=0" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe><br /><a href="#" class="small bold" onclick="$(\'#vidiv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#viimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase vimeo
 
// Start parse and replase rutube
  $patterns_rutube = '~https?:\/\/(?:[\w]+\.)*rutube\.ru/video/([A-Za-z0-9-_]{5,40})/~ix';
  if(preg_match($patterns_rutube, $text, $out)) $img_src = getMediaThumb($out[1], 'rutube');
  $patterns = '~https?:\/\/(?:[\w]+\.)*rutube\.ru/video/([A-Za-z0-9-_]{5,40})/~ix';
  $replacements = '<img id="ruimg_\\1_'.$rand.'" width="120px" height="90px" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="'.$img_src.'" /><div style="display: none;" id="rudiv_\\1_'.$rand.'"><iframe width="640" height="360" src="http://rutube.ru/video/embed/\\1" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen scrolling="no"></iframe><br /><a href="#" class="small bold" onclick="$(\'#rudiv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#ruimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase rutube
 
// Start parse and replase xyu.tv
  $patterns_xuy = '~https?:\/\/(?:[\w]+\.)*xyu\.tv/video/([0-9]{1,10})(.*)~ix';
  if(preg_match_all($patterns_xuy, $text, $out, PREG_SET_ORDER)) $img_src = getMediaThumb($out[0][1], 'xyu');
  $patterns = '~https?:\/\/(?:[\w]+\.)*xyu\.tv/video/([0-9]{1,10})(.*)~ix';
  $replacements = '<img id="xyimg_\\1_'.$rand.'" width="120px" height="90px" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="'.$img_src.'" /><div style="display: none; id="xydiv_\\1_'.$rand.'""><iframe width="640" height="360" src="http://xuy.tv/embed/?id=\\1&autoplay=0&color=white&related=0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen scrolling="no"></iframe><br /><a href="#" class="small bold" onclick="$(\'#xydiv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#xyimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase xyu.tv
 
// Start parse and replase redtube.com
  $patterns_red = '~https?:\/\/(?:[\w]+\.)*redtube\.com/([0-9]{1,7})(.*)~ix';
  if(preg_match_all($patterns_red, $text, $out, PREG_SET_ORDER)) $img_src = getMediaThumb($out[0][1], 'red');
  $patterns = '~https?:\/\/(?:[\w]+\.)*redtube\.com/([0-9]{1,7})(.*)~ix';
  $replacements = '<img id="reimg_\\1_'.$rand.'" width="120px" height="90px" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="'.$img_src.'" /><div style="display: none;" id="rediv_\\1_'.$rand.'"><object height="360" width="640"><param name="allowfullscreen" value="true"><param name="AllowScriptAccess" value="always"><param name="movie" value="http://embed.redtube.com/player/"><param name="FlashVars" value="id=\\1&style=redtube&autostart=false"><embed src="http://embed.redtube.com/player/?id=\\1&style=redtube" allowfullscreen="true" AllowScriptAccess="always" flashvars="autostart=false" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" height="360" width="640" /></object><br /><a href="#" class="small bold" onclick="$(\'#rediv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#reimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase redtube.com
 
// Start parse and replase xhamster.com
  $patterns_xhm = '~https?:\/\/(?:[\w]+\.)*xhamster\.com/movies/([0-9]{1,10})/?(.*?)~ix';
  if(preg_match_all($patterns_xhm, $text, $out, PREG_SET_ORDER)) $img_src = getMediaThumb($out[0][1], 'xhamster');
  $patterns = '~https?:\/\/(?:[\w]+\.)*xhamster\.com/movies/([0-9]{1,10})/?(.*)~ix';
  $replacements = '<img id="xhimg_\\1_'.$rand.'" width="120px" height="90px" onclick="$(this).hide(); $(this).next(\'div\').css({\'display\' : \'block\'});" style="background:transparent;border:6px solid #ABABAB;border-radius:3px;padding:1px;margin:3px 3px 3px 0;" class="clickable" src="'.$img_src.'" /><div style="display: none;" id="xhdiv_\\1_'.$rand.'"><iframe width="640" height="360" src="http://xhamster.com/xembed.php?video=\\1" frameborder="0" scrolling="no"></iframe><br /><a href="#" class="small bold" onclick="$(\'#xhdiv_\\1_'.$rand.'\').css({\'display\' : \'none\'}); $(\'#xhimg_\\1_'.$rand.'\').show();">╤ъЁ√Є№</a></div>';
  $text = preg_replace($patterns, $replacements, $text);
// End parse and replase xhamster.com
 
  return $text;
}
Примерно так? (Для /includes/bbcode.php)

PHP:
'#\[video\](.*?)\[/video\]#isu'                                => getMediaThumb('$1'),
 

Angry Bird

Пользователь
#10
А интегрируется в редактор это очень просто:

Код:
/templates/default/posting_editor.tpl
 
Найти:
<input type="button" value="{L_CODE}" name="codeCode" title="{L_CODE_TITLE}" style="width: 43px;" />
Вставить после:
<input type="button" value="Видео" name="codeCode" title="Вставить видео (Ctrl+Y)" style="width: 68px;" />
 
Найти:
bbcode.addTag("codeUrl", "url", "/url", "W", ctrl);
Вставить после:
bbcode.addTag("codeVideo", "video", "/video", "Y", ctrl);
 
Сверху