MediaWiki, bbPress, and WordPress integration..
Published 1 year, 5 months agoI should have written this up a while back, but, I was just so busy then, I didn’t have the time!
Anyway, here’s what I have done to get my MediaWiki, bbPress forums, and my WordPress blog working together in harmony!
- I installed MediaWiki 1.10-alpha on my domain.
- Then customized the links for it and so forth. So I removed all references to the index.php/ in the Wiki URLS.
Examples below here:
http://wiki.mydomain.net/The_Codex:Community_Portal
http://wiki.mydomain.net/Main_Page?action=edit§ion=1 - Integrated bbPress to my WordPress blog. So anyone that registers on my bbPress forums, is automatically registered into my WordPress blog. Usernames and Passwords work for BOTH..
- Applied the bbPress_Auth_for_MediaWiki extension to my MediaWiki.. However, I had to use some of the modifications listed here.
Now, people can login to my MediaWiki with the usernames and passwords from either my WordPress blog, or the forums..
However, there is a downside, and that is people can’t register directly on my MediaWiki. If they tried too, it would give the following error message:
“Login error:
There was either an external authentication database error or you are not allowed to update your external account.”
Well, since I’m awesome like that! I’ve come up with a work around for this! And here below is what I had done..
- Edited the MediaWiki:Sidebar by adding in my own custom Register link, pointing to the Blog’s register page.
- Edited some of the MediaWiki: (Logouttext, Createaccount, some Login”whatever files”, Nologin, Notloggedin, and maybe a few others) files - Removing all the “create account” references. So the “Login / Create Account” link was chopped down to just “Login”.. Same goes for the one found on the actual login page..
- Replaced those “create account” words/calls with custom text saying “Please click on the register link in the sidebar. Once you’ve created an account through my blog’s register page, you’ll get an email with the details. Once registered, your username and password will allow you to login on the Codex.”
- Also, had added that little “hack” to hide the [Edit] link on the pages and stuff, if not logged in.. I had done this before even doing the above!
So far, I’m good to go on the Codex side of things! I’ll just have customize the email that comes from the blog after they register there, and the same for the forums. And that’s what I’ll cover below here..
- I downloaded and installed the Themed Login and Registration plugin for WordPress.
- Upload it to the: wp-content/plugins/, then activate it as normal.
-
I then made a page called: Where To
Since I have pretty permalinks on, the page’s location is here for example: domain.net/where-to/
In the Where To page’s Write Window, I added the following text/urls for example:
“If you are seeing this page, you now have the ability to access the following places with your username and password.
The
<a href="http://wiki.yourdomain.net/">Codex</a>.
The<a href="http://yourdomain.net/forums/">Forums</a>.
The<a href="http://yourdomain.net/wp-admin/">Site Admin</a>. “ -
Under Plugins => Login Register Options =>
A) Under the: Uninstallation Options => I put check in box for: Toggle Complete Uninstall:
B) Under the: Redirect After Login:
=>I changed wp-admin/ to where-to/If you have the normal setup for the permalinks, (for me on localhost this worked): /?page_id=11
Of course, change the actual number to your own..
C) Under the: Redirect After Logout: => I left this one at: wp-login.php
D) If you are using any other theme, then the “Gathering” theme, you might want to skip this section. And follow the directions for it, according to your theme’s layout!
Unless your sidebar call is like this.. in the index.php file:
<?php get_header(); ?>
<?php get_sidebar(); ?>Still in the Login Register Options, I left everything alone from there down TILL the part for the Template Header Files: section..
Since I’m using the Gathering theme, the call for the sidebar in the theme files is right after the header call.
<?php get_header(); ?>
<?php get_sidebar(); ?>D-1) In the Template Header Files: window, I made it like this:
header.php
sidebar.phpD-2) In the Template After Header HTML: window, I made it like this:
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id="maincontent">D-3) In the Template Before Footer HTML: window, I made it like this:
<?php endif; ?>
</div>
<!--index.php end-->
<?php get_footer(); ?>D-4) In the Template Footer Files: window, I made it like this: footer.php
E) Scroll down to the User Email Template: window. Since he uses variables for his stuff.. here is what I used for mine, and it works because I got the email after doing a test sign up.
Username: ##username##
Password: ##password##You now have the ability to access any of the following locations with your username and password.
The Site Admin
##siteurl##/wp-admin/The Forums
##siteurl##/forums/The Codex
http://yourwiki.yourdomain.netPlease note: Of course, change the The Codex and Forums urls to whatever your’s is.. example: ##siteurl##/my-forums-folder-name/
And for Codex/Wiki: http://yourdomain.net/yourwiki/ or whatever..
Then, I clicked the Update Options button..
F) In my Theme’s CSS File, I added the following CSS Style references:
#login {margin:0 auto 0 auto;width:250px;}
#login ul {margin:0;padding:0;}
#login ul li {display:inline;margin-left:10px;}
After doing the above, everything seems to be working just fine for me! I hope this helps others..
UPDATE: I’ve decided to remove my MediaWiki, or better known as the Codex. I merely installed it to play around, customize, and get familiar with it.
The whole reason for removing it is, I really don’t have the time for it. I don’t have time to add anything to it, make a theme for it, and customize it anymore.
As for this article, it’s still a good reference guide as what To-Do for getting your MediaWiki, bbPress, and WP login/registration working together.
I hope you find it as useful as I did. Well, I guess that’s it for now. Tata.
For additional reference links, here they are:
http://www.mwusers.com/forums/showthread.php?t=3348
http://bbpress.org/forums/topic/486?replies=12
Adam on January 20, 2007
Hey Spencerp
I was wondering if your bbpress-wordpress integration allowed users to login into either app and it would mean they are instantly logged into both?
cheers!
spencerp on January 21, 2007
Hey Adam,
I just checked it, and I don’t believe so. I logged out of my forums, then did a CTRL + SHIFT + R while in Firefox, refreshed this page here, and was still logged into the blog.
However, depending on what settings are enabled in your Firefox.. Once logged in, it will keep you logged into all of them. So for me, once I’m logged into forums then close the forums browser window, browse my blog and then reopen a window for the forums, I’m still logged into it.
I would love that though, if it was possible. I hope this helps.

Openology on July 18, 2007
We are working on integration of opensource application from 2 directions - the frontend visual and backend function.
What you have describe is very common, the mismatch template is a pain to integrate. Our thoughts is to have a standard structure across different applications so that visual customization could work across applications.
On the backend part we are still experimenting but we have some codes working for wordpress, mediawiki and phpbb.
Helio AKA. Dennis O. Madsen on September 4, 2007
What a cool guide, - huge shoulder claps from me to you!
There is one HUGE problem though (understatement);
1.First of this plugin wich you uses in your guide, is no longer avaible for download?
http://codex.wordpress.org/User:RobLa/bbPress_Auth_for_MediaWiki
(if it where, i don’t know if it works with newest versions of wordpress and mediawiki.)
2. this IS still avaible:
http://hery.blaogy.org/2007/02/21/mediawiki-wordpress-integration/
And it seems to be great EXCEPT, it’s USELESS today, because it dosn’t work with the new version of mediawiki and wordpress, as they write on the site:
“This extension is tested with Mediawiki 1.6.9 (the latest release for PHP4) and wordpress 2.1. It will not work (yet) for Mediawiki > 1.6.9 (because of PHP5) but the next version will be PHP5 ready.”
Well “my” logic was, that php5 is backward compatible, there for it sounded like nonsense; so i just desided to try it out, and guess what, the instructions wast right, - the plugin just don’t work with the newest mediawiki; i got the following error, when trying to login with a user from wordpress: “Wiki has a problem
Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Can’t contact the database server: Unknown error)”
******now my question******
Is there any plugin or way out there you know off, to make the step nr. 4 in the guide possible? (make it possible to login to MediaWiki with the usernames and passwords from a WordPress blog, thats shares the same database.)
I hope somone smarter than me, has some views and solutions on this topic, as all treads about this subject seems outdated, and the topic seems more important than ever.
In advance thnx.
/Helio AKA. Dennis O. Madsen
PS; i have tryed to get answers in theste two treds too:
http://bbpress.org/forums/topic/mediawiki-bbpress-and-wordpress-integration?replies=29
http://wordpress.org/support/topic/132820?replies=1#post-611044
spencerp on September 17, 2007
Hello Dennis,
Wow, I haven’t dealt with MediaWiki for a long time. Lucky for you, I THINK I have a copy of the AuthPress.php file on a CD backup some where. I’ll have to find it then.
However, like you said, with the newer versions of MediaWiki and WordPress that are out, or coming out, I’m not sure how this will work… I’ll have to set up another copy of MediaWiki and BBpress forums again and test things.
“Is there any plugin or way out there you know off, to make the step nr. 4 in the guide possible? (make it possible to login to MediaWiki with the usernames and passwords from a WordPress blog, thats shares the same database.)”
Well, with the original setup which I’ve written about above in the post. The Username and Passwords from the WP blog did work with the MediaWiki, not just from the BBpress forum User and Passwords.
Originally it’s supposed to be for BBpress Forum username and passwords to work with MediaWiki, like they have setup on the WP.org Support forums and Codex. But, in this case we’ve taken it a step farther.
As for your error there, I don’t remember getting that one. I’ll have to check things out again, because things (plugins and hacks) are so outdated it’s not funny. And with newer versions of MediaWiki and WordPress coming out, it’s only making things worse sigh.
I’ll keep you posted ok.

spencerp on September 17, 2007
Oh yeah, I found a copy of that Dennis. Here’s what I had before…
http://spencerp.net/downloads/AuthPress.php.txt
I hope that helps?
Smirnoff on October 4, 2007
Hi Spencerp
It seems you’re the only MW-WP-bb expert in the whole Net, so would you mind my stupid question?
I’m trying to make the same integration. Well, WP+bb are working ok and use the same account database, no problems with them.
I’ve installed all the extensions for MW to enable the integration, and here’s what I have. When I try to log on into MW, it’s successfully checking account info, and tells me if something is wrong with the credentials, so it IS ABLE to get the info.
But: while installing MW i’ve created admin acc-t called ADMIN, it’s the same name as WP user. I am able to authenticate in MW with this account, everything’s working for admin. But I can’t log in with any other WP account: if I enter wrong credentials (username or password) it says it’s wrong; if I enter PROPER ONES, it fails saying
“Internal error
There was either an external authentication database error or you are not allowed to update your external account.
Backtrace: ….”
So, it is working only for account that was created in MW _before_ connecting WP acct database.
I have WP 2.3, and I was working with MW 1.11. I thought probably they’ve changed something in MW scheme, and downgraded it to 1.9.4 (since it was working on your 1.10). No way, the problem remains.
Sorry bothering you, but maybe you have any ideas about this situation?
Thanks anyway,
Regards,
d.s.
Smirnoff on October 4, 2007
Hi there
Looks like I’ve found the solution.
We have to change something in AuthPress.php:
function setPassword( $password ) {return false;}
to
function setPassword( $password ) {return true;}
That way it is working.
Thanks
spencerp on October 4, 2007
That’s probably because I’m “Mr. Awesome”, hence for my blog title.
Smirnoff, I hadn’t tried this integration on WP 2.3 yet. But, I can say that I got that error before myself. Here’s what I wrote above in the post…
Yeah, exactly. See, the integration is for it to RUN OFF OF the WordPress registrations, or.. bbPress registrations. Depending on what you want exactly. I had it so people had to sign-up through my WP blog FIRST or the bbPress forums, then their user and passwords would work on the bbPress forums, WP blog, and the MW.
I had ALL THREE databases in under ONE main database…So when in phpMyAdmin.. you would see ALL three software database tables in there under ONE main database… And your MW user table would be void, after the integration was done correctly. Your MW user table would basically be replaced with Wordpress’s user table. Same goes for the bbPress user table. Well, the bbPress user table and WP user table.. were pretty much working together. Then they controlled the MW user table…
See, I never tried this integration on WP 2.3 before, nor anything above MW 1.10. This integration hack of mine here, was done up along time ago, on older versions of MW, WP, and bbPress. So technically this “hack” of mine is void…I’ll have to get back into this stuff again and try again though…
If you’re trying this on MW 1.9.4, but on WP 2.3 and the latest bbPress forum software, I’m not sure how it will work…? I forget what WP version, and bbPress version I had when doing up this “hack” of mine… =/ It’s been many months ago lol. The whole “hack” of mine was pretty much void after a few other releases of MW though… Because I had quite a few discussions about THAT/THIS on their email lists back when…
They kept up-ing their security and made various PHP code changes and database handling changes that it through this “hack” into a downward spiral towards a crap heap. I wished they left it alone though, but they didn’t.
Again, I’ll have to get working on THIS stuff again to see for myself, and see if I can get something working for THIS again…
No need to apologize, you’re not bothering me.
The only thing I can really say about it, is, it sounds like you’ve got it for most part now. But, I’ll still have to test this all out later then… I just been busy with other things, where I don’t have the time for it yet, sigh. I’ll try to get on this soon though.
LOL! I don’t know about THAT though. I didn’t have to do anything “hack wise” to that file. Cause when I had it setup, it was for people to register on my forums OR my WP blog and then that username and password would work on the MW.
From the “fix” you gave above there, I think that’s only to fix the issue regarding registering on your MW directly right? Looking forward to your reply..
Smirnoff on October 5, 2007
Hi,
nope, that was all about using WP or BB (WP in my case) account to authenticate ang log in to MW. It wasn’t working for all accounts except Admin. After applying this hack I can log in to MW using any WP account, either old or newly created. I have not tested creation of the new account in MW itself after integration yet, but I think it’s better to disable this feature as you did.
For some reason it WAS WORKING at your system without the ‘hack’, you were able to use WP accounts in MW, but I was unable to do that as I said. This hack is only for enabling the same functionality as you had with the most recent versions of WP, BB and MW.