Results 1 to 8 of 8

Thread: Full Screen Image Slideshow and PHP 7.x

  1. #1
    Join Date
    Jan 2015
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Full Screen Image Slideshow and PHP 7.x

    1) Script Title: Cut & Paste Full Screen Image Slideshow (w/ auto read images from directory)

    2) Script URL (on DD): http://www.javascriptkit.com/script/...ow/index.shtml

    3) Describe problem: Since the upgrade to PHP 7.x the slideshow is not working anymore. Is there a code update? Or some things I could change by hand?
    Last edited by james438; 03-05-2019 at 05:20 AM. Reason: added link.

  2. #2
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,110
    Thanks
    96
    Thanked 98 Times in 96 Posts

    Default

    Are you referring to Full Page Slideshow?
    To choose the lesser of two evils is still to choose evil. My personal site

  3. #3
    Join Date
    Jan 2015
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry, I am talking about:
    Full Screen Image Slideshow (w/ auto read images from directory)- by JavaScript Kit (www.javascriptkit.com)
    On their website they are linking to this forum...

  4. #4
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,110
    Thanks
    96
    Thanked 98 Times in 96 Posts

    Default

    Ah. I updated your post to include the link to the script. This should help others who are more familiar with javascript. My area of coding knowledge lies more with PHP and MySQL. Sadly, I am least familiar with js.
    To choose the lesser of two evils is still to choose evil. My personal site

  5. #5
    Join Date
    Jan 2015
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It anyway might have to do with the file fpslideshowvar.php
    I don't think it is a javascript issue as the problem occured only after the upgrade from PHP 5.6 to 7.0
    I have no idea how to check compatibility of the file...

  6. #6
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,110
    Thanks
    96
    Thanked 98 Times in 96 Posts

    Default

    Without seeing your site I suspect that some non-standard characters are no longer being recognized and now appear as black diamonds with a question mark. Try adding the following meta tag and see if that helps:

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    I still use PHP 5.6, so I can't really troubleshoot this, but this sort of thing can happen when upgrading PHP versions.
    To choose the lesser of two evils is still to choose evil. My personal site

  7. #7
    Join Date
    Jan 2015
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No, no such very well known diamonds.
    Just nothing - only the loading... icon - forever...

  8. #8
    Join Date
    Jan 2015
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    One issue I found is the following:
    In the file fpslideshowvar.php:

    Code:
    <?
    Header("content-type: application/x-javascript");
    
    function returnimages($dirname=".") {
       $pattern="\.(jpg|jpeg|png|gif|bmp)$";
       $files = array();
       $curimage=0;
       if($handle = opendir($dirname)) {
           while(false !== ($file = readdir($handle))){
                   if(eregi($pattern, $file)){
    		 $filedate=date ("M d, Y H:i:s", filemtime($file));
                     echo "		[$curimage, \"$file\", \"$filedate\"],\n";
                     $curimage++;
                   }
           }
           echo "		[\"placeholder\"]\n";
           closedir($handle);
       }
       return($files);
    }
    
    echo "var fpslideshowvar={\n";
    echo "	baseurl: \"http://" . $_SERVER["SERVER_NAME"] . dirname($_SERVER['PHP_SELF']) . "/\",\n";
    echo "	images: [\n";
    returnimages();
    echo "	],\n";
    echo "	desc: []\n";
    echo "}\n";
    ?>
    The line

    Code:
                  if(eregi($pattern, $file)){
    has to be replaced with

    Code:
                  if(preg_match($pattern, $file)){
    for PHP7.x

    But it still doesn't work...

Similar Threads

  1. Replies: 2
    Last Post: 04-21-2016, 02:22 AM
  2. Replies: 6
    Last Post: 01-23-2015, 11:54 AM
  3. Replies: 1
    Last Post: 11-22-2012, 10:21 PM
  4. Looking for multi-functional slideshow - full screen, customizable appearance, etc.
    By tnd1000 in forum Looking for such a script or service
    Replies: 8
    Last Post: 10-19-2012, 10:41 PM
  5. Ultimate Fade-In Slideshow - making the show full-screen
    By tnd1000 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 07-24-2012, 07:23 PM

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
  •