Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
MediaWiki Integration
MediaWiki Integration
0
Comments
I didn't see any variables that describe the location of the Vanilla install?
Do they need to share a folder or something?
// change these values to reflect your Vanilla database information
$wgAuth = new AuthPlugin_Vanilla($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, "LUM_");
This is what my $wgAuth looks like:
$wgAuth = new AuthPlugin_Vanilla($wglocalhost, $wgfakelogin, $wgfakepass, $wgfreshvanilla, "LUM_");
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/wiki/AuthPlugin_Vanilla.php on line 26 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/wiki/AuthPlugin_Vanilla.php on line 27 Warning: Cannot modify header information - headers already sent by (output started at /var/www/wiki/AuthPlugin_Vanilla.php:189) in /var/www/wiki/includes/WebResponse.php on line 10
I was still having the exact same error as Fullman, though. The header issue. Turns out there were a few line breaks not before <?php, but after the last line in the file. Probably introduced by me when copying stuff into localsettings.php
No output buffering necessary, for me anyway.
That said, my wiki still doesn't recognize any of my vanilla users. Do I need to change anything in authplugin.php? Like, what database it's going to use?
Edit: FIXT (when I was trying to fix the errors I commented out the auth line since I didn't need it . . . .well, i still need it. esp the part with the prefix.)
if(md5($password) == $vanilla_userinfo['Password']) return true;
I have 0 experience with Vanialla. Could somebody help me down the right path to correct the issue? I'm guessing I need to pull in vanilla's auth classes in somehow.
It is an incomplete method because if you log in to the forum it doesn't also log you into the wiki, but I am currently working on a project for works that provides that feature so I will post instructions when that's done.
Fatal error: Cannot redeclare class Database in /.../forums/library/Framework/Framework.Class.Database.php on line 25
This means that if you register on the forum as "john.doe", when you try to log into MediaWiki it will tell you that your account doesn't exist (because it's got a period in it).
One way to fix this would be to open up the regexp in AuthPlugin_Vanilla.php, but I don't know if that creates any wider MediaWiki issues. The safest solution seems to be to edit Vanilla's library/People/People.Class.UserManager.php, changing:-
Validate($this->Context->GetDefinition('UsernameLower'), 1, $SafeUser->Name, 20, '', $this->Context);
to:-
Validate($this->Context->GetDefinition('UsernameLower'), 1, $SafeUser->Name, 20, '^[a-zA-Z0-9]+$', $this->Context);
...which means that if a user tries to create a forum username that includes anything other than alphanumeric characters, they get an error message.
(I'll be tackling the two-cookie issue myself in the next couple of weeks, if nobody else has done so already.)