Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Plugins by
edited by

I installed chat room plugin for my site and make the link visible for only Experts, Editors, Moderators and Admins. It is working and link tab only visible for Experts, Editors, Moderators and Admins. It is not visible for registered users but registered users can enter chat room using the link “http://www.mysite.net/chat". Please tell me how to prevent this?

After followed instruction given by Kai

Q2A version: 1.6.3

2 Answers

+1 vote
selected by
Best answer

Guess it is not in the settings implemented.

Try adding the following code to qa-chat.php right after line:

public function process_request( $request ) {
you put this code block:
            // return if not at least expert
            if(qa_get_logged_in_level() < QA_USER_LEVEL_EXPERT) {
                $qa_content['custom0']='<div>Access forbidden</div>';
                return $qa_content;

Hope that helps.
Great! It is working well. I have no any idea about coding. Only followed your instructions. I feel that how nice I have a knowledge about coding. Thank you very much your quick and marvelous support.

I have uploaded a captured image.
You are welcome.
0 votes
Panel admin - Pages - Chat room - visible for admins,experts,editors....etc.
I have already done that as I mentioned in my question. The link is not visible to registered users. But they can log in to chat page by typing “http://www.mysite.net/chat" in address bar. Then they can see and use the chat room. I want to prevent that.