Previous Thread
Next Thread
Print Thread
Rate Thread
[7.2.2] DokuWiki authenticating against UBB.t #315652
09/13/2007 5:47 AM
09/13/2007 5:47 AM
Joined: Sep 1999
Posts: 97
Sydney, Australia
M
Myke Offline OP
Power User
Myke  Offline OP
Power User
M
Joined: Sep 1999
Posts: 97
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!

Last edited by Myke; 09/13/2007 5:50 AM.
Sponsored Links
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Myke] #315653
09/13/2007 6:12 AM
09/13/2007 6:12 AM
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Gizmo Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,938
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 - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Gizmo] #315658
09/13/2007 10:30 AM
09/13/2007 10:30 AM
Joined: Mar 2000
Posts: 25,587
Texas
AllenAyres Offline
I type Like navaho
AllenAyres  Offline
I type Like navaho
Joined: Mar 2000
Posts: 25,587
Texas
Thank you Myke! thumbsup


- Allen wavey
- What Drives You?
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres] #315660
09/13/2007 1:34 PM
09/13/2007 1:34 PM
Joined: Mar 2000
Posts: 25,587
Texas
AllenAyres Offline
I type Like navaho
AllenAyres  Offline
I type Like navaho
Joined: Mar 2000
Posts: 25,587
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?
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres] #315661
09/13/2007 1:46 PM
09/13/2007 1:46 PM
Joined: Mar 2000
Posts: 25,587
Texas
AllenAyres Offline
I type Like navaho
AllenAyres  Offline
I type Like navaho
Joined: Mar 2000
Posts: 25,587
Texas
Read the acl docs, not too bad. smile


- Allen wavey
- What Drives You?
Sponsored Links
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres] #315662
09/13/2007 3:10 PM
09/13/2007 3:10 PM
Joined: Nov 2003
Posts: 491
SoCal
S
sirdude Offline
Enthusiast
sirdude  Offline
Enthusiast
S
Joined: Nov 2003
Posts: 491
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.

Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: sirdude] #315671
09/13/2007 8:09 PM
09/13/2007 8:09 PM
Joined: Sep 2005
Posts: 137
Columbus, OH
A
AshtarRose Offline
Journeyman
AshtarRose  Offline
Journeyman
A
Joined: Sep 2005
Posts: 137
Columbus, OH
Sir Dude want to play around with my site to see if you can get my board hooked into my mediawiki?

Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AshtarRose] #315672
09/13/2007 9:11 PM
09/13/2007 9:11 PM
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Gizmo Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
:points: she's cheating on me with an older man! :snicker:™


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Gizmo] #315673
09/13/2007 9:35 PM
09/13/2007 9:35 PM
Joined: Nov 2003
Posts: 491
SoCal
S
sirdude Offline
Enthusiast
sirdude  Offline
Enthusiast
S
Joined: Nov 2003
Posts: 491
SoCal
:flex:™

Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: sirdude] #315674
09/13/2007 9:38 PM
09/13/2007 9:38 PM
Joined: Mar 2000
Posts: 25,587
Texas
AllenAyres Offline
I type Like navaho
AllenAyres  Offline
I type Like navaho
Joined: Mar 2000
Posts: 25,587
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?
Sponsored Links
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres] #315675
09/13/2007 9:39 PM
09/13/2007 9:39 PM
Joined: Nov 2003
Posts: 491
SoCal
S
sirdude Offline
Enthusiast
sirdude  Offline
Enthusiast
S
Joined: Nov 2003
Posts: 491
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

Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Gizmo] #315676
09/13/2007 9:46 PM
09/13/2007 9:46 PM
Joined: Sep 2005
Posts: 137
Columbus, OH
A
AshtarRose Offline
Journeyman
AshtarRose  Offline
Journeyman
A
Joined: Sep 2005
Posts: 137
Columbus, OH
He appreciates my breasts

Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: sirdude] #315677
09/13/2007 9:57 PM
09/13/2007 9:57 PM
Joined: Mar 2000
Posts: 25,587
Texas
AllenAyres Offline
I type Like navaho
AllenAyres  Offline
I type Like navaho
Joined: Mar 2000
Posts: 25,587
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?
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres] #315680
09/13/2007 11:34 PM
09/13/2007 11:34 PM
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Gizmo Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,938
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 - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Gizmo] #315699
09/16/2007 1:23 AM
09/16/2007 1:23 AM
Joined: Mar 2000
Posts: 25,587
Texas
AllenAyres Offline
I type Like navaho
AllenAyres  Offline
I type Like navaho
Joined: Mar 2000
Posts: 25,587
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?
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AllenAyres] #315718
09/16/2007 6:58 PM
09/16/2007 6:58 PM
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Gizmo Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
yeh, TNG is much better than TUFAT; but definately needs some work...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: AshtarRose] #315720
09/16/2007 7:37 PM
09/16/2007 7:37 PM
Joined: Nov 2003
Posts: 491
SoCal
S
sirdude Offline
Enthusiast
sirdude  Offline
Enthusiast
S
Joined: Nov 2003
Posts: 491
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.

Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Myke] #316180
10/29/2007 3:30 PM
10/29/2007 3:30 PM
Joined: Jul 2004
Posts: 88
UK
D
driv Offline
Power User
driv  Offline
Power User
D
Joined: Jul 2004
Posts: 88
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

Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: driv] #316207
11/01/2007 7:55 AM
11/01/2007 7:55 AM
Joined: Sep 1999
Posts: 97
Sydney, Australia
M
Myke Offline OP
Power User
Myke  Offline OP
Power User
M
Joined: Sep 1999
Posts: 97
Sydney, Australia
Cheers, and glad to hear that it worked! smile

Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Myke] #318009
06/08/2009 8:57 AM
06/08/2009 8:57 AM
Joined: Sep 1999
Posts: 97
Sydney, Australia
M
Myke Offline OP
Power User
Myke  Offline OP
Power User
M
Joined: Sep 1999
Posts: 97
Sydney, Australia
Just confirming that this still works with UBB.threads 7.5.3.

Re: [7.2.2] DokuWiki authenticating against UBB.t [Re: Myke] #322925
01/14/2018 10:56 AM
01/14/2018 10:56 AM
Joined: Aug 2017
Posts: 4
Hackelton U.K.
T
TGCSanderson Offline
Lurker
TGCSanderson  Offline
Lurker
T
Joined: Aug 2017
Posts: 4
Hackelton U.K.
Does this work still with UBB.threads Version7.6.1


Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with, and recommend, the following Web Hosts:
· Stable Host
· Blue Host
· Interserver.net
Visit Us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,170
Joined: July 2001
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,448
Posts293,484
Members13,793
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 25,587
JoshPet 11,330
Rick 8,373
LK 7,396
Lord Dexter 6,503
Gizmo 5,938
Greg Hard 5,533
Top Posters(30 Days)
isaac 4
Today's Statistics
Currently Online 686
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 19
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2018 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.6.2
(Preview build 20180611.dev)
Page Time: 0.106s Queries: 15 (0.023s) Memory: 3.4133 MB (Peak: 3.7085 MB) Zlib enabled. Server Time: 2018-06-19 10:14:53 UTC