SMF and MediaWiki Bridge

Started by rsw686, February 08, 2008, 08:28:51 PM

Previous topic - Next topic

Invers

MultiformeIngegno, well I have installed everything in one domain like this:
www.mydomain.pl/forum
www.mydomain.pl/wiki
and I wanted it to work at last in that config, and it's working.
I don't know much of SMF code and all, but it looks like this bridge don't use SSI.php at all.

Are you sure that in the part which you copy to mediawiki config file, LocalSettings.php, you set everything right?
I mean this:

# Make "Enable local storage of cookies" is unchecked in the
# SMF Admin -> Server Settings -> Feature Configuration section
# www.domain.org/wiki and www.domain.org/forums -> www.domain.org
# wiki.domain.org and forums.doman.org -> .domain.org
#$wgCookieDomain = 'www.domain.org';
#$wgCookiePath = '/'; // Optional, defaults to '/'
#$wgCookieSecure = false;  // Optional, only change on scheme mismatch


In your case, $wgCookieDomain should be set to '.domain.org'
if it's set as it should and it does not work,  then, well I can't do much about it :(

MultiformeIngegno

Quote from: MultiformeIngegno on March 26, 2010, 02:26:25 AM
I've tried the bridge with the new 1.16beta and it doesn't work!!
They released 1.16beta3...
Someone who wants to "investigate" on why the bridge doesn't work anymore on the new version..? :P
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

fred2028

So I installed this  bridge on my localhost server and currently it does nothing. When I login to SMF and then go to the wiki, it's logged out. I click login and it directs me to SMF. I login and am back to SMF's main page.

When I manually login to the wiki, I click logout and it shows an SMF page saying Session Unverified, please login/logout again.
Cheers,
Fred Liu

Invers

Quote from: fred2028 on June 29, 2010, 02:14:04 PM
So I installed this  bridge on my localhost server and currently it does nothing. When I login to SMF and then go to the wiki, it's logged out. I click login and it directs me to SMF. I login and am back to SMF's main page.
That is right, file in first post is a bit outdated and won't work with current wiki version.
Quote from: fred2028 on June 29, 2010, 02:14:04 PM
When I manually login to the wiki, I click logout and it shows an SMF page saying Session Unverified, please login/logout again.
True, that is a bug. I had that problem too.

Did you try using that file I posted? It works for me.


Leemy

Im running this successfully between 2.0RC3 and 1.14. Will I have an issue in upgrading to 1.15? Does it bring benefits for a sparsely used, basic wiki? I doubt it, but am asking.. Thanks,

MultiformeIngegno

It will work fine 'til 1.15 (included), only 1.16 isn't supported... For changes in 1.15 you can read the changelog at mediawiki.org. :) 
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Invers

Good news. It will work with latests mediawiki beta.
I figured out what was wrong. I just need to make sure it wont stop working on 1.15


MultiformeIngegno

@Invers: you own a kiss if you post a version that works with 1.16! :P
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Invers

Ok, it should work now on mediawiki from 1.13 to 1.15.4 and 1.16betas.
And I have even more good news :3
Login/Logout redirecting works now as it should (at last for me) - I tested it on mediawiki 1.15 it should work on 1.16 to, someone need to test

I was trying to do full testing on my combo -  kinda broken smf2.0rc3 install + mediawiki 1.16beta3 but it acting a bit random (I have broken apache and php on my local server)

On my server where I have normal smf2.0rc3 install + mediawiki 1.15.4, there is no problems. it works great :3

If someone want to know what was wrong.
line 183 should look like that    function AutoAuthenticateSMF($user, &$result) {
and it was
Quotefunction AutoAuthenticateSMF(&$user, &$fix) {
the main problem was that ampersand before $user, dunno if &$fix was a problem too.

Attached already modified file, test it and tell if it works

MultiformeIngegno

Tomorrow I'll try with 1.16 beta! ;)
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

MultiformeIngegno

Quote from: MultiformeIngegno on July 03, 2010, 07:22:27 PM
Tomorrow I'll try with 1.16 beta! ;)
It works!!!! :D
Thanks Invers!!!! The only problem I've noticed is the old "session verification failed" that I always had also with previous Auth_SMF.php...
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Invers

@MultiformeIngegno
The "session verification failed" must have something to do with subdomian config you are using.
I will look into that at the end of this week... Well once I figure out how to create subdomians on my localhost with is windows+xampp ^^'

ups

#272
Having trouble with 1.16 :(

It seems to identify the sessions correctly from SMF, but when I try to edit a page, it show the "Lost session data" error. No idea what can be wrong.

[edit]
Got it!

There was an error on the cookie domain. It was defined with www. and I wasn't using it on the url.

Now I have another problem. If I logout of SMF, the session is not destroyed in MediaWiki.
I worked around with


if($ID_MEMBER == 0)
{
session_destroy();
if($user->isLoggedIn()){
$user->logout();
}
return true;
}


But this only works on the second page load on mediawiki after loggin out.

Joshua Dickerson

rsw686, are you still developing this? Sorry for not reading the entire topic, I read the first two or so pages.

Any reason you didn't choose to make this in to a mod? People (like me) would be very interested in it as a mod. At least make the file downloadable from this site.

Any reason you didn't go with the SMF functions since you are already using API file?

I've made some changes to it and I'm making some more which I will upload here shortly.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

MultiformeIngegno

rsw686 is no more developing this bridge (I think he moved to another platform..)! :(

Quote from: groundup on August 28, 2010, 12:25:35 PM
I've made some changes to it and I'm making some more which I will upload here shortly.
Great! Keep us updated! :)
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Draffi


Kindred

no update right now. The current bridge which we are using is far too specific to the oddness that is simplemachines.org and is not currently extensible.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Goss

#277
I seem to be having a bit of trouble getting this up and running.  I've recently installed mediawiki and have installed this bridge to get it connected with my forum.  However, when I click the log-in button it redirects me to the forum login page.  I login there and then it only logs me in on the forum.  If I return to the wiki page, I am not logged in. 

Here is my LocalSettings file. 

# SMF Authentication
# To get started you only need to configure wgSMFPath and wgSMFVersion.
# The rest of the settings are optional for advanced features.

# Relative path to the forum directory from the wiki
# Do not put a trailing /
# Example: /public_html/forum and /public_html/wiki -> ../forum
$wgSMFPath = "../forum";

# Set to the version of SMF you are using.
#$wgSMFVersion = "1.1";
$wgSMFVersion = "2.0";

# Use SMF's login system to automatically log you in/out of the wiki
# This will only work 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 wgCookeDomain below
$wgSMFLogin = true;

# Make "Enable local storage of cookies" is unchecked in the
# SMF Admin -> Server Settings -> Feature Configuration section
# www.domain.org/wiki and www.domain.org/forums -> www.domain.org
# wiki.domain.org and forums.doman.org -> .domain.org
$wgCookieDomain = 'www.markedrp.com';
$wgCookiePath = '/'; // Optional, defaults to '/'
$wgCookieSecure = false;  // Optional, only change on scheme mismatch

# Require members to be a part of this SMF group(s) to login
# NOTE: Members of the SMF Administrator group are always able to login
#$wgSMFGroupName = 'Wiki Editor';
#$wgSMFGroupName = array('Wiki Editor', 'Global Moderator');

# Grant members of this SMF group(s) wiki sysop privileges
# NOTE: These members must be able to login to the wiki
#$wgSMFAdminGroupName = 'Wiki Admin';
#$wgSMFAdminGroupName = array('Wiki Admin', 'Global Moderator');

# Load up the extension
require_once "$IP/extensions/Auth_SMF.php";
$wgAuth = new Auth_SMF();


Forum URL: www.markedrp.com/forum
Wiki URL: www.markedrp.com/wiki

Although, with the forum I am using the standalone SimplePortal, which is at www.markedrp.com.  I'm not sure if that would make a difference.

Any ideas?

Goss

Anybody?

I was thinking about this today and wonder if it's maybe due to the fact that my wiki and SMF forum are on different databases.  Would I have to manually make the bridge point at the SMF database for the user information?

Kindred

yes... it will not work with different databases as it is
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: