Standalone random block error/question

TotalHosting

Joined: 2003-02-06
Posts: 6
Posted: Fri, 2004-01-23 17:25

Hi All

Running Gallery 1.3.4 on Linux/Apache.

The Gallery works fine.

I am using the block-random.php from http://www.barcahall.com/gallery-block-random.html

When I try to call the block directly from:
http://www.northernmonmouth.com/gallery/block-random.php

I get the following error:

Warning: Invalid argument supplied for foreach() in /home/virtual/site367/fst/var/www/html/gallery/block-random.php on line 234
No photo chosen.

Line 234 looks like this:

foreach ($cache as $name => $count) {

Any one have any ideas?

Also, how would I use the random block to display photos from just a specific album?

There are three images in the test gallery.

Thanks.

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Fri, 2004-01-23 17:30

Try deleting your block-random.cache in your albums directory. Next time you view the page it will re-create a fresh one.

 
TotalHosting

Joined: 2003-02-06
Posts: 6
Posted: Fri, 2004-01-23 17:37

Worked like a charm. Thanks very much.

Any thoughts on my question? How do I limit the random selections to just a specific album (once I have more than one)?

P

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Fri, 2004-01-23 17:42

Not sure for PHPNuke or standalone versions but PostNuke you can via the block settings.

 
tp
tp's picture

Joined: 2003-03-26
Posts: 104
Posted: Sat, 2004-01-24 00:00

thanks.. i was getting the no photo chosen with my standalone setup and this fixed me up... i was thinking this was probably a bigger break so this was a relief.. :D