php forum
php mysql forum
php mysql smarty
 
Topic Options
#315652 - 09/13/07 05:47 AM [7.2.2] DokuWiki authenticating against UBB.t
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
Purpose
To authenticate DokuWiki users against your UBB.threads database.

Demo
As can be seen on my site, the VFDCwiki is integrated with the VFDC Forums.

Background
From the DokuWiki website:

DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at creating documentation of any kind. It is targeted at developer teams, workgroups and small companies. It has a simple but powerful syntax which makes sure the datafiles remain readable outside the Wiki and eases the creation of structured texts. All data is stored in plain text files – no database is required.

DokuWiki can use a variety of authentication backends for logging users in and out. Since it supports a MySQL backend, you can use your UBB.threads database to authenticate your Wiki users.

Changes to conf/local.php
Changes are required to the DokuWiki configuration which can be done by either manually editing the conf/local.php file, or by using the Admin panel of your installation. For each step I will be showing the change required within conf/local.php.

1. Enable ACL (Access Control Lists) for your Wiki installation.

Php Code:
$conf['useacl'] = 1; 

2. Enable MySQL as your desired authentication type.

Php Code:
$conf['authtype'] = "mysql"; 

3. Require the configuration file for your MySQL authentication.

Php Code:
require_once ("mysql.conf.php"); 

By default, you may only have a conf/mysql.conf.php.example file. Just copy it to conf/mysql.conf.php since we'll be modifying it in the steps ahead.

4. If you want all of your UBB.t Administrators to be "superuser" in your Wiki, then add the following:
Php Code:
$conf['superuser'] = '@Administrators'; 

5. DokuWiki can allow users to register, resend their password, and manage their own profile. I disable all of these actions, forcing my users to go through the forums for that functionality. You can disable these actions as follows:
Php Code:
$conf['disableactions'] = 'register,resendpwd,profile'; 

The only user-level actions that are allowed are login and logout, which is the bare minimum required to track users in the system.

Changes to conf/mysql.conf.php
This file contains all configuration settings required by the MySQL backend. If you copied this file from the default example file, then just change the settings mentioned below. Otherwise, just include the below in the abovementioned file.

Note: If you use a different UBB.t table prefix to "ubbt_" then just replace as required.

1. Populate the main database settings below. The server, user, password and (name of) database should be the same as your UBB.threads configuration.
Php Code:
$conf['auth']['mysql']['server']   = 'localhost';
$conf['auth']['mysql']['user']	 = 'your_user';
$conf['auth']['mysql']['password'] = 'your_password';
$conf['auth']['mysql']['database'] = 'your_database';

$conf['auth']['mysql']['forwardClearPass'] = 0;

$conf['auth']['mysql']['TablesToLock']= array("ubbt_USERS", "ubbt_USERS AS u","ubbt_GROUPS", "ubbt_GROUPS AS g", "ubbt_USER_GROUPS", "ubbt_USER_GROUPS AS ug"); 


2. The settings below are for the MySQL user authentication.
Php Code:
$conf['auth']['mysql']['checkPass'] =
	   "SELECT USER_PASSWORD AS pass
		FROM ubbt_USERS
		WHERE USER_LOGIN_NAME='%{user}'";

$conf['auth']['mysql']['getUserInfo'] =
	   "SELECT USER_PASSWORD AS pass, 
		USER_DISPLAY_NAME AS name, 
		USER_REGISTRATION_EMAIL AS mail
		FROM ubbt_USERS
		WHERE USER_LOGIN_NAME='%{user}'";

$conf['auth']['mysql']['getGroups'] =
	   "SELECT GROUP_NAME AS `group`
		FROM ubbt_GROUPS g, ubbt_USERS u, ubbt_USER_GROUPS ug
		WHERE u.USER_ID = ug.USER_ID
		AND g.GROUP_ID = ug.GROUP_ID
		AND u.USER_LOGIN_NAME='%{user}'"; 


and that about does it! If you've done everything correctly, and more importantly, if I haven't forgotten anything smile then you should be able to login to your wiki using your forum username and password!

But, you won't be able to edit anything yet (unless you're the admin) until you setup the ACL based on your Forum users or groups. See the next section!

Changes to conf/acl.auth.php
DokuWiki's ACL allows you to grant all sorts of access levels to users and/or groups down to the namespace or page. You may decide that you want your wiki editable by all your users, or just your moderators, or only members from a custom group you created in your forums.

I defined access levels for my forum Moderators and Users groups. I also have a custom group called Authors.

My conf/acl.auth.php looks like this:

Code:
*               @ALL          1
*               @user         8
*               @admin      255
vf5:*           @Authors     16
vf5:*           @Moderators   8
vf5:*           @Users        1

The first three lines in the above ACL are most likely your default settings. The admin group can do everything, (local) users can edit, create and upload, and everyone else (ALL) gets read-only. You could probably delete or comment the @user and @admin lines since you'll no longer be using the default local authentication.

The last three lines, however, use the group names from your forums. In the example above, my forum groups have only been given access to the namespace called "vf5". In this namespace, it gives all my forum Users read-only access, Moderators can read, edit, create, and upload, and Authors can do everything Moderators can with the addition of delete.

I use the Authors group mainly for forum users who aren't Moderators but are willing to contribute to the Wiki.

In case you're wondering why the @Administrators group doesn't appear in my ACL, it's because I've already defined this group to be a "superuser" (see step 4 in Changes to conf/local.php).

Please refer to DokuWiki ACL documentation for a more detailed information.

Of course, my Wiki is not as "open" as others, and I pretty much control which forum users can edit it. So, the above just serves as an example of how to control access levels using groups from your UBB.t forums, and not a suggestion of how you should run your Wiki! smile

If anyone is brave enough to try this out, let me know how it goes for you!


Edited by Myke (09/13/07 05:50 AM)

Top
#315653 - 09/13/07 06:12 AM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Myke]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
Thanks for providing this, it looks like it'll be really useful for those UBB's that use a wiki smile
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#315658 - 09/13/07 10:30 AM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Gizmo]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25554
Loc: Texas
Thank you Myke! thumbsup
_________________________
- Allen wavey
- What Drives You?

Top
#315660 - 09/13/07 01:34 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25554
Loc: Texas
If we want the wiki to be private, with no access unless you are a member, is that pretty easy?
_________________________
- Allen wavey
- What Drives You?

Top
#315661 - 09/13/07 01:46 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25554
Loc: Texas
Read the acl docs, not too bad. smile
_________________________
- Allen wavey
- What Drives You?

Top
#315662 - 09/13/07 03:10 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres]
sirdude Offline
Enthusiast

Registered: 11/08/03
Posts: 488
Loc: SoCal
i really think we should have a ubbthreads api, where more than just user_auth is gleaned from.

i had to fool around with auto login / user creation of a threads user, based upon a foreign system and it just screamed for such an api.

i know Rick mentioned it to me at some point, but i'd love to see it.

possible cookie sharing, stylesheet sharing and on and on.

makes integration easier and even more tight in the end.
_________________________

Top
#315671 - 09/13/07 08:09 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: sirdude]
AshtarRose Offline
Journeyman

Registered: 09/22/05
Posts: 137
Loc: Columbus, OH
Sir Dude want to play around with my site to see if you can get my board hooked into my mediawiki?
_________________________
http://www.riddledindarkness.com * Yeah I need the Crazy Mods.

Top
#315672 - 09/13/07 09:11 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AshtarRose]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
:points: she's cheating on me with an older man! :snicker:™
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#315673 - 09/13/07 09:35 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Gizmo]
sirdude Offline
Enthusiast

Registered: 11/08/03
Posts: 488
Loc: SoCal
:flex:™
_________________________

Top
#315674 - 09/13/07 09:38 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: sirdude]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25554
Loc: Texas
wink

Originally Posted By: sirdude
i really think we should have a ubbthreads api, where more than just user_auth is gleaned from.

i had to fool around with auto login / user creation of a threads user, based upon a foreign system and it just screamed for such an api.

i know Rick mentioned it to me at some point, but i'd love to see it.

possible cookie sharing, stylesheet sharing and on and on.

makes integration easier and even more tight in the end.


and header/footer/headerinsert smile

yes please smile
_________________________
- Allen wavey
- What Drives You?

Top
#315675 - 09/13/07 09:39 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres]
sirdude Offline
Enthusiast

Registered: 11/08/03
Posts: 488
Loc: SoCal
hehe.. i don't know if you are stalking me tonite or it's the other way around, but i seem to be posting either just before or just after you laugh
_________________________

Top
#315676 - 09/13/07 09:46 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Gizmo]
AshtarRose Offline
Journeyman

Registered: 09/22/05
Posts: 137
Loc: Columbus, OH
He appreciates my breasts
_________________________
http://www.riddledindarkness.com * Yeah I need the Crazy Mods.

Top
#315677 - 09/13/07 09:57 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: sirdude]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25554
Loc: Texas
Originally Posted By: sirdude
hehe.. i don't know if you are stalking me tonite or it's the other way around, but i seem to be posting either just before or just after you laugh


smile

I need to integrate another script into threads (my tng genealogy software) - someone integrated some other forum with the app using the api from them, a ubbt api may make it possible for me to get it done too smile
_________________________
- Allen wavey
- What Drives You?

Top
#315680 - 09/13/07 11:34 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
Originally Posted By: sirdude
:flex:™
! thats my :flex:&trade!!

Originally Posted By: AllenAyres
I need to integrate another script into threads (my tng genealogy software) - someone integrated some other forum with the app using the api from them, a ubbt api may make it possible for me to get it done too smile
That'd be nice, I wouldn't necessarily have to fork it off to do any sort of auth against its db... Though to add features and styles how i want them it's going to have to anyway :x...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#315699 - 09/16/07 01:23 AM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Gizmo]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25554
Loc: Texas
dokuwiki is probably all I need - the feature comparison with the others is close enough, UNLESS I end up needing a mysql backend smile

tng - not written the best (could really use some sort of template system to start) but appears to be the best of its kind out there right now.
_________________________
- Allen wavey
- What Drives You?

Top
#315718 - 09/16/07 06:58 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
yeh, TNG is much better than TUFAT; but definately needs some work...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#315720 - 09/16/07 07:37 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AshtarRose]
sirdude Offline
Enthusiast

Registered: 11/08/03
Posts: 488
Loc: SoCal
Originally Posted By: AshtarRose
Sir Dude want to play around with my site to see if you can get my board hooked into my mediawiki?


i've actually looked deeper into it and find that mediawiki has tons of features and all that, but for a ubbthreads board, it's overkill.

dokuwiki and pmwiki would be the two choices i'd go with.

and the more i look @ dokuwiki, the better i like it. i much prefer their ACL and just the coding style in general.

the only issue is hooking in the styles in a more automatic way, but any wiki you choose would have that problem.
_________________________

Top
#316180 - 10/29/07 03:30 PM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Myke]
driv Offline
User

Registered: 07/07/04
Posts: 36
Loc: UK
Originally Posted By: Myke
If anyone is brave enough to try this out, let me know how it goes for you!


Hi Myke,
Just wanted to let you know that this works well and couldn't have come at a better time for me smile

Thanks a lot laugh

Top
#316207 - 11/01/07 07:55 AM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: driv]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
Cheers, and glad to hear that it worked! smile

Top
#318009 - 06/08/09 08:57 AM Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Myke]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
Just confirming that this still works with UBB.threads 7.5.3.

Top


Moderator:  sirdude 
Who's Online
0 registered (), 30 Guests and 25 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Ubb - Buy It!
best forum software
Latest Posts
I want to create a Self Search mod [Question]
by lightningrod
03/10/10 09:04 PM
If I create a new script, can I just upload it?
by lightningrod
03/10/10 05:35 PM
Notepad Creates Errors when working with PHP
by lightningrod
03/10/10 05:01 PM
Question on Adding a New Script ?
by lightningrod
03/10/10 06:39 AM
Disable Watch List option
by Mike_Tabat
03/09/10 01:27 PM
[7.x] [Pre-7.3] [Final] pJIRC Addon v0.5
by Gizmo
02/27/10 05:07 PM
How to Be a Great Host
by pinku
02/19/10 02:47 AM
New Mods
Disable Watch List option
by Mike_Tabat
02/18/10 09:14 AM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
[7.x] [Pre-7.3] [Final] pJIRC Addon v0.5
by
07/30/06 10:42 PM
Newest Members
joshuasm02, Chosen, Vick, Bartman, Infinity Master
13496 Registered Users
Top Posters
AllenAyres 25554
JoshPet 11330
Rick 8373
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438
(Views)Popular Topics
Known public proxy servers 1028046
Finished-[6.5.2] Games Arcade Deluxe v1.9 327222
Integrated Index Page (IIP) 5.3.1 279924
Integrated Index Page (IIP) 5.1.1 279403
TLD Bv2.1 Released - Threads Links Directory 270427
[6.0x] Who's Online 4.0.0 [Finished] 230365
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 217518
[6.3.x] [beta] Hit Hack 2.0 179339
FlashChat & UBB.threads 161010
[7.x] Gizmo's Embedding BBCode (Pre UBB.T7.3) 154650
Forum Stats
13496 Members
59 Forums
37114 Topics
290378 Posts

Max Online: 686 @ 06/28/07 07:04 AM
Featured Member
Registered: 02/16/10
Posts: 1

 

 

 
fusionbb message board php hacks