Support Forums | Demo Gallery [1.x] [2.x] | 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  

block-NG-AlbumList.php - scrolling MOD

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic
Author Message
eucarya

User
User


Joined: May 26, 2004
Posts: 37
Location: phoenix

PostPosted: Wed Nov 10, 2004 10:40 pm    Post subject: block-NG-AlbumList.php - scrolling MOD Reply with quote

Have you got too many albums to list without having a huge block?
Here is how to modify the block-NG-AlbumList.php block to make it scroll.

1. After line 39:
Code: › $content .= "</div>";

ADD
Code: › $content .= "</marquee>";


2. After lines 45 and 46:
Code: ›       return $content;
}

ADD
Code: ›
$content .= "<marquee loop=\"infinite\" direction=\"up\" behavior=\"scroll\" align=\"center\" scrollamount= \"2\" scrolldelay=\"60\" height=\"220\" onmouseover='this.stop()' onmouseout='this.start()'>";


Here is the entire block with the modified code for scrolling
Code: ›
<?php
global $gallery, $GALLERY_EMBEDDED_INSIDE, $GALLERY_MODULENAME;


// CHANGE THIS TO REFLECT YOUR INSTALLATION     
$GALLERY_BASEDIR = "/var/www/virtual/artish.org/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>";
                                $content .= "</marquee>";
                        }
                }
        }
        return $content;
}

$content .= "<marquee loop=\"infinite\" direction=\"up\" behavior=\"scroll\" align=\"center\" scrollamount= \"2\" scrolldelay=\"60\" height=\"220\" onmouseover='this.stop()' onmouseout='this.start()'>";

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

?>


enjoy!

~tonyash
Back to top
Offline View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
AdBot
   Post subject: block-NG-AlbumList.php - scrolling MOD  

Back to top
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks 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: Dedicated ServersDomain NamesWeb HostingDomain Name RegistrationDedicated Web HostingWeb Design New YorkCompare VoIPseo packagesSEO CompanyNew York Yellow PagesFind LocationsVOIP Phone ServiceNeckermannOnline internetSEORestaurant Locator • Get great HP coupons from CouponSnapshot • Search for great dell coupons at CouponSnapshot.com.au • Graduation DressesAndroid TabletSEO IndiaBuy Phen375fuel filter

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