Customizing SMF > Portals, Bridges, and Integrations

SMF and MediaWiki Bridge

(1/66) > >>

rsw686:
After testing out both bridges currently available for SMF and MediaWiki I decided to write my own. Let me first go through what I liked and didn't like about the existing bridges.

First Bridge:
http://www.mediawiki.org/wiki/Extension:SMF_Authentication
http://www.simplemachines.org/community/index.php?topic=195978.0

This bridge allows for auto authentication by using the smf_api.php. Due to the number of files required I did not test this bridge. I didn't want to deal with the hassle when upgrading software down the road. Especially because SMF 2.0 database tables are different and I wasn't sure if the smf_api.php would be updated.

From looking at the code if a user is demoted from the administrator position it does not remove him from the wiki sysop group. It also looks to create two instances of an account with the auto authentication due to wiki requiring upper case for the first letter and it doesn't format the name with ucfirst. Please note that I could be wrong, but these were issues I ran into when using similar code.

One feature it is lacking is the ability to declare an SMF group that is only allowed to edit the wiki.

Second Bridge:
http://www.mediawiki.org/wiki/Extension:SMF/Users_Integration

This bridge does not do anything with auto authentication. It does allow you to specify a SMF group that is allowed to edit the wiki. Another plus is that it is a single file. The downside is the configuration does not use the values from SMF's Settings.php. You have to specify the database tables and permissions. It also doesn't set wiki sysop privileges for SMF administrators.

I did test this one out and found a small issue. For one they did not disable the change password option in the wiki, which doesn't work anyway due to the rest of the code not being there. This only requires a change of true to false, which must have been an oversight.

My Bridge:
The SMF and MediaWiki integration I built only requires one file placed in the wiki extensions directory. To get started you only need to configure the relative path to your SMF forum. In the default configuration the wiki login is separate from the forum. It will assign and remove sysop privileges to SMF administrators and allow you to lock down editing to an SMF group.

For the auto authentication I have decided not to use the smf_api.php file for the above reasons. When you click login / logout the wiki redirects you to the SMF page and then back to the wiki. A couple of gotchas are that you must be using SMF database sessions (default setting). You also need to configure SMF to make sure local storage of cookies are disabled. You might not need to do this if your wiki is inside your forum folder.

The bridge also supports SMF usernames with underscores. MediaWiki converts underscores to spaces which causes authentication problems with almost all other bridges. I developed a work around by checking for the first registered SMF username with spaces or underscores. It is very unlikely that two SMF users will have the same name like john_smith and john smith. If they do you'll need to change the username of the later registered SMF user.

You can download the bridge from http://wgnrs.dynalias.com/smf/Auth_SMF.php

klra:
Does your bridge have an issue (like the others) with members that have a _ or - in their username?

I am seriously thinking of setting this up for my forums & members.

Also, would an bridged installation be viewable to all on the net or just to the forum members?

I'd like to have our Wiki viewable by all, but with permissions set so that only Admins, Mods or possibly forum members would be able to edit the content of the Wiki.

Thanks!

rsw686:

--- Quote from: klra on February 09, 2008, 12:02:09 PM ---Does your bridge have an issue (like the others) with members that have a _ or - in their username?

I am seriously thinking of setting this up for my forums & members.

Also, would an bridged installation be viewable to all on the net or just to the forum members?

I'd like to have our Wiki viewable by all, but with permissions set so that only Admins, Mods or possibly forum members would be able to edit the content of the Wiki.

Thanks!

--- End quote ---

I'll test out the _ and - in the user names and get back to you. The wiki is viewable by all. Administrators can always edit. By default only members can edit. If you don't want members to edit, just create a new SMF group and assign nobody to it. Configure the wiki LocalSettings.php value to that group name. Then you can add members as needed to that group and they will be allowed to edit.

klra:
Ok, I'm gonna look closely at this Wiki & bridge, as it's something that Ive wanted to ad to my website & forums.

Not being very good with code, I'm hoping to see some more installation info about how to impliment the bridge if you are so inclined.

Thanks for writing this!

klra:

--- Quote ---If you don't want members to edit, just create a new SMF group and assign nobody to it. Configure the wiki LocalSettings.php value to that group name. Then you can add members as needed to that group and they will be allowed to edit.
--- End quote ---

So the permissions can be set up to only allow specific membergroups to edit the Wiki- this is great because then I can allow only veteran/trusted members access.

This will prevent new members and malcontents from posting irrelevant data.

Navigation

[0] Message Index

[#] Next page

Go to full version