That's simple. Instead of writing HTML code straight away in the template, you should put it in some variable in bb_plugins.php. This variable will have an empty value, if the user ID condition is not met; value of HTML code otherwise. Example below.
- bb_plugins.php:
if(in_array($user_id, array(7,16))){
$bbCodeImg=<<<out
<a href="JavaScript:paste_stri
nL('', 3, '[imgs='+prompt('URL:','{$main_url}'+'/img/!pix.gif')+']', prompt('{$l_promptAlt}','')+'[/imgs]', '')" onmouseover="window.status='{$l_bb_image}'; return true" onmouseout="window.status=''; return true"><img src="https://www.minibb.com/forums/img/button_image.gif" style="width:23px;height:22px" alt="{$l_bb_image}" /></a>
out;
}
else $bbCodeImg='';
- templates/main_post_form.html:
{$bbCodeImg}
I think you must tie up this solution also with one you have requested here. ;-) So certain users not only won't see the button, but also are prohibited use some functional code from bb_codes.php in general.