The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.

Create a free forum like this one.

Forum Chatbox Permissions

View previous topic View next topic Go down

In progress Forum Chatbox Permissions

Post by Major_John on February 28th 2015, 8:20 am

Hello, I have seen it done on other forumotion forums but I am unsure how to replicate it. How do I make the chat box only available/visible to certain groups/special ranks (ie admins) and not everyone?

New Member

Posts : 1
Reputation : 1
Language : English

Back to top Go down

In progress Re: Forum Chatbox Permissions

Post by Ange Tuteur on February 28th 2015, 8:02 pm

Hello @Major_John,

Give the following a try. First go to Administration Panel > Display > Colors > CSS stylesheet and paste the following code.
body.chatbox, #chatbox_top { display:none }

Then go to Modules > JavaScripts codes management and create a new script.

Placement : In the homepage
Paste the following code and submit :
$(function() {
  var fa_chat = document.getElementById('frame_chatbox'), top = document.getElementById('chatbox_top'), frame;

  if (_userdata.user_level == 1) { = 'block';
    fa_chat.onload = function() {
      if (fa_chat.contentDocument) frame = fa_chat.contentDocument;
      else frame = fa_chat.contentWindow.document; = 'block';
  } else = 'none';

This will allow you to hide the chatbox from non-administrators, and show it for admins on the index. You wont be able to see the chatbox by going to the direct link unfortunately.

If you want to display the chatbox for both moderators and admins, replace _userdata.user_level == 1 by _userdata.user_level
Ange Tuteur

Male Posts : 13083
Reputation : 2758
Language : EN10, FR5
Location : Pennsylvania

Back to top Go down

View previous topic View next topic Back to top

Permissions in this forum:
You cannot reply to topics in this forum