Wednesday, May 21 2003 @ 06:02 AM EDT
Contributed by: anonymous
Views: 2,178
Hello,
I just installed Gallery v 1.3
everthing is fine and it is reading my geeklog user/passwd
but when i make a gallery private, so you need to be logged in to see it.
The problem is that when i logout the Gallery doesn't log me out and if i am on public PC somebody after me can go to the site and without logging in see the gallery, that i want to be private. Any ideas what can be done about this ?
Thanks
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Logout from Gallery & Omission in README for manual integration
Authored by: anonymous on
Tuesday, May 27 2003 @ 07:44 PM EDT
I am also having the issue with not being able to logout from gallery without closing the browser.
Now that I understand how the integration works a little better, I realized that I needed to try the manual integration installation when using the cvs of gallery. All went fine, but unfortunately, the manual installation instructions are missing a very important (at least for me) conditional statement (the one that checks for group permissions).
I would suggest this modification be replace the corresponding section in the README.txt that is downloaded with the package from gplugs.sourceforge.net. After adding the last conditional statement group permissions started working. I am not sure how I can update it. . .or i would update the cvs myself.
/* GEEKLOG MOD * If loggedIn has the perm and we're logged in, then * we're ok also. */ $loggedIn = $gallery->userDB->getLoggedIn(); if ($perm[$loggedIn->getUid()] && $gallery->user->isLoggedIn() ) { return true; } if (is_array($perm)) { foreach ($perm as $gid => $pbool) { $group = $gallery->userDB->getUserByUid($gid); if ($group->isGroup == 1) { if (SEC_inGroup(abs($group->uid), $uid)) { return true; } } } } return false;
I hope this helps someone. I am still investigating the issue with the gallery session not being terminated when you logout of geeklog.
Authored by: anonymous on
Saturday, August 09 2003 @ 03:26 AM EDT
found this code on another site...( I would cite but I can\'t remember which one it was) put it in my gallery init.php and it worked like a charm. Now when I log out of geeklog I am logged out of gallery also.
*** Begin quote ***
The Logout Problem.
------------------------
Edit, around line 200 (was around line 240 for me), init.php in your gallery\'s main directory. You\'ll see something like this:
if (isset($_USER[\"username\"])) {
$gallery->session->username = $_USER[\'username\'];
Simply add the following three lines after it:
} else if (!empty($gallery->session->username)) {
$gallery->session->username = \"\";
}
I am also having the issue with not being able to logout from gallery without closing the browser.
Now that I understand how the integration works a little better, I realized that I needed to try the manual integration installation when using the cvs of gallery. All went fine, but unfortunately, the manual installation instructions are missing a very important (at least for me) conditional statement (the one that checks for group permissions).
I would suggest this modification be replace the corresponding section in the README.txt that is downloaded with the package from gplugs.sourceforge.net. After adding the last conditional statement group permissions started working. I am not sure how I can update it. . .or i would update the cvs myself.
MODIFICATIONS TO ALBUM.PHP (gallery/classes)
##### FIND THIS CODE ##### around line 1108
$loggedIn = $gallery->userDB->getLoggedIn();
if ($perm[$loggedIn->getUid()] &&
strcmp($gallery->user->getUid(), $everybody->getUid())) {
return true;
}
return false;
##### AND REPLACE IT WITH #####
/* GEEKLOG MOD
* If loggedIn has the perm and we're logged in, then
* we're ok also.
*/
$loggedIn = $gallery->userDB->getLoggedIn();
if ($perm[$loggedIn->getUid()] && $gallery->user->isLoggedIn() ) {
return true;
}
if (is_array($perm)) {
foreach ($perm as $gid => $pbool) {
$group = $gallery->userDB->getUserByUid($gid);
if ($group->isGroup == 1) {
if (SEC_inGroup(abs($group->uid), $uid)) {
return true;
}
}
}
}
return false;
I hope this helps someone. I am still investigating the issue with the gallery session not being terminated when you logout of geeklog.