Home | Support Forums | Your Account | Gallery [2] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Get GT-AlbumList.php code here

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » GalleryTap View previous topicPrinter friendly versionView next topic
Author Message
wHiTeHaT

Beginner
Beginner


Joined: Jul 28, 2003
Posts: 10

PostPosted: Fri Jul 02, 2004 2:38 pm    Post subject: Get GT-AlbumList.php code here Reply with quote

i hope it is usefull

Code: › <?php

if (eregi("block-GT-AlbumList.php",$PHP_SELF)) {
    Header("Location: index.html");
    die();
}

global $gallery, $GALLERY_EMBEDDED_INSIDE, $GALLERY_MODULENAME;
define(PHPNUKE_ADDR,"http://www.yoururl.com/");

// CHANGE THIS TO REFLECT YOUR INSTALLATION     
$GALLERY_BASEDIR = "/YOURPATH/modules/gallery/";
$GALLERY_MODULENAME = "gallery";
// DON"T CHANGE ANYTHING BELOW HERE

require_once($GALLERY_BASEDIR."init.php");
$GALLERY_EMBEDDED_INSIDE = "nuke";
$GALLERY_EMBEDDED_INSIDE_TYPE = "phpnuke";

$content = "";

$albumDB = new AlbumDB(FALSE);

function printAlbumList($albumName,$depth=0) {
        global $gallery, $GALLERY_EMBEDDED_INSIDE, $GALLERY_MODULENAME;

        $printedHeader = 0;
        $myAlbum = new Album();
        $myAlbum->load($albumName);
        $numPhotos = $myAlbum->numPhotos(1);
        for ($i=1; $i <= $numPhotos; $i++) {
                $myName = $myAlbum->getAlbumName($i);
                if ($myName && !$myAlbum->isHidden($i)) {
                        $nestedAlbum = new Album();
                        $nestedAlbum->load($myName);
                        if ($gallery->user->canReadAlbum($nestedAlbum)) {
                                $val2 = $nestedAlbum->fields['title'];
                                $content .= "<div style=\"margin: 0px 0px 0px 20px\">";
                                $content .= "<span class=fineprint>";
                                $content .= "<a href=\"";
                                $content .= makeAlbumUrl($myName);
                                $content .= "\">$val2</a>\n";
                                $content .= printAlbumList($myName,$depth+1);
                                $content .= "</span>";
                                $content .= "</div>";
                        }
                }
        }
   return $content;
}


foreach ($albumDB->albumList as $album) {
   if (!$album->isRoot()) {
      continue;
   }
   $content .= "<a href=\"".PHPNUKE_ADDR."gallery-album_".$album->fields['name'].".html\">" .$album->fields['title'] ."</a>\n<br><hr>";
   $content .=  printAlbumList($album->fields["name"]);

}
?>


Have fun with it
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: Get GT-AlbumList.php code here  

Back to top
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » GalleryTap View previous topicPrinter friendly versionView next topic

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSearch Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaSEO

6th year online! 2003-2008
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia