PHPNuke block code to generate a listing of albums errors.
lstepnio
Joined: 2003-02-21
Posts: 35 |
Posted: Wed, 2003-09-10 16:13 |
I'm trying to generate a linkable listing of my gallery top level albums on my PHPNuke website. I have a block with the following code which almost works: $GALLERY_BASEDIR = "/home/httpd/majjix.com/modules/gallery/"; require_once($GALLERY_BASEDIR . "init.php"); $albumDB = new AlbumDB(FALSE); $numAlbums = $albumDB->numAlbums($gallery->user); for ($i=1; $i <= $numAlbums; $i++) { $album = $albumDB->getAlbum($gallery->user, $i); $albumName = $album->fields["name"]; $albumTitle = $album->fields["title"]; $albumURL = makeAlbumUrl($albumName); $content .= "<img src=images/blocks/icon_dot.gif>&<a href=\"$albumURL\">$albumTitle</a></br>\n"; } The problem is if I go into the gallery as module in PHPNuke with the above code enabled it fails with the following error in the logs: http://www.majjix.com/modules.php?name=gallery PHP Fatal error: Call to a member function on a non-object in /home/httpd/gallery.majjix.com/classes/AlbumDB.php on line 218
The random and new albums blocks on the PHPNuke site seem to working perfectly with this code: Any suggestions? |
|
Posts: 35
bumping. hoping someone has some insight. I commented out the code on my page for now but I really would like to get this working.