Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
  1.  # 1
    Need help! I'm trying to setup a DokuWiki, just like Lussumo's, where you need to login to be able to post...
    The default for DokuWiki is to be able to post without logging in, can anyone give me step by step instructions on how to make a superuser and make it so you can login?
    Thanks!!!!!
    •  
      CommentAuthorMark
    • CommentTimeNov 14th 2005 edited
     # 2
    This is not really the place for dokuwiki support. It is all defined very clearly in the dokuwiki documentation.

    http://wiki.splitbrain.org/wiki:acl
  2.  # 3
    i know.... i'm sorry, but I couldn't get it worked out with the instructions they had
    •  
      CommentAuthorMark
    • CommentTimeNov 14th 2005 edited
     # 4
    The instructions on that page I linked couldn't help you?
  3.  # 5
    it didn't confuse me, it just didn't work, i tried doing it over a couple times too
    •  
      CommentAuthorMark
    • CommentTimeNov 14th 2005 edited
     # 6
    Oh really?

    Wierd. I'd give you a step by step, but I honestly don't remember configuring it. I just read the docs and did it and didn't really have any problems. The lussumo docuwiki site took me about 3 hours to set up from downloading dokuwiki to putting it online. I just remember being really impressed with the software.
  4.  # 7
    If I were to do it without using MySQL, I got that all working fine, but I can't figure out how to setup the MySQL part... It seems like you got that working fin though :-D
    •  
      CommentAuthorMark
    • CommentTimeNov 14th 2005
     # 8
    Ohhhhh. Well, my version isn't using mysql - it's the flat file version.
  5.  # 9
    Hm... How do you get new user registrations without you manually adding them?
    •  
      CommentAuthorMark
    • CommentTimeNov 14th 2005
     # 10
    link to here: doku.php?id=home&do=register
    •  
      CommentAuthorbugsmi0
    • CommentTimeSep 6th 2006
     # 11
    the doku wiki instructions are all geek to me i don't understand why they just don't make it set up as an automatic install like Vanila here and also the media wiki installs like Vanilla as well if i'm not mistaken, having to go into terminal and hand code so primitive and barbaric, I also notice for Mac their instructions are for placing doku in /sites not webserver/root has anyone using mac found an easier way to install ?
    •  
      CommentAuthorgiginger
    • CommentTimeSep 6th 2006
     # 12
    MediaWiki is fine to install but to set up how you want and administrate it's a fucking joke.

    Haven't really had a proper play with Dokuwiki yet. It's on my list.
    •  
      CommentAuthorbugsmi0
    • CommentTimeSep 6th 2006
     # 13
    yea surprisingly the install was pretty straight forward and worked for me nicely (sweating) been seeing how Mark set up his pages not sure if he has login set up need to study it myself more on how to make use of it. I want it to read only pages nobody can edit but admin
    • CommentAuthorjh
    • CommentTimeSep 14th 2006
     # 14
    anyone want to help make a Doku-Vanila integration addon?
  6.  # 15
    I'll second the Doku-Vanilla integration! It should not be too hard since most of it is already spelled out. I'm just not proficient enough to take it on. See the instructions: http://wiki.splitbrain.org/wiki:auth:mysql
  7.  # 16
    Does anyone know how to do a Vanilla-Doku Integration? I have looked at the auth:mysql but I dont understand really how Vanilla does its own user/password let alone how to integrate it into Dokuwiki...
    • CommentAuthorbshultz
    • CommentTimeJan 5th 2007 edited
     # 17
    I have it working... I don't know if it's 100% the correct way of doing things, but it works well enough.

    Caveats:
    I set up so DokuWiki checks if I'm logged in to Vanilla via "People", and if so, to log in automatically. I didn't want to set extra cookies beyond the session, nor allow login/logout by anything but Vanilla.

    !! This may or may not work for you, but hopefully it gives a starting point. !!

    !! Including People gives all sorts of crazy PHP warnings. On Dreamhost they're inconsequential, as output buffering is turned off, but this may be a problem on your host. !!

    UPDATE:
    re-tested with a fresh install of Vanilla and Dokuwiki and works as expected.
    added line '$conf['useacl'] = 1;' to conf/local.php.
    added file conf/acl.auth.php.
    added opening and closing php tags to files for clarity.
    corrected error ($Configuration['DATABASE_NAME'] should be $Configuration['DATABASE_USER']) inc/auth/vanilla.class.php, line 69.

    UDATE II:
    Minor changes to inc/auth/vanilla.class.php

    All that said, here goes:

    file: [dokuwiki base directory]/conf/local.php

    Add the following lines at the outset of the file:
    /* Include Vanilla's People. Dokuwiki will overwrite these variables.
    * NOTE: this must be the first line in the file */
    @include(DOKU_CONF.'local.protected.php');


    Also include the following:
    $conf['useacl'] = 1;
    $conf['authtype'] = 'vanilla';
    /* Grab DB info from Vanilla's conf */
    $conf['auth']['mysql']['server'] = $Configuration['DATABASE_HOST'];
    $conf['auth']['mysql']['user'] = $Configuration['DATABASE_NAME'];
    $conf['auth']['mysql']['password'] = $Configuration['DATABASE_PASSWORD'];
    $conf['auth']['mysql']['database'] = $Configuration['DATABASE_NAME'];


    file: [dokuwiki base directory]/conf/local.protected.php
    (NOTE: make sure to set the proper VANILLA_ROOT!!)

    <?php
    /* Integrating w/vanilla give all sorts inconsequential errors. For
    * debugging purposes, comment out the next two lines */
    error_reporting(0);
    ini_set("display_errors", 0);

    if(!defined('VANILLA_ROOT')) define('VANILLA_ROOT', '/path/to/your/vanilla/install');
    require_once VANILLA_ROOT.'appg/settings.php';
    require_once VANILLA_ROOT.'appg/init_people.php';
    ?>php


    file: [dokuwiki base directory/conf/acl.auth.php
    <?php
    /* allows all users to view wiki pages */
    * @ALL 1
    /* grant admin user all rights */
    * @Administrator 16
    /* grant member create & edit rights */
    * @Member 8
    ?>


    file: [dokuwiki base directory]/inc/auth/vanilla.class.php

    <?php
    /**
    * Vanilla Backend
    *
    * Adapted from Andreas Gohr's <andi@splitbrain.org> PunBB backend
    * by Brent Shultz <bshultz@gmail.com>
    */

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

    class auth_vanilla extends auth_mysql {

    /**
    * Constructor.
    *
    * Sets additional capabilities and config strings
    */
    function auth_vanilla(){
    global $Configuration;
    $this->cando['external'] = true;

    $conf['passcrypt'] = 'md5';
    $conf['auth']['mysql']['checkPass'] = "SELECT u.Password AS pass
    FROM ${db_prefix}User AS u, ${db_prefix}Role AS g
    WHERE u.RoleID = g.RoleID
    AND u.Name = '%{user}'
    AND g.Name = ('Member' OR 'Moderator' OR 'Administrator')";
    $conf['auth']['mysql']['getUserInfo'] = "SELECT Password AS pass, u.Name AS name, Email AS mail,
    UserID as id, g.Name as group
    FROM ${db_prefix}User AS u, ${db_prefix}Role AS g
    WHERE u.RoleID = g.RoleID
    AND u.Name = '%{user}'";
    $conf['auth']['mysql']['getGroups'] = "SELECT g.Name as `group`
    FROM ${db_prefix}User AS u, ${db_prefix}Role AS g
    WHERE u.RoleID = g.RoleID
    AND u.Name = '%{user}'";
    $conf['auth']['mysql']['getUsers'] = "SELECT DISTINCT u.Name AS user
    FROM ${db_prefix}User AS u, ${db_prefix}Role AS g
    WHERE u.RoleID = g.RoleID";
    $conf['auth']['mysql']['FilterLogin'] = "u.Name LIKE '%{user}'";
    $conf['auth']['mysql']['FilterName'] = "u.Name LIKE '%{name}'";
    $conf['auth']['mysql']['FilterEmail'] = "u.Email LIKE '%{email}'";
    $conf['auth']['mysql']['FilterGroup'] = "g.Name LIKE '%{group}'";
    $conf['auth']['mysql']['SortOrder'] = "ORDER BY u.Name";
    $conf['auth']['mysql']['getGroupID'] = "SELECT RoleID AS id FROM ${db_prefix}Role WHERE Name='%{group}'";
    $conf['auth']['mysql']['TablesToLock']= array("${db_prefix}User", "${db_prefix}User AS u",
    "${db_prefix}Role", "${db_prefix}Role AS g");
    $conf['auth']['mysql']['debug'] = 0;
    // call mysql constructor
    $this->auth_mysql();

    }

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

    if ($Context->Session->UserID > 0) {
    mysql_connect($Configuration['DATABASE_HOST'], $Configuration['DATABASE_USER'], $Configuration['DATABASE_PASSWORD']);
    if ($CookieUserID == '') $CookieUserID = $Context->Session->UserID;
    mysql_select_db($Configuration['DATABASE_NAME']);
    $result = mysql_query('SELECT u.Name as Name, u.Password as Password, u.Email as Email, u.RoleID, g.RoleID, g.Name as GroupName FROM LUM_User as u, LUM_Role as g WHERE UserID='.$CookieUserID.' AND u.RoleID = g.RoleID');
    while ($row = mysql_fetch_object($result)) {
    $USERINFO['pass'] = $row->Password;
    $USERINFO['name'] = $row->Name;
    $USERINFO['mail'] = $row->Email;
    $USERINFO['grps'] = array($row->GroupName);
    $_SERVER['REMOTE_USER'] = $row->Name;
    $_SESSION[DOKU_COOKIE]['auth']['user'] = $row->Name;
    $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO;
    }
    mysql_free_result($result);
    return true;
    }

    // to be sure
    auth_logoff();
    return false;
    }
    }
    ?>


    Comments, suggestions, corrections, etc. are welcomed.
    •  
      CommentAuthoricouto
    • CommentTimeJan 5th 2007 edited
     # 18
    Anyone wanting to try out several different wikis, as well as CMSs, e-Commerce packages, and other php+database software (like "Vanilla"), without having to install them, then check out this website:

    OpenSourceCMS
    a site that allows you to try out several packages for blogs, forums, cms, e-commerce, e-learning and others, including full admin capabilities for all, without having to install them in your own server.
  8.  # 19
    Yeah that is a good site, I made a discussion about it a while ago...
  9.  # 20
    I tried the integration, but had some problems, it caused the entire wiki to not be viewable... maybe i will have to try it again...
    • CommentAuthorbshultz
    • CommentTimeJan 6th 2007 edited
     # 21
    I've made some changes to the instructions above to correct some minor errors/omissions.

    Also, did you set the path to Vanilla in conf/local.protected.php on the following line?

    if(!defined('VANILLA_ROOT')) define('VANILLA_ROOT', '/path/to/your/vanilla/install');
    Not setting that line, or setting it improperly, will result in a blank wiki.
  10.  # 22
    I set that line after forgetting it... and got the wiki to appear, but now i am getting the auth failed contact wiki admin thing... I think i will start over with step one again, just to make sure i did it right.
    • CommentAuthorbshultz
    • CommentTimeJan 7th 2007 edited
     # 23
    Make sure in conf/local.php you have the line:
    $conf['useacl'] = 1;
    I accidentally omitted that my first go round.

    Also omitted from my initial posting, was conf/acl.auth.php
    <?php
    /* allows all users to view wiki pages */
    * @ALL 1
    /* grant admin user all rights */
    * @Administrator 16
    /* grant member create & edit rights */
    * @Member 8
    ?>

    That should make it all good to go.
  11.  # 24
    What is-
    $CookieUserID = @$_COOKIE[$Configuration['COOKIE_USER_KEY']];
    $VerificationKey = @$_COOKIE[$Configuration['COOKIE_VERIFICATION_KEY']];

    $_SERVER['REMOTE_USER'] = $row->Name;
    • CommentAuthorbshultz
    • CommentTimeJan 7th 2007
     # 25
    Re:
    $CookieUserID = @$_COOKIE[$Configuration['COOKIE_USER_KEY']];
    $VerificationKey = @$_COOKIE[$Configuration['COOKIE_VERIFICATION_KEY']];

    I initially had issues that would not set the cookie user & verification key via $Context if the login was not persistent (ie. session only). I figured it out, but forgot to remove those lines.

    I've eliminated those in my post above, and replaced:

    if (($CookieUserID != '' && $VerificationKey != '')||($Context->Session->UserID > 0)) {
    withif ($Context->Session->UserID > 0) {
    It does the same exact thing, just dumps extraneous code.

    $_SERVER['REMOTE_USER'] is how DokuWiki stores usernames. $row->Name; is that info from the database.
  12.  # 26
    So the only things I have to replace in the code is the path and database info?
    • CommentAuthorbshultz
    • CommentTimeJan 7th 2007
     # 27
    The database info is called from Vanilla's "$Configuration".

    The only line you should need to change is the path to Vanilla.
  13.  # 28
    what does the proper path to vanilla look like?
    http://site.com/vanilla or not?
    •  
      CommentAuthorjimw
    • CommentTimeJan 10th 2007
     # 29
    That's what mine looks like except I have a different folder name.
  14.  # 30
    yep, never did get this to work... has anyone else got it up and running? and if so how and can you host the files...
    •  
      CommentAuthorTiggr
    • CommentTimeApr 28th 2007
     # 31
    Hi,

    I'm just testing this, but it doesn't work! :-( I'm logged in at Vanilla, but DokuWiki thinks, I'm not! And if I try to login in at DokuWikis login screen, the screen allways just reloads! :-(

    Tiggr
    •  
      CommentAuthorTiggr
    • CommentTimeApr 29th 2007
     # 32
    Umpf: $Context->Session->UserID is always 0! Why?
  15.  # 33
    @Tiggr: you probably need to put:

    define('NOSESSION', true)
    somewhere in dokuwiki.php.

    Anyway, I've written a new class for this purpose (ie. make DokuWiki use Vanilla authentication). The source is in the wiki at: vanilla:integration:dokuwiki

    Works for me, I hope someone else will find it useful too.
    •  
      CommentAuthorTiggr
    • CommentTimeJul 15th 2007
     # 34
    OK, now it works! Thank you very much!
    •  
      CommentAuthorTiggr
    • CommentTimeAug 27th 2007 edited
     # 35
    Took me some time, until it realy worked, but now it runs like a rocket!

    Thank you very much!

    Tschüss
    Tiggr (aka Marcus)

    PS:
    Forum: http://www.orgaohnenamen.de/forum
    Wiki: http://www.orgaohnenamen.de/wiki
    (I still have to do something about design...)
    • CommentAuthorrmccue
    • CommentTimeSep 16th 2007 edited
     # 36
    Just to let you know, the reason you get all the errors is because Vanilla sets it's error reporting to all, but Dokuwiki uses a bad practice and doesn't check if the variables are set first. To put it simply, it's a Dokuwiki bug.
    To fix it, you can change the core of Dokuwiki, or you can add
    error_reporting(0);
    after the require_once lines in vanilla.class.php

    However, I can't log in. I get the same problem as Tiggr, but I've definitely got it in there (local.php actually, since that's where your settings should go).
    •  
      CommentAuthorTiggr
    • CommentTimeSep 16th 2007
     # 37
    I'm very sorry I can't help you, I've just deleted my first dokuwiki installation and did it again: And than it worked fine!
    • CommentAuthorrmccue
    • CommentTimeSep 17th 2007
     # 38
    Well, for now, I'm going to give up on it and just leave the users seperate.
    • CommentAuthorlecrepier
    • CommentTimeNov 16th 2007 edited
     # 39
    Hi,
    (sorry my english is not very good)

    I follow the instruction of the wiki page for integration of dokuwiki.

    I think i have done correctly the instruction. first I had the problem with magic-quotes-gpc. i created a file htaccess whith this line : SetEnv MAGIC_QUOTES 0. it's ok

    Now, I obtain these error

    have you a idea about that ?
    Thank

    I use vanilla 1.1.3 and dokuwiki 2007-06-26b
    • CommentAuthorlecrepier
    • CommentTimeNov 16th 2007
     # 40
    oups !!

    I add this line like rmccue :
    error_reporting(0);

    I don't have any mor error, but i don't believe the identification is working,
    I'm coming back soon
  16.  # 41
    Im having issues with this as well.

    All I have done is make the changes noted in the documentation file located here:

    http://lussumo.com/docs/doku.php?id=vanilla:integration:dokuwiki

    I've not been able to get it working. Right now, all I get is a blank screen when I try and go to the wiki.

    Does anyone have more detailed steps... any order.. any things that need to be configured outside of those file changes... etc?

    Thanks in advance

    JB
  17.  # 42
    Is there anyone that can help with this? Is the MediaWiki integration better?

    I'd really like to get this working asap.

    Thanks in advance

    JB
    •  
      CommentAuthorTiggr
    • CommentTimeDec 6th 2007
     # 43
    Hi!

    I took three tries, doing in my opinion always the same, but only the third try worked. :-(

    But I don't know, what the difference made!

    Tiggr
  18.  # 44
    Hi Tiggr,

    Thanks for being willing to help. Could you maybe explain to me what you did exactly?

    Did you do anything different from what the documentation here says:

    http://lussumo.com/docs/doku.php?id=vanilla:integration:dokuwiki

    I'd really like to get this working as soon as possible.

    Thanks in advance

    JB
  19.  # 45
    Is anyone successfully using a wiki integrated with Vanilla? I really need some help.
    •  
      CommentAuthorTiggr
    • CommentTimeDec 8th 2007
     # 46
    All I did, was following the instructions...

    And I've added two lines to local.php

    $conf['superuser'] = '@Administrator';
    $conf['disableactions'] = 'register,resendpwd,profile,login,logout';


    And this is changed/new in conf/dokuwiki.php:

    $conf['defaultgroup']= 'user'; //Default groups new Users are added to
    $conf['superuser'] = '!!not set!!'; //The admin can be user or @group
    $conf['manager'] = '@Moderatoren'; //The manager can be user or @group

    /* Vanilla */
    /* Mandatory */

    define('NOSESSION', true);
    $conf['authtype'] = 'vanilla';

    /* Optional */
    define('VANILLA_ROOT', '/home/orgaohnenamen_de/www/forum/'); /* This is the default */
    $conf['acl'] = 1; /* You probably have this set already */
    $conf['disableactions'] = 'login,logout,profile,register,resendpwd'; /* Now handled by Vanilla */
    $conf['passcrypt'] = 'md5'; /* Not really necessary, set automatically by the authentication backend */


    And this is new inside the .htaccess, it's very rude, but I did it:

    php_flag magic_quotes_gpc Off
    php_flag display_errors 0



    That's all I remember.
    • CommentAuthorrmccue
    • CommentTimeDec 9th 2007
     # 47
    Woot! I don't know what happened (probably the magic quotes was my undoing), but it works! Now, to just set up ACL...

    Thanks Tiggr!
  20.  # 48
    It is not necessary to make any changes to conf/dokuwiki.php. That file contains all the default settings for a dokuwiki setup, anything you place in conf/local.php will override what is in the dokuwiki.php.

    All default values are stored in a file called conf/dokuwiki.php. If you want to modify a setting you should do this in a file called conf/local.php – this makes sure your special configs are not overwritten by a later upgrade. The config manager will use this file as well.
    -- taken from http://wiki.splitbrain.org/wiki:config
  21.  # 49
    Thanks Tiggr and sirlancelot for your help! I'm going to try again tonight, and hopefully I can get it working. If so, I'll try and document the process in detail for others.

    Thanks again, and if anyone else has any tips for this I'd appreciate it.
    • CommentAuthorrmccue
    • CommentTimeDec 11th 2007
     # 50
    Hmm, it seems as though it's not working anymore. Damn. I'm going to look into this and see if I can get it working again, as it's locked me out of my wiki :P