Invisible Admins/Moderators

131 views
Skip to first unread message

Banjo Fox

unread,
Sep 14, 2016, 9:19:11 PM9/14/16
to AJAX-chat
In other chat applications (DiGi for example) it was possible for Admins/Moderators to go "invisible".

Has anyone on this list attempted a mod like that before?

Thanks!

- Banjo

Cuore di angelo

unread,
Sep 19, 2016, 1:35:54 PM9/19/16
to AJAX-chat
I thought so at a option like that. As usual I chose the shortest way : I open the database , update , and read messages posted in real time chart ... hahaha

Banjo Fox

unread,
Sep 19, 2016, 1:47:37 PM9/19/16
to AJAX-chat
Hrm...

My gut feeling says that the simplest way is to simply remove/not show the username in the OnlineList.
What I'm struggling with right now is finding out how the various lists get populated (OnlineList, and ChannelList).

:(

- Banjo

Cuore di angelo

unread,
Sep 20, 2016, 10:13:00 AM9/20/16
to AJAX-chat
case Admin || Moderator {

 display:none; 

}


(???)

Banjo Fox

unread,
Sep 20, 2016, 5:21:46 PM9/20/16
to ajax...@googlegroups.com
Something like this perhaps?

// Invisibility
case '/invisible':
        $this->setUserName($this->getLoginUserName().'['.implode(' ', array_slice($textParts)),$this->'style="display:none;"']');
        $this->updateOnlineList();
        return true;

It doesn't work (yet) but I am also not very fluent in PHP or JavaScript :D

Banjo Fox

unread,
Sep 23, 2016, 12:13:39 PM9/23/16
to ajax...@googlegroups.com
Ideally I would like this to be a checkbox so I have come up with the following:

Added the following to: js/custom.js

ajaxChat.setInvisibility function validate() {
if (document.getElementById('invisibilitySetting').checked) {
        alert("checked");
    } else {
        alert("You didn't check it! Let me check it for you.");
    }
}


I also created a new entry in the settings menu:
lib/template/loggedIn.html

<dl>
<dt><label for="invisibilitySetting">[LANG]settingsInvisibility[/LANG]</label></dt>
<dd><input type="checkbox" id="invisibilitySetting" onclick="ajaxChat.setInvisibility();"/></dd>                     
</dl>

Updated the code above to work properly (getting alerts now).

Fiksik Jump

unread,
Sep 10, 2018, 8:04:28 PM9/10/18
to AJAX-chat
не работает 0.8.8

пятница, 23 сентября 2016 г., 19:13:39 UTC+3 пользователь Banjo Fox написал:
Reply all
Reply to author
Forward
0 new messages