Extension:MediaWikiChat

MediaWiki extensions manual
MediaWikiChat
Release status: stable
Implementation Special page , API
Description Provides a lightweight chat system
Author(s) Adam Carter (UltrasonicNXTtalk)
Latest version 2.24.0
MediaWiki >=1.39
Database changes Yes
Tables chat
chat_users
License GNU General Public License 2.0 or later
Download
README.md
  • $wgChatKicks
  • $wgChatMeCommand
  • $wgChatFloodMessages
  • $wgChatSidebarPortlet
  • $wgChatLinkUsernames
  • $wgChatMaxMessageLength
  • $wgChatRichMessages
  • $wgChatUseStyleAttribute
  • $wgChatFloodSeconds
  • $wgChatOnlineTimeout
  • chat
  • modchat
  • viewpmlog
Quarterly downloads 18 (Ranked 118th)
Translate the MediaWikiChat extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The MediaWikiChat extension provides a lightweight chat client and server for MediaWiki, accessed through Special:Chat.

Installation

edit
  • Download and move the extracted MediaWikiChat folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MediaWikiChat
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'MediaWikiChat' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Features

edit
  • Username autocompletion – Start typing the username of an online person (excluding yourself), then press tab, and it will be completed (As in IRC)
  • Pings – In user preferences, you can enable pings (chat playing a sound) when you receive mentions (someone says your name), private messages, or normal messages. Mentions will also be highlighted in red.
  • Fullscreen – In preferences, you can also enable chat to use fullscreen. (This is a slightly experimental feature that may need tweaks to your site's CSS (MediaWiki:Skinname.css) to fit properly with your skin.)
  • Idle users – after 10 minutes of inactivity, users on the sidebar will start to fade out (the background and text will get lighter), and a tooltip will appear showing how long the user has been idle for.
  • /me messages – as in IRC, you can send a "/me status" message, to show a system message with your status.
  • Blocking – by clicking on the link by a user's name in chat, (assuming you are a chat mod), you may block the user from chat. Users blocked from editing wikipages are blocked from chat by default.
  • Smileys – On your wiki you can add chat "smileys" or emoticons. See #Smileys for more information
  • Wiki syntax support – Most of wiki syntax options work in chat messages and private messages
  • Clearing the chat – to clear the screen of messages, just refresh the page. This will clear the screen and you will only see new messages sent after you have refreshed the page.
  • Sidebar module - Skins that support the sidebar interface message ('MediaWiki:Sidebar`) will show a sidebar module of all the users currently on chat.
  • Multiple consecutive messages from the same user are grouped, with their name and avatar shown once (since Gerrit change 329648).
  • Avatar support via Extension:SocialProfile when SocialProfile is installed

Configuration parameters

edit

These should be added below the line of installing MediaWikiChat:

  • $wgChatKicks – Enable the 'kicking' of other users by chatmods and sysops? Enabled by default.
  • $wgChatRichMessages – Parse of messages through the WikiText parser? Enabled by default.
    • $wgChatUseStyleAttribute – Allow the use of the style attribute on HTML elements? Enabled by default.
  • $wgChatOnlineTimeout – the length of time it takes for a user to be considered offline. Smaller values give faster response times for users to be considered offline, but increase the chance of users being reported offline when they aren't (there may just be a temporary blip in their connection to the server). Set in 100ths of a second. Default 6000 (1 minute).
  • $wgChatSidebarPortlet – Show the online users module in the sidebar? Enabled by default.
  • $wgChatFloodMessages – and $wgChatFloodSeconds Stops users sending more than X messages per Y seconds. Defaults to 3 messages per 5 seconds.
  • $wgChatLinkUsernames – Link to user pages in the main chat window? Disabled by default.
  • $wgChatMeCommand – Enable "/me <text>" command that prints a status-type message? Disabled by default.
  • $wgChatMaxMessageLength – Sets the maximum length for a message. Defaults to 1000 (characters).
  • You can change the image denoting users who are chat moderators at MediaWiki:Chat-mod-image. Set this to the URL of the image you would like to use.
  • A 'toolbox' for chat rules/helpful links/etc. can be shown above the chat window. Write the message at MediaWiki:Chat-topic.

User rights

edit
  • chat – users that are allowed to chat. Defaults to all registered users, except those in the 'blockedfromchat' group
  • modchat – users that can 'kick' other users (if enabled) and block them. Defaults to sysops and users in the 'chatmod' group.
  • viewpmlog – users that can see the private message log. Defaults to nobody, but you may like to add this group to CheckUsers/oversighters, for example.

Smileys

edit
  • MediaWikiChat parses all messages to replace certain character combinations with 'smiley' images. The 'smileys' to use are set in MediaWiki:Smileys, and should use the following format:
* <chars> <filename>
For example:
* :) Smile.png
* =D Yay.gif
* ;) Go-on-and-review-that-patchset-for-me.jpg
and so on...

Since MediaWikiChat 2.19.3, multiple character sequences can be used for one filename, like so:

* <chars1> <chars2> <chars...> <filename>
* :) :-) Smile.png
* =D :D Yay.gif

API documentation

edit

MediaWikiChat includes some new actions that can be used with api.php. The commands will run as the currently logged in user in the browser.

chatgetnew

edit

This API receives new messages. To call the API, use action=chatgetnew.

chatsend

edit

This API sends a message. To call the API, use action=chatgetnew along with appending one/both of the parameters.

Parameters
  • message: Sends a message, where message=''message'' contains the text for a chat message.
  • id: The used ID of the user the PM is to be sent to. In order to send a PM, chain both parameters like so: &id=''0''&message=''message''

chatkick

edit

This API kicks a user from chat. To call the API, use action=chatkick, along with appending the id parameter.

Parameeters
  • id: the user ID of the user to be kicked.

See also

edit