Moderate Chat / ban users, delete messages

I need to be able to ban a user or delete inappropriate comments on the chat as a moderator. What is the moderator role for in your chat software if not to actually moderate?

  • aecnu
    • WP Unicorn

    Greetings Tonia,

    Thank you for this great question and a significant item to bring up.

    What is the moderator role for in your chat software if not to actually moderate?

    Though I have played with this plugin some in the past, I never put much thought to the moderator role and would guess that to truly moderate a chat the moderator would need to have a window that shows everything typed in a message to check it before it is posted to the chat. Good luck with that.

    However, I certainly do not know everything nor do I know what the lead developer was thinking with the inclusion of this wording within the plugin.

    Therefore I will see if I can get the lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Tonia
    • WPMU DEV Initiate

    Hi Joe, Thanks for your reply. We would like to use this to feature an expert for scheduled chats. I don’t need/want to moderate each comment, I need to be able to delete inappropriate comments. I figured out how to ban users by deleting their wp user accounts.

  • aecnu
    • WP Unicorn

    Greetings Tonia,

    Thank you for your additional input and I must admit that deleting users from your installation is a sure fire way to get rid of them, until then come and sign back up.

    While thinking about what you wrote a little more effective for you and troublesome for them would be to use a role editor like Advanced Access Manager plugin or User Role Editor plugin to create a banned role that denies almost every privilege and then assign them to that role.

    This way it ties up that email address and they will need to go get a new one to get back in definitely slowing them down.

    Thank you for being a WPMU Dev Community Member!

    Cheers, Joe

  • Tonia
    • WPMU DEV Initiate

    Hi Joe, That would work too…I found a plug-in that will extend the native wp ban comments utility to work to ban the user from registering with the email address in question. Same result as your suggestion. I’ll keep yours in mind if this one doesn’t work as I intend. Is it possible to pay someone to develop (quickly) the ability for me to delete comments during a chat? Not moderate them, or filter them, but to take them out after they have been posted if they are unacceptable?

  • aecnu
    • WP Unicorn

    Greetings Tonia,

    Thank you for your additional input on this and your questions as well, sorry for the delay as it appears this ticket got jacked up in the back of the ticket system.

    Is it possible to pay someone to develop (quickly) the ability for me to delete comments during a chat? Not moderate them, or filter them, but to take them out after they have been posted if they are unacceptable?

    You could see if there’s a developer available at wpmu jobs who could get onto it right this minute

    Or you could always approach someone like Tweaky:

    https://www.tweaky.com/

    Thank you for being a WPMU Dev Community Member!

    Cheers, Joe

  • Paul33
    • WPMU DEV Initiate

    Definitely urgently need to have a means to moderate chat entries as a chat room with no means to quickly moderate inappropriate entries is a nightmare.

    Its a great looking chat plug-in but needs that moderation option fast !

  • Paul
    • The Green Incsub

    @paul33, agreed this is needed and we are working on this concept to be added to the Chat plugin. Unfortunately, development tasks take time. Especially with a legacy plugin like Chat. At the moment your only option is to directly remove the records from your database table. If you would like more information about how to perform that task reply back here. Thanks

  • Paul
    • The Green Incsub

    @paul33 and @tonia,

    Was in a discussion with someone internal this morning related to this topic. Just wanted to ask a question for clarification.

    So the task of moderation within our chat plugin is really non-functional. When you are asking for the ability to ‘moderate’ inappropriate entries are we talking during the chat session. So for example I moderate one of our weekly Plugins and Code chat sessions here are WPMUDEV.

    Is the need to have the ability to hide/delete a message just entered by a user?Or are we talking about something in the historical chat logs? I’m assuming the need is immediate during the chat session. Thoughts?

  • Paul33
    • WPMU DEV Initiate

    For me, I’m certainly looking at moderating live chat in real time and would be looking for (not necessarily in order of priority) ……..

    1. A means to delete any post via a delete button

    2. A means to ban a user either by IP or, preferably, FB log-in as I only allow FB log-ins

    3. A means to close the chat room when not in use – mine is a sports site where I only want the chat-room on game nights and don’t want to leave it open to abuse away from game nights

    A bonus would be some form of “banned words” function that replaces listed words with ***** or similar.

    Paul

  • Paul
    • The Green Incsub

    @paul33, Thanks for the feedback. I can see #1 within the chat session. #2 might be something that just lives with an admin area. Sort of like WordPress comment/keywork ban. #3 I agree.

    Also coming will be private chat. Similar to how some product support sites do it where you fill out a form with name, email, some initial question and you are connected with someone in support for a private chat session. Which can then be emailed to you. We have out eCommerce system, MarketPress where many user want to have this option. Heck I would like to have that option here on WPMUDEV somethings. It sure would keep the back and forth postings to a minimum.

  • Tonia
    • WPMU DEV Initiate

    Yes, need to be able to delete a comment in real-time immediately inside the live chat session. Also, closing the chat when not in use. We also intend to have it open only during scheduled times to avoid the sleeze factor.

    Thanks for the further conversation, as is, the chat is really problematic for professional use.

  • Paul
    • The Green Incsub

    @tonia, Thanks for the reply. My thought is we can add some hover effect on the row. The moderator can change a message to deleted. Then is there is a mistake like you deleted the wrong message we can allow you to undelete.

    The ‘deleted’ message will still show on the moderator screen but have a different color. For the non-moderator we would hide the message. One issue is page refresh. So when someone in on the chat session the message are loaded via AJAX calls to the server. If you ‘delete’ a message I need to figure out a way to hide the messages in the non-moderator screen without having them reload the page. I’ll think of something on this.

  • Paul
    • The Green Incsub

    @paul33 and @tonia,

    Since you asked for the featured I’m going to burden you with some helpful QA of the moderation changes.

    First you can download the 1.0.2 beta 1 version via the link just below

    https://dl.dropbox.com/u/2616987/WPMUDev/wordpress-chat-1.0.2-beta1.zip

    This update has three somewhat major (ok 2 major and on minor) changes.

    1. Ability to moderate message within the live chat! No kidding. As the moderator you will see a little button below the chat avatar. Or just to the left of everything else if you are not using the avatar. By default the button will have a read background and read ‘delete’. Once clicked the background will change to green and the label changed to ‘updelete’. This change is automatically updated to all other chant users. Both other moderators as well as general users. One not this functionality is only on the live chat. If you are using the logs option the delete/undelete buttons to not show.

    2. Ability to close the chat session. As a moderator you are no doubt familiar with the ‘Archive’ and ‘Clear’ buttons. Well now you will see a new button to the left which reads ‘Close Chat Session’. This is the default state. Once clicked the button label will change to ‘Open Chat Session’ and the text area input will be hidden for all and replaced with a message to the user. So should provide a way to close the chat so other users do not post without you.

    3. Third a minor is the ‘mention’ feature we have had on out WPMU DEV chat for 6 months. If you click on the user avatar or name it will copy the name to the chat input area. The name will be preceded with ‘@’. A small feature but something I like to add to the plugin version.

    So please do me the favor of testing this out. I’ve tested via the inline as well as bottom corner chat. Seems to work.

  • Paul
    • The Green Incsub

    @paul33, As per the chat discussion, Can you move the original chat plugin back into place and rest your color scheme. Also, I would like to request a screen capture of your settings so that I can review the setup on my end. This means an image of the main Settings > Chat panel showing the color section as well as the popup on the chat page itself if there are different color used.

    Paul

  • Paul33
    • WPMU DEV Initiate

    This is getting silly now !

    I deactivated and then deleted the plugin and then re-uploaded the original 1.1 version only to find the settings page still has my modified color scheme including the dodgy BG color box which is still white and refuses to change !

    What have i done ?!!!

  • Paul
    • The Green Incsub

    @paul33, The other question is do you have a backup of the original chat plugin which was running on your site? I’m guessing no. Sorry, should have mentioned on my original post about the beta that this is a development version. Still installing the 1.1 stable version should get you back. Unless there were modifications to the plugin code.

  • Paul33
    • WPMU DEV Initiate

    Okay – first up – many thanks for the beta release and I’m happy it works fine now so good job !

    I’ve managed to restore my required black color scheme but is there a way to reduce the message row heights and – probably more important – the gaps between the message rows ? At the moment, the chat messages are too spaced out vertically and I’d prefer to close them up so as to get more rows/messages in the chat box.

    I’ve played with various css options in the WP Editor but can’t seem to do it !

  • Paul
    • The Green Incsub

    @paul33, Thanks for the bug notice on the clear button. I’ll look into that over the weekend.

    So on your other question about how to reduce the spacing. For some unknown reason each chat message row, which is a div already, gets prepended and appended a set of empty paragraph tags. I suspect that is what is causing the spacing.

    Try this. Add the CSS rule to your theme stylsheet

    .chat-wrap p { display: none; }

    This should hide the ‘extra’ paragraphs.

  • Paul33
    • WPMU DEV Initiate

    Do you mean add the .chat-wrap p { display: none; } to wordpress-chat/css/style.css because I did that via the WP Editor and saw no change.

    Also – is there a way of adding the revised beta files without replacing the old one in full as I’d have to recode all the color changes again !!!

  • Paul
    • The Green Incsub

    @paul33,

    Ok. Looking at the CSS more this morning. Appears there are two specific styles to consider. Both of the CSS rules I’ve pasted below are setting specific margins. So try setting the values to 0px.

    Line 13

    div.chat-box p {

    margin-bottom: 5px !important;

    }

    Line 43.

    .chat-area p {

    display: block;

    margin-bottom: 2px !important;

    padding: 0 !important;

    }

  • Paul33
    • WPMU DEV Initiate

    Will try that one later – thanks !

    Running my first live chat tonight with about a dozen on board and its a disaster at the moment ! Not sure if its the plug-in or the server but messages are regularly delayed and then appear in repeats of two/three at a time ….. and there are audible pings going on all over the place without accompanying posts !

    Hopefully its the server !

  • Paul
    • The Green Incsub

    @paul33, sorry to hear about the troubles. Let me know if this does turn out not to be server related. The moderation does add an extra query. So maybe there is some threshold we have hit on your site.

    Also, might thing about increasing the chat ping time. By default I think this is 1 second. This means every second each user will query your server checking for new chat messages. You can probably live with setting this to 2 seconds. Look under Settings > Chat then under the Advanced tab.

  • Paul33
    • WPMU DEV Initiate

    The server guys are looking at thing but haven’t come back yet.

    It was very patchy and worked fine at times but most the time there were delays up to 30 seconds before chat messages appeared ….. and some times they never did. On numerous occasions, messages appeared two or three times but then when you refreshed the browser, it corrected itself and showed just one.

  • Tonia
    • WPMU DEV Initiate

    Hi Paul, and Paul33,

    I installed the beta and deleting comments seems to work fine from the admin/moderator log-in. So too the close the chat session. Thank you very much.

    In testing on other matters,

    1) I can’t log in to enter the chat with a public email in the username/login area on the bottom of the chat page. The page refreshes but nothing changes on the screen.

    1a) Where is this information stored?

    2) Log in with Facebook — Clicking the Log out of Facebook button at the bottom has no effect whether I am or am not logged in to Facebook in another window. (I am incidentally simultaneously logged in to WPMUdev with Facebook in another window).

    Ideally, I’d like users to have to be registered with our WP in order to chat. But the interface is not seamless. I have to log out for a moment to extricate myself from the FB log in on the chat. I’ll be back with more on this.

  • Tonia
    • WPMU DEV Initiate

    O.K. So, logging out of FB here on wpmudev had no effect. I had to log in to WP and then log out of WP to enter the chat area as an anonymous user. I will probably, just require WP log in, rather than public or FB.

    Is there a way to put a WP registration/log-in form right there where it says, “You must be logged in to participate in chats?”

    Item 3) Any progress with banning users from inside the plug-in? Right now I have set up to use another plug in but that requires leaving the chat and going in to the Admin panel.

    Thank you so much. You have greatly improved the value of this plug-in. I really appreciate your attention.

  • Paul
    • The Green Incsub

    @tonia, thanks for the replies. Non of the user authentication logic was changed in the beta version. Also, make sure you grab beta 2 from this reply https://premium.wpmudev.org/forums/topic/moderate-chat-ban-users-delete-messages#post-274368

    If you are having some inconsistent issue with user authentication then I need to know specifically how the beta version functionality compares to the current released version.

    No update on banning process. That is going to be more involved and deeper into the code. The plugin is somewhat old and needs some serious review before we can start adding the banning logic. So this means for the time you will need to continue using the other plugin. Even when banning is directly supported via the chat plugin I don’t at the moment see this as something that will be done via the live chat interface. But I may find some clean way for this.

  • Tonia
    • WPMU DEV Initiate

    Hi Paul,

    I did use the beta2 download you specified. Thank you.

    I am fine with the work-around for the banning users.

    I can’t speak to the authentication logic in the released version. I did not test it. And, I cannot test it further. Perhaps someone else will create a new thread to address this at a later time.

    We will be testing further before release, and let you know if we find any additional issues. I have not tested with a load of real users, so not sure if we will have the issues Paul33 has discussed. I hope not. I look forward to hearing if they were server related, as I am anxious to avoid them!

  • Paul
    • The Green Incsub

    @paul33, Wanted to continue the followup on your request to adjust the CSS for the chat messages. So, when Iook at your chat page this morning I see some left over chat messages. See the image I posted. I'm assuming what you want to do is reduce or remove the space between the message (see red arrows).

    In order to do this you will need to add a rule to your theme style.css When I use Firebug to review your site I see this rule from Line 24

    div.post-bodycopy p {

    display: block;

    margin: 1em 0;

    padding: 0;

    }

    If I change the margin: 1em 0; to margin: 0; the messages collapse as per this second image. The problem is this CSS rule is used for all your site to control paragraph spacing. So you need to add something specific for the chat.

    Something like

    div.post-bodycopy .chat-area p { margin: 0; }

  • Paul33
    • WPMU DEV Initiate

    This sounds perfect but I’m a little confused about exactly what I do add now !!!

    When you say “add something like”, that makes me nervous so do I add that line AND the lines detailed above ?

    Sorry – I’m probably out of my depth a little here !

  • Paul
    • The Green Incsub

    @paul33,

    Sorry for the confusion. The top CSS is already within your system. so you just need to add the bottom CSS section (repeated again below) to your theme’s style.css or however you are including the CSS. Do not add this to the chat stylesheet.

    div.post-bodycopy .chat-area p { margin: 0; }

  • Paul33
    • WPMU DEV Initiate

    So I’ve added ……….

    div.post-bodycopy .chat-area p { margin: 0; }

    to the foot of style.css for my Atuahalpa scheme via the WP Editor and saved the modified style.css. Do I have to change anything else or do anything else as it doesn’t appear to have changed anything ?

  • Paul
    • The Green Incsub

    @paul33, Then you are probably adding this to the wrong file. Again, this is something with your theme setting the 1em margin on the paragraph. If you view the page source and search for ‘div.post-bodycopy p’ you will see the line. Since this is inline CSS I don’t have a reference to tell you where to edit.

    http://screencast.com/t/6XMeBiBg

    Try adding it to the chat style.css and see if that help. But I hate to advise direct tweaks to the plugin style since updates mean you will loose customizations.

  • Paul33
    • WPMU DEV Initiate

    Okay – I’ve added it directly to the chat style.css and it works fine so many thanks for that – big improvement.

    Last but not least ( I will leave you in peace soon – honest !), going back to one of my earlier questions, I’m still running a heavily tweaked version of CHAT without the ability to CLEAR deleted posts. Rather than lose all my tweaks by loading up the latest release, are there just a couple of lines I can add to my existing version to bring about the changes or does it really need a full replacement ?

  • Paul
    • The Green Incsub

    I’m still running a heavily tweaked version of CHAT without the ability to CLEAR deleted posts.

    Did you upgrade to the second beta?? It should solve the archive/clear issue. Also be sure to deactivate then reactivate the plugin as there are some changes to the database structure into effect only on activation.

    https://dl.dropbox.com/u/2616987/WPMUDev/wordpress-chat-1.0.2-beta2.zip

    Rather than lose all my tweaks by loading up the latest release, are there just a couple of lines I can add to my existing version to bring about the changes or does it really need a full replacement ?

    No, not really. Again you should be able to apply any of your CSS changes to your theme which should override the plugin changes. But as I pointed out in my previous post these is a bunch of inline CSS styles from your theme. To prevent upgrades breaking your tweaks you really need to find out more about where to add CSS override changes outside of the plugin. Sorry to say that is outside of my ability since I don’t have access to your theme. And really is beyond the area of support for the chat plugin.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.