• Hi,

    Would like to ask if there are any free Plugin to use for video or File Folder Gallery.

    I will have a backend process to copy file on a specific local Folder or Drive.

    File should be automatically available in the gallery Page that will be published and visitors can Play the video file and able to download it.

    or Listing of files of a specific Drive folder for download.

    Thank you so much.

    van

    • This topic was modified 2 months, 3 weeks ago by vanityq.
    • This topic was modified 2 months, 3 weeks ago by vanityq.
    • This topic was modified 2 months, 3 weeks ago by vanityq.
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I’m unaware of such a plugin, sorry. WP largely relies upon DB data, relying upon directory content is rather unusual. PHP code to do something like that isn’t too complicated for those that know PHP. For example, the following could be incorporated into a custom page template or pattern:

    foreach (new DirectoryIterator( wp_upload_dir()['basedir'].'/gallery') as $file) {
        if($file->isDot()) continue;
        echo '<div class="gallery">
    <video width="320" height="240" controls>
      <source src="', wp_upload_dir()['baseurl'].'/gallery/'.$file->getFilename() , '" type="video/mp4">
      Your browser does not support the video tag.
    </video>
    </div>';
    }

    Assumes all videos are .mp4 and reside in /wp-content/uploads/gallery/ and no other files exist. You’ll need additional CSS to get the output to appear in a grid format.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.