From: John K. <jo...@ke...> - 2002-08-17 08:24:21
|
> > ... perhaps I should have put glowing neon lights > > and dancing animated gifs around the word "simple" in my request. Hi, In case Jeff's explantion needs additional simplification, here's the step-by-step version :) Wise ones please check this and make sure I haven't got it wrong. Seems to work for me. All file paths are relative to the phpwiki folder. * Open index.php * Find: define('ADMIN_USER', "admin"); * Add two new lines under the ADMIN_PASSWD line: define('RESTRICTED_USER', "user"); define('RESTRICTED_PASSWD', "test"); * Now open lib/WikiUser.php * Scroll to the end and replace the whole of the _pwcheck function with this: function _pwcheck ($userid, $passwd) { global $WikiNameRegexp; if (!empty($userid) && $userid == ADMIN_USER) { if (!empty($passwd) && $passwd == ADMIN_PASSWD) return WIKIAUTH_ADMIN; return false; } elseif (!empty($userid) && $userid == RESTRICTED_USER) { if (!empty($passwd) && $passwd == RESTRICTED_PASSWD) return WIKIAUTH_USER; } return false; } * Finally open lib/main.php * Halfway down you'll find this: case 'edit': if (defined('REQUIRE_SIGNIN_BEFORE_EDIT') && REQUIRE_SIGNIN_BEFORE_EDIT) return WIKIAUTH_BOGO; return WIKIAUTH_ANON; Replace it with this: case 'edit': return WIKIAUTH_USER; I think that should do it. John. -- ------------------------------------ 0113 2289316 / 07944 755613 jo...@ke... / www.kershaw.org AOL johnkershaw / Y! john_m_kershaw ------------------------------------ |