Results 1 to 2 of 2

Thread: Photo Album script v2.0 is not working :(

  1. #1
    Join Date
    Sep 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Photo Album script v2.0 is not working :(

    I wanted to put this on my project for my gallery page. But it isn't working. I tried running the page on different browsers (Google Chrome, Mozilla Firefox, Opera), but still, the page contains nothing at all. Please help me! I really wanted this kind of photo album. Thank you!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

    Warning: Please include a link to the DD script(s) in question in your post. See this post for more information.


    The script requires a PHP enabled server and will not run locally or on a server that's not PHP enabled. Are you running it on a PHP enabled server?

    If not, you need to. However, if you are running it on a PHP enabled server, the getalbumpics.php is a little dated. Here's a more modern version:

    PHP Code:
    <?php 
    Header
    ("content-type: application/x-javascript"); 
    if (
    phpversion() >= 5.1){ 
       @
    date_default_timezone_set(date_default_timezone_get()); 


    function 
    returnimages($dirname=".") { 
       
    $pattern='/\.(jpg|jpeg|png|gif|bmp)$/i'
       
    $curimage=0
       if(
    $handle opendir($dirname)) { 
           while(
    false !== ($file readdir($handle))){ 
                   if(
    preg_match($pattern$file)){ 
             
    $filedate=date ("M d, Y H:i:s"filemtime($file)); 
                     echo 
    "        [$curimage, \"$file\", \"$filedate\"],\n"
                     
    $curimage++; 
                   } 
           } 
           echo 
    '        ["placeholder"]' "\n"
           
    closedir($handle); 
       } 


    $photovar=$_GET['id']; 
    if (!
    preg_match('/^[a-z_][a-z0-9_]+$/i'$photovar)){ 
        echo 
    'alert("Photo Album ID must contain only letters, numbers, or underscore, and cannot start with a number")'
        die(); 

    echo 
    "var $photovar={\n"
    echo 
    "    baseurl: \"http://" $_SERVER["SERVER_NAME"] . dirname($_SERVER['PHP_SELF']) . "/\",\n"
    echo 
    "    images: [\n"
    returnimages(); 
    echo 
    "    ],\n"
    echo 
    "    desc: []\n"
    echo 
    "}\n"
    die(); 
    ?>
    Try it. The browser cache may need to be cleared and/or the page refreshed to see changes.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. PHP Photo Album script v2.11 not working for me.
    By valedaw2 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-07-2011, 01:13 AM
  2. Resolved PHP Photo Album script v2.11 not working
    By hr1 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 08-14-2010, 09:54 PM
  3. PHP Photo Album script v2.0 Not Working IE7
    By drmeisner in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 09-06-2009, 02:28 PM
  4. PHP Photo Album script - Script isn't working for me?
    By Tommisauce in forum Dynamic Drive scripts help
    Replies: 12
    Last Post: 08-09-2007, 03:09 PM
  5. URGENT - Photo Album Viewer Script Not Working
    By vlane95678 in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 08-31-2006, 01:03 AM

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
  •