BB-code of colour fill
Adds tags for choosing a colour of marking text to the form of reply
Author: Alex_63
Platform: MyBB
Analogue: Fill for message text (MyBB) [kolobdur74]
To HTML-bottom (Admin > Options: 2nd form):
Code:
<!-- BB-code of colour fill / © Alex_63 --><style>
#button-mark{background:url(http://forumstatic.ru/files/0015/92/70/15526.png);}
#mark-area{width:auto;position:absolute;right:6px;top:43px}
#mark-area *{border:0}#mark-area table{width:320px;height:20px;padding:0;margin:0}
#mark-area td{margin:0; padding:0; line-height:0}
#mark-area td img{width:20px;height:20px;cursor:pointer!important}
</style>
<script type="text/javascript">
$('#button-color').after('<td id="button-mark"><img src="/i/blank.gif" onclick="$(\'#mark-area\').toggle();" title="Background fill"/></td>');
$(function(){var area=$('#color-area').html();if(area)area=area.replace(/color([\=\'\]])/mgi,'mark$1');
area='<div class="container" id="mark-area" onclick="$(this).toggle()" style="display:none">'+area+'</div>';
$('#color-area').after(area);});
$('.post-content:contains("[mark")').each(function(){var sp='<span style="background-color:$1">$2</span>';
$(this).html($(this).html().replace(/\[mark=(.*?)\](.*?)\[\/mark\]/mgi,sp));});
</script>