ok ange how do i setup your code so only users of that lvl can see the buttons
like admin can only see admin button,mods only see mod button?
like admin can only see admin button,mods only see mod button?
$(function() {
 // custom buttons
 groupButton([1, 2, 3], 'test', 'http://i39.servimg.com/u/f39/18/21/41/30/bouton10.png');
Â
 function groupButton(users, tagname, image) {
  for (i=0; i<users.length; i++) {
   if (users[i] === _userdata.user_id) {
    $("#text_editor_textarea").before("<img src='"+image+"' title='Warning' id='"+tagname+"-b'/>");
    $('#'+tagname+'-b').click(function(){$('#text_editor_textarea').sceditor('instance').insertText('['+tagname+']','[/'+tagname+']')});
   }
  }
  var reg = new RegExp('\\['+tagname+'\\](.+?)\\[/'+tagname+'\\]','ig');
  $('div.postbody div').each(function () {if ($(this).text().indexOf('['+tagname+']') != -1) $(this).html($(this).html().replace(reg, '<div class="'+tagname+'_mess"><div class="titl">Warning</div><div>$1 </div></div>'))});
 }
});
groupButton([88576], 'test', 'http://i39.servimg.com/u/f39/18/21/41/30/bouton10.png');
if (_lang.rank_title === '<span style="color:#f00">my</span> rank') console.log(true);