Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#26 2010-06-26 21:04:40

Hellfire
Member
Registered: 2010-04-21
Posts: 18

Re: DokuWiki + Flux1.4 Integration

Hey, thanks for the wiki theme. I was able to easily comment out the includes for the navbar, etc I was wondering about the following two things.

I like having a fixed width (like the wiki theme you gave me), is this easy to set for fluxbb (air)? I want the rounded rectangle container to be fixed see this pic:

http://hellfire.boxofspoons.net/images/width.jpg

Also, I would like to put the wiki within a container (matching the one in flux):

http://hellfire.boxofspoons.net/images/border.jpg

Offline

#27 2010-06-27 15:41:07

oli_v_ier
Member
Registered: 2008-09-21
Posts: 39

Re: DokuWiki + Flux1.4 Integration

Hellfire wrote:

I had a similar problem, but it wasn't caused by the integration. I found that if you move dokuwiki (say from /www/iamtestingmynewwiki to /www/wiki) some of the stuff gets messed up. Maybe there is a baseurl setting somewhere that needs to be fixed?

In /conf/dokuwiki.php , you have to change: $conf['basedir']     = '/wiki/';
wink

Thanks, but this wasn't the source of me problem.

I solved it by:
1- moving the configuration instructions from local.protected.php to local.php
2- moving the code :

define('PUN_ROOT', '../forum/'); include PUN_ROOT.'include/common.php';

to the beginning of fluxbb_v1_4.class.php, juste before

require_once DOKU_INC.'inc/auth/mysql.class.php';

(deleted local.protected.php, now empty file)

Then I had other errors:

**Fatal error: Cannot redeclare utf8_strlen() (previously declared in ......./inc/utf8.php:132) in ......./include/utf8/mbstring/core.php  on line 28**

That's because some functions in the file inc/utf8.php are already defined by FluxBB 1.4.0, these are:

    * utf8_strlen
    * utf8_substr
    * utf8_strtolower
    * utf8_strtoupper
    * utf8_ucfirst
    * utf8_strpos

So I've followed these instructions, adding an check around these functions:

if(defined('PUN_ROOT')) { ... }

Offline

#28 2010-06-28 02:19:24

Hellfire
Member
Registered: 2010-04-21
Posts: 18

Re: DokuWiki + Flux1.4 Integration

Just so you know, since your modifications are now in just local.php, they will be overwritten EVERY TIME you change ANYTHING in dokuwiki. Really easy way to break your site.

Offline

#29 2010-06-28 03:34:13

oli_v_ier
Member
Registered: 2008-09-21
Posts: 39

Re: DokuWiki + Flux1.4 Integration

Hellfire wrote:

Just so you know, since your modifications are now in just local.php, they will be overwritten EVERY TIME you change ANYTHING in dokuwiki.

Not exactly. local.php is overwritten each time you use the config manager. This will be a problem only if you use configuration instructions not accessible via the config manager (in this case they will be lost).

Offline

#30 2010-11-19 01:35:07

Plazzmex
Member
Registered: 2008-07-24
Posts: 85

Re: DokuWiki + Flux1.4 Integration

How do you integrate the dokuwiki into the site layout like here?
I'm trying to do this by putting

define('PUN_WIKI', 1);
define('PUN_ROOT', '../');
require PUN_ROOT.'include/common.php';
define('PUN_ACTIVE_PAGE', 'wiki');
 
$page_title = array(pun_htmlspecialchars($pun_config['o_board_title']));
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';

in the top of doku.php file nothing good happens...

Added: anybody?

Last edited by Plazzmex (2010-11-22 22:10:13)

Offline

#31 2010-11-26 10:10:28

Plazzmex
Member
Registered: 2008-07-24
Posts: 85

Re: DokuWiki + Flux1.4 Integration

Don't know about you, but I have another problem.
After fixing the utf8 errors, another error appears:

Fatal error: Call to a member function query() on a non-object in C:\Program Files (x86)\wamp\www\fluxbb\include\functions.php on line 185

Does anybody know a solution ?

Added: seems like this error shown only when I did something. Now remade all the changes and all works but image showing.
The images inside the wiki not shown... I think it's because it fetches wrong path to the picture because of my define of 'define('PUN_ROOT', '../');'. When I comment out this code the pictures are shown correctly..
How can I fix this ?

Last edited by Plazzmex (2010-11-30 22:26:07)

Offline

#32 2010-12-15 20:24:56

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,639
Website

Re: DokuWiki + Flux1.4 Integration

Sorry for the delay. I just contacted you via email. Let's get this sorted.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#33 2010-12-17 13:41:24

square
Member
From: Toulouse, France
Registered: 2008-05-15
Posts: 16

Re: DokuWiki + Flux1.4 Integration

Hi,

After I followed all the advices, it doesn't work for me.
Fluxbb 1.4.2 with dokuwiki-2010-11-07.tgz "Anteater".

Are there any changes for it to work with the previous versions of both fluxbb or dokuwiki ?

Last edited by square (2010-12-18 11:52:15)

Offline

#34 2010-12-17 23:49:52

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,639
Website

Re: DokuWiki + Flux1.4 Integration

Not that I know of, no. What exactly "doesn't work" for you?


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#35 2010-12-18 15:30:26

square
Member
From: Toulouse, France
Registered: 2008-05-15
Posts: 16

Re: DokuWiki + Flux1.4 Integration

Franz wrote:

Not that I know of, no. What exactly "doesn't work" for you?

I've got the same message as Plazzmex, after I edit inc/utf8.php like mentionned here ( http://www.dokuwiki.org/auth:punbb )

Fatal error: Call to a member function query() on a non-object in /homepages/mydomain/forum/include/functions.php on line 185

Forget it : that works now.

My solution was found here : http://fluxbb.fr/aide/doku.php?id=astuces:dokuwiki

The same solution that was spoken earlier in this topic...

Last edited by square (2010-12-18 15:49:57)

Offline

#36 2011-03-25 06:51:36

jedd
Member
Registered: 2011-03-25
Posts: 3

Re: DokuWiki + Flux1.4 Integration

Hello,

Has anyone managed to integrate the latest DokuWiki "Anteater" with fluxbb 1.4.5 so far?
The above solution leads to a blank page instead of DokuWiki's homepage... hmm

Thanks for your help

Offline

#37 2011-04-05 20:46:39

emorling
Member
Registered: 2011-04-02
Posts: 8

Re: DokuWiki + Flux1.4 Integration

Sorry if this is the wrong place to post this. Let me know if you want it in a PM or another thread in the future.

To fix the online bug, i suggest this change to the trustExternal function.

function trustExternal($user,$pass,$sticky=false){
    global $USERINFO;
    global $conf;
    global $lang;
    global $pun_user;
    global $pun_config;
    $sticky ? $sticky = true : $sticky = false; //sanity check
 
    // someone used the login form
    if(!empty($user)){
      if($this->checkPass($user,$pass)){
        $expire = ($sticky) ? time() + 31536000 : 0;
        $uinfo  = $this->getUserData($user);
        pun_setcookie($uinfo['id'], auth_cryptPassword($pass), $expire);
        $pun_user = array();
        $pun_user['password'] = auth_cryptPassword($pass);
        $pun_user['username'] = $user;
        $pun_user['realname'] = $uinfo['name'];
        $pun_user['email']    = $uinfo['mail'];
        $pun_user['g_title']  = $uinfo['group'];
        // remove user from the online list
          if($this->_openDB()) {      
              $sql = "DELETE FROM ${db_prefix}online WHERE ident='".$_SERVER['REMOTE_ADDR']."'";
              $this->_modifyDB($sql);
              $this->_closeDB();
        }    
      }else{
        //invalid credentials - log off
        msg($lang['badlogin'],-1);
        auth_logoff();
        return false;
      }
    }
 
    if(isset($pun_user) && !$pun_user['is_guest']){
      // okay we're logged in - set the globals
      $USERINFO['pass'] = $pun_user['password'];
      $USERINFO['name'] = $pun_user['realname'];
      $USERINFO['mail'] = $pun_user['email'];
      $USERINFO['grps'] = array($pun_user['g_title']);
 
      $_SERVER['REMOTE_USER'] = $pun_user['username'];
      $_SESSION[DOKU_COOKIE]['auth']['user'] = $pun_user['username'];
      $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO;
      return true;
    }
 
    // to be sure
    auth_logoff();
    return false;
  }

To fix the online bug, i suggest this change to the logOff function.

function logOff(){
    global $pun_user;
      // remove user from the online list
      if(isset($pun_user) && $this->_openDB()) {      
          $sql = "DELETE FROM ${db_prefix}online WHERE ident='".$pun_user['username']."'";
          $this->_modifyDB($sql);
          $this->_closeDB();
    }
    $pun_user = array();
    $pun_user['is_guest'] = 1;
    pun_setcookie(1, random_pass(8), time() + 31536000);
    
  }

I personally need to retrieve an online list of users and a guest count. If you feel it's out of place in the punbb.class.php then I'll simply keep it in a sub-class...

/**
   * get a list of online users and a guest count
   */
  function getOnline(){
      $guest_cnt = 0;
      $users = array();
      if($this->_openDB()) {          
          $sql = "SELECT user_id, ident FROM ${db_prefix}online WHERE idle=0 ORDER BY ident";
          $result = $this->_queryDB($sql);
          if($result !== false && count($result)) {
          foreach($result as $row){
              if ($row['user_id'] > 1){
                  $users[] = $row;    
              }else{$guest_cnt++;}
          }
        }
        $this->_closeDB();
    }
    return array('users'=>$users, 'guest_cnt'=>$guest_cnt);
  }

Thanks

Offline

#38 2011-04-05 21:40:52

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,639
Website

Re: DokuWiki + Flux1.4 Integration

Looks good. Thanks for the effort.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#39 2011-07-07 21:41:59

danfascia
Member
Registered: 2011-01-16
Posts: 4

Re: DokuWiki + Flux1.4 Integration

I have a "fairly well working implementation" of Flux 1.4 and Dokuwiki (latest update) but the cookie integration seems a bit flaky.

For example, even after I logoff through FluxBB, if I log back in I get Permission Denied on the wiki. I have it setup to redirect straight to Dokuwiki after login and I think therein lies the problem...

Is there something that goes on in FluxBB index.php after login that I am bypassing to do with setting/resetting the session cookies?

Offline

#40 2011-09-13 02:40:01

oli_v_ier
Member
Registered: 2008-09-21
Posts: 39

Re: DokuWiki + Flux1.4 Integration

@danfascia could you please post your "fairly well working implementation" of Flux 1.4 and Dokuwiki (latest update) . I'll be very interested indeed !

Thanks !

Offline

#41 2011-10-06 10:23:29

oli_v_ier
Member
Registered: 2008-09-21
Posts: 39

Re: DokuWiki + Flux1.4 Integration

Offline

#42 2012-10-16 02:12:03

Hellfire
Member
Registered: 2010-04-21
Posts: 18

Re: DokuWiki + Flux1.4 Integration

I have been successfully using auth_fluxbb_v1_4 to integrate fluxbb and dokuwiki for a while. I thought I would pop back in and say that while it has been working flawlessly, I recently upgraded dokuwiki to 2012-10-13 "Adora Belle" and had to change line 87 from:

    $this->auth_mysql();

to

    parent::__construct();

Hopefully this helps someone out.

Offline

#43 2012-10-16 08:16:07

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,639
Website

Re: DokuWiki + Flux1.4 Integration

True, I had to do that, too, when upgrading our wiki recently. Cheers, I updated the post.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#44 2013-06-01 12:37:54

elodie
Member
Registered: 2013-06-01
Posts: 6

Re: DokuWiki + Flux1.4 Integration

Greetings,

I'm using "PunBB auth backend" for Dokuwiki since more 3 years and all is working perfectly, even after several Dokuwiki's updates.

I had till now the Dokiwiki version Angua (2012-01-25b) and today, i have tried to update to the latest version Weatherwax (2013-05-10) but it's don't work anymore.

I get the message "User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.". So i have checked Goolgle, wiki and forums, i have tried a new version of your script called "FluxBB auth backend" because i'm usingin FluxBB 1.4.7 but always the same error message.

I didn't change anything from my config so i have checked it and i don't see any problem :

$conf['useacl'] = 1;
$conf['authtype'] = 'authfluxbb14';
//$conf['authtype'] = 'authpunbb';
include PUN_ROOT.'include/common.php';
define('PUN_ROOT',$_SERVER['DOCUMENT_ROOT'].'forum/');
$conf['defaultgroup'] = 'user';
$conf['superuser'] = 'elodie';
$conf['disableactions'] = 'register,resendpwd,login,profile';
$conf['userewrite'] = '1';

I have tried authfluxbb14, fluxbb14 and authpunbb with punbb but same. I don't know what i could check, i have enable the debug mode and called it but it don't tell me anything realy interesting for me.

"FluxBB auth backend" always compatible to the latest version Weatherwax (2013-05-10) please ?
Someone to help me to check the problem ?

Thanks so much smile

PS. I use always in a other directory the last version of DokuWiki Angua (2012-01-25b) and all is working correctly.

Offline

#45 2013-06-08 11:22:46

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,639
Website

Re: DokuWiki + Flux1.4 Integration

Did you use the adapter from the beginning of this topic? If you use that, you should set $conf['authtype'] to "authfluxbb_v1_4", due to the recent changes in DokuWiki.

I'll carefully try to upgrade our own integration in the next days, so I'll post back on that.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#46 2013-06-08 11:57:20

elodie
Member
Registered: 2013-06-01
Posts: 6

Re: DokuWiki + Flux1.4 Integration

Greetings,

Franz wrote:

Did you use the adapter from the beginning of this topic? If you use that, you should set $conf['authtype'] to "authfluxbb_v1_4", due to the recent changes in DokuWiki.

Yes, i have used this one, but the file is named in a other way : /inc/auth/fluxbb14.class.php
so i have tryed :
$conf['authtype'] = 'fluxbb14';
and
$conf['authtype'] = 'authfluxbb14';

but it's same.

The code is : pastebin . franceserv . fr / 270 ( could be fine to set a version number to this code wink )

My old code is : /inc/auth/punbb.class.php
and i have tried :
$conf['authtype'] = 'punbb';
and
$conf['authtype'] = 'authpunbb';

but it's same.

The code of this old class is : pastebin . franceserv . fr / 269

The wiki is at : www . franceserv . fr/wiki2/
and we can see the error message : "User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin."

Franz wrote:

I'll carefully try to upgrade our own integration in the next days, so I'll post back on that.

Could be great to report your experience smile

Thanks again.

PS. Sorry for my links to have added space, i wasnt allowed to post links here ... ("You are not allowed to post links")

Offline

#47 2013-06-09 00:27:29

aliasm2k
Member
From: India
Registered: 2013-05-26
Posts: 47
Website

Re: DokuWiki + Flux1.4 Integration

Maybe PUN_ROOT is not set correctly hmm

Offline

#48 2013-06-09 11:52:57

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,639
Website

Re: DokuWiki + Flux1.4 Integration

I upgraded our wiki and had the same problems, too. I turned our custom "auth backend" into a proper authentication plugin (as that's required for the new version). However, I've had to temporarily turn off ACL (access control lists) to get the adapter working again.

Investigating...

I'll post the adapter code on GitHub when I'm finished.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#49 2013-06-09 12:42:26

elodie
Member
Registered: 2013-06-01
Posts: 6

Re: DokuWiki + Flux1.4 Integration

aliasm2k wrote:

Maybe PUN_ROOT is not set correctly hmm

Already set correctly since few years smile

aliasm2k wrote:

I upgraded our wiki and had the same problems, too. I'll post the adapter code on GitHub when I'm finished.

Alright thanks ! smile

Offline

#50 2013-06-09 13:22:27

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,639
Website

Re: DokuWiki + Flux1.4 Integration

Here we go, try these instructions and please report whether they work for you:
https://gist.github.com/franzliedke/5743534

(It all seems to work here on FluxBB.org.)


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

Board footer

Powered by FluxBB