DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

tips:integration_with_ipb_2.x

Integrate with IPB 2.x

This is a description of how to integrate the user authentication and group facilities in IPB (Invision Power Board) with dokuWiki.

FIXME I search yet how to connect AUTOMATICALY the user to IPB in Dokuwiki !!!

A good start might be the source of the Coppermine Gallery. The Bridging works fine with IPB 2.x.x. Some say it won't but I have tried it bymyself and it works fine. http://documentation.coppermine-gallery.net/bridging.htm

An issue is the displayed names and login names. Not sure if it is possible to prevent DokuWiki from showing the loginname (user) anywhere and show just the name.

Requirements

  • A working installation of IPB 2.x
  • A working installation of dokuWikiDELETEME
  • Some patience

Facts

  • This method of integrating relies on the use of groups in IPB.

Steps

Configure local.php

The code below is best placed in conf/local.php, so that it will be easy to upgrade later.

We use IPB username as a replacement for name since IPB does not provide us with any information about real names (first name, last name).

$conf['openregister']= 0;                //Should users to be allowed to register?
 
$conf['useacl']      = 1;                //Use Access Control Lists to restrict access?
 
$conf['authtype'] = 'mysql';
 
$conf['auth']['mysql']['forwardClearPass'] = 1;             // handles password encryption inside the sql query
 
$conf['auth']['mysql']['server']   = '<host>';              // mySQL host, usually localhost
$conf['auth']['mysql']['user']     = '<database user>';     // mySQL database user for the database that is used by IPB
$conf['auth']['mysql']['password'] = '<database password>'; // mySQL database password for the database that is used by IPB
$conf['auth']['mysql']['database'] = '<database>';          // mySQL database that is used by IPB
 
$conf['auth']['mysql']['passcheck']= "SELECT name AS 'login'
                                        FROM ibf_members, ibf_members_converge
                                       WHERE name='%u'
                                         AND converge_pass_hash = MD5(CONCAT(MD5(converge_pass_salt),MD5('%p')))";
$conf['auth']['mysql']['userinfo'] = "SELECT name, email AS mail
                                        FROM ibf_members
                                       WHERE name='%u'";
$conf['auth']['mysql']['groups']   = "SELECT mgroup as `group`
                                        FROM ibf_members
                                       WHERE ibf_members.name='%u'";

Use following queries for development version of DokuWiki:

$conf['auth']['mysql']['checkPass']= "SELECT name AS 'login'
                                        FROM ibf_members, ibf_members_converge
                                       WHERE name='%{user}'
                                         AND converge_pass_hash = MD5(CONCAT(MD5(converge_pass_salt),MD5('%{pass}')))";
$conf['auth']['mysql']['getUserInfo'] = "SELECT name, email AS mail
                                        FROM ibf_members
                                       WHERE name='%{user}'";
$conf['auth']['mysql']['getGroups']   = "SELECT mgroup as `group`
                                        FROM ibf_members
                                       WHERE ibf_members.name='%{user}'";

If it doesn't work, have a look to mysql_invision

Configure acl.auth

How to configure the acl.auth is described in acl. The group numbers are the ones that you have created in IPB.

An example :

# Access Control
#
# none   0
# read   1
# edit   2
# create 4
# upload 8

# Groupes existant sous IPB
# @1	Validating
# @2	Invités
# @3	Membres
# @4	Admin Principal
# @5	Bannis
# @6	Modérateur Principal
# @7	Donateur
# @8	Site Admin
# @9	Modérateurs
# @10	Wikistes
# @11	Traducteurs
# @12	Equipe de Dev

 
*               @ALL        1
*               @3          255
*               @4          255
*               @6          255
*               @7          255
*               @8          255
*               @9          255
*               @10         255
*               @11         255
*               @12         255
sommaire        @ALL        1
sommaire        @4          255
sommaire        @6          255
sommaire        @8          255
sommaire        @9          255
sommaire        @10         255 
menu            @ALL        1
menu            @4          255
menu            @6          255
menu            @8          255
menu            @9          255
menu            @10         255
tips/integration_with_ipb_2.x.txt · Last modified: 2011-06-18 17:05 by ach