> pictools > doc > forPhyspics
> pictools > doc > forPhyspics
Pictools: How Things Work
V3.3 (445)
forPhyspics.php
/scripts/forPhyspics.php
Scripts for dirbar directory scan and inserting rows and columns in PhyspicsMain
usage, in PHP scripts: $sp->inclood_once("/scripts/forPhyspics.php");

This script provides the functions needed by the standard page layout and its headers dirbar.php and titleandlogo.php

pagefail($page, $comment = "", $status = 404)
Terminate processing a page and delegate to error.php. Argument $page is the site-rooted path to be shown as the failing page. Argument $comment is an extra sentence to be inserted after the first sentence of the box404 message. $status is the http status code; 404 is usually right, sometimes 403 if the user is to be allowed to know that the file exists and s/he cannot view it.
getparentelts($dir)
Compute dirbar elements for $dir and its parents. The returned elements are each a two element array, as for getbarelts.
getbarelts()
Gets entries for the dirbar. The returned value is an array of pairs, where each pair is itself an array having two string elements. The first string is the name to display in the directory bar. It will be the directory name unless that directory has a property for page.bartitle. The second string is the directory to which that dirbar element should link when clicked.

This method computes the pair for the last element, corresponding to $sp->thispage. The exact value reported depends on whether the name of the current page is index.php. See the code for details. String pairs fopr parent directories are computed by getparentelts.

loadfile($file)
Read and interpret $file. Return the generated contents. Used by prunetext.
prunetext($file)
Read (and php parse) $file. Then remove leading lines that begin "<link" and return the result.
putcolumns($side, $contents)
The $side argument is "left" or "right". The function copies the given contents into the named side of the current page. $contents is a space-separated list of files. Each file is wrapped in <td class="$side.column $side.column.k">...</td>, where k ranges upward from 0.
putrows($end, $contents)
Analogous to putcolumns.
 
Copyright © 2023 ZweiBieren, All rights reserved. Feb 5, 2023 17:05 GMT Page maintained by ZweiBieren