Bahrat's code (for standalone) no photo chosen.

gdesanto

Joined: 2002-10-04
Posts: 8
Posted: Fri, 2002-11-15 01:44

I get nothing but no photo chosen.

It running un-modified bahrat's code. I'm using a shtml include to call the block-random.php code, if that has any bearing.

Greg

 
josephp

Joined: 2002-10-03
Posts: 172
Posted: Fri, 2002-11-15 03:17

My suggestion to use .php then use the include php code and it works itself

 
gdesanto

Joined: 2002-10-04
Posts: 8
Posted: Fri, 2002-11-15 21:31

I converted the call to a PHP include and I still got in No Photo Chosen.

Greg

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Sun, 2002-11-17 04:54

Suppose you're calling the include from"
/path/to/website/index.php
But the block-random.php lives in
/path/to/website/gallery
Then you'll need to set the $GALLERY_BASEDIR variable to the latter for it to work correctly.
i.e.
$GALLERY_BASEDIR = "/path/to/website/gallery/"; /* WITH TRAILING SLASH!! */
include("gallery/block-random.php");

Otherwise, the block-random code expects to find init.php in the main directory, not in the gallery directory.

-Beckett (beck@beckettmw.com)

 
cosmicdynamo

Joined: 2002-11-14
Posts: 17
Posted: Fri, 2002-11-29 20:47

I started to have the same problem:

Warning: Invalid argument supplied for foreach() in /home/spaceta/public_html/vg/modules/gallery/pnblocks/gallery_random.php on line 332
No photo chosen.

Is this the same problem as above?
Where do I include the
include("gallery/block-random.php"); as stated above?

Thanks
Pierre

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Sat, 2002-11-30 08:11
Quote:
I started to have the same problem:

Warning: Invalid argument supplied for foreach() in /home/spaceta/public_html/vg/modules/gallery/pnblocks/gallery_random.php on line 332
No photo chosen.

Hello Pierre,

seems that you use my code. That is a little bit different compared to Bharat's original code. I hope you use PostNuke as CMS! Because it is especially for this CMS! If you do so try to delete the block-random.cache file which exists in the album directory. Maybe that helps for the moment.

Joerg

 
jr1001

Joined: 2003-05-04
Posts: 13
Posted: Tue, 2003-12-16 18:45

I too get "No photo chosen" but it is intermittent - like on every 3rd or 4rth refresh. Anyway to eliminate that? I use joergs lates source code with Gallery 1.4.1