Integration
Important: This document only applies to Showbooth Go. The functionalities referenced in this document are not supported by Showbooth Player.
About Integration
Because a slideshow in Showbooth Go is made of flat files and folders, it's possible to integrate with external data sources (usually data feeds in JSON/ XML or even a database) by generating the files and folder structures that Showbooth needs.
Beginning with version 1.1, before trying to access the __showbooth.php script in your server, Showbooth Go will try to access __showbooth.json.
Because Showbooth accesses a JSON file, PHP is no longer required, you can build your own script in any language your server supports.
Procedure
Your custom script must do the following for a safe slideshow update.
- Add a _lock file to the slideshow directory. This will make sure that Showbooth doesn't try to update while the content is not ready.
- Copy all media (images, videos and other files) to the slideshow's directory with the correct group/folder structure.
- Generate other needed files: captions, overlays, menus.
- Generate a __settings.json file.
- Generate a __showbooth.json file with your slideshow's file structure (more info on this bellow).
- Remove the _lock file.
File
For the __showbooth.json file, Showbooth Go expects a JSON file with a list of the files and folders of your slideshow with the following JSON structure:
{ "files": [ {"file": "folder_1/filename_1.jpg", "size": 133700, "modified": 1525854105}, {"file": "folder_1/filename_2.jpg", "size": 100535, "modified": 1532349458}, {"file": "folder_2/filename_3.jpg", "size": 518796, "modified": 1531236870}, {"file": "folder_2/filename_4.jpg", "size": 849972, "modified": 1528881951}, {"file": "folder_3/filename_5.jpg", "size": 969123, "modified": 1528880998}, {"file": "folder_3/filename_6.jpg", "size": 449897, "modified": 1422027931} ] }
- file The relative path of the path (relative to the slideshow's folder).
- size The file's size as reported by the filesystem in bytes (like the output of PHP's filesize function).
- modified The modification time as reported by the filesystem as a UNIX timestamp (like the output of PHP's filemtime function).
Article last updated on November 7th, 2019 [1499f5].