ShoutBox Extension

From Jimbojw.com

Jump to: navigation, search

The ShoutBox Extension is a MediaWiki extension which adds a parser function called #shoutbox for embedding ShoutBoxes.

It is released under The MIT License.

Contents

Compatibility

This extension requires:

  • MediaWiki 1.6.x, 1.9.x, 1.10.x or higher
  • PHP 4.x, 5.x or higher

Installation

  1. Download ShoutBox, and be sure to rename the downloaded file to ShoutBox.php.
  2. Drop this script in $IP/extensions
    Note: $IP is your MediaWiki install dir.
  3. Enable the extension by adding this line to your LocalSettings.php:
    require_once('extensions/ShoutBox.php');

Configuration

Note: All instructions in this section are strictly Optional

The following global variables may be specified in LocalSettings.php AFTER the require_once() call to activate the extension.

Global Purpose Default
$wgShoutBoxMinWidth Defines the minimum acceptable width in pixels for embedded shoutboxes. 100
$wgShoutBoxMaxWidth Defines the maximum acceptable width in pixels for embedded shoutboxes. 600
$wgShoutBoxMinHeight Defines the minimum acceptable height in pixels for embedded shoutboxes. 100
$wgShoutBoxMaxHeight Defines the maximum acceptable height in pixels for embedded shoutboxes. 1024
$wgShoutBoxDefaultId Default ID to use when creating a shoutbox. null
$wgShoutBoxCSS Absolute URL to CSS stylesheet to use when styling a shoutbox. null

Usage

Once installed, you (or editors of your wiki) may begin embedding shoutboxes into any article.

The parser extension expects to be called in any of the following ways:

  • {{#shoutbox}} (if a $wgShoutBoxDefaultId has been specified) -or-
  • {{#shoutbox:id}} -or-
  • {{#shoutbox:id|width}} -or-
  • {{#shoutbox:id|width|height}}

Where:

  • id is the id of the shoutbox to display
  • width (optional) is the width in pixels of the shoutbox (defaults to 150 if unspecified)
  • height (optional) is the height in pixels of the shoutbox (defaults to 300 if unspecified)

Example

Here is the Meopedia shoutbox.
{{#shoutbox:27760|400}}

Comments

Got something to say?

Leave a comment
Sorry, comments are disabled.

or, read what others have said ...