Headers and footers

The necessary boilerplate at the top and bottom of a GopherPHP page is contained in two separate template files: php/page_header.php for the HTML header and page banner or logo, and php/page_footer.php for boilerplate to be inserted at the bottom of each page. The default header displays a banner with the name of the site at the top of each page, as well as the page modification date and a GopherPHP copyright message at the bottom.

You can modify these templates according to your requirements, but make sure that the required information in the HTML header (especially CSS stylesheets) remains intact. For instance, you may want to display a project logo instead of the name banner at the top of the page, or include a disclaimer at the bottom of each page. The standard GopherPHP header and footer templates are shown below.

Standard header template

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title><?=$GOPHER_PAGETITLE?></title> <!-- name of the GopherPHP site -->
    <link rel="stylesheet" type="text/css" href="<?=$GOPHER_CSS?>"> <!-- main CSS style (GOPHER) -->
    <style type="text/css">
    <meta name="generator" content="GOPHER-PHP">
    <meta name="author" content="Stefan Evert">
    <!-- a centered logo or text will look better than this standard banner, so consider replacing it -->
    <div class="banner" id="top">

    <!-- END OF PAGE HEADER (navigation bars are automatically inserted below) -->

Standard footer template


    <p class="backlink">
      Last modified: <?=date("d/m/Y", getlastmod())?>
      <?php gopher_copyright(); ?>