random block produces error ( Invalid argument supplied for

sillium

Joined: 2004-01-28
Posts: 4
Posted: Wed, 2004-01-28 15:16

Hi Folks,

i am running PN .726 and Gallery v1.4.2-RC1. I downloaded the latest random block from joerg's site.
When i choose the block in the blocks menu i cant select an album, it always says "no special albums".
At the place on my site where the block should appear i only see this error message:

Warning: Invalid argument supplied for foreach() in /xx/xxxx/xxxx/xxxx/xxxxxx/modules/Gallery/pnblocks/gallery_random.php on line 532

(i replaced my path with x's ;) )
Can annyone help?

thx in advance
alex

 
sillium

Joined: 2004-01-28
Posts: 4
Posted: Thu, 2004-01-29 08:30

I was browsing this forum and found some hints on my problem mentioned above.
I delete the random_block.cache but nothing made the block work.

It seems the the block cant find my albums. Ist there anything ican do to make a random block work?
I even tried the block from nukedgallery.com, same problem.

i have no clue....

thx

alex

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Sun, 2004-02-01 11:20

Hi Alex,

did you set any special rights on the albums? Normaly only albums with read access for everyone are ready to choose.

Joerg

 
sillium

Joined: 2004-01-28
Posts: 4
Posted: Mon, 2004-02-02 10:21

Hi Joerg,

the permissions on the albums dir are 777 and on the albums are 775 .
Is it a problem the the albums dir is within the gallery dir? I read on nukedgallery that it has to be outside the modules dir.

thx in advance
alex

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Mon, 2004-02-02 16:55

Hi alex,

I meant gallery-permissions not filesystem permissions. Do you have any permissions set or has everyone the right to browse the albums you want to show pictures from in the random block? This is essential, only albums which are readable for everyone could be displayed from the block.

My albums dir is outside the modules dir. I've no experience with album dirs inside the gallery dir.

Joerg

 
sillium

Joined: 2004-01-28
Posts: 4
Posted: Tue, 2004-02-03 09:32

Hi Joerg,

ok that was a misunderstanding. I found the problem. I tested it with an albums directory directly in the webroot. It works now.
It seems that the block has difficulties to find the albums if they ara under the "Gallery".
Thx for the hint.

regards
alex

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Wed, 2004-02-04 19:55

Great that it works for now!

Joerg

 
gooberlx

Joined: 2003-11-24
Posts: 6
Posted: Sun, 2004-02-22 00:57

Using the latest version of the PN Block......I get this:

Warning: Invalid argument supplied for foreach() in /home/xxxxx/public_html/postnuke/modules/gallery/pnblocks/gallery_random.php on line 532

I dunno....I always get this error when I install a new version and I always forget what I do to fix it......grrrrr.

No special permissions on anything concerning Gallery in PostNuke.

albums dir = /public_html/Albums - 777 (775 for album dirs inside)
gallery dir = /public_html/postnuke/modules/gallery