News:

Wondering if this will always be free?  See why free is better.

Main Menu

Brigde SMF & MediaWiki

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

Previous topic - Next topic

Snakehit

Okay, Great! So the clean installation is working properly. Please download now the installation file on http://www.mediawiki.org/wiki/Extension:SMF_Authentication .

Try to install this. Just add the files, if the problem returns then it is my brigde... (if so I will search for a fix :-)) This must be fixed.

ianus

#61
Greetings!

I will write down every single step of this installation.

At first, I disable the old ( misbehavior )Wiki.
Now I have a clean install of  MediaWiki 1.11.0
Also I run SMF1.1.2 with TP0.9.8

#1:
Download now the installation file on http://www.mediawiki.org/wiki/Extension:SMF_Authentication .

#2:
Unzip & connect via ftp to the server

#3:
copy Auth_SMF.php to wiki/extensions

#4:
@server: rename GlobalFunctions.php to GlobalFunctions_original.php
copy GlobalFunctions.php (from bridge-files) to wiki/includes

#5:
@server: rename User.php to User_original.php
copy User.php (from bridge-files) to wiki/includes

#6:
@server: rename Userlogin.php to Userlogin_original.php
copy Userlogin.php (from bridge-files) to wiki/includes/templates


#7:
Download & open the LocalSettings.php
Add the contend of "AddToLocalSettings.php" (from bridge-files) at the very end of  LocalSettings.php

Looks like this:
# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
$wgCacheEpoch = max( $wgCacheEpoch, $configdate );


#### SMF Authentication
#Snakehit (snakehit (at) gmail.com)

# 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

(There is more text of course, not only this snipped)
Save & Upload

#8:
@server: rename SSI.php to SSI_original.php
copy SSI.php (from bridge-files) to Path/to/SMF
(have a look at #13)

#9:
copy SMF_api.php (from bridge-files) to Path/to/SMF

#10:
Open LogInOut.php (from bridge-files) and edit line 449 -> see README of bridge-files

#11:
@server: rename LogInOut.php to LogInOut_original.php
copy LogInOut.php (from bridge-files) to Path/to/SMF/Sources

#12:
Open LocalSettings.php
Fix the Path/To/SMF/smf_api.php
Fix the Path/To/SMF/SSI.php

#13:
Fix only for TinyPortal !!!!!!
Open SSI.php
Find
// Load the important includes.
require_once($sourcedir . '/QueryString.php');
require_once($sourcedir . '/Subs.php');
require_once($sourcedir . '/Errors.php');
require_once($sourcedir . '/Load.php');
require_once($sourcedir . '/Security.php');

add
require_once($sourcedir . '/TPortal.php');

(hint: It would be nice, if you show the necessary edit to SSI.php inside the README. This would allow to add your changes to a custom SSI.)



At this Moment, my SMF is running and the bridge is working also.

There are some entries which I made before the bridge and one entry from snakehit.
Both are correct.


The first (after bridge - install) edit brings up the old errors.
Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the article text. This sometimes happens when you are using a buggy web-based anonymous proxy service.

and

in the preview window I cans see
before bridge is up:
Quote''To support Snakehit\'s work''

''Kursiver Text''

'''Fetter Text'''

Sign ` ... ´ ...\' ...

'''Sign ` ... ´ ... ' ... '''


SNAKEHIT DID THIS Say's, "why me"

After bridge is up:
QuoteIanus say\'s: Brigde is up and running - hopefully

\'\'\'Bold text\'\'\'

\'\'Italic text\'\'



Sorry, but I think, I have done everything correct.


There ar two pages meanwhile. I have add the second one to make sure, everything is working with english language settings.

http://www.firopolis.de/snakes/index.php/Hauptseite

http://firopolis.de/snakes/index.php/Main_Page



Snakehit

#62
Okay, I will do a complete new installation on my laptop right now and I will try it by myself. We need to find this. Thanks in advance.

If possible could pm me your MSN?


*edit 13u23: I've found the problem... working on it ;-)
*edit 13u36: Found, working on version 1.2
*edit 14u34: Working on the release package.
*edit 15u09: Contacted testpersons

ianus

Greetings!

Well done!

Snakehit say´s:
"overwrite all the file on your server with the new package" (he send to me).

Easy, a little bit copy & paste
In LogInOut.php: correct path to wiki files.
At: line 449 +450
In LocalSettings.php: correct path to SMF files
After: # This requires the link to SMF API.

I didn´t change the files which come from 1.1 and are no longer part of 1.2,
so SSI.php and user.php
Don´t know if this files should be in the final release. At the moment, I use the files from the old bridge. Wonder, if I should use the SMF versions or keep the modified ones.


A quick test finally shows, that the bridge is working.
Log in&out at SMF causes a log in&out at Wiki!
No markup errors anymore!

See: http://www.firopolis.de/snakes/index.php/Hauptseite

Good work genius! Thanks a lot!




A hint for usage!
The login & logout from Wiki is still working – and causes errors. Haven't tested this with the old version.


Notice: Undefined variable: smf_settings in
Path/to/Wiki/extensions/Auth_SMF.php on line 84

Notice: Undefined index: $passwd in
Path/to/Wiki/extensions/Auth_SMF.php on line 88

Notice: Undefined variable: smf_settings in
Path/to/SMF/forum/smf_api.php on line 234

Notice: Undefined index: host in
Path/to/SMF /forum/smf_api.php on line 246


Maybe this could be fixed through the bridge or by disable this in one of the wiki-files.
Don´t know.

I hope, that I´m not the only testperson and recommend to wait until oblongmedulla and NoursoN have run a test.

Snakehit

#64
4 people are testing the bridge. 2 of them already said the new version is stable... I've sent you a email with the new source code. Could you try to install that one and check if the errors are gone. If not so, can you explain them better.

@ianus: You must always use the original files and overwrite them with the one in the package. In version 1.2 I doesn't use anymore the SSI.php file. That means that you can use the original one.

-Snakehit

oblongmedulla

#65
Hey Snake I have it installed- and it works-
I noticed 1 error that I am having when I hit logout- it does log out but shows an error Undefined variable: smf_settings in var/www/vhosts/mysite.com/httpdocs/smf/smf_api.php on line 234

Here is my lines 233-236 in smf_api.php
// Use PHP to parse the URL, hopefully it does its job.
$parsed_url = parse_url($smf_settings['forum_url']);
if (isset($parsed_url['port']))
$parsed_url['host'] .= ':' . $parsed_url['port'];



During the install I had to make a couple changes in localsettings maked by {}

# This requires the link to SMF API.
$wgSMFPathAPI= "../{smf}/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://{mysite.com/SMF}/index.php"; # Full path to index.php file of SMF


I think as i was supposed to?

Thanks again for your help-

And no mark up errors also! Woohoo!

Snakehit

@oblongmedulla: can you PM me your emailadress, i've just fixed the little problems in a new release :-)

oblongmedulla

Snakehit, everything seems to work except-

When you logout of wiki, it does not log you out of the forum. I am not sure if it is was designed to do so, everything else seems to work at this point.

Also in the localsettings file:
I had to change line 147 from
$wgSMFPathAPI= "../smf_api.php"; # The smf_api.php file can be download from SMF website and must be placed in rootdir of your forum)

to
$wgSMFPathAPI= "../smf/smf_api.php"; # The smf_api.php file can be download from SMF website and must be placed in rootdir of your forum)

NoursoN

Whaouhhh it's progressing quickly here :)

Thanks for this nice bridge !!

Snakehit

@oblongmedulla: Did you receive the latest version in your mailbox?

oblongmedulla


Snakehit

The new version of the bridge has been released. If you still have any question you can always use this or contact me through PM.

http://blog.snakehit.be/2008/01/11/mediawiki-extension-smf_authentication-v12/

-Snakehit

oblongmedulla

Yah I am still having the issue when I log out via Wiki- It forwards me to the forum but does not log me out.

Anyone else having these issues?


Snakehit

@oblongmedulla: send me an email with your files of Auth_SMF and the Sources/LogInOut.php file. Thanks

ianus

Greetings!

I have faced a comparable behavior, but only if the Wiki-logout is used.

It seems, that the user is logged out only from the Wiki and further edits (of wiki articles) or the use of personal settings won't be possible anymore.

Also I have to mention, that this isn´t clearly reproducible.

I tried this with different users and different logins ( 1hour,..., forever).
Every time (after logout from Wiki), I face the SMF side and the user is still logged in.
In some cases he can use the Wiki as before, but not always.
I can't figure out dependencies.
So I try to use the Wiki which is open in a new window and refresh it. Sometimes I use a link to the Wiki at my SMF side. Also I try to clear cache (via F5 or an Firefox plugin) or use it "as it loads".
I faced this yesterday and run the tests for two hours this morning, but can't describe exactly the steps to produce (or avoid) the partial logout.


Maybe it could be nice or necessary to be able to use the Wiki-login&out. Imho it depends on the integration manner.
In my case, I plan to integrate the SMF navigation bar and comment out the whole Wiki-loggin&out function.
But on the other site, a solution could be nice in general.

Snakehit

So you say that people must have the possibility the use the login & logout of the Wiki.
At this moment everything of that is disabled :-)

Paracelsus

Snakehit

I'm running into a problem... update to tbridge version by uploading the new files and overwriting the old ones.

It works ok, but when I try to click on edit the whole page turns into non-utf-8 and all the accents are turned into strange characters.

ianus

#77
Greetings!

This post is written to explain the current situation.
Snakehit and I have contact via e-mail, so he received an answer to his last question and a bunch of thanks for his code.

The actual situation is, that the bridge is working, so feel free to download and use it.

The log in&out function of Wiki is (of course) disabled, the log in&out button leads to the SMF site and functions.
The Wiki-login leads to a site which offers links to SMF registration or login.
The Wiki-logout leads to SMF startpage.
(You have to use the SMF logout button for a final logout. Imho this could cause misunderstandings and maybe there will be a solution for this in future.)

As long as a user is logged in your SMF, he can use the Wiki.
If he isn't logged in, he can see the Wiki articles, but can't write.

So, the functionality this bridge want to offer, is working well. I have it in use for some days now without problems. (SMF1.1.4; TP0.9.8, MediaWiki1.11)

I would love to send a link, maybe with a test-account, but at the moment, this seems to be impossible.
The way I have integrated some SMF elements into my Wiki environment – to show that the user is still on the same page and so – aren't working as expected.
The main problem is – imho – the way SMF handles the simultaneous use of SSI and smf_api.
I'm not sure if some changes at the bridge code could bypass this issue or if I had to figure out a different way to integrate SMF elements.

Anyway, Snakehits code should offer a "user-bridge" and so my problem with a "code-bridge" is maybe only a side effect.

At the moment, Snakehit is busy with important work which has noting to do with this code. If  he seems to be uninterested, I can assure, that this isn't the case and I want so send him my best wishes with this closing paragraph.

Succubus Evaligan

I can't modify users of SMF in Wiki. I want put in a higher rank a normal user of smf in wiki, I see the user in the list but when I try to modify in the permision of the user in wiki they says that don't exist.
Yuri Goddess

noctrine

I am really loving this Bridge. However, I am wondering if there is any way to use the Login/Logout Functions in SSI on the wiki pages.

Also, I am getting that error. It stops me from banning people (by username) through the wiki. Banning isn't really an issue. But it would be fun to not have to edit the user_group table to make sysops.

Advertisement: