Hi gbpatel,
Try this way:
1. and a logic in the code below:
if(is admin)
{
menuitem=menu.Add(user.IsAnonymous?0:1,TEXT(IsContact(user)?"UI_MENU_RemoveContact":"UI_MENU_AddContact"),""+__cc_urlbase+"Images/DefaultAvatar.gif",function()
{
if(IsContact(user))
{
RemoveContact(user);
}
else
{
AddContact(user);
}
},null);
}
2. first load hide the code below
<div id="historybubutton" style="display:none" style="" class="MessengerSmallButton" title="[[UI_MENU_AddContact]]" hoverclass="MessengerSmallButtonHover"
onclick="CuteChatMessenger.BubbleCommand('ShowAddFriend',this,event)">
<img src="#__cc_urlbase#Images/icon_add.gif" alt="[[UI_MENU_AddContact]]" />
</div>
3.and a logic
<script>
if(is admin)
{
show the div above
}
</script>
Regards,
ken