Перейти к контенту

UBBC Mod


Рекомендуемые сообщения

Я поставил УББК мод. Круто ;) А можно ли сделать чтобы все эти коды работали ещё и подписи? Чтобы при редактировании своей подписи тоже можно было пользоваться дополнительными кодами?

 

Добавлено:

На всякий случай вот его код без формы быстрого ответа с кликабельными смайлами и IBF кодами (стандартными):

 

Откройте Skin/s1/skin_post.php и найдите:

Примечание: (Этот код встречается в этом файле дважды. Заменить в обоих местах.)

 

<script language='Javascript' src='html/ibfcode.js'></script>
         <td class='row1' width="100%" valign="top">
	 <table cellpadding='2' cellspacing='2' width='100%' align='center'>
                 <tr>
                	 <td nowrap width='10%'>
        <input type='button' accesskey='b' value=' B '       onClick='simpletag("B")' class='codebuttons' name='B' style="font-weight:bold" onMouseOver="hstat('bold')">
        <input type='button' accesskey='i' value=' I '       onClick='simpletag("I")' class='codebuttons' name='I' style="font-style:italic" onMouseOver="hstat('italic')">
        <input type='button' accesskey='u' value=' U '       onClick='simpletag("U")' class='codebuttons' name='U' style="text-decoration:underline" onMouseOver="hstat('under')">
        
        <select name='ffont' class='codebuttons' onchange="alterfont(this.options[this.selectedIndex].value, 'FONT')"  onMouseOver="hstat('font')">
        <option value='0'>{$ibforums->lang['ct_font']}</option>
        <option value='Arial' style='font-family:Arial'>{$ibforums->lang['ct_arial']}</option>
        <option value='Times' style='font-family:Times'>{$ibforums->lang['ct_times']}</option>
        <option value='Courier' style='font-family:Courier'>{$ibforums->lang['ct_courier']}</option>
        <option value='Impact' style='font-family:Impact'>{$ibforums->lang['ct_impact']}</option>
        <option value='Geneva' style='font-family:Geneva'>{$ibforums->lang['ct_geneva']}</option>
        <option value='Times' style='font-family:Verdana'>{$ibforums->lang['ct_verdana']}</option>
        <option value='Optima' style='font-family:Optima'>Optima</option>
        </select><select name='fsize' class='codebuttons' onchange="alterfont(this.options[this.selectedIndex].value, 'SIZE')" onMouseOver="hstat('size')">
        <option value='0'>{$ibforums->lang['ct_size']}</option>
        <option value='1'>{$ibforums->lang['ct_sml']}</option>
        <option value='7'>{$ibforums->lang['ct_lrg']}</option>
        <option value='14'>{$ibforums->lang['ct_lest']}</option>
        </select><select name='fcolor' class='codebuttons' onchange="alterfont(this.options[this.selectedIndex].value, 'COLOR')" onMouseOver="hstat('color')">
        <option value='0'>{$ibforums->lang['ct_color']}</option>
        <option value='blue' style='color:blue'>{$ibforums->lang['ct_blue']}</option>
        <option value='red' style='color:red'>{$ibforums->lang['ct_red']}</option>
        <option value='purple' style='color:purple'>{$ibforums->lang['ct_purple']}</option>
        <option value='orange' style='color:orange'>{$ibforums->lang['ct_orange']}</option>
        <option value='yellow' style='color:yellow'>{$ibforums->lang['ct_yellow']}</option>
        <option value='gray' style='color:gray'>{$ibforums->lang['ct_grey']}</option>
        <option value='green' style='color:green'>{$ibforums->lang['ct_green']}</option>
        </select>
          <a href='javascript:closeall();' onMouseOver="hstat('close')">{$ibforums->lang['js_close_all_tags']}</a>
    	 </td>
      </tr>
      <tr>
         <td align='left'>
        <input type='button' accesskey='h' value=' http:// ' onClick='tag_url()'            class='codebuttons' name='url' onMouseOver="hstat('url')">
        <input type='button' accesskey='g' value=' IMG '     onClick='tag_image()'          class='codebuttons' name='img' onMouseOver="hstat('img')">
        <input type='button' accesskey='e' value='  @  '     onClick='tag_email()'          class='codebuttons' name='email' onMouseOver="hstat('email')">
        <input type='button' accesskey='q' value=' QUOTE '   onClick='simpletag("QUOTE")'   class='codebuttons' name='QUOTE' onMouseOver="hstat('quote')">
        <input type='button' accesskey='p' value=' CODE '    onClick='simpletag("CODE")'    class='codebuttons' name='CODE' onMouseOver="hstat('code')">
        <input type='button' accesskey='l' value=' LIST '     onClick='tag_list()'          class='codebuttons' name="LIST" onMouseOver="hstat('list')">
        <!--<input type='button' accesskey='l' value=' SQL '     onClick='simpletag("SQL")'     class='codebuttons' name='SQL'>
        <input type='button' accesskey='t' value=' HTML '    onClick='simpletag("HTML")'    class='codebuttons' name='HTML'>-->
    	 </td>
     </tr>
     <tr>
     <!-- Help Box -->
      <td align='left' valign='middle'>
      {$ibforums->lang['hb_open_tags']}: <input type='text' name='tagcount' size='3' maxlength='3' style='font-size:10px;font-family:verdana,arial;border:0px;font-weight:bold;' readonly class='row1' value="0">
        <input type='text' name='helpbox' size='50' maxlength='120' style='width:80%;font-size:10px;font-family:verdana,arial;border:0px' readonly class='row1' value="{$ibforums->lang['hb_start']}">
      </td>
     </tr>
  	 </table>
         </td>
       </tr>

 

Замените на:

 

<td class='row1'>
<script language="javascript" type="text/javascript" src="html/UBBC/ubbc.js"></script>
<script language="javascript" type="text/javascript"><!--
var flash_w = '200'; var flash_h = '400';
var ubbc_dir = 'html/UBBC';
var emoticon_dir = 'html/emoticons';
var use_graphics = 1; // 1 = Graphical, 0 = Form based (buttons)
makeInterface(1,1,use_graphics);
//--></script>
 </td>

 

Найдите опять же в двух местах:

 

<textarea cols='60' style='width:95%' rows='15' wrap='soft' name='Post' tabindex='3' class='textinput'>$data</textarea>

 

Замените на:

 

<textarea cols="60" rows="12" wrap="soft" name="Post" tabindex="3" style="background-image: url('http://www.bestfilez.net/forums/uploads/quickreplybg.gif'); class="textinput" onClick="storeCaret(this);" onKeyup="storeCaret(this);" onChange="storeCaret(this);" onFocus="storeCaret(this);">$data</textarea>
<script language="javascript"><!--
ubbcInit(1,1,use_graphics);
//--></script>

 

Откройте файл sources/lib/post_parser.php и найдите:

 

$txt = preg_replace( "#\[s\](.+?)\[/s\]#is", "<s>\\1</s>", $txt );

 

Ниже добавьте:

 

$txt = preg_replace( "#\[shadow=(\S+?)\s*\](.*?)\[\/shadow\]#is", "<font style='width=80%; filter:shadow\(color=\\1)'>\\2</font>", $txt );
	 $txt = preg_replace( "#\[glow=(\S+?)\s*\](.*?)\[\/glow\]#is", "<font style='width=80%; filter:glow\(color=\\1)'>\\2</font>", $txt );
	 $txt = preg_replace( "#\[fliph\](.+?)\[\/fliph\]#is", "<font style='width=80%; filter:flipH'>\\1</font>", $txt );
	 $txt = preg_replace( "#\[flipv\](.+?)\[\/flipv\]#is", "<font style='width=80%; filter:flipV'>\\1</font>", $txt );
	 $txt = preg_replace( "#\[move\](.+?)\[\/move\]#is", "<marquee>\\1</marquee>", $txt );
	 $txt = preg_replace( "#\[blur\](.*?)\[\/blur\]#is", "<font style='width=80%; filter:blur'>\\1</font>", $txt );
	 $txt = preg_replace( "#\[align\s*=\s*(\S+?)\s*\](.*?)\[\/align\]#is", "<div align=\"\\1\">\\2</div>", $txt );
	 $txt = preg_replace( "#\[dropshadow=(\S+?)\s*\](.*?)\[\/dropshadow\]#is", "<font style='width=80%; filter:dropshadow(color=\\1)'>\\2</font>", $txt );
	 $txt = preg_replace( "#(\[invert\])(.+?)(\[/invert\])#is", "<font style='width=80%; filter:invert'>\\2</font>", $txt );
	 $txt = preg_replace( "#(\[xray\])(.+?)(\[/xray\])#is", "<font style='width=80%; filter:xray'>\\2</font>", $txt );
	 $txt = preg_replace( "#\[spoiler\](.*)\[/spoiler\]#is", "<\!-- spoilerKillit --><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td bgcolor=\"#000000\" valign=\"middle\" align=\"left\"><font color=\"#000000\" size=\"1\"><b>Скрытый текст (Выделите для чтения)\:</b></font><br></td></tr><tr><td bgcolor=\"#ffffff\" valign=\"middle\" align=\"left\"><font color=\"#ffffff\" size=\"1\"><\!-- spoilerKillitEnd --><\!--txtStart-->\\1<\!--txtEnd--><\!-- spoilerKillit --></td></tr></table><\!-- spoilerKillitEnd -->", $txt );
     $txt = preg_replace( "#\[video\](.+?)\[/video\]#is", "<embed width=\"400\" height=\"300\" src=\\1 type=\"application/x-shockwave-video\">", $txt );
     $txt = preg_replace( "#\[sound\](.+?)\[/sound\]#is", "<param name=\"BACKGROUNDCOLOR\" <br /><embed src=\\1 align=\"baseline\" border=\"0\" width=\"275\" height=\"40\" type=\"audio/x-pn-realaudio-plugin\" console=\"Clip1\" controls=\"ControlPanel\" autostart=\"true\">", $txt );
     $txt = preg_replace( "#\[web\](.+?)\[/web\]#is", "<IFRAME WIDTH=550 HEIGHT=400 SRC=\\1></IFRAME>", $txt );
	 $txt = preg_replace( "#\[me\](.+?)\[/me\]#is", "[color=purple]<b>*" . $ibforums->member['name'] . " \\1</b>[/color]<br>", $txt );

 

Найдите:

 

function unconvert($txt="", $code=1, $html=0) {

 if ($code == 1)
 {

 

Ниже добавьте:

 

$txt = preg_replace( "#(<font style='width=80%; filter:invert'>)(.+?)(</font>)#is", "\[invert\]\\2\[/invert\]", $txt );
	 $txt = preg_replace( "#(<font style='width=80%; filter:xray'>)(.+?)(</font>)#is", "\[xray\]\\2\[/xray\]", $txt );
	 $txt = preg_replace( "#(<marquee>)(.+?)(</marquee>)#is", "\[move\]$2\[/move\]", $txt );
	 $txt = preg_replace( "#(<font style='width=80%; filter:glow\(color=)(.+?)(\)'>)(.+?)(</font>)#is", "\[glow=\\2\]\\4\[/glow\]", $txt );
	 $txt = preg_replace( "#(<font style='width=80%; filter:shadow\(color=)(.+?)(\)'>)(.+?)(</font>)#is", "\[shadow=\\2\]\\4\[/shadow\]", $txt );
	 $txt = preg_replace( "#(<font style='width=80%; filter:flipV'>)(.+?)(</font>)#is", "\[flipv\]\\2\[/flipv\]", $txt );
	 $txt = preg_replace( "#(<font style='width=80%; filter:flipH'>)(.+?)(</font>)#is", "\[fliph\]\\2\[/fliph\]", $txt );
	 $txt = preg_replace( '#(<div align=")(.+?)(">)(.+?)(</div>)#is', "\[ALIGN=\\2\]\\4\[/ALIGN\]", $txt );
	 $txt = preg_replace( "#(<font style='width=80%; filter:blur'>)(.+?)(</font>)#is", "\[blur\]\\2\[\/blur]", $txt );
	 $txt = preg_replace( "#(<font style='width=80%; filter:dropshadow\(color=)(.+?)(\)'>)(.+?)(</font>)#is", "\[dropshadow=\\2\]\\4\[\/dropshadow\]", $txt );
	 $txt = preg_replace( "#(<\!--txtStart-->)(.+?)(<\!--txtEnd-->)#is", "\[spoiler\]\\2\[/spoiler\]", $txt );
	 $txt = preg_replace( "#(<\!-- spoilerKillit -->)(.+?)(<\!-- spoilerKillitEnd -->)#is", "", $txt );
     $txt = preg_replace( "#<param name=\"BACKGROUNDCOLOR\" <br /><embed src=(.+?)align=\"baseline\" border=\"0\" width=\"275\" height=\"40\" type=\"audio/x-pn-realaudio-plugin\" console=\"Clip1\" controls=\"ControlPanel\" autostart=\"true\">#"  , "\[sound\]\\1\[/sound\]"  , $txt );
     $txt = preg_replace( "#<embed width=\"400\" height=\"300\" src=(.+?)type=\"application/x-shockwave-video\">#"  , "\[video\]\\1\[/video\]"  , $txt );
     $txt = preg_replace( "#<IFRAME WIDTH=550 HEIGHT=400 SRC=(.+?)></IFRAME>#"  , "\[web\]\\1\[/web\]"  , $txt );
	 $txt = preg_replace( "#\[me\](.+?)\[/me\]#is", "[color=purple]<b>*" . $ibforums->member['name'] . " \\1</b>[/color]<br>", $txt );
	 $txt = preg_replace( "#\[me\](.+)#is", "[color=purple][b]*" . $ibforums->member['name'] . " \\1[/b][/color]<br>", $txt );

 

Загружаем файлы на сервер и крутой мод установлен :)

 

Добавлено:

Папку UBBC кладем в директорию html форума, файл quote.js тоже в директорию html форума. Усё :D

Ссылка на комментарий
Поделиться на других сайтах

Папку UBBC и файл quote.js берём сдесь: http://www.ibresource.ru/db/index.php?pg=show&id=29 из скачанного архива понадобятся только эта папка с файлом, остальное не пригодится, если вам ненужна форма быстрого ответа с кликабельными смайлами и кодами IBF
Ссылка на комментарий
Поделиться на других сайтах

  • 7 лет спустя...

К сожалению, ссылка в последнем посте битая. В файловом архиве этого форума не осталось UBB-мода

Ведь это его надо ставить, чтобы получить форму ответа как здесь: http://forum.sysman.ru/index.php?showtopic=17772 ?

Изменено пользователем Velomax
Ссылка на комментарий
Поделиться на других сайтах

  • 9 месяцев спустя...

Присоединиться к обсуждению

Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.

Гость
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Ответить в этой теме...

×   Вы вставили отформатированный текст.   Удалить форматирование

  Допустимо не более 75 смайлов.

×   Ваша ссылка была автоматически заменена на медиа-контент.   Отображать как ссылку

×   Ваши публикации восстановлены.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.

Зарузка...
×
×
  • Создать...

Важная информация

Находясь на нашем сайте, вы соглашаетесь на использование файлов cookie, а также с нашим положением о конфиденциальности Политика конфиденциальности и пользовательским соглашением Условия использования.