Не нравятся результаты поиска? Попробуйте другой поиск!
dle-faq.ru FAQ (все вопросы) Общие вопросы Как удалить лишнее в BB редакторе?

Как удалить лишнее в BB редакторе?


     30.03.2016    Общие вопросы    430

вопрос
Здравствуйте!
Я хочу чтобы при добавления комментарий, в BB редакторе отображались только смайлы. Возможно ли реализовать?

Ответил: Westus


Открыть файл engine/modules/bbcode.php
Найти код:
$code = <<<HTML
<div class="bb-editor ignore-select">
<div class="bb-pane" onmouseenter="if(is_ie9) get_sel(eval('fombj.'+ selField));">
<b id="b_b" class="bb-btn" onclick="simpletag('b')" title="{$lang['bb_t_b']}"></b>
<b id="b_i" class="bb-btn" onclick="simpletag('i')" title="{$lang['bb_t_i']}"></b>
<b id="b_u" class="bb-btn" onclick="simpletag('u')" title="{$lang['bb_t_u']}"></b>
<b id="b_s" class="bb-btn" onclick="simpletag('s')" title="{$lang['bb_t_s']}"></b>
<span class="bb-sep"></span>
<b id="b_left" class="bb-btn" onclick="simpletag('left')" title="{$lang['bb_t_l']}"></b>
<b id="b_center" class="bb-btn" onclick="simpletag('center')" title="{$lang['bb_t_c']}"></b>
<b id="b_right" class="bb-btn" onclick="simpletag('right')" title="{$lang['bb_t_r']}"></b>
<span class="bb-sep"></span>
<b id="b_emo" class="bb-btn" onclick="show_bb_dropdown(this)" title="{$lang['bb_t_emo']}" tabindex="-1"></b>
<ul class="bb-pane-dropdown">
    <li>{$output}</li>
</ul>
<span class="bb-sep"></span>
{$url_link}
{$image_link}
<b id="b_color" class="bb-btn" onclick="show_bb_dropdown(this)" title="{$lang['bb_t_color']}" tabindex="-1"></b>
<ul class="bb-pane-dropdown" style="min-width: 150px !important;">
    <li>
        <div class="color-palette"><div><button onclick="setColor( $(this).data('value') );" type="button" class="color-btn" style="background-color:#000000;" data-value="#000000"></button><button onclick="setColor( $(this).data('value') );" type="button" class="color-btn" style="background-color:#424242;" data-value="#424242"></button><button onclick="setColor( $(this).data('value') );" type="button" class="color-btn" style="background-color:#636363;" data-value="#636363"></button><button onclick="setColor( $(this).data('value') );" type="button" class="color-btn" style="background-color:#9C9C94;" data-value="#9C9C94"></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#CEC6CE;" data-value="#CEC6CE"></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#EFEFEF;" data-value="#EFEFEF"></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#F7F7F7;" data-value="#F7F7F7"></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#FFFFFF;" data-value="#FFFFFF"></button></div><div><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#FF0000;" data-value="#FF0000"></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#FF9C00;" data-value="#FF9C00"></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#FFFF00;"  data-value="#FFFF00"></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#00FF00;"  data-value="#00FF00"></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#00FFFF;"  data-value="#00FFFF" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#0000FF;"  data-value="#0000FF" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#9C00FF;"  data-value="#9C00FF" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#FF00FF;"  data-value="#FF00FF" ></button></div><div><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#F7C6CE;"  data-value="#F7C6CE" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#FFE7CE;"  data-value="#FFE7CE" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#FFEFC6;"  data-value="#FFEFC6" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#D6EFD6;"  data-value="#D6EFD6" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#CEDEE7;"  data-value="#CEDEE7" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#CEE7F7;"  data-value="#CEE7F7" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#D6D6E7;"  data-value="#D6D6E7" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#E7D6DE;"  data-value="#E7D6DE" ></button></div><div><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#E79C9C;"  data-value="#E79C9C" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#FFC69C;"  data-value="#FFC69C" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#FFE79C;"  data-value="#FFE79C" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#B5D6A5;"  data-value="#B5D6A5" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#A5C6CE;"  data-value="#A5C6CE" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#9CC6EF;"  data-value="#9CC6EF" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#B5A5D6;"  data-value="#B5A5D6" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#D6A5BD;"  data-value="#D6A5BD" ></button></div><div><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#E76363;"  data-value="#E76363" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#F7AD6B;"  data-value="#F7AD6B" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#FFD663;"  data-value="#FFD663" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#94BD7B;"  data-value="#94BD7B" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#73A5AD;"  data-value="#73A5AD" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#6BADDE;"  data-value="#6BADDE" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#8C7BC6;"  data-value="#8C7BC6" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#C67BA5;"  data-value="#C67BA5" ></button></div><div><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#CE0000;"  data-value="#CE0000" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#E79439;"  data-value="#E79439" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#EFC631;"  data-value="#EFC631" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#6BA54A;"  data-value="#6BA54A" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#4A7B8C;"  data-value="#4A7B8C" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#3984C6;"  data-value="#3984C6" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#634AA5;"  data-value="#634AA5" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#A54A7B;"  data-value="#A54A7B" ></button></div><div><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#9C0000;"  data-value="#9C0000" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#B56308;"  data-value="#B56308" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#BD9400;"  data-value="#BD9400" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#397B21;"  data-value="#397B21" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#104A5A;"  data-value="#104A5A" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#085294;"  data-value="#085294" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#311873;"  data-value="#311873" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#731842;"  data-value="#731842" ></button></div><div><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#630000;"  data-value="#630000" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#7B3900;"  data-value="#7B3900" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#846300;"  data-value="#846300" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#295218;"  data-value="#295218" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#083139;"  data-value="#083139" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#003163;"  data-value="#003163" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#21104A;"  data-value="#21104A" ></button><button type="button" onclick="setColor( $(this).data('value') );" class="color-btn" style="background-color:#4A1031;"  data-value="#4A1031" ></button></div></div>                
    </li>
</ul>
<span class="bb-sep"></span>
<b id="b_hide" class="bb-btn" onclick="simpletag('hide')" title="{$lang['bb_t_hide']}"></b>
<b id="b_quote" class="bb-btn" onclick="simpletag('quote')" title="{$lang['bb_t_quote']}"></b>
<b id="b_tnl" class="bb-btn" onclick="translit()" title="{$lang['bb_t_translit']}"></b>
<b id="b_spoiler" class="bb-btn" onclick="simpletag('spoiler')" title="{$lang['bb_t_spoiler']}"></b>
</div>
<textarea name="comments" id="comments" cols="70" rows="10" onfocus="setNewField(this.name, document.getElementById( 'dle-comments-form' ))">{text}</textarea>
</div>
HTML;

Заменить на:

$code = <<<HTML
<div class="bb-editor ignore-select">
<div class="bb-pane" onmouseenter="if(is_ie9) get_sel(eval('fombj.'+ selField));">
<b id="b_emo" class="bb-btn" onclick="show_bb_dropdown(this)" title="{$lang['bb_t_emo']}" tabindex="-1"></b>
<ul class="bb-pane-dropdown">
    <li>{$output}</li>
</ul>
</div>
<textarea name="comments" id="comments" cols="70" rows="10" onfocus="setNewField(this.name, document.getElementById( 'dle-comments-form' ))">{text}</textarea>
</div>
HTML;
Чтобы комментировать - войдите или зарегистрируйтесь на сайте

Похожие вопросы