Extension:Discuz AutoAuthenticate
|
Discuz_AutoAuthenticate Release status: unknown |
|
|---|---|
| Implementation | User identity |
| Description | |
| Author(s) | Roy Lee |
| Last version | 1.0 (2008-12-12) |
| MediaWiki | 1.13.0 |
| License | No license specified |
| Download | download See Auth_Discuz.php |
| Example | http://www.surveyshome.com/wiki |
|
Check usage (experimental) |
|
Contents |
[edit] Version Infomation
- Extension: Disucz_AutoAuthenticate
- Forum: Discuz (http://www.discuz.net/)
- Version: 1.0
- Released: 12/12/2008
- UCenter version: 1.0
- Discuz Version: 6.1
- MW Version: 1.13.0
[edit] What this is
This causes users who are logged in to Discuz User center to be logged in to the wiki. When the session expires or they logout via Discuz, they will no longer be logged in to the wiki.
This is ideal for my situation since I desire tight user integration between Discuz and MediaWiki, and I require users to be logged in to edit pages. The wiki is new sub-application for my site, so there is no wiki user, and the admin username is the same.
[edit] Requirements
- Integrate with Discuz 6.1 and UCenter1.0. - Working MediaWiki (I'm using 1.13.0 as of writing this)
[edit] Installation
1. Save Extension:Discuz AutoAuthenticate.
2. Put it into the MediaWiki "./extensions" dir
3. In LocalSettings.php add:
## Add Discuz Authentication # If you experience the issue where you appear to be logged in # eventhough you are logged out then disable the page cache. #$wgEnableParserCache = false; #$wgCachePages = false; # Use DUC's login system to automatically log you in/out of the wiki # This will only work if you confige the wiki as a Discuz application # NOTE: Make sure to configure the wgCookeDomain below $wgDUCLogin = true; # www.domain.org/wiki and www.domain.org/forums -> www.domain.org # wiki.domain.org and forums.doman.org -> .domain.org # $wgCookieDomain = ''; # $wgCookiePath = '/'; // Optional, defaults to '/' # $wgCookieSecure = false; // Optional, only change on scheme mismatch # Require members to be a part of this DUC group(s) to login # NOTE: Members of the DUC Administrator group and the admin is add to the sysop group # The groupid is defined in your discuz.[discuzdb_prefix]usergroup # 10 is for registed user $wgDUCGroupName = '1,2,3,10,11,12,13,14,15'; # Grant members of this DUC group(s) wiki sysop privileges # NOTE: These members must be able to login to the wiki $wgDUCAdminGroupName = '1'; # Load up the extension require_once("$IP/extensions/Auth_DUC/Auth_Discuz.php"); $wgAuth = new Auth_DUC(); ## Restrict anonymous users from editing any page $wgGroupPermissions['*']['edit'] = false; ## The following line is actually necessary, don't remove it. ## Or, you'll get a blank page when edit some page. $wgGroupPermissions['user']['edit'] = true;
4. Modify config.inc.php Modify the file according your web site's configuration. You can find an example:
5. Setting up the extention as a UCenter application,
[edit] Bugs
- Probably lots more. I am a newbie at both PHP and MW, so it's unlikely that I will have thought of all the contingencies.
[edit] Fixes
[edit] Author contact
You can contact me at lihongzhai at gmail dot com. If you make this better, or know of a better approach, please do me a favor and let me know!
