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  

Improved random block :fixed the block-random.cacheerror

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

Beginner
Beginner


Joined: Jul 11, 2003
Posts: 1

PostPosted: Fri Jul 11, 2003 3:57 pm    Post subject: Improved random block :fixed the block-random.cacheerror Reply with quote

Ok.. hard times to find :
i had to delete the block-random.cache file after changing the ALBUM_BASEADDR variable.
then i had the same errors i saw in some post:
Warning: Invalid argument supplied for foreach() in /home/*******/public_html/BlackNova/html/modules/gallery/random_support.php on line 230
etc etc

i found that the test in get_random_photo_id() function is wrong

Code: › $rebuild = 0;
      if (fs_file_exists(CACHE_FILE)) {
         $stat = fs_stat(CACHE_FILE);
         $mtime = $stat[9];
         if (time() - $mtime < CACHE_EXPIRED) {
         $rebuild = 1;
         }
      }

      if ($rebuild) {
         scanalbums();
         savecache();
      } else {
         readcache();
         print "readcache";
      }


should be
Code: › $rebuild = 0;
      if (fs_file_exists(CACHE_FILE)) {
         $stat = fs_stat(CACHE_FILE);
         $mtime = $stat[9];
         if (time() - $mtime < CACHE_EXPIRED) {
         $rebuild = 1;
         }
      }

      if (!$rebuild) {
         scanalbums();
         savecache();
      } else {
         readcache();
         print "readcache";
      }



in the first one , it tries to read the cache file if it does not exists!

PS: if this bug has already been notified , i m sorry .. i havent found a post with it
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: Improved random block :fixed the block-random.cacheerror  

Back to top
dari

Site Admin
Site Admin


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

PostPosted: Sat Jul 12, 2003 9:55 am    Post subject: Reply with quote

hmm...yeah, i'll patch it up and reissue a new download later this weekend. thanks for the note Smile
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
yrret

Beginner
Beginner


Joined: Apr 19, 2003
Posts: 3

PostPosted: Fri Jul 25, 2003 8:56 pm    Post subject: Reply with quote

DELETE YOUR OLD block-random.cache file, and you will not get the out of bounds etc error, or the rand() errors.
Jeez, I was ready to shoot myself in the head.
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


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

PostPosted: Fri Jul 25, 2003 9:57 pm    Post subject: Re: Improved random block :fixed the block-random.cacheerror Reply with quote

an updated version, with this fix, is available in the downloads section.
_________________
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: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSEO Search Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaCheap Web Design

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