Brigde SMF & MediaWiki

Started by Snakehit, September 21, 2007, 10:26:58 AM

Previous topic - Next topic

ianus

#80
Greetings!

Woah, you guys drive me mad. I received a notification via e-mail, which told me, that somebody have written here. I hoped that snakehit solved the problem with the SSI+smf_api problem, but...

Well, ask and you should receive help.

For both of you.
The Wiki-usermanagement isn't working with this bridge.
So if you want to change user-settings, you have to use SMF.
As far as I can see.

@Succubus Evaligan
There is another bridge, which makes it possible (necessary) to have a special group (in SMF). Only members of this group are allowed to edit.
Have a look at:
http://www.mediawiki.org/wiki/Extension:SMF/Users_Integration

A test of this bridge is at the very top of my todo-list. So I can't tell you if you could edit a user via wiki, but I don't think so.
(BTW. I think it would be nice to have one thread per brigde, to avoid misunderstandings.)

@noctrine
The login/logout is managed by SMF and the wiki-button should lead to the correct SMF-side.
So I don't see why an extra SSI_log is necessary.

Anyway, at the moment, you can't use the brigde with SSI. I try to put the "require ssi.php" into different Wiki sites (index, localsettings, monobook.php) with different errors.
So I don't know if you can put the SSI_login/out into the Wiki and use it together with the brigde. Imho this could work.








noctrine

#81
Yeah, but the way my site is built I use SSI for the login across the site. Its built into the header and the login for the forum was removed. (You can see what I mean at hxxp:indiepoint.net [nonactive])

With the old Auth that I had. Just looking at it I believe it was made by Snakehit just looking at it. I was able to use the SSI function on my wiki (after making all the needed variables global for the wiki) but the new one disables the SSI file on the wiki page.

Atleast thats what I gathered from the blog post about 1.2 on Snakehits site.


EDIT: I retract what I said about the old auth possibly being from snakehit. The first auth I had was the leetphp one. But people had to login to the wiki itself, and I didn't like that.

EDIT2: It doesn't work with this bridge, but with the other bridge I just had to make the variables used in SSI.php global with Mediawiki and it functioned (semi) correctly. But it still didn't work with the sessions.

ianus

Greetings!

Quotethe new one disables the SSI file on the wiki page.
That is exactly the problem we have with this bridge at the moment.

In my case, I try to add the menubar, but the basics are the same and I want to use this bridge because all alternatives forces the user to login twice, and so they offer no real bridge imho.
For edit2: Sorry but I have no idea how to use the SSI-log for an other page.

It is possible to use the SSI functions with the snakehit-bridge.
You have to insert the path to SSI not inside the wiki-code, but inside the bridge-code.

But, and this is crucial, it will break the Wiki-markup (again).
This is the "old" problem we noticed a while ago. You will be unable to insert or edit an article, because a / is added to every '
(See: this post)

So, the SSI integration will show the Wiki and the ssi_functions are working, but you cant use the Wiki itself.
Example (Wiki+SSI but with the error : http://www.firopolis.de/wiki/index.php/Main_Page)

I will explain how to integrate the SSI and maybe anybody can give a hint, how to avoid the slashes-problem or figure out another way to use SSI.




Download the bridge...
..open "addToLocalSettings.php"
.. find

$wgSMFPathAPI= "../forum/smf_api.php"; # The smf_api.php file can be download from SMF website and must be placed in rootdir of your forum)
$wgSMFPathIndex= "http://www.domain.tld/Pathto/forum/index.php"; # Full path to index.php file of SMF

..add

$wgSMFPathSSI= "../forum/SSI.php"; # The path to your SSI.php)


Save and don't forget to add all this to LocalSettings.php


Open in the downloaded files "extensions/Auth_SMF.php"..
..find

//Load the SMF files ;-)
if(!require_once($wgSMFPathAPI))
die('Could not load the SMF API');


..add

if(!require_once($wgSMFPathSSI))
die('Could not load the SMF SSI thing');

Save.

Upload all the bridge-files to the correct destinations (don't forget to backup).





Maybe one of the code-gurus here, can point out why SSI and smf_api aren't working together.

Regards

Sanhux

Hello

I tried the solution posted here but I am experiencing an error, which says

Fatal error: Call to undefined function: smf_authenticateuser() in wiki/extensions/Auth_SMF.php on line 25

Any help? Thanks

ianus

Greetings!

The function smf_authenticateuser() belongs to the smf_api.php
My guess is that you forgot to copy this file
or that you have set the wrong path in the LocalSettings file.

Hope that helps

Sanhux

Hello

I think the problem is my media wiki version , 1.6.10

Thanks for the help

ianus

Quote
I think the problem is my media wiki version , 1.6.10
Maybe, but I'm not sure.
Quote
Thanks for the help
Your Welcome


Maybe another bridge is working better with your Wiki.
Have a look at
SMF and MediaWiki Bridge


addh

#87
I'm getting this same problem in Mediawiki without any of these extensions (found by google). What was the fix?

edit: I see that this is an AutoAuthenticate extension, and I've got one that bridges between MW and bbPress. Can't figure out what the issue is, though.


Snakehit


surra

#89
hoi!

i had a working mediawiki 1.13 in http://tarbatu.org [nofollow] (with some users), installed smf 1.1.4 http://tarbatu.org/koda [nofollow] , upgraded it to 1.1.6 and added bridge files from http://www.mediawiki.org/wiki/Extension:SMF_Authentication [nofollow] to wiki/smf and to mediawiki's localsettings.php wrote:
Quote#### SMF Authentication
#Snakehit (snakehit (at) gmail.com [nofollow])

# For all non-logged in users
$wgGroupPermissions['*']['createaccount']   = false; # This requires a user be logged into the wiki to make changes.
$wgGroupPermissions['*']['edit']            = false; # Specify who may create new accounts: 0 means no, 1 means yes

# Disable everything of caching, caching is boe for the login system.
$wgEnableParserCache = false;
$wgCachePages = false;

# Users can use the login function inside of the wiki to login.
$wgUseWikiLogin = false;

# This requires the link to SMF API.
$wgSMFPathAPI= "http://tarbatu.org/koda/smf_api.php [nofollow]";    # The smf_api.php file can be download from SMF website and must be placed in rootdir of your forum)
$wgSMFPathIndex= "http://tarbatu.org/koda/index.php [nofollow]";  # Full path to index.php file of SMF

// require the Auth_SMF.php
require_once 'http://tarbatu.org/extensions/Auth_SMF.php'; [nofollow]

$wgAuth = new Auth_SMF();
?>

now i have working smf in http://tarbatu.org/koda [nofollow] but mediawiki gives blank screen in http://tarbatu.org [nofollow] - where did i mistake? i can give ftp-access if it helps.

ps when i try to logout from smf, i get error:
QuoteFatal error: Class 'User' not found in /home/tarbatuo/public_html/koda/Sources/LogInOut.php on line 452

pss is it impossible to use mediawiki-s users on smf? so could mediawiki users have their userpages on mediawiki.
world is mushroom forest

Snakehit

The problem is that the extension is not compatible with your directoryhierarchy. Normally SMF is the central point of this and from SMF we go to Mediawiki. (SMF_Authentication checks if the session of SMF exists, if the session exists then we log in the user) - from your website people will come from Mediawiki. That won't work! People need to come from SMF to Mediawiki to log them in.

Quote
ps when i try to logout from smf, i get error:
Quote

    Fatal error: Class 'User' not found in /home/tarbatuo/public_html/koda/Sources/LogInOut.php on line 452

In the package you have a directory called Sources. Did you copy that file in to the SMF Sources folder? And did you check the paths at line 449?

Quote
pss is it impossible to use mediawiki-s users on smf? so could mediawiki users have their userpages on mediawiki.

No, it's not possible.

surra

Quote from: snakehitNo, it's not possible.

why? :) if in one way it works, why it couldnt work the other way? is there something wrong with mediawiki?
world is mushroom forest

Snakehit

It's possible, but it is not possible with this extension :-)

Xandar

 I'm having some difficulty with your SMF/Media Wiki Authentication integration.  The sites that are being integrated are hxxp:www.dlwhatif.com/forums [nonactive] and /wiki. In terms of the Wiki seeing the SMF forums, this aspect works perfectly -- once a login exists on the SMF, it can log into the Wiki as well.  The difficulty that I'm having is that the Wiki does not register as logged in even after logging into the forums.  Any suggestions on things to doublecheck/verify/research would be welcome.  I  Other than that, the integration seems to work well!

# Use SMF Authentication

# 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
# even though 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 = "../forums";

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


I think the problem is the:

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

but I've tried:

$wgCookieDomain = any of the following: 
  localhost, hxxp:dlwhatif.com [nonactive], .dlwhatif.com, hxxp:www.dlwhatif.com [nonactive], blank

Any help would be appreciated.

Thank you,
Xandar


Advertisement: