[ABD] Integration for DokuWiki

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Nathan Brittles
Registered User
Posts: 17
Joined: Fri Aug 05, 2005 9:28 pm

[ABD] Integration for DokuWiki

Post by Nathan Brittles » Sat Nov 10, 2007 9:31 pm

Howdy !

I started working to integrate a DokuWiki installation to my phpBB3 test forum. My idea is for phpbb being leading in concerns of design and user administration and the DokuWiki being attached to it. Any one out there interested or working on this, too ?

YOS, Nathan
Last edited by Derky on Sat Jul 10, 2010 2:06 pm, edited 2 times in total.
Reason: Marking as abandoned

MewDragon
Registered User
Posts: 191
Joined: Fri Dec 23, 2005 6:24 pm

Re: [BETA] Integration for DokuWiki

Post by MewDragon » Sun Nov 11, 2007 12:56 am

If this is a mod request, it should be moved to mod requests board.

User avatar
Joe User
Registered User
Posts: 71
Joined: Mon Sep 13, 2004 9:56 am
Location: Germany
Name: Markus Kohlmeyer
Contact:

Re: [BETA] Integration for DokuWiki

Post by Joe User » Mon Nov 12, 2007 3:05 pm

I'm interested in this mod, and i'm sure nobody is working on such a mod.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: [BETA] Integration for DokuWiki

Post by A_Jelly_Doughnut » Mon Nov 12, 2007 4:29 pm

MewDragon wrote:If this is a mod request, it should be moved to mod requests board.
Done :)
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

Nathan Brittles
Registered User
Posts: 17
Joined: Fri Aug 05, 2005 9:28 pm

Re: [BETA] Integration for DokuWiki

Post by Nathan Brittles » Mon Nov 19, 2007 6:50 pm

As promised a the things I did :

A. prepare DokuWiki to use phpBB3 includes
1) Both programs use a class called cache
- modify inc/cache.php
find : class cache{
replace with : class wiki_cache{
find : function cache($key,$ext) {
replace with : function wiki_cache($key,$ext) {
find : class cache_parser extends cache {
replace with : class cache_parser extends wiki_cache {
find : parent::cache($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode);
replace with : parent::wiki_cache($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode);
2) Both programs define a couple of utf8 functions. These cannot be declared twice.
- modify inc/utf8.php
enclose the following functions :
* utf8_strlen
* utf8_substr
* utf8_strtolower
* utf8_strtoupper
* utf8_strpos
like :
if(!defined('IN_PHPBB')){
function utf8...{
}
}
I haven't compared the functions yet. But I assume the dw ones do the same as their phpbb3 counterparts with the same name.
3) Sessionhandling of phpBB3 is done with a get variable sid=... which must be passed along by DokuWiki.
- modify inc/init.php
find : if(!defined('DOKU_SCRIPT'))
replace with : if(!defined('DOKU_SCRIPT')&&!defined('IN_PHPBB'))
- modify inc/common.php
find : $xlink .= DOKU_SCRIPT.'?id='.$id;
replace with : $xlink .= DOKU_SCRIPT.'&id='.$id;
- if using the orphanswanted plugin, this needs to be modified, too :
find : $output .= "<tr><td>$count</td><td><a href=\"". DOKU_URL. "doku.php?id=" .
replace with : $output .= "<tr><td>$count</td><td><a href=\"". DOKU_URL . DOKU_SCRIPT . "&id=" .
C. Create file : inc/auth/phpbb3.php

<?php
/**
* phpBB3 authentication backend
*/

$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
while(!is_file($phpbb_root_path . 'common.' . $phpEx)){
$phpbb_root_path .= '../';
}
include_once($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$conf['phpbb_user']=$user;
$sid=$user->session_id;
define('DOKU_SCRIPT', 'doku.php?sid='.$sid);

define('DOKU_AUTH', dirname(__FILE__));
require_once(DOKU_AUTH.'/basic.class.php');

class auth_phpbb3 extends auth_basic {

var $dbcon = 0;
var $dbver = 0; // database version
var $dbrev = 0; // database revision
var $dbsub = 0; // database subrevision
var $cnf = null;
var $defaultgroup = "";

function auth_phpbb3() {
global $conf;

if (method_exists($this, 'auth_basic'))
parent::auth_basic();

$this->defaultgroup = $conf['defaultgroup'];
$this->cando['external'] = true;
}

function trustExternal($username,$pass,$sticky=false){
global $USERINFO;
global $conf;
$sticky ? $sticky = true : $sticky = false; //sanity check

$USERINFO['name'] = $conf['phpbb_user']->data['username'];
$USERINFO['mail'] = $conf['phpbb_user']->data['user_email'];
$USERINFO['grps'] = array('ALL','user');

$_SERVER['REMOTE_USER'] = $conf['phpbb_user']->data['username'];
$_SESSION[DOKU_COOKIE]['auth']['user'] = $conf['phpbb_user']->data['username'];
$_SESSION[DOKU_COOKIE]['auth']['pass'] = $pass;
$_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO;

return true;
}

}

//Setup VIM: ex: et ts=2 enc=utf-8 :

C. Configuration : The Wiki is cut down to the basic functions (disableactions). I did all configurations in conf/local.protected.php :
define('IN_PHPBB', true);
$conf['useacl'] = 1;
$conf['authtype'] = 'phpbb3';
$conf['disableactions'] = 'backlink,index,login,recent,revisions,register,resendpwd,profile,check,subscribe,unsubscribe,source,export_raw';
Missing :
- no integration of the admin pages yet
- no integration of the templates

Any suggestions ?

banzaimonkey
Registered User
Posts: 11
Joined: Mon Nov 12, 2007 8:54 am
Contact:

Re: [BETA] Integration for DokuWiki

Post by banzaimonkey » Fri Nov 23, 2007 9:19 pm

The filename for the phpbb3 auth class should be phpbb3.class.php, otherwise DokuWiki returns a bad authentication configuration error.

Also, anyone trying to set this up should make sure to change $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../'; in phpbb3.class.php to the appropriate path to your phpbb3 installation. This is relative to the DokuWiki root.

Nathan Brittles
Registered User
Posts: 17
Joined: Fri Aug 05, 2005 9:28 pm

Re: [BETA] Integration for DokuWiki

Post by Nathan Brittles » Fri Nov 23, 2007 9:38 pm

Uuups ... my bad. You're right about the filename.

This is a sandbox thing I do on my pc and I am more an admin, than an developer. I tend to see world with a "working ... good ! not working ... bad !" type of view. By adding "../" as long as the common.php wasn't found, I can in this early stage move the wiki, where I want to. But of course you're right about hard coding the path.

I started banging on a dokuwiki template, that makes use of the phpBB3 style, but I wasn't very lucky yet. To be honest, nothing works right now. Again I admit, I am freely experimenting, rather than analzing scientificly.

Nathan Brittles
Registered User
Posts: 17
Joined: Fri Aug 05, 2005 9:28 pm

Re: [BETA] Integration for DokuWiki

Post by Nathan Brittles » Thu Jan 10, 2008 9:15 pm

Ugly ... I've got it working. But I had to modify the Wiki to the core. I do not advise this - and most likely would not be able to reproduce the steps :-(

User avatar
Joe User
Registered User
Posts: 71
Joined: Mon Sep 13, 2004 9:56 am
Location: Germany
Name: Markus Kohlmeyer
Contact:

Re: [ALPHA] Integration for DokuWiki

Post by Joe User » Thu Jan 10, 2008 9:41 pm

Could you provide a "diff -Naur ..." please?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

banzaimonkey
Registered User
Posts: 11
Joined: Mon Nov 12, 2007 8:54 am
Contact:

Re: [BETA] Integration for DokuWiki

Post by banzaimonkey » Sun Feb 10, 2008 9:32 pm

Nathan Brittles wrote:Ugly ... I've got it working. But I had to modify the Wiki to the core. I do not advise this - and most likely would not be able to reproduce the steps :-(
If you want to try and you're using Windows, you can use WinMerge. :) There are similar utilities for other platforms.

Nathan Brittles
Registered User
Posts: 17
Joined: Fri Aug 05, 2005 9:28 pm

Re: [ALPHA] Integration for DokuWiki

Post by Nathan Brittles » Mon Feb 11, 2008 5:54 pm

I'm using Ubuntu. But I switched my board to phpbb3 a couple of days ago and am now in the process of de-bugging it to get it to run smooth. Further I am still not completely happy with the way the DokuWiki integrates into the board.

banzaimonkey
Registered User
Posts: 11
Joined: Mon Nov 12, 2007 8:54 am
Contact:

Re: [ALPHA] Integration for DokuWiki

Post by banzaimonkey » Mon Feb 11, 2008 6:33 pm

If you're not liking DokuWiki, there is a MediaWiki authentication integration project on MediaWiki. I've been thinking of switching to MediaWiki for easier data backup and extra features like versioning.

daenney
Registered User
Posts: 6
Joined: Mon Feb 14, 2005 9:11 pm

Re: [ALPHA] Integration for DokuWiki

Post by daenney » Sun Feb 24, 2008 1:14 am

I was wondering if there is anything new or a better method on how to integrate this?

I like dokuwiki a lot and is of more use in a development environment than mediawiki is because you can set rights depending namespaces and have much more fine-grained control over what users can do and read and you can make the wiki fully private.

User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3466
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Re: [ALPHA] Integration for DokuWiki

Post by bonelifer » Sun Feb 24, 2008 3:51 am

I can't answer your questions but someone has cleaned this up and put it on the Dokuwiki wiki. I was able to get it working with this wiki article. Make sure to go into Dokuwiki's Admin panel and disable PROFILE EDITING, REGISTRATION and LOGIN from Dokuwiki.

http://wiki.splitbrain.org/wiki:tips:in ... ith_phpbb3
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

daenney
Registered User
Posts: 6
Joined: Mon Feb 14, 2005 9:11 pm

Re: [ALPHA] Integration for DokuWiki

Post by daenney » Sun Feb 24, 2008 12:11 pm

Thanks a bunch, that worked like a charm.

I have achieved the setup as to not allow any forum user to read or write the wiki, since we only want some people of the dev-team to be able to do that, not the whole forum userbase,

To achieve this I need to use DOkuwiki's ACL but how do I do it now?
For example I have a phpbb group called monkeys and I want them to have edit rights on the monkey* namespace.
Any clue on how that is to be done?

Locked

Return to “[3.0.x] Abandoned MODs”