Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.


edited December 2007 in Vanilla 1.0 Help
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?


  • MarkMark Vanilla Staff
    edited November 2005
    This is not really the place for dokuwiki support. It is all defined very clearly in the dokuwiki documentation.
  • i know.... i'm sorry, but I couldn't get it worked out with the instructions they had
  • MarkMark Vanilla Staff
    edited November 2005
    The instructions on that page I linked couldn't help you?
  • it didn't confuse me, it just didn't work, i tried doing it over a couple times too
  • MarkMark Vanilla Staff
    edited November 2005
    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.
  • 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
  • MarkMark Vanilla Staff
    Ohhhhh. Well, my version isn't using mysql - it's the flat file version.
  • Hm... How do you get new user registrations without you manually adding them?
  • MarkMark Vanilla Staff
    link to here: doku.php?id=home&do=register
  • 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 ?
  • 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.
  • 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
  • anyone want to help make a Doku-Vanila integration addon?
  • 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:
  • 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...
  • edited January 2007
    I have it working... I don't know if it's 100% the correct way of doing things, but it works well enough.

    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. !!

    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.

    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 <> PunBB backend * by Brent Shultz <> */ 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.
  • edited January 2007
    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:

    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.
  • Yeah that is a good site, I made a discussion about it a while ago...
  • 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...
  • edited January 2007
    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.
  • 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.
  • edited January 2007
    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.
  • What is-
    $CookieUserID = @$_COOKIE[$Configuration['COOKIE_USER_KEY']];
    $VerificationKey = @$_COOKIE[$Configuration['COOKIE_VERIFICATION_KEY']];

    $_SERVER['REMOTE_USER'] = $row->Name;
  • 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.
  • So the only things I have to replace in the code is the path and database info?
  • The database info is called from Vanilla's "$Configuration".

    The only line you should need to change is the path to Vanilla.
  • what does the proper path to vanilla look like? or not?
  • That's what mine looks like except I have a different folder name.
  • 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...
  • 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! :-(

Sign In or Register to comment.