Posted on: 01/31/02 10:35pm
By: Anonymous (bas)
So after some digging around in both the Geeklog and Gallery code I came to this modification in the init.php (from line 144 onwards) in Gallery :
} else if (!strcmp($GALLERY_EMBEDDED_INSIDE, "geeklog")) {
include_once("/opt/geeklog/public_html/lib-common.php");
include_once("/opt/geeklog/system/lib-database.php");
include($GALLERY_BASEDIR . "classes/gallery/UserDB.php");
include($GALLERY_BASEDIR . "classes/gallery/User.php");
/* Load our user database (and user object) */
$gallery->userDB = new Gallery_UserDB;
if(!empty($_USER['uid'])) {
/* Load their user object with their username as the key */
$result = DB_query("SELECT username FROM WHERE uid = ''");
$U = DB_fetchArray($result);
$gallery->user = $gallery->userDB->getUserByUsername(strtolower($U['username']));
}
} else {
Note: replace /opt/geeklog
with the path to your geeklog installation.
Note: this replaces the inclusion of lib-common.php in init.php in John's hack.
Note: Users in Gallery are CASE-SENSITIVE, so I made the mapping to user lower case. You need to define the users in Gallery as lower-case for this hack to work.
Nore : This hack has only been tested on Geeklog 1.3.1 and Gallery 1.2.5
This code provides a mapping with the users of geeklog and the users defined in Gallery. It's not the most elegant solution since it requires two places for user-administration, but it does the job.
The nicest solution would be to create a new User and UserDB class for Gallery that directly use the user-information in Geeklog. This is something I may implement in the future.
Ok have fun,
Bas.
Posted on: 02/03/02 10:07am
By: squatty
Posted on: 02/03/02 02:11pm
By: Anonymous (Anonymous)
Posted on: 02/13/02 07:29am
By: Anonymous (bas)
Posted on: 02/13/02 07:34am
By: Anonymous (bas)
Posted on: 02/13/02 08:31am
By: squatty
Posted on: 02/21/02 07:48pm
By: Anonymous (Anonymous)
Posted on: 03/14/05 07:43pm
By: DaveC