How to set up gallery or widget to display images from a folder

Wouldn’t it be nice if we had a folder, on our web server, where we could copy some images, and they would automagically show up in a widget or gallery on our blog?

With [Galdget] or [Galdget plus+] WordPress plugins, you can make galleries that slideshow the images from one or more folders on your web site, and use them in widgets, posts or pages on your WordPress blog.

Here is the example:

 «  Open  » 
Open in new tab
Rotation is on
Galdget plus+ gallery frame


And here is what it looks like from under the hood:

Galdget plus+ URL list setup, dir demo

We have two folders and one image URL in the URL list, just to show that you can freely combine things. You may be happy with only one folder, though. Of course, we use a distinct group number that is not used in other galleries. All files from the above folders, with extensions .jpg .jpeg .bmp .png .gif .html .htm .php will be enlisted into the gallery. This means that:

  • adding files here will directly put them in the gallery without any other effort,
  • removing files from here will directly remove them from the gallery without any other effort,
  • renaming existing files may have impact on the order of displaying.

Isn’t this handy?

Moreover, for each file that is displayed in the gallery (.jpg .jpeg .bmp .png .gif .html .htm .php) you may provide a .txt file with the same name, which should containt the following:

  • first line: URL that you want to use when visitors click on the gallery while this item is displayed,
  • all other lines: Descriptive text that is displayed when visitors hover their mouse over the gallery, while this item is displayed.

You can see what it looks like if you hover your mouse over the gallery above.

A note about .php and .htm(l) files

Files with extensions .php .html .htm are not image files, they are web pages. For them the scalling factor is important and you should set it to proper value. Too small and the site will turn into an icon, too big and you will see only the fraction of the page.

Php files may generate active content and may be used to provide some information that varies depending on the actual circumstances. As an example, in the gallery above we present a php file that displays the visitors user agent information and IP address. Here is the source code of the script:

  <style type="text/css">
    body { font-size: 14pt;
           background: linear-gradient(to left top,
                                       #E6E6FA, #87CEFA);
    html { height: 100%; }
  This is php script speaking,<br>
  you are comming to me from:<ul>
        <?php echo $_SERVER['HTTP_USER_AGENT']; ?>
        <?php echo $_SERVER['REMOTE_ADDR']; ?>