Extension:SMF/Users Integration

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear action run.svg
SMF/Users Integration
Release status: stable
Implementation User identity
Description Links MediaWiki's user table to SMF's.
Author(s) Nicholas Dunnaway
Latest version 1.3.0 (2007-04-06)
MediaWiki 1.9
License GPL
Download php|uber.leet
Google Code
Change log
Example Source
Translate the SMF extension if it is available at translatewiki.net
Check usage and version matrix.

This extension links MediaWiki to SMF's user table for authentication, and disallows the creation of new accounts in MediaWiki. Users must then log in to the wiki with their SMF account.

Installation[edit]

Extension[edit]

The extension requires PHP 4.2+, MySQL 4+, and MediaWiki 1.9.2 If you need help, log in at uber.leetphp.com and select 'Support' on the main menu.

  1. Download the extension (download, view source code). Put Auth_SMF.php in /extensions/
  2. Add the code below to the bottom of LocalSettings.php.
  3. Make a new SMF group called "Wiki Editor". If you set $wgSMF_UseWikiGroup to 'true', only users in the 'Wiki Editor' group can edit MediaWiki.


// This requires a user be logged into the wiki to make changes.
$wgGroupPermissions['*']['edit'] = false; // MediaWiki Setting

// Specify who may create new accounts: 0 means no, 1 means yes
$wgGroupPermissions['*']['createaccount'] = false; // MediaWiki Setting

// SMF User Database Plugin. (Requires MySQL Database)
require_once './extensions/Auth_SMF.php';

$wgSMF_WikiGroupName  = 'Wiki Editor';          // Name of your SMF group
                                                // users need to be a member
                                                // of to use the wiki. (i.e. wiki)

$wgSMF_UseWikiGroup   = true;                   // This tells the Plugin to require
                                                // a user to be a member of the above
                                                // SMF group. (ie. wiki) Setting
                                                // this to false will let any SMF
                                                // user edit the wiki.

$wgSMF_UseExtDatabase = false;                  // This tells the plugin that the SMF tables
                                                // are in a different database than the wiki.
                                                // The default settings is false.

$wgSMF_Version = '1.0';                         // This is what version of SMF you are using.
                                                // Current valid values are 1.0 and 1.1

/*-[NOTE: You only need the next four settings if you set $wgSMF_UseExtDatabase to true.]-*/
// $wgSMF_MySQL_Host     = 'host';               // SMF MySQL Host Name.
// $wgSMF_MySQL_Username = 'username';           // SMF MySQL Username.
// $wgSMF_MySQL_Password = 'password';           // SMF MySQL Password.
// $wgSMF_MySQL_Database = 'database_name';      // SMF MySQL Database Name.

$wgSMF_UserTB         = 'smf_members';        // Name of your SMF user table. (i.e. smf_members)
$wgSMF_GroupsTB       = 'smf_membergroups';   // Name of your SMF groups table. (i.e. smf_membergroups)
$wgAuth               = new Auth_SMF();       // Auth_SMF Plugin.

Known Issues[edit]

  1. Does not like names with underscores in them.
    • It doesn't like dashes either. - Slamlander 22:46, 25 November 2006 (UTC)


Change Log[edit]

  • Release 1.3
    • Now fails with an error when the Wiki Group is not found.
    • Now works with SMF 1.1.2
    • Fixed Mixed casing password bug.