News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

SMF and MediaWiki Bridge

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

Previous topic - Next topic

[-Trogan-]

does this work if i use wiki for a subdomain and forums for a /forum/ extension?

if so then what will i need to know?

[-Trogan-]

ok yea now i screwed the pooch here (my board and my wiki both have stopped working)

http://wiki.torous1234.co.cc/ ---> wiki

http://www.torous1234.co.cc/forum/ ----> smf forum




please please help

as i have no idea what went wrong

sletts02

In need of some help please :) When I set $wgSMFLogin = false; it works fine but doesn't login to both wiki and forum. When $wgSMFLogin = true; it ONLY logs in to the forum and redirects to forum mainpage when login is clicked from wiki.

The URLS are:
hxxp://www.scottletts.com/erc/smftest/index.php

hxxp://www.scottletts.com/erc/wiki/

Sample login details
User: testuser
Pass: pass123


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

# If you experience the issue where you appear to be logged in
# eventhough you are logged out then disable the page cache.
#$wgEnableParserCache = false;
$wgCachePages = false;

# 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 = "../smftest";

# 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.scottletts.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();


What am I doing wrong? :/

Paracelsus

Quote from: sletts02 on December 14, 2009, 07:14:10 PM
In need of some help please :) When I set $wgSMFLogin = false; it works fine but doesn't login to both wiki and forum. When $wgSMFLogin = true; it ONLY logs in to the forum and redirects to forum mainpage when login is clicked from wiki.

(...)

What am I doing wrong? :/

Nothing, it is supposed to work that way.

sletts02

Quote from: Paracelsus on December 15, 2009, 07:24:05 AM
Quote from: sletts02 on December 14, 2009, 07:14:10 PM
In need of some help please :) When I set $wgSMFLogin = false; it works fine but doesn't login to both wiki and forum. When $wgSMFLogin = true; it ONLY logs in to the forum and redirects to forum mainpage when login is clicked from wiki.

(...)

What am I doing wrong? :/

Nothing, it is supposed to work that way.

Huh? Isn't that a bit pointless then?

Is there anyway to it so;

If a user clicks login on the wiki, it redirects them to the forum login, logs them in to BOTH? At the moment there is no way to login to the wiki....

Paracelsus

Quote from: sletts02 on December 15, 2009, 04:47:47 PM
Quote from: Paracelsus on December 15, 2009, 07:24:05 AM
Quote from: sletts02 on December 14, 2009, 07:14:10 PM
In need of some help please :) When I set $wgSMFLogin = false; it works fine but doesn't login to both wiki and forum. When $wgSMFLogin = true; it ONLY logs in to the forum and redirects to forum mainpage when login is clicked from wiki.

(...)

What am I doing wrong? :/

Nothing, it is supposed to work that way.

Huh? Isn't that a bit pointless then?

Is there anyway to it so;

If a user clicks login on the wiki, it redirects them to the forum login, logs them in to BOTH? At the moment there is no way to login to the wiki....

Oh ok, I thought you were just saying that, to log in, you had to do it in the forum and not in the wiki (but of course once you did it you would be logged in both).

Check the other bridge options, specially this one:
# 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

leip

Question on how this bridge functions: I'm interested in porting an existing wiki to use the SMF - mediawiki bridge.  some users have accounts on both, but may not match username or password. 

Does it use the forum ID_MEMBER in the wiki tables?

or does the bridge insert new rows into the wiki_users table?  and use a new member id created by the insertion to the wiki_users table? 

If the username matches a wiki user, and the passwords match, does the bridge log that person in without creating a new user?

I'll need to manually update the wiki tables to cross-reference the correct user id numbers after migrating to this bridge.
Thanks,
Dave

[-Trogan-]

any ideas to my above post (in a need to get this fixed asap)

hashi

Hey.

Just a few comments and questions. I tried using your bridge, and it worked perfectly for existing members. However, when new members tried to sign up, they could get into the Forum, but not into the Wiki. On inspection of the database, the members did not show up in the wiki users tables. Is there a fix for this? Or something you can suggest?

My forum is in folder: www/wl/forum
My wiki is in folder: www/wl/wiki

The forum is accessed from: forum.mysite.com [nofollow]
The wiki is access from: wiki.mysite.com [nofollow]

Thanks :)

Jayden

hashi

#209
Ok. I've been doing some playing and I have narrowed it down. It's anyone with a non-ASCII letter in their name. We have members called "hashi", "taydr", "maggy" etc and they all work fine, but members with names like "jökull", "renaçido" and "nendûr" have problems logging into the wiki with the bridge running.

Can you suggest a work around? At the moment I'm getting them to recreate accounts which isn't really ideal.

Edit: I thought it might be relevant that the wiki reports an incorrect password, so I have an idea it might be an issue with non-ASCII letters when it comes to sha1'ing the password?

Thanks

Jayden

Paracelsus

Quote from: hashi on January 24, 2010, 09:40:18 PM
Ok. I've been doing some playing and I have narrowed it down. It's anyone with a non-ASCII letter in their name. We have members called "hashi", "taydr", "maggy" etc and they all work fine, but members with names like "jökull", "renaçido" and "nendûr" have problems logging into the wiki with the bridge running.

Can you suggest a work around? At the moment I'm getting them to recreate accounts which isn't really ideal.

Edit: I thought it might be relevant that the wiki reports an incorrect password, so I have an idea it might be an issue with non-ASCII letters when it comes to sha1'ing the password?

Thanks

Jayden

I had the same problem from the beginning. Have no solution so the only thing I do is to ask the user to change the username (the nickname that shows up in the forum can stay unchanged).

hashi

Quote from: Paracelsus on January 25, 2010, 03:36:22 AM
Quote from: hashi on January 24, 2010, 09:40:18 PM
Ok. I've been doing some playing and I have narrowed it down. It's anyone with a non-ASCII letter in their name. We have members called "hashi", "taydr", "maggy" etc and they all work fine, but members with names like "jökull", "renaçido" and "nendûr" have problems logging into the wiki with the bridge running.

Can you suggest a work around? At the moment I'm getting them to recreate accounts which isn't really ideal.

Edit: I thought it might be relevant that the wiki reports an incorrect password, so I have an idea it might be an issue with non-ASCII letters when it comes to sha1'ing the password?

Thanks

Jayden

I had the same problem from the beginning. Have no solution so the only thing I do is to ask the user to change the username (the nickname that shows up in the forum can stay unchanged).

Yeah, thats what I'm having to get my members to do and they aren't happy. Maybe someone needs to give the OP a nudge here? :P

Paracelsus

It may be that a non-ASCII support is missing when authenticating SMF usernames. On this I found that his expression:

utf8_decode($username)

is used on some mediawiki extensions to go over the non-ascii problem as in IP board-mediawiki bridge:
http://www.ipbwiki.com/forums/index.php?showtopic=4712

I noticed that Auth_SMF.php used to bridge SMF to mediawiki doesn't have any kind of reference to this... maybe the answer lies here, I don't know, it is just a guess.

rsw686

Quote from: hashi on January 25, 2010, 05:12:45 AM
Yeah, thats what I'm having to get my members to do and they aren't happy. Maybe someone needs to give the OP a nudge here? :P

I'm assuming you did the UTF8 conversion on your forum? I never designed the bridge with UTF8 support as I used SMF with the default Latin1 encoding. If you look at the MediaWiki users table you will see that it was designed with Latin1 encoding as well. Unfortunately due to the lack of development on SMF 2 I converted my forum to vBulletin a year ago and no longer use the bridge. The great thing about PHP is the source code is in plain view. Feel free to modify it to work on your site.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

rsw686

Quote from: sletts02 on December 14, 2009, 07:14:10 PM
In need of some help please :) When I set $wgSMFLogin = false; it works fine but doesn't login to both wiki and forum. When $wgSMFLogin = true; it ONLY logs in to the forum and redirects to forum mainpage when login is clicked from wiki.

That is how it was designed. When wgSMFLogin = false SMF and MediaWiki each user their own authentication systems. When you log into one, you are not logged into the other. When you set wgSMFLogin = true I redirect the login to SMF and MediaWiki uses the SMF cookies to validate the login. If after logging into SMF your aren't logged into MediaWiki automatically check your cookie configuration. You need to have the cookies configured correctly for MediaWiki to see the SMF cookie.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

hashi

Quote from: rsw686 on January 27, 2010, 12:06:45 AM
Quote from: hashi on January 25, 2010, 05:12:45 AM
Yeah, thats what I'm having to get my members to do and they aren't happy. Maybe someone needs to give the OP a nudge here? :P

I'm assuming you did the UTF8 conversion on your forum? I never designed the bridge with UTF8 support as I used SMF with the default Latin1 encoding. If you look at the MediaWiki users table you will see that it was designed with Latin1 encoding as well. Unfortunately due to the lack of development on SMF 2 I converted my forum to vBulletin a year ago and no longer use the bridge. The great thing about PHP is the source code is in plain view. Feel free to modify it to work on your site.

Clearly I don't understand the code used and nor do I have the time to be sifting through it playing with it. Surely you must know enough to be able to assist in what is probably a very quick fix?

rsw686

Quote from: hashi on January 27, 2010, 01:44:37 AM
Clearly I don't understand the code used and nor do I have the time to be sifting through it playing with it. Surely you must know enough to be able to assist in what is probably a very quick fix?

And I have the time to be working on something that I don't even use now? I would have to setup a test database for SMF and MediaWiki, upload the files, and configure both applications. Then I need to configure the bridge, work on a fix, and test. That will take at least 2 hours of my time. I was nice enough to contribute a free bridge that I wrote for my site to address shortcomings in others. In return I get demanded to add features. You didn't even answer my question of if your forum was converted to UTF8 support.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

hashi

Quote from: rsw686 on January 27, 2010, 08:25:42 AM
Quote from: hashi on January 27, 2010, 01:44:37 AM
Clearly I don't understand the code used and nor do I have the time to be sifting through it playing with it. Surely you must know enough to be able to assist in what is probably a very quick fix?

And I have the time to be working on something that I don't even use now? I would have to setup a test database for SMF and MediaWiki, upload the files, and configure both applications. Then I need to configure the bridge, work on a fix, and test. That will take at least 2 hours of my time. I was nice enough to contribute a free bridge that I wrote for my site to address shortcomings in others. In return I get demanded to add features. You didn't even answer my question of if your forum was converted to UTF8 support.

Yes it was. Most people would at least mention in their original post when they're no longer supporting it so that at least people won't download it, or bother posting about problems.

I managed to play with it enough to get the members to login without too much issue, however I seem to have troubles setting their permissions because they all get set as sysops :S

rsw686

Quote from: hashi on January 27, 2010, 01:34:01 PM
Yes it was. Most people would at least mention in their original post when they're no longer supporting it so that at least people won't download it, or bother posting about problems.

That post was over two years ago and I really didn't think to go back and edit it. There hasn't been any major bugs in the bridge. What you are asking for is a feature request for UTF8 support.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

hashi

Quote from: rsw686 on January 27, 2010, 02:21:33 PM
Quote from: hashi on January 27, 2010, 01:34:01 PM
Yes it was. Most people would at least mention in their original post when they're no longer supporting it so that at least people won't download it, or bother posting about problems.

That post was over two years ago and I really didn't think to go back and edit it. There hasn't been any major bugs in the bridge. What you are asking for is a feature request for UTF8 support.

Why are you trying to argue with me what I'm requesting or not... it's pointless. You've already said you're not willing to help in the slightest, so update your original post to let people know you can't help with issues anymore and be done with it.

Advertisement: