Version: , by TheHideoutGuy
Developer Last Online: Oct 2015
Version: Unknown
Rating:
Released: 09-24-2001
Last Update: Never
Installs: 3
No support by the author.
After a crash course learning PHP, vBulletin, and vbPortal I've managed to come up with an add-on/hack based on the Nuke5 hack that is included in the package. To those experienced PHP programmers, please be kind this is my first official PHP project!
This add-on consists of a folder that you install in the classes subdir which contains the database class for vBulletin. You also have to make some modifications to a couple Gallery files and real simple and minor modifications to 2 vbPortal files.
This hack uses the vB user database for assigning permissions to the various albums. It's not complete by any means, and be forewarned that the album permissions page wants to load the entire user database each time, which is obviously not good for larger sites.
Probably in future releases I'm going to remove the Nuke stuff altogether in an attempt to speed up the script, but for the moment I have left it in.
For those who don't want to run vbPortal it is entirely possible to hack init.php in gallery to always use the vBulletin database class, but I am not packaging it that way because I am using vbPortal.
Enjoy!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
had a look in the full release forums but couldn't find this ?...anyway has anyone used this without Vbportal ?
Quote:
For those who don't want to run vbPortal it is entirely possible to hack init.php in gallery to always use the vBulletin database class, but I am not packaging it that way because I am using vbPortal
Sounds straight forward but being a bit of a n00b I could do with a bit of a hand / info on this ?
One problem, When accessed through vBportal you get this error if you are not admin.
Fatal error: Call to a member function on a non-object in /home/virtual/site223/fst/var/www/html/modules/Gallery/classes/Album.php on line 1037
It works fine if you access it directly.
that line, and surrounding lines are as follows
Code:
function getPerm($permName, $uid) {
$perm = $this->fields["perms"][$permName];
if ($perm[$uid]) {
return true;
}
global $gallery;
/* If everybody has the perm, then we do too */
$everybody = $gallery->userDB->getEverybody();
if ($perm[$everybody->getUid()]) {
return true;
}
/*
* If loggedIn has the perm and we're logged in, then
* we're ok also.
*/
$loggedIn = $gallery->userDB->getLoggedIn();
if ($perm[$loggedIn->getUid()] &&
strcmp($gallery->user->getUid(), $everybody->getUid())) {
return true;
}
return false;
}