MyBB Community Forums

Full Version: MyBB Mediawiki
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
I downloaded it from here, I don't know if it's the latest, but it doesn't work with my new version of Media Wiki :s
I don't think that the link you provided will work in the latest version of MediaWiki, which is 1.16.0
Any updates on this ?
(2010-10-01, 03:01 PM)laeresh Wrote: [ -> ]Any updates on this ?
second

Since no one is doing this, i'll think i give it a go, no php programmer, but hey perhaps i make the lucky shot.
Will post result somewhere end of this week.
Attached is the AuthMyBB.php I'm using, and it works with the latest (final) versions of MyBB and MediaWiki. You'll need to change the row

var $forum_path = "../forums/";

to point to whatever directory you're hosting your MyBB in (relative to the MediaWiki directory). After changing the default path (if required), save the file to your MediaWiki directory.

These are the settings I have in the LocalSettings.php of MediaWiki:

# Don't let users mess with their accounts through MediaWiki
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;

# Users cannot use the login function inside of the wiki to login.
$wgUseWikiLogin = false;

# These lines are required for the plugin to load
require_once("./AuthMyBB.php");
$wgAuth = new AuthMyBB();

# Disable everything of caching, caching is boe for the login system.
$wgEnableParserCache = false;
$wgCachePages = false;

As I said earlier, this still has some issues - with people using underscores in their login names, if I remember correctly - but at least it works for the most part.

Hope this helps someone.
That single session login thing would be really nice. I might try my hand at getting that part to work...
One possible solution would be to create a new field for your users storing a wiki-compatible username and referencing that (instead of the real username) in MyBBAuth.php. You would need to keep these wiki usernames unique (eg. verify them on user registration or username change).
Is there a version that works with the current MyBB?
At least for me, the script I posted here works with MyBB 1.6.2 and MediaWiki 1.16.2.

At first I thought, that upgrading MediaWiki to 1.16.1 broke the authentication, but the problem was in that I use frames on my site. The 1.16.1 patch "involves denying framing on all pages except normal page views and a few selected special pages.".

If you want to allow MediaWiki to run inside a frame (or iframe) under your domain, you need to add the following line to your LocalSettings.php in the MediaWiki directory:

$wgEditPageFrameOptions = 'SAMEORIGIN';

More details at http://www.mediawiki.org/wiki/Manual:$wgEditPageFrameOptions
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20