News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

SMF and MediaWiki Bridge

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

Previous topic - Next topic

kiakanpa

you dont remove the setting.php file - only the require function from the bridge. Adding the settings from settings.php into the Auth_smf.php should not be a security issue in itself as direct access to auth_smf.php will not reveal the settings - if you want to be really sure you could just disable access to the extentions folder through .htaccess - but i dont think this is needed.

rosey

"To get started you only need to configure the relative path to your SMF forum."

ok... is that really all I need to get started?  I did that and it is not working...

I configured the relative path and the smf version, but when I try to login to the wiki it tells me no user with my name exists. 

Chris369

Quote from: Chris369 on July 08, 2008, 12:25:54 PM
Need a bit of help with this.

My wiki is installed at wiki.psnfriends.net
Forum is in root of psnfriends.net

So I think I need these variables

wgsmfpath = "..";
wgcookiedomain = ".psnfriends.net"

But I can't see where I change these variables? And have I even got them right? Is there any others I need to change?

Thanks for any help  :)

Aynone?

Sir-Uli

Hello,
my Structure:
wiki at hxxp:example.com [nonactive] (Path: /some/path/)
forum at hxxp:forum.example.com [nonactive] (Path: /some/path/forum).

My Config:
$wgSMFPath = "forum";
$wgSMFVersion = "1.1";
$wgSMFLogin = true;
$wgCookieDomain = '.example.com';


SMF-Config:
Enable local storage of cookies [ ]
Use subdomain independent cookies [X]
Use database driven sessions [X]


My Software: Mediawiki: 1.12.0 & SMF 1.1.5

I'm not redirected back to the wiki after login and if i try to logout from the wiki, i get the error-message:
Session verification failed. Please try logging out and back in again, and then try again.
from SMF when trying to Logout from the wiki. When i logout manually in the forum, it works.

How can i solve this? Do i have to change $wgCookiePath or $wgCookieSecure? Perhaps i'm thining i a wrong way ;)

Please help me! Thanks in Advance!

rsw686

Your config looks correct to me. Do you use Firefox? If so view the page info and look at the cookies set. See if the SMF cookie carries over to the wiki.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

drhamad

Alright, what am I missing here.  I just did a completely vanilla install of MediaWiki, and put Auth_SMF (with options set) in the extensions folder.
http://www.fmvperformance.com/ = forum
http://www.fmvperformance.com/fmvarticles = wiki

It's not doing anything... ignoring the fact that auth_smf is even there.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

rsw686

drhamad:

The options don't get set in Auth_SMF.php. They need to be copied pasted into MediaWiki's LocalSettings.php file.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

drhamad

Quote from: rsw686 on August 11, 2008, 07:17:17 PM
drhamad:

The options don't get set in Auth_SMF.php. They need to be copied pasted into MediaWiki's LocalSettings.php file.

Oops, I'm blind.  Thanks man.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

drhamad

Hey rsw, exactly where did you put your SMF header information in the MediaWiki template?  I'm having a hard time understanding their code (just looking in MonoBook.php)... trying to do an include() to include something at the top.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

rsw686

Quote from: drhamad on August 12, 2008, 02:32:48 PM
Hey rsw, exactly where did you put your SMF header information in the MediaWiki template?  I'm having a hard time understanding their code (just looking in MonoBook.php)... trying to do an include() to include something at the top.

Scroll down a bit in MonoBook.php. You'll see regular HTML with <?php ?> tags inside of it. Just add the header in there. I used the Kind Of Blue skin for MediaWiki as it fit my forum design better.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Paracelsus

@ rsw686,

I've just updated mediawiki to 1.13 and the "AutoAuthenticate" hook stopped working.

Reading mediawiki's manual I found out that this hook is no longer supported in 1.13, being replaced by "UserLoadFromSession" instead. I then replaced the above expression by this one in Auth_SMF.php and the workaround seem to have solved the problem, but I'd like to know if further changes need to be made.

rsw686

Quote from: Paracelsus on August 19, 2008, 08:11:27 AM
@ rsw686,

I've just updated mediawiki to 1.13 and the "AutoAuthenticate" hook stopped working.

Reading mediawiki's manual I found out that this hook is no longer supported in 1.13, being replaced by "UserLoadFromSession" instead. I then replaced the above expression by this one in Auth_SMF.php and the workaround seem to have solved the problem, but I'd like to know if further changes need to be made.

I will have to look into this. 1.13 must have been just released.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Oldiesmann

According to MediaWiki's website, it was released last Thursday.

I've been using an SVN copy of MediaWiki for a while now, but haven't upgraded for several months, so I guess the version I'm using doesn't have that change.

quatermass

Ahh so close and yet...

I'm looking for a MediaWiki to SMF integration but I want to use the MediaWiki Database for the SMF user login.
We've hardly got any SMF members compared with the MediaWiki membership.

See http://theaquariumwiki.com/ for how we've added SMF to our Wiki.
Forum link is in the left upper panel.

Has any work been done with doing this type of integration?

I would have thought a MediaWiki -- SMF integration program for common user login would make SMF very popular with MediaWiki administrators? They seem to be crying out for one.

Comments?

Paracelsus

That Mediawiki -> Forum interaction instead of Forum -> Mediawiki when it comes to members might be interesting.

One thing that I've just remembered and that would also be cool to add to the bridge:

- Put the talk/discussion pages directing to a new topic with the page name as subject and in a specified board. I've seen this integration in several wikis from "wikidot".

Abavagada

I am using SMF 1.1.6, and installed Mediawiki 1.6 (older version of PHP on the server that hosts me). I installed the bridge, copied the parts from it into the LocalSettings.php for the wiki.

My problem is that now when I try to access the wiki, I get this error:
Fatal error: Call to a member function on a non-object in /home/abavagad/public_html/parlame/wiki/extensions/Auth_SMF.php on line 279

I did not change any of the code.

lines 278-282 are:
278      // Only poll the database if no session or username mismatch.
279      if(!($user->isLoggedIn() && $user->getName() == $username))
280      {
281             $user->setName($username);
282             $user->setId($user->idForName());

Can anyone help me on this?


rsw686

Sorry that version of MediaWiki is not supported. I've only used the 1.12 versions so I'm not sure even where to start.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Paracelsus

Quote from: Abavagada on September 22, 2008, 09:33:21 AM
I am using SMF 1.1.6, and installed Mediawiki 1.6 (older version of PHP on the server that hosts me). I installed the bridge, copied the parts from it into the LocalSettings.php for the wiki.

My problem is that now when I try to access the wiki, I get this error:
Fatal error: Call to a member function on a non-object in /home/abavagad/public_html/parlame/wiki/extensions/Auth_SMF.php on line 279

I did not change any of the code.

lines 278-282 are:
278      // Only poll the database if no session or username mismatch.
279      if(!($user->isLoggedIn() && $user->getName() == $username))
280      {
281             $user->setName($username);
282             $user->setId($user->idForName());

Can anyone help me on this?



Put this as false instead in LocalSettings.php:
$wgSMFLogin = true;

Mediawiki 1.6 works with SMF but the autologin function doesn't, meaning that you have to login again to the wiki (but the member database integration work perfectly).

Abavagada

Thanks Paracelsus. That did the trick.  :D


drhamad

This bridge has worked like a charm for me.  Thanks!
The only thing I'd comment on, and this is minor, is that if a permissions group specified in LocalSettings.php for edit access doesn't exist in SMF, the whole thing ceases to function.  It'd be nice if that wasn't true, but not a big deal since you can just create the group or delete it from LocalSettings
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

Advertisement: