> pictools > doc > SlideShow
> pictools > doc > SlideShow
Pictools: Driver Pages
V3.3 (445)
SlideShow.php
/library/SlideShow.php
Page viewed for all slideshows
usage, in thumbstitle.php: href='/library/SlideShow.php?dir=$dir'

(The button containing the href attribute shown above becomes enabled as described in slideshowGuide.php.)

The query part of the URL should be ?dir=directoryname. but the code also accepts an older version in form ?cap=captionsfile&file=segmentname. (In the latter case the dir value is computed as dirname(cap)/file.) From the query, the code finds the appropriate captions file via pkscripts:findCoveringCapFile. The desired file: segment is the last directory name in the dir parameter. Picture lines in the file's segment are

[picturename.ext] caption

Most of the SlideShow.php code is to prepare for slideshowdefs.js on the client side. The key step is scanning the captions file. Each picture line adds an element to an array of Pic objects. The scan also looks for lines assigning values to pace, startn, random, and repeat. These are passed to slideshowdefs to initialize the parameters in the slidescontrol panel.

The Pic object, defined in slideshowdefs.js, has these fields:

url location of image file, site-rooted
title title of segment
subtitle text from most recent subtitle line
caption caption from the [picture] line
pace time to leave picture visible, in milliseconds

The remainder of SlideShow.php is a singularly uninteresting viewable page.  It displays the "Loading" gif shown below and has three hidden buffers; one each for the previous, current, and next slide. At the top it links in slideshowdefs.js. The onload attribute for the body calls startShow in that script, which runs the show. The page's final action is to include the popup control panel, slidescontrol.php.

 
Copyright © 2023 ZweiBieren, All rights reserved. Feb 5, 2023 17:05 GMT Page maintained by ZweiBieren