1.09.2009

Integrate Dokuwiki with SMF

I recently needed an integration of Dokuwiki with SMF (Simple Machines Forum). After some research i managed to get it done. Inspired by this thread.

I tested this with SMF 2.0 RC1.2 and DokuWiki 2009-02-14b.

  1. Download and install both SMF and Dokuwiki. I separated them using a /forum and a /wiki directory.
  2. Get the file smfauth.class.php from here and put it inside your wiki/inc/auth/ directory
  3. Do the following changes in your smfauth.class.php file:
    find all instances of memberName and change to member_name
    find all instances of realName and change to real_name
    find all instances of emailAddress and change to email_address
    find all instances of groupName and change to group_name
    find all instances of additionalGroups and change to additional_groups
    find all instances of dateRegistered and change to date_registered
    find all instances of posterEmail and change to poster_email
    find all instances of ID_GROUP and change to id_group
    find all instances of ID_MEMBER and change to id_member
  4. Edit the line in your smfauth.class.php file where it says “MODIFICATION REQUIRED” (Line 32), and include the absolute path to your forum/Settings.php file
  5. Edit the file wiki/conf/local.php and change the setting for $conf['authtype'] to ’smfauth’
  6. Edit line 78 in smfauth.class.php and do the following change:
    change
    AND (concat(',',u.additionalGroups,',') LIKE concat('%,',g.ID_GROUP,',%') OR u.ID_GROUP = g.ID_GROUP)";
    to
    AND (concat(',',u.additionalGroups,',') LIKE concat('%,',g.ID_GROUP,',%') OR u.ID_GROUP = g.ID_GROUP OR u.ID_POST_GROUP = g.ID_GROUP)";
  7. Edit the file wiki/conf/local.php and change the setting for $conf['superuser'] to the name of the superuser group in SMF (@Administrator in german, i’d guess it’d be @Admin in the english version)
  8. Add the following line to your wiki/conf/local.php file:
    $conf['auth']['mysql']['charset'] = 'utf8';
  9. You should now be able to log in using your SMF superuser. Now add correct permissions for the group ‘Newbie’ (case sensitive) in your Dokuwiki access control

I think that’s it, i hope i didn’t forget anything. If you have any questions, feel free to comment.

Kommentare

In 6th task you should consider the change from “u.additionalGroups” to “u.additional_groups”…

Hinterlasse einen Kommentar

Dein Kommentar:

XHTML: Sie dürfen folgende Tags verwenden: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Kategorien