PDA

View Full Version : PHP Photo Album script



jr_yeo
04-07-2006, 12:43 PM
Script: PHP Photo Album script
URL: http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm

just a newbie here...

My question is, how do i toggle the sort by filename alphabetically? :-)

tried nulling this part of the script...still its not sorted by filename...
var gsortorder="" but by file date...

tnx

ddadmin
04-09-2006, 01:50 AM
Are you sure the script doesn't sort by file name when you enter a blank string for "gsortorder"? What the script does is perform no sorting at all, as by default, your server should already list files in alphabetical order, so there's no need for the script to do any sorting in this case. To confirm, FTP or telnet to your images directory, and see if the files inside are sorted alphabetically by default.

jr_yeo
04-11-2006, 09:40 AM
tried the script on a Linux (Mandrake) platform and the script works smoothly :o

but ive got 93 pictures and only the first 89 of them are sorted alphabetically..;)

the rest of the pictures are unsorted.... :confused:

by the way, m using localhost as my web server :)

ddadmin
04-11-2006, 06:54 PM
Hmmm honestly I don't see why the script would stop sorting correctly after the 89th image, unless the filename for that image onwards contains certain special characters. Can you post the file names of the images before, on, and after the 89th image?

jr_yeo
04-14-2006, 03:23 PM
my question had been answered before in this thread :eek:

http://www.dynamicdrive.com/forums/showthread.php?t=7430&highlight=php+album

thnx for the time, ddadmin :cool:

just have to read more of the forums :o :o

jr_yeo
05-02-2006, 07:00 PM
one other problem ive encountered :D

when i tried the script on a windows platform (localhost), the script is not being parsed :) but when i tried it on a linux platform (localhost) the script works just fine :) any idea why is this so? tnx :cool:

chuckster
05-03-2006, 11:08 AM
I'm having the same problem with sorting by file name. With ftp I can see they are in alpha order on the server.

http://www.chuckroast.com/fire-safety/emb/test.php

Otherwise I'm finding this very useful.

Twey
05-03-2006, 11:55 AM
when i tried the script on a windows platform (localhost), the script is not being parsedProbably PHP isn't installed and configured properly. It's a lot trickier on Windows, you have to fiddle around with config files and stuff. See the PHP docs (http://uk2.php.net/manual/en/install.windows.php) on the subject.

jr_yeo
05-06-2006, 12:56 PM
but im using a windows, apache, mysql, php bundle installer (wamp) :)
any other php scripts i have works like a charm :D

Twey
05-06-2006, 12:57 PM
Strange... are you using the same file extension as you do for the working PHP scripts?

jr_yeo
05-06-2006, 12:59 PM
yeah.... *.php :D

Twey
05-06-2006, 01:12 PM
Well, that's very peculiar. Are you doing anything differently to what you would normally -- a different location, accessing it differently, strange characters in the file, that sort of thing?

jr_yeo
05-06-2006, 02:36 PM
don't think so... :D i just followed as per instructed at PHP Photo Album script link :) which is i placed the "getpics.php" to http://localhost/test/what" directory where "what" is where the pictures to be displayed are located and "test" is where the other directions is placed :D

Twey
05-06-2006, 04:06 PM
Are you sure you removed the ".txt" extension from the end of the filename?

jr_yeo
05-06-2006, 07:20 PM
m sure :cool:

Twey
05-06-2006, 07:40 PM
And another PHP file in the same directory does get parsed?

jr_yeo
05-07-2006, 12:09 AM
yupz.... :) phpinfo()....works :)
did a
<?php
$flavor[] = "blue raspberry";
$flavor[] = "root beer";
$flavor[] = "pineapple";

sort($flavor);
print_r($flavor);
?> works also :)

Twey
05-07-2006, 12:12 AM
OK... I'm now confused.
Please:
1) Check the permissions are set correctly (Windows has execute control, I think);
2) Post the code inside the file;
3) Post the output of the script.

jr_yeo
05-07-2006, 12:14 AM
strange characters in the file
is underscore considered a strange character? :o

Twey
05-07-2006, 12:20 AM
Nope. Any ASCII control characters, I should think.

jr_yeo
05-07-2006, 12:24 AM
sorry :confused: what is execute control? :o

Twey
05-07-2006, 12:30 AM
I don't know how to get to it on Windows, but there should be an option somewhere that says "allow users from group So-And-So to execute this file."

jr_yeo
05-11-2006, 12:48 PM
IMHO, i think execution control is limited to Linux platforms only

Twey
05-11-2006, 02:52 PM
No, it isn't. I thought so too, but Mike set me straight.
On NT-based Windows systems (except XP Home, I think) one can enable "viewing complex permissions" or something similar under Tools->Folder Options->View. Then, when viewing the "sharing" properties tab, there should be a new button that allows you to control what various users and groups can do with the file.

jr_yeo
05-11-2006, 03:24 PM
still can't see the feature though :) would it make any difference if i told u that my computer is not in any way connected to a LAN and there's no other user or group in the computer except me, the Windows XP Pro Administrator? :D IMHO, that feature only works if m sharing my files :D

Twey
05-11-2006, 04:11 PM
still can't see the feature thoughWell, it's a good job Microsoft provides such extensive documentation :rolleyes:

would it make any difference if i told u that my computer is not in any way connected to a LAN and there's no other user or group in the computer except me, the Windows XP Pro Administrator?No, but I would say that running everything as an "Administrator" is daft :)
IMHO, that feature only works if m sharing my filesYou are. Not via SMB; you're sharing them via HTTP. The same rules, I believe, apply.

jr_yeo
05-11-2006, 05:15 PM
okies :rolleyes:

jr_yeo
05-11-2006, 05:36 PM
Well, it's a good job Microsoft provides such extensive documentation
where can i find such extensive documentation? :rolleyes:

Twey
05-11-2006, 06:27 PM
Sarcasm, I fear :) You'll just have to keep looking.

jr_yeo
05-12-2006, 12:21 AM
he he :D