Extension:MediaWikiChat

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
MediaWikiChat

Release status:Extension status stable

MediaWikiChatScreenshot.png
ImplementationTemplate:Extension#type Special page, API
DescriptionTemplate:Extension#description Provides a lightweight chat system
Author(s)Template:Extension#username Adam Carter (UltrasonicNXTtalk)
Latest versionTemplate:Extension#version 2.18 (2016-12-30)
MediaWikiTemplate:Extension#mediawiki 1.25+. Warning: Download only offers 1.23 and 1.27+
PHPTemplate:Extension#php 5.2+
Database changesTemplate:Extension#needs-updatephp Yes
TablesTemplate:Extension#table1 chat
chat_users
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
README.md
ExampleTemplate:Extension#example Brickipedia
ParametersTemplate:Extension#parameters
  • $wgChatKicks
  • $wgChatRichMessages
  • $wgChatSidebarPortlet
  • $wgChatOnlineTimeout
  • $wgChatFloodSeconds
  • $wgChatFloodMessages
  • $wgChatLinkUsernames
  • $wgChatMeCommand
  • $wgChatUseStyleAttribute
  • $wgChatMaxMessageLength
Added rightsTemplate:Extension#rights
  • chat
  • modchat
  • viewpmlog
Hooks usedTemplate:Extension#hook
ParserBeforeInternalParseManual:Hooks/ParserBeforeInternalParse
UserRightsManual:Hooks/UserRights
LoadExtensionSchemaUpdatesManual:Hooks/LoadExtensionSchemaUpdates
SkinBuildSidebarManual:Hooks/SkinBuildSidebar
GetPreferencesManual:Hooks/GetPreferences

Translate the MediaWikiChat extension if it is available at translatewiki.net

Check usage and version matrix.

IssuesPhabricator

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 place the file(s) in a directory called MediaWikiChat in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'MediaWikiChat' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • YesY 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 you 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.
  • Usernames and avatars will only show once when a person sends multiple messages in a row since Gerrit change 329648.

Configuration parameters[edit]

These should be added below the line of installing MediaWikiChat:

  • $wgChatKicks – Enable the 'kicking' of other users by chatmods and sysops Disabled 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.
  • $wgChatSocialAvatars – Load users' avatars from SocialProfile? Deprecated as of version 2.12.8. Avatars are loaded automatically if possible.
  • 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 – is 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
  • idid=0 is the user ID of the user to be kicked.

See also[edit]


Social toolsSocial tools
SocialProfileExtension:SocialProfile OverviewExtension:SocialProfileDeveloper infoExtension:SocialProfile/For developersScreenshotsExtension:SocialProfile/ScreenshotsHistorySocial tools#History
Other social extensions Automatic Board WelcomeExtension:Automatic Board WelcomeBlogPageExtension:BlogPageChallengeExtension:ChallengeFanBoxesExtension:FanBoxesMiniInviteExtension:MiniInviteNewUsersListExtension:NewUsersListPictureGameExtension:PictureGamePollNYExtension:PollNYQuizGameExtension:QuizGameRandomFeaturedUserExtension:RandomFeaturedUserRandomGameUnitExtension:RandomGameUnitRandomUsersWithAvatarsExtension:RandomUsersWithAvatarsSiteMetricsExtension:SiteMetricsSiteScoutExtension:SiteScoutSportsTeamsExtension:SportsTeamsUserStatusExtension:UserStatusUserWelcomeExtension:UserWelcome
Other related extensions

(which do not depend on SocialProfile)

AnswersExtension:AnswersAJAXPollExtension:AJAXPollCommentsExtension:CommentsImageRatingExtension:ImageRatingLinkFilterExtension:LinkFilterMediaWikiChatExtension:MediaWikiChatNewSignupPageExtension:NewSignupPageTopListsExtension:TopListsVideoExtension:VideoVoteNYExtension:VoteNYWikiForumExtension:WikiForumWikiTextLoggedInOutExtension:WikiTextLoggedInOut