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 customization

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

Novice
Novice


Joined: Aug 10, 2003
Posts: 25

PostPosted: Sun Aug 10, 2003 11:16 am    Post subject: block customization Reply with quote

i'm using the NG-newAlbums-Horozontal block and i was wondering if anyone knew how to make it only three album across. better yet, 3 albums across and 2 albums down. making a total of 6 images. i think it would look really neat with each album at 150x150 pixel.

----
nothing to report. only a request..
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: block customization  

Back to top
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Sun Aug 10, 2003 12:18 pm    Post subject: Reply with quote

Yep - it's certainly possible. Look how I have it working:

http://www.esp3.net

Scroll down to the bottom. Not quite the same but uses the same technique! Very Happy
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Sun Aug 10, 2003 1:14 pm    Post subject: Re: block customization Reply with quote

I've had a play with the block. Cut and paste the following code, making sure you overwrite the existing code:

Code: ›
/* DON"T CHANGE ANYTHING BELOW HERE */

global $gallery, $prefix, $cookie, $user;

require_once($GALLERY_BASEDIR."init.php");

cookiedecode($user);
$username = $cookie[1];

if( is_user($user) ) {
   $tempUser = new LoggedInUser();
}
else {
        $tempUser = new EverybodyUser();
}
$albumNameCache = array();
$albumDateCache = array();
$content = "";
$albumDB = new AlbumDB(FALSE);
$scaleTo = 150;
foreach ($albumDB->albumList as $tmpAlbum) {
        $name = $tmpAlbum->fields["name"];
        $tempAlbum = new Album();
   $tempAlbum->load($name);
   if(($tempUser->canReadAlbum($tempAlbum)) || ($tempUser->isLoggedIn() && !$gallery->session->offline)) {
      array_push($albumNameCache,$name);
      array_push($albumDateCache,$tempAlbum->fields['clicks_date']);
   }
}

arsort($albumDateCache);

$keys = array_keys($albumDateCache);

$content .= "<center><table border=\"0\"><tr align=\"center\">";

for($i=0;$i<6;$i++){
   $parentTitle = "";
   $currentAlbum = new Album();
   $albumName = $albumNameCache[$keys[$i]];
   $currentAlbum->load($albumName);
      if($currentAlbum->fields['parentAlbumName']) {
         $parentAlbum = new Album();
         $parentAlbum->load($currentAlbum->fields['parentAlbumName']);
         $parentTitle .= $parentAlbum->fields['title']." - ";
      }
      if($i == 3) { $content .= "</tr><tr>"; }
      $content .= "<td align=\"center\"><a href=\"".WEB_BASE_ADDR."modules.php?set_albumName=".$albumName."&op=modload&name=".GALLERY_NAME."&file=index&include=view_album.php\">";
      if(USE_THUMBS) {
         $content .= $currentAlbum->getHighlightTag($scaleTo)."<br>";
      }
      $content .= $parentTitle."".$currentAlbum->fields['title']."</a></td>";   
}
$content .= "</tr></table></center>";
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
executive

Novice
Novice


Joined: Aug 10, 2003
Posts: 25

PostPosted: Sun Aug 10, 2003 6:18 pm    Post subject: Re: block customization Reply with quote

i like the site and really like your LATEST PAPARAZZI. anyway thanks for the mod and i'll apply and post back.

OT: why do i have to log in everytime i visit this site? is it possible to remember the users?
Back to top
Offline View user's profile Send private message
executive

Novice
Novice


Joined: Aug 10, 2003
Posts: 25

PostPosted: Sun Aug 10, 2003 6:42 pm    Post subject: Reply with quote

hello again slackbladder, is there a way so that i can customize the block myself? i hate to keep coming back and bothering you. sooner or later you'll ignore me. lol!

anyway, if i can make one more request, can you make it just 3 albums across and a link to the gallery bellow it? i find that there's no more room for articles.

this will be my last request for some time.
Back to top
Offline View user's profile Send private message
executive

Novice
Novice


Joined: Aug 10, 2003
Posts: 25

PostPosted: Sun Aug 10, 2003 6:57 pm    Post subject: Reply with quote

i think i did it myself. lol! i had no idea what i was doing but her's what i changed:

for($i=0;$i<6;$i++){

to

for($i=0;$i<3;$i++){

now gotta figure out a way to add a link to my album gallery at the bottom of the random block. Very Happy
Back to top
Offline View user's profile Send private message
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Mon Aug 11, 2003 1:40 am    Post subject: Reply with quote

Very Happy NICE ONE!

Let us know if you get stuck!
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Mon Aug 11, 2003 1:44 am    Post subject: Re: block customization Reply with quote

executive wrote: › OT: why do i have to log in everytime i visit this site? is it possible to remember the users?


It's so the UPDATED GALLERIES block on the left works. It needs users to log out and log back in again to allow the MOD to show what has changed since their last visit. The session time for the cookie has been reduced to something like 30 mins.
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Mon Aug 11, 2003 7:14 am    Post subject: Reply with quote

actually, i think it's an hour. but it's the only way to force a user to log in when they revisit the page (i think the old session time was something like a year). i know it's a PITA, but you can tweak the session time on your site if you use that block, just change the value that's in the index.php patch file from 3600 to something else.
Back to top
Offline View user's profile Send private message Visit poster's website
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