Invoked to display a picture designated in a captions file; instantiates a frame.php to display the picture
Sample picture page
The above usage information is misleading. In practice, servepicture
is invoked via /.htaccess
or /admin/urlHandler.php
. See the description in ShowingPictures
.
The algorithm in servepicture.php
calls pkscripts:parsecaps
to see if the designated .cap
file has the correct [ ] picture line. If that line is absent, the algorithm goes on searching for it in parent directories. If it's not there either, the request fails via forPhyspics:pagefail
.
When returning success for a picture [ ] line, parsecaps
also returns an associative array as documented in pkscripts
. The members of the array, under keys rawcaption
, pixname
, and so on, contain all the information needed to display the picture. This information is inserted in the in-memory properties environment by calling pkscripts:setframeparms
. Then property "frame.wholepage
" is fetched and the page it names is invoked. The default wholepage is frame.php
, which takes values from the in-memory properties and displays the picture.