> pictools > doc > box404
> pictools > doc > box404
Pictools: Physpics Page Pieces
V3.3 (445)
box404.php
/library/box404.php
Red error warning box that appears atop an index.php page when that page is substituted for an incorrect URL
usage, in dirbar.php: include $sp->filerooted("/library/box404.php");

When a user requests a non-existent page, Physpics replies by displaying an existing page with a red box above it as drawn by this file The error is usually 404 (URL missing), but can be 403 (URL disallowed) or 410 (Gone). If the request was for physpics.com/pictools/non-existent-page, the box would look like this:

The erroroneous URL, possibly as redirected by urlHandler, is shown in bold in the first sentence. If there is an accompanying message, it follows. The comments button links to the URI formed by concatenating the value of property manager.href and a query field in the form

?subject=404+for+page+xxxx.xxx  

The presence of the red box happens thus: When urlHandler can find no page to satisfy an URL request, it invokes forPhyspics.pagefail. That function sets $sp->errorURL and $sp->errorMSG (via SiteProps.showMSG) and delegates to page /error.php. The latter removes successive tails of errorURL until it finds a directory that exists and has an index.php page. It then delegates to that page. Usually index.php is a standard Physpics page and loads dirbar.php. Dirbar checks $sp->errorURL and, if it is set, loads box404.php to draw the red box.

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