Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: PHP Photo Album script

  1. #1
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post PHP Photo Album script

    Script: PHP Photo Album script
    URL: http://www.dynamicdrive.com/dynamici...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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.

  3. #3
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    tried the script on a Linux (Mandrake) platform and the script works smoothly

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

    the rest of the pictures are unsorted....

    by the way, m using localhost as my web server

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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?

  5. #5
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    my question had been answered before in this thread

    http://www.dynamicdrive.com/forums/s...ight=php+album

    thnx for the time, ddadmin

    just have to read more of the forums

  6. #6
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    one other problem ive encountered

    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

  7. #7
    Join Date
    Jul 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    when i tried the script on a windows platform (localhost), the script is not being parsed
    Probably 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 on the subject.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    but im using a windows, apache, mysql, php bundle installer (wamp)
    any other php scripts i have works like a charm

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Strange... are you using the same file extension as you do for the working PHP scripts?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •