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

Release status: beta

Implementation Special page, Database
Description Allows users to subscribe to categories and receive daily email updates listing new and updated pages for each category
Author(s) Michael Yatzkanic (Myatzkantalk)
Latest version Beta 2 (May 16, 2008)
MediaWiki 1.11+
License GPL v3
Download Project page
Subversion [Help]

Browse source code
View code changes
Note Note: No localisation updates provided by Translatewiki.net.

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

Check usage and version matrix; code metrics

Description[edit | edit source]

CategorySubscriptions allows a user to subscribe to categories and receive daily email updates of the changes that occurred within each category during the previous day.

The goal of this extension is to allow a user to easily watch changes that occur within a category. Categories can be added directly (one category at a time) or by viewing a wiki page and viewing all the categories that wiki page belongs too.

Update[edit | edit source]

The code has undergone a major update. Please visit the new project home to get the newest source code.

This wiki page and the new Google code page will be updated in the near future to reflect the new changes.

Requirements[edit | edit source]

Pear[edit | edit source]

The following Pear packages are required for the php emailing script. If you do not have Pear installed you will have to install it in additon to these required packages.

  • Mail
  • Net_SMTP (if using smtp to send emails)
  • Net_socket (dependant of net_smtp)

If you are using a different emailing protocol other than SMTP you will have to configure the mailer script and Pear as needed.

SQL Table[edit | edit source]

An installer script is now provided to create the table automatically. The following is left for reference.

A new table must be created in the mediawiki database. The table is very simple and has only 3 columns

  • id - unique identifier for each column (auto-increment)
  • user_id - the id of the user making the subscription
  • category - the name of the category to be subscribed too

The SQL statement to create the table (note: only tested on MySQL database):

CREATE TABLE category_subscriptions ( 
   id int(10) unsigned NOT NULL auto_increment,
   user_id int(10) unsigned NOT NULL default '0',
   category varchar(255) NOT NULL default '',
   PRIMARY KEY  (id)

If your MediaWiki installation has a database prefix, be sure to prefix it to the table name. Example, if $wgDBprefix="mw" then your table name will be "mwcategory_subscriptions"

Installation[edit | edit source]

This section will be updated to reflect the new procedure...

  1. Install required Pear packages and create new table in database
  2. Create directory "CategorySubscriptions" under the extensions folder of your wiki installation
  3. Copy all 3 php files (CategorySubscriptions.php, CategorySubscriptions.i18n.php, CategorySubscriptionsMailer.php) into the folder you just created
  4. Add the following code to your LocalSettings.php file:
  5. Configure the mailer script (database host, user name, password, etc...)
  6. Using your favorite automation method, set the CategorySubscriptionsMailer.php script to run every morning.

Usage[edit | edit source]

New and improved usage instructions will be up shortly, as the interface to the extension changed slightly.

Code[edit | edit source]

Code is now available through svn at the Google code page linked in the info box.