PDA

View Full Version : Preliminary release: Gallery add-on for vBulletin/vbPortal


TheHideoutGuy
09-24-2001, 10:00 PM
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! ;)

For those who are interested you can download gallery at http://gallery.sourceforge.net and vbPortal can be had at http://www.phpportals.com

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!

TheHideoutGuy
09-25-2001, 05:26 PM
Crud... Wrong forum.. Sorry..
Mods - Please move to appropriate forum.

Thanks.

mars
05-29-2002, 11:24 AM
had a look in the full release forums but couldn't find this ?...anyway has anyone used this without Vbportal ?
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 ?

Thanx in advance :)

countryboy713
06-04-2002, 12:57 AM
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


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;
}



the red line being 1037

corsacrazy
03-23-2003, 09:10 AM
does this work ? is there a vb home intergration ?