Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
help in modifying this code.
Old 11-20-2002, 05:23 AM help in modifying this code.
praveen's Avatar
Life is a Dream

Posts: 3,591
Name: Praveen
Location: Chennai, India
Trades: 0
hello,

i have a image gallery script.. and i seem to be having some problems with it.

Quote:
echo "<br>";
$dir_list = Dir_List($base_serverpath);
for ($i = 2; $i < count ($dir_list); $i++)
{
$dirname = $dir_list[$i];
echo "<center><b>Photographs of ";
echo "<a href=\"$PHP_SELF?gallery_name=$dirname\"><font size=3 face=verdana>$dirname</font></a></center>";
}
/*** if there's not a Gallery chosen - chose the first ***/
if (!$gallery_name)
{
$gallery_name = $dirname(2);
}
as seen above the script searches for images/directories in its folder and if any image is found in the root directory, it displayes it else it displays the first gallery/folder photos.

this is ok.

but in my scenario, i will not have any photos in the root, all the photos will be in folders.. so i do not want the script to display any/or the 1st folder's photos..

rather i just want it to display the folder names when there is no photos in the root.

i know the it is in the last 4 lines, but i do not know the syntax to do it.
i tried commenting the line where it says galleryname=dirname(2)

but i get a script warning.

can anyone tell me how to do this??

thanks
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
praveen is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to help in modifying this code.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24709 seconds with 12 queries