• Welcome to Simple Machines Community Forum. Please login or sign up.
September 19, 2021, 09:27:41 AM

News:

SMF 2.0.18 has been released! Please update. Read more.


How to integrate SMF with Wiki?

Started by Jochus, November 12, 2005, 10:59:29 AM

Previous topic - Next topic

devnet

Found the solution for the password problem here:  http://uber.leetphp.com/forums/viewtopic.php?t=45&highlight=password

It seems that the extension for mw was parsing the password in lowercase as well :)  Put this into play and it worked.

Although, I initially didn't think it worked...because I was using a member that wasn't part of the wiki group.  So this error is received when you have a user who isn't part of the group that you've locked mediwiki to having editor rights as well :)

TarantinoArchives

I have two wikis working with this plugin and it works fine, aside from some issues with some people, which might be related to their usernames or problems with cookie settings... in general i am very pleased, but i think producers of software such as mediawiki and smf should work closer together in providing API documentation and support for making their products interoperable across version-number updates etc...

TarantinoArchives

i'm having problems with this now, it worked for months. i am using the latest mediawiki and smf now and some users get errors when they want to log into the wiki. anyone here proficient in php and all that to look over the code of that smf_auth thing to check if that is handling utf-8 correctly and all that? some can log in (including me) but some just can't... weird

Digitalroot

I have released a new version of the Auth plug-in for SMF 1.1.2

HookedOnWinter

May 15, 2007, 06:31:57 PM #44 Last Edit: May 15, 2007, 06:33:57 PM by HookedOnWinter
So I'm getting an error, and I'm not sure why. When I login with an account that should work, I get a blank page with a 1 line error:


Fatal error: Call to a member function on a non-object in /home/content/s/e/a/searles2sels/html/wiki/includes/SpecialUserlogin.php on line 320


Line 320 says:


if (!$u->checkPassword( $this->mPassword )) {
$this->mainLoginForm( wfMsg( $this->mPassword == '' ? 'wrongpasswordempty' : 'wrongpassword' ) );
return;
}


so it's something about the password being wrong, even though it's not. I'm pretty sure I've installed the bridge correctly. SMF_Auth.php is in the extensions folder, and here is the extra code (personal info is censored):


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

// Specify who may create new accounts: 0 means no, 1 means yes
$wgGroupPermissions['*']['createaccount'] = false; // MediaWiki Settings

// SMF User Database Plugin. (Requires MySQL Database)
require_once './extensions/Auth_SMF.php';

$wgSMF_WikiGroupName  = 'Wiki';          // Name of your SMF group
                                                // users need to be a member
                                                // of to use the wiki. (i.e. wiki)

$wgSMF_UseWikiGroup   = true;                   // This tells the Plugin to require
                                                // a user to be a member of the above
                                                // SMF group. (ie. wiki) Setting
                                                // this to false will let any SMF
                                                // user edit the wiki.

$wgSMF_UseExtDatabase = true;                  // This tells the plugin that the SMF tables
                                                // are in a different database then the wiki.
                                                // The default settings is false.

$wgSMF_Version = '1.1';                         // This is what version of SMF you are using.
                                                // Current valid values are 1.0 and 1.1

/*-[NOTE: You only need the next four settings if you set $wgSMF_UseExtDatabase to true.]-*/
$wgSMF_MySQL_Host     = '*******';               // SMF MySQL Host Name.
$wgSMF_MySQL_Username = '*******';           // SMF MySQL Username.
$wgSMF_MySQL_Password = '*******';           // SMF MySQL Password.
$wgSMF_MySQL_Database = '*******';      // SMF MySQL Database Name.

$wgSMF_UserTB         = 'smf_members';        // Name of your SMF user table. (i.e. smf_members)
$wgSMF_GroupsTB       = 'smf_membergroups';   // Name of your SMF groups table. (i.e. smf_membergroups)
$wgAuth               = new Auth_SMF();       // Auth_SMF Plugin.


any ideas?

Talisman

What version of MediaWiki are you using?  My understanding is that this bridge is broken under versions 1.9 and 1.10...although I'd love if someone could confirm the accuracy of that!

HookedOnWinter

SMF: 1.1.2
MediaWiki: 1.6.8
PHP: 4.3.11 (cgi-fcgi)

Talisman

Your version wouldn't be causing the issue, then.

Did you confirm that your table prefix is smf_, and you've created the Wiki membergroup in SMF?

Sorry if I'm asking the obvious, but sometimes the simple things get overlooked!

tumr

Quote from: HookedOnWinter on May 16, 2007, 10:54:31 AM
SMF: 1.1.2
MediaWiki: 1.6.8
PHP: 4.3.11 (cgi-fcgi)

From hxxp:meta.wikimedia.org/wiki/SMF/Users_Integration [nonactive], it looks like you need to upgrade to MediaWiki version 1.9.2 for this to work properly.

HookedOnWinter

Quote from: Talisman on May 16, 2007, 01:37:08 PM
Your version wouldn't be causing the issue, then.

Did you confirm that your table prefix is smf_, and you've created the Wiki membergroup in SMF?

Sorry if I'm asking the obvious, but sometimes the simple things get overlooked!

No I appreciate the attention to detail. But yes, I've taken care of all of those.

Quote from: tumr on May 16, 2007, 03:29:51 PM
Quote from: HookedOnWinter on May 16, 2007, 10:54:31 AM
SMF: 1.1.2
MediaWiki: 1.6.8
PHP: 4.3.11 (cgi-fcgi)

From hxxp:meta.wikimedia.org/wiki/SMF/Users_Integration [nonactive], it looks like you need to upgrade to MediaWiki version 1.9.2 for this to work properly.

I believe I need PHP 5 for 1.9... and GoDaddy only offers  PHP 4 to my knowledge. hmm....

Talisman

Quote from: tumr on May 16, 2007, 03:29:51 PM
Quote from: HookedOnWinter on May 16, 2007, 10:54:31 AM
SMF: 1.1.2
MediaWiki: 1.6.8
PHP: 4.3.11 (cgi-fcgi)

From http://meta.wikimedia.org/wiki/SMF/Users_Integration [nofollow], it looks like you need to upgrade to MediaWiki version 1.9.2 for this to work properly.

It's odd that that page indicates you need PHP 4.2+ when MW 1.9.2 requires PHP 5+

At any rate the SMF_Auth version 1.3 which seems to be the current download at the php|uber.leet site is the same one which is working properly on my system - PHP 4, MW 1.6.8, SMF 1.1.2.

I don't think your problem is version related.  If you want to be certain I can give you the copy of SMF_Auth I'm using.

jaybest

Just working through this myself...

I had the following error:

Unable to view external table
MySQL Error Number: 1146
MySQL Error Message: Table 'adslblog.smf_members' doesn't exist

Because I had a different SQL database prefix (the default is smf_) when I set this up.

Just rename the LocalSettings.php to reflect your nonstandard forum suffix. In my case it was dslforum_members.

$wgSMF_UserTB         = 'dslforum_members';        // Name of your SMF user table. (i.e. smf_members)
$wgSMF_GroupsTB       = 'dslforum_membergroups';   // Name of your SMF groups table. (i.e. smf_membergroups)


Also after I completed this fix, the next one I have is:

Unable to view external table
MySQL Error Number: 1267
MySQL Error Message: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,EXPLICIT) for operation '='


So I will get onto that fix next..
it looks like there was a similar issue with the PHPBB <=>Wiki integration tools.
hxxp:mwusers.com/forums/showthread.php?t=2332 [nonactive]


TarantinoArchives

yeah u need to make sure all your stuff is UTF... unfortunately neither smf nor mediawiki are very user-friendly in helping you make sure all your back-end database stuff is stringently unicode

Advertisement: