Skip to main content

Files Gallery 0.3.0

· 5 min read
Karl Ward

Big update with upgraded interface, dynamic layouts, multi-language interface, video thumbnails, folder preview images, download folder and filemanager options.

See demoRelease info for Files Gallery version 0.3.0

Upgraded interface

The interface has been upgraded pretty much everywhere with new popup, improved layouts, menus and mouse events. Head on over to the demo to view the new designs.

Dynamic layouts

From the topbar layouts dropdown, users now have controls to progressively scale size and space of grid, rows and column layouts to suit their personal taste.

Folder preview images

New folder preview images, enabled by default, but can be disabled with new option folder_preview_image [demo]

Download folder

New option download_dir allows downloading all files in folder as zip. Optionally, set 'download_dir' => 'files' to download all files directly in browser without using zip (only works in desktop browsers). Creating zip files on server is slow, and zip files will therefore get cached inside dir once created. Download dir as zip requires PHP ZipArchive extension enabled.

Filemanager Beta

New filemanager options upload, rename, delete, duplicate, create new folder and create new file. Filemanager options are disabled by default, but can be enabled from _files/config/config.php.

Beta

Filemanager options are currently beta because we need to implement a better interface to access filemanager features, and because there should be a user-system with permissions in place to make the filemanager more useful.

See docs

Multi-language interface

New multi-language interface, currently available for 16 different languages. With option lang_auto, default language is detected from browser, falling back to option lang_default if the browser's language is not available. Optionally, you can add languages as a menu in the topbar ?lang_menu=true. Individual users can override language by assigning ?lang={code} in brower.

See docs

Video thumbnails

Added support for video thumbnails [see demo], requires FFmpeg and PHP exec(). FFmpeg is a command-line tool, which needs to be installed from the command-line. If you are on shared hosting, it's unlikely that you have access to FFmpeg. Video thumbnail generation is slow, but once thumbnails are cached, they will load much faster on successive visits.

See docs

Videos open in popup

Videos now open in the popup [demo], which provides a better interface for navigating between videos and images in the same folder. This behavior can be disabled with option popup_video.

CSS variables

Added more CSS variables, allowing you to customize styles, for example --primary-color:deeppink.

_files/css/custom.css
:root {
--primary-color: seagreen;
--popup-bg: #000;
--popup-placeholder-bg: #222;
--popup-timer-color: white;
--popup-caption-max-width: 640px;
--popup-caption-font-size: .9rem;
--popup-caption-font-weight: 300;
--popup-caption-line-height: 135%;
--popup-caption-color
--popup-caption-item-space: .35em;
--popup-caption-line-clamp: 3;
--files-data-top: 0;
--files-data-display: none;
--files-data-display-hover: block;
--files-data-animation: opacity .2s;
--grid-height: 100%;
--grid-font-size: 14px;
--list-max-width: 1040px;
--rows-height: auto;
--rows-justify-content: space-evenly;
--rows-flex-grow: 1;
--sidebar-width: calc(10vw + 180px);
--sidebar-width-small: 85vw;
--sidebar-width-hover: 480px;
--menu-font-size: 16px;
--menu-line-height: 30px;
--menu-folder-icon-size: 22px;
--menu-text-indent: 6px;
--menu-icon-toggle-opacity: 0;
}
See docs

Include custom

Include custom header, footer, css and javascript into Files Gallery. Useful when you want to include custom counters, analytics or custom styling.

  • _files/include/head.html
  • _files/css/custom.css
  • _files/include/footer.html
  • _files/js/custom.js
See docs

More features

  • All paths (files and directories) that start with _files* will be ignored and excluded by Files Gallery. Useful to hide some files and folders.
  • New updates notification dropdown, with options to "update", "download" and "read more".
  • check_updates option is now disabled by default.
  • Live sorting (by name) now uses "natural" sort algorithm taking numbers into consideration. Before [1.jpg, 111.jpg, 2.jpg] will now become [1.jpg, 2.jpg, 111.jpg].
  • New option image_resize_dimensions_allowed comma-separated list of additional allowed image resize dimensions. Not used directly in Files Gallery, but useful for external apps like embed.photo.gallery if you want to allow other resize dimensions.
  • New option image_resize_types allows you to set what image types are allowed to resize. Useful for example if you want to disable resizing of PNG and GIF images to retain transparency and/or animations directly in the Files Gallery layout.
  • Added new image meta IPTC items title, headline, description, creator, credit, copyright, keywords, city, sub-location and province-state [forum].
  • New option click_window allows you to assign a list of file extensions that open directly in new window on click. Useful for easy viewing of PDF, HTML and text files, without first showing preview in modal.
  • New option click_window_popup opens new window as popup instead of new tab. Useful when used with click_window option for easy viewing of PDF, HTML and text files. Only works for desktop, as most mobile devices will open a new standard browser window (tab).
  • Folder links ("open in new tab", "copy link" and ctrl/cmd-click) will now link to the folder in Files Gallery, instead of linking directly to the folder. File links will still link directly to real file path [forum] / [forum].
  • Basic X3 compatibility, shares thumbnails, panel login, license and refreshes X3 cache on filemanager operations.
  • New url method to diagnose available server functionality and configuration. Accessible from url ?check=1.

Bug fixes

  • Fixed bug with #hash popup deep-linking when image name is number.
  • Fixed so that popup deep-link #hash works with file names that contain #hash.
  • Fixed issue with caching when using symlinks.
  • Fixed some servers that return undefined $_SERVER['QUERY_STRING'] [forum]
  • Fixed +?& characters bug in code editor on save [forum]
  • Folder load no longer fails if there are UTF-8 errors in image IPTC or EXIF.
  • Folder load no longer fails if images contain invalid GPS data.
  • Folder cache is not created if there are errors.
  • Fixed so that _files/config/config.php is created on first load.