Discover FolioPages CMS, a free, open source and lightweight Content Management System.
A lightweight, free and open source, self hosted flat file PHP photo and file gallery that does not require a database and is easy to install. List all file formats from local directories, display images, play mp3 and mp4 files with HTML5 native player, embed Youtube and Vimeo videos.Discussion
- Built on PHP, jQuery, Ajax & HTML5.
- Display multiple albums and/or full gallery in one page.
- Responsive interface (version 3+).
- Automatic thumbnail creation.
- Supports "jpg", "gif", "png", "mp3", "mp4" files or other extensions.
- Supports Youtube and Vimeo videos (version 2.0+).
- Plays "mp3" and "mp4" files using HTML5's native player.
- Album / Image description from a text file (version 2.0+).
- Enable / Disable captions for gallery or album thumbnails.
- Display thumbnails inline, in the scroller or select number of thumbnails to display with pagination.
- Customizable appearance through CSS.
- Display gallery / albums using a shortcode - (version 4.4+).
- A server running PHP 5+.
- PHP GD library (for automatic thumbnail creation).
- Apache 2.4+ web server after version 4.3 (htaccess files used to prevent file/directory indexing).
- Download and expand the zip file to your computer.
- Upload the contents of 'foliogallery-master' to the root directory of your domain.
- For each album, create a subfolder in the 'albums' folder and copy your images into it.
- Make sure the 'albums' folder and all its subfolders have write permissions.
- To enable responsive view, you must have the following line of code in head (between ) section of your page's html:
<meta name="viewport" content="initial-scale=1, width=device-width" />
- To add a video from youtube, simply add an image to your album's folder and name it utube-1234.jpg where 1234 is the id of the video in youtube.
- To add a video from vimeo, simply add an image to your album's folder and name it vimeo-1234.jpg where 1234 is the id of the video in vimeo.
- To add a mp3 or mp4 file, simply copy it to your desired album. For custom image, add an image to your album's thumbs folder and name it YOUR_VIDEO_FILE_PREFIX.jpg
- The Available settings can be adjusted in required.php file
- The following can be adjusted for resizing the gallery:
- Main canvas width
- Display Gallery/Albums in scrollable container(s) or in full
- Thumbnail width during thumb creation
- Show/Hide captions
- Show/Hide titles
- Show/Hide partial exif data if available
ShortcodesAs of v4.40 it is possible to embed gallery or albums using a shortcode. To do this:
- Include the PHP function at the beginning of your page.
- Replace the FolioGallery "div" elements with a shortcode
- Place your content in a PHP variable
- Output page content using the PHP function
// include the PHP function before page content include 'foliogallery/foliogallery-functions.php'; // place page content in a php variable $content = ' // display the gallery [foliogallery] // display "Videos" album [foliogallery=Videos] // display "Scenery" album [foliogallery=Scenery] // display "Los Angeles" album [foliogallery=Los Angeles] '; // print page content using the PHP function echo foliogallery_shortcode($content);
Complete GalleryPaste the following to your page's html, where you want your gallery to appear:
Or bypass the above and use a shortcode instead (see how to use Shortcodes):
<div class="folioGallery" id="folioGallery"></div>
Either of the codes above will output the following:
- Paste the following to your page's HTML:
<div id="SOME_UNIQUE_ID" class="folioGallery" title="Los Angeles"></div>
- The title attribute is the subfolder name where images are located.
- The ID attribute can be anything but must be unique.
- The class attribute must be folioGallery.
Either of the codes above will output the following:
Descriptions As Of v4.3
- To add descriptions to an album or image, create a folder in your album directory named descriptions then add a file in this folder called descriptions.txt and add your descriptions to it.
- ALBUM description must be added on the first line like so: album;description of album;.
- Image description must be added like so: imagefilename.jpg;description of image; where imagefilename.jpg is the name of the file in your album.
- Each image description must be entered after imagefilename.jpg; (note the semicolon).
- Each description must be on a new line and must end with a semicolon
Q: Does the gallery scan multi level subfolders?
A: The gallery scans only 1st level subfolders located within the "albums" directory. Each 1st level subfolder represents an album.
Q: How do I modify album or gallery settings?
A: Available variables can be configured by editing the required.php file. Each variable is described in this file.
Q: Can I sort files by a specific criteria?
A: Yes, files can be sorted by modified date or alphabetically from the config file.
Q: Is there a limit on how many files I can have in an album?
A: No, the script does not limit the number of files. But your server may.
Q: How do I increase the width of FolioGallery container?
A: Modify the ".fg" class in CSS file.
Q: How do I display paginated thumbnails instead of a scroller?
- In config.php file set $inline_albums and/or $inline_thumbs to TRUE;
- Set $thumbs_per_page variable to the number of thumbs you want to display in each block.
Q: Is it possible to create my own thumbnails manually?
A: Simply copy your thumbnails to the "thumbs" folder in your album. If "thumbs" folder does not exist, create it manually. The software will only create thumbnails if they do not exist in this location.
Q: My images load very slowly, how do I speed them up?
A: Large images require additional bandwidth and server resources. To speed up loading time, optimize each image. You may also use caching but poorly optimized images will still load slow the first time.