How to set rules to not allow user to add new contact????

Last post 04-27-2009, 11:51 PM by gbpatel. 4 replies.
Sort Posts: Previous Next
  •  04-18-2009, 1:51 AM 51232

    How to set rules to not allow user to add new contact????

    hi!,
     
    can one plz help me to stop user for adding new contact by using "Add  new contact button".
    i don't want to allow user to add new contact.
    so can you plz tell me what Rules is required to set into database so i can stop user for adding new contact.
  •  04-20-2009, 4:29 AM 51253 in reply to 51232

    Re: How to set rules to not allow user to add new contact????

    Hi gbpatel,
     
    Try this way:
     
    1. Open file 'NewMessengerMain.htm' (\CuteSoft_Client\CuteChat\NewMessengerMain.htm)
     
    2. Find section below and comment it
     
     <div 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. Open file 'Channel_New.js'(\CuteSoft_Client\CuteChat\Script\Channel_New.js)
     
    4. Find section below and comment it
     
    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);
     
    Regards,
     
    Ken
  •  04-20-2009, 6:10 AM 51259 in reply to 51253

    Re: How to set rules to not allow user to add new contact????

    thanks dear for your help,
     
    but in my system there are 3 type of users.

    1] Admin
    2] ClientAdmin
    3] Client
     
    i want to not allow only "Client" type of user to add new contact.
    so i have to set rules base on type of user login into messenger.
     
    if Admin or ClientAdmin user is login into messenger then the can see and Add new Client to his contact list.
     
     
  •  04-23-2009, 10:07 PM 51475 in reply to 51259

    Re: How to set rules to not allow user to add new contact????

    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
  •  04-27-2009, 11:51 PM 51584 in reply to 51475

    Re: How to set rules to not allow user to add new contact????

    hi ! ken
     
    thanks a lot.
    it's working for me.
View as RSS news feed in XML