[prev in list] [next in list] [prev in thread] [next in thread]
List: gallery-devel
Subject: [Gallery-devel] re: [Gallery-users] Add Photos from directory or URL
From: "Tim Rice" <rice0009 () mc ! duke ! edu>
Date: 2002-01-22 13:37:18
[Download RAW message or body]
Damon,
If you have not solved your upload problem, I can help you. I had the same
problem. It stems from Apache being configured to not return a list of
files in a directory in the absence of an Index file. Please note that
this is the proper behavior. What I did to solve the problem was to write
a small php file that I placed in my upload directory and called index.php.
I've included a copy of it. This is a very crude script that displays all
the files in the current directory, with an anchor tag around it. To get
Gallery to pick the images up correctly, I had to include the index.php on
the end of the URL that I entered in the upload dialog (ie
http://yoursite/upload/index.php) Otherwise, it would show the files, but
not actually pick them up.
Also, if you still need help with the Random Image block, I can send you
mine. I modified the HTML to center the images. Changes consist of adding
a Center tag set around the Anchor tag for the image.
Tim Rice
Network Systems Analyst
Department of Medicine
Duke University Medical Center
(See attached file: index.php)
["index.php" (application/octet-stream)]
<HTML>
<HEAD>
<TITLE>Uploads for Gallery</TITLE>
<BODY><UL>
<?
$current=getcwd();
/* chdir($headdir); */
$handle=opendir(".");
while ($file = readdir($handle)) {
if(is_file($file)) if($file!="index.php") echo "<LI><A HREF=$file>$file</a><br>";
}
closedir($handle);
chdir($current);
?></UL>
</BODY>
</HTML>
__[ g a l l e r y - d e v e l ]_________________________
[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic