Author
Topic: SMF MediaWiki integration released (Read 354076 times)

You are right, the SMF doesn't know something about the wiki, I add a new Tab and it's okay.

I tested the thing with subdomain cookies and I can login at my SMF without any error. But the MW give me new warnings: "session_name() [function.session-name.php]: session.name cannot be numeric or empty " in /home/restofthepath/folder/wiki/extensions/Auth_SMF.php on line 333" and "session_destroy () [function.session-destroy.php]: Trying to destroy uninitialized session in /home/restofthepath/folder/wiki/extensions/Auth_SMF.php on line 334"

As I wrote a post before yours:I uncommented in the localsettings.php this two values:$wgSMFGroupID = array(2);$wgSMFAdminGroupID = array(1, 3);

And only "not administrator's" can use the mediawiki. I couldn't fix it, that I - as admin - can use the bridge as well and nobody from the SMF team cares about the broken bridge (very sad). eKyNoX had the problem as well and wrote about it in march 2015. Nobody has done something so far and I don't think it will happen any time soon.You see, since august - my last post - nobody respond. Hopefully this will help you a little bit, but maybe you can fix it and publish it to the community.

Shadra,If you use $wgSMFGroupID, you need to specify all group ids that can access the wiki. In SMF by default groups that have to exist:1 = Administrators2 = Global Moderators3 = Moderators (pseudo type group that is only autofilled when viewing a board though)After that you have the groups it creates by default with IDs 4 to 8 for some post based groups.

In the example, $wgSMFGroupID uses group ID 2, which are Global Moderators. So only those who are Global Moderators will be able to use the wiki if you follow the example.

We don't make use of $wgSMFGroupID here, we actually use $wgSMFDenyGroupID and use the same group id provided in the example (4). This prevents users with less than 10 posts from being able to login/modify the wiki and we do this as it offers us the best spam control on our wiki. We usually can find and stop a spammer on the forums before they reach 10 posts, legit users usually can get past this in a short time and then are free to modify the wiki.

# Members in these SMF groups will not be allowed to sign into wiki.# This is useful for denying access to wiki and a easy anti-spam# method. The group ID, which can be found in the url (;group=XXX)# when viewing the group from the administrator control panel.#$wgSMFDenyGroupID = array(4);

# Grant members of this SMF group(s) access to the wiki# NOTE: The wgSMFDenyGroupID group supersedes this.$wgSMFGroupID = array(4);

# Grant members of this SMF group(s) wiki sysop privileges# NOTE: These members must be able to login to the wiki$wgSMFAdminGroupID = array(1, 2);So all users, including myself, should now have access to the wiki, but I've still the problem that my session don't work.

Warning: session_name() [function.session-name.php]: session.name cannot be a numeric or empty '' /wiki/extensions/Auth_SMF.php on line 333Warning: session_destroy() [function.session-destroy.php]: Trying to destroy uninitialized session in ' /wiki/extensions/Auth_SMF.php on line 333

// Back to whatever we had (we hope mediawiki).session_name($old_session);

// Now SMFs turn.smf_sessionSetup();

// This means we have no SMF session data or unable to find it.if (empty($_SESSION['session_var']))return true;

smf_redirectWrapper('logout_url', 'logout;' . $_SESSION['session_var'] . '=' . $_SESSION['session_value']);}I'm loged in on my board, but as user that doesn't matter, because I'm automaticly loged in on the wiki, too. But not as admin.

I have a problem with this bridge. I have, I think, already tried all options. In the MediaWiki Forum members are not detected. It can not log any in the MediaWiki. There are only the standard groups of the Forum. The Forum and the MediaWiki lying on the sub domain wwx.unterdomain.hauptdomain.dev. The root of the MediaWiki is as subfolder of the root of the forum. Both use the same database.

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

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

# Use SMF's login system to automatically log you in/out of the wiki# This works best if you are using SMF database sessions (default).# Make sure "Use database driven sessions" is checked in the# SMF Admin -> Server Settings -> Feature Configuration section# NOTE: Make sure to configure the $wgCookieDomain below#$wgSMFLogin = true;$wgCookieDomain = 'hauptdomain.dev';and tested it with$wgCookieDomain = 'unterdomain.hauptdomain.dev';

Thank you for clarifying. I tried installing mediawiki 1.26, but they have a different system for calling extensions. Where can I find the updated version, the json file, required to install this extension?

The old method of requiring a file via localsettings.php changed after 1.25, I believe.

Just a note to those who may be stumbling in getting the cookie to carry over (MediaWiki continuously showing log in). I was able to resolve it by pulling down the July 2014 version of the Auth_SMF.php file and using that rather than the Fix #12 version from July 2017.

Hi guys,This seems to be the right topic for me and I hope you can help.

Recently I installed MediaWiki 1.30 and wanted to integrate its users with SMF 2.0.15. So I basically want MW to use SMF user accounts for authentication, so no new accounts have to be created.

I tried SMF extensions listed in hte MW Extensions page: hxxp:www.mediawiki.org/wiki/Category:Simple_machines_forum_extensions [nonactive] but they are very old. Most of them are already not available (sites do not exist anymore) and the rest just doesn't work with SMF. I'm getting error after an error. Not even able to see the logon page. By the source code it seems the ones I found do not support SMF 2.0.

Does anyone from you have a MW extension for SMF 2.0 that just works? Like I download it, install it, configure e.g. in LocalSettings and job done? I'm not able to resolve all these incompatibility issues in PHP code by myself.

Hi all,I have the same problem that a few previous have had in that I have setup the auth and local correctly (to my knowledge) and when i click on "login" in the wiki it redirects me to the SMF login, after login I redirect back to the wiki but I am not logged in at all.

I have posted a help topic within MW but that hasn't had any hits.It does, however, have more information. So please refer to it.mediawiki.org/wiki/Topic:Ud5w2egnyevk1r1o

I would really appreciate any help. I have gone through the code line by line, function by function, and created alerts to find out where it possibly drops out but with no luck. I'm still with the same original issue of not being able to actually use SMF to login to the wiki...