View Single Post
Old 04-23-2024, 10:50 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,734
Quote:
Originally Posted by INever View Post
Thnx. Will print and save this page.

I admit I'm at the Paul Markam level of coding ability but isn't there something simple like:

<script> xyxabnd rotate images from <a href="https://image-files.domain.com" #images interval in seconds# </script></a>
this will use glob to get a list of images and output the html markup (of course you will need to use the proper markup for the js slideshow)

Code:
<?php

$path = 'images/';
$file_types = ['*.jpg', '*.png', '*.gif'];

$images = [];
foreach ($file_types as $file_type) {
    foreach (glob($path . $file_type) as $file) {
        $images[$file] = $path . basename($file);
    };
}

foreach ($images as $i) {
    echo sprintf('<a href="%s"><img src="%s" alt="%s" /></a>', $i, $i, basename($i));
}
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Tube Themes
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote