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  

[RELEASE] - Improved New Albums Block
Goto page 1, 2  Next
 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » Blocks View previous topicPrinter friendly versionView next topic
Author Message
dari

Site Admin
Site Admin


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

PostPosted: Tue Aug 12, 2003 2:57 pm    Post subject: [RELEASE] - Improved New Albums Block Reply with quote

There is a new, improved New Albums block available here at NukedGallery.net. Go here:
http://www.nukedgallery.net/article28.html [nukedgallery.net]
for the story.

EDIT: IF YOU DOWNLOADED THIS BLOCK PRIOR TO WEDNESDAY, AUGUST 13 AT 8:45AM (EDT), YOU MUST CHANGE THIS IN THE CODE:
ON LINE 134, IT READS:
Code: › $stat = fs_stat(CACHE_FILE);

IT SHOULD READ:
Code: › $stat = fs_stat(ALBUMCACHE);

THE DOWNLOAD THAT IS AVAILABLE AT THIS SITE HAS BEEN UPDATED WITH THIS FIX AS OF THIS TIME.
_________________


Last edited by dari on Wed Aug 13, 2003 7:40 am; edited 2 times in total
Back to top
Offline View user's profile Send private message Visit poster's website
AdBot
   Post subject: [RELEASE] - Improved New Albums Block  

Back to top
slackbladder

Moderator
Moderator


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

PostPosted: Tue Aug 12, 2003 3:12 pm    Post subject: Reply with quote

Nice one - great work as usual! Smile

Amended the config, installed the block and worked first time!

However after refresh I got the following error:

Warning: stat() [function.stat]: Stat failed for CACHE_FILE (errno=2 - No such file or directory) in /my/path/to/modules/gallery/platform/fs_unix.php on line 75

Maybe my server (permissions, etc)

What do you think?
Rolling Eyes

It's running on the test site - have a look
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: Tue Aug 12, 2003 3:50 pm    Post subject: Reply with quote

Hmn - my fault - I had display_errors 'ON' in my php.ini Shocked

However it was still flagged as an error - is it a problem?
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: 6274
Location: Washington Township, NJ, USA

PostPosted: Tue Aug 12, 2003 3:53 pm    Post subject: Re: [RELEASE] - Improved New Albums Block Reply with quote

you still getting the error after making the php.ini change? the stat() function is a standard PHP call: http://www.php.net/stat and shouldn't give an error when the file has been created already. (the way the code works, stat isn't called unless the file exists..).

let me know if it pops up again.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
slackbladder

Moderator
Moderator


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

PostPosted: Tue Aug 12, 2003 4:00 pm    Post subject: Reply with quote

NO error gone! Very Happy But because display_errors if OFF. I guess the error is still there - but doesn't seem to be affecting the block. Is it likely that it's NOT using the new style of CACHE FILE?
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: 6274
Location: Washington Township, NJ, USA

PostPosted: Tue Aug 12, 2003 4:02 pm    Post subject: Reply with quote

take a look in your album directory. see if album_list.cache is there and populated...
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
slackbladder

Moderator
Moderator


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

PostPosted: Tue Aug 12, 2003 4:08 pm    Post subject: Reply with quote

YEP - it's there and fully loaded!!! Now we're cooking on GAS! Mr. Green

Hey 100 posts - do I get a GOLD STAR! Laughing (95 useless rubbish, 5 just about worth while! Shocked Laughing )
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: 6274
Location: Washington Township, NJ, USA

PostPosted: Tue Aug 12, 2003 7:16 pm    Post subject: Re: [RELEASE] - Improved New Albums Block Reply with quote

congrats on hitting 100 Smile

this should help speed things up for people with massive galleries (several thousands of photos).

i just need to get the caching implemented in the Most Popular photo block. this will be slightly more complex, as it would require a fairly large cache file. there are several ways of doing it:
1. the cache file lists every photo in all the albums with their associated click counts. BAD BAD BAD...lots of photos == HUGE cache file.
2. the cache file contains only the photo name and click count of the photo from each album with the most number of hits. this would lower it to just one photo per album. it still would be big, and require a large amount of time to regenerate the cache file, but it would be quick for the rest of the time. what would be the ideal update rate on the cache file? hourly, daily, etc?
3. keep it the way it is. get the stats real time. takes a long time, everytime.

solution 2 seems to be the best. it'll probably take me half a day or so to code it up and debug it, so it might not happen till later in the week.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
channone

Beginner
Beginner


Joined: Jul 29, 2003
Posts: 5

PostPosted: Wed Aug 13, 2003 1:29 am    Post subject: Reply with quote

I had the same error. i did the following and it went away.

define(ALBUMCACHE, $gallery->app->albumDir . "/album_list.cache");
/* define(ALBUMCACHE,ALBUM_DIRECTORY."album_list.cache"); */

line 134 or so

if(fs_file_exists(ALBUMCACHE)) {
/* $stat = fs_stat(CACHE_FILE); */
$stat = fs_stat(ALBUMCACHE);

it's late and I took a quick stab at it..seems to work.
Back to top
Offline View user's profile Send private message
slackbladder

Moderator
Moderator


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

PostPosted: Wed Aug 13, 2003 1:49 am    Post subject: Reply with quote

Yep - works for me! Very Happy
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Ciro

Beginner
Beginner


Joined: Aug 13, 2003
Posts: 4

PostPosted: Wed Aug 13, 2003 3:23 am    Post subject: Re: [RELEASE] - Improved New Albums Block .: ERROR :. Reply with quote

I get these errors:

Warning: main(/home2/user2582/public_html/html/modules/gallery/albums/init.php): failed to open stream: No such file or directory in /home2/user2582/public_html/html/blocks/block-NG-NEW-newAlbums.php on line 36

Fatal error: main(): Failed opening required '/home2/user2582/public_html/html/modules/gallery/albums/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/user2582/public_html/html/blocks/block-NG-NEW-newAlbums.php on line 36

Running on an upgraded PHPNuke (6.0 => 6.5) as a center block.

What could be wrong?
Back to top
Offline View user's profile Send private message
slackbladder

Moderator
Moderator


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

PostPosted: Wed Aug 13, 2003 3:42 am    Post subject: Reply with quote

Check your GALLERY setup - it appears your paths are wrong. Run the /modules/gallery/setup again.

Unless you have done something different to the standard install - this is wrong:
/home2/user2582/public_html/html/modules/gallery/albums/init.php

Should be more like:
/home2/user2582/public_html/html/modules/gallery/init.php
/home2/user2582/public_html/html/albums

ALBUMS should be outside of your MODULES folder
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
techmike

Beginner
Beginner


Joined: Aug 03, 2003
Posts: 3
Location: Sweden

PostPosted: Wed Aug 13, 2003 4:12 am    Post subject: Re: [RELEASE] - Improved New Albums Block Reply with quote

Hi I'm new to this Gallery thing.
However when I'm tried your block I got these errors:

Warning: Invalid argument supplied for foreach() in /var/www/mikenet/php/html/gallery-1.3.4/session.php on line 55

Fatal error: Failed opening required '/var/www/mikenet/php/html//var/www/mikenet/php/html/gallery-1.3.4/ML_files/ML_settings.inc' (include_path='.:/usr/share/pear') in /var/www/mikenet/php/html/gallery-1.3.4/ML_files/ML_config.php on line 108

I'm running PHP-Nuke 6.8.

Any ideas what I'm doing wrong?
Back to top
Offline View user's profile Send private message Visit poster's website
Ciro

Beginner
Beginner


Joined: Aug 13, 2003
Posts: 4

PostPosted: Wed Aug 13, 2003 4:15 am    Post subject: Reply with quote

slackbladder wrote: › Check your GALLERY setup - it appears your paths are wrong. Run the /modules/gallery/setup again.


My paths are very fine:

/* CHANGE THESE VARIABLES */
$GALLERY_BASEDIR = "/home2/user2582/public_html/html/modules/gallery/";
define(WEB_BASE_ADDR,"http://way-point.org/");
define(GALLERY_NAME,"gallery");
define(USE_THUMBS,0); // Set to 1 to show thumbnails, 0 to just list albums.
define(HOROZONTAL,0); //Set to 1 to list horozontally, 0 for vertically. If USE_THUMBS is 0,
//this is ignored, and albums will be listed vertically.
define(ALBUM_DIRECTORY,"/home2/user2582/public_html/html/modules/gallery/albums/");
/* DON"T CHANGE ANYTHING BELOW HERE */

public_html/html/modules/gallery/ => http://way-point.org/html/modules/gallery/ [way-point.org]

main site=http://way-point.org/html/ [way-point.org], ebedded gallery is here: http://way-point.org/html/modules.php?name=gallery [way-point.org]

slackbladder wrote: ›
Unless you have done something different to the standard install - this is wrong:
/home2/user2582/public_html/html/modules/gallery/albums/init.php

Should be more like:
/home2/user2582/public_html/html/modules/gallery/init.php
/home2/user2582/public_html/html/albums

ALBUMS should be outside of your MODULES folder



I'm using a standard install of Gallery, wich was first standalone (1.3.3) & then embedded in PHP-Nuke 6.0 with a ported phpBB. Then I upgraded PHP-Nuke to 6.5 and the Gallery to 1.3.4 and short after that to 1.3.4-pl1.

Why should the albums be outside the modules BTW?

EDIT: The Migrating Gallery Frequently Asked Questions on http://gallery.menalto.com/ [menalto.com] says nothing about moving the albums outside te modules dir when migrating into PHP-Nuke.

Tnx for your answer!

EDIT: I changed define(USE_THUMBS,0); to define(USE_THUMBS,1); and now I'm getting this error:
Fatal error: Call to undefined function: numaccessiblealbums() in /home2/user2582/public_html/html/blocks/block-NG-NEW-newAlbums.php on line 47

Which is another topic i saw...

---
Gallery v.1.3.4-pl1 on PHP-Nuke 6.5
PHP Version: 4.3.2 - MySQL version: 4.0.13 - Apache version: 1.3.28 (Unix) - OS: Linux
Back to top
Offline View user's profile Send private message
slackbladder

Moderator
Moderator


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

PostPosted: Wed Aug 13, 2003 5:03 am    Post subject: Reply with quote

Ciro wrote: ›
My paths are very fine:

/* CHANGE THESE VARIABLES */
$GALLERY_BASEDIR = "/home2/user2582/public_html/html/modules/gallery/";
define(WEB_BASE_ADDR,"http://way-point.org/");
define(GALLERY_NAME,"gallery");
define(USE_THUMBS,0); // Set to 1 to show thumbnails, 0 to just list albums.
define(HOROZONTAL,0); //Set to 1 to list horozontally, 0 for vertically. If USE_THUMBS is 0,
//this is ignored, and albums will be listed vertically.
define(ALBUM_DIRECTORY,"/home2/user2582/public_html/html/modules/gallery/albums/");
/* DON"T CHANGE ANYTHING BELOW HERE */


This is wrong:
define(WEB_BASE_ADDR,"http://way-point.org/");

Currently points to a POSTNUKE install, should be:
define(WEB_BASE_ADDR,"http://way-point.org/html/");

Quote: ›
Why should the albums be outside the modules BTW?


Doesn't have to be - I was referring to a STANDARD install, where GALLERY places the file location for you - you have chosen a different place for the album files.

By putting the albums folder inside MODULES, your current robots.txt could be stopping Crawler BOTS from finding your photos, so you may lose traffic (Google image search, etc).

Quote: ›
I changed define(USE_THUMBS,0); to define(USE_THUMBS,1); and now I'm getting this error:
Fatal error: Call to undefined function: numaccessiblealbums() in /home2/user2582/public_html/html/blocks/block-NG-NEW-newAlbums.php on line 47


Save config.php and your albums directory and remove everything else. Then do a fresh install of 1.3.5 - you mave have some wrong files in place from the upgrade to 1.3.4
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » Blocks View previous topicPrinter friendly versionView next topic
Goto page 1, 2  Next

 
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