// Page Variables
$page_title = "- About the Code";
// Library files
include ("../lib/page.lib"); // page default variables
include ("../lib/font.lib"); // Font Adjuster
include ("../tpl/header.tpl");
include ("../tpl/nav.tpl");
?>
print "$Font $FontColorBodyLink $FontSizeLarger"; ?>About the Code
6/6/00 - This site uses print popup("http://www.php.net/", "PHP");?> for its navigation and templates. PHP is a server-side, cross-platform, HTML embedded scripting language similar to print popup("http://support.microsoft.com/support/default.asp?PR=asp&FR=0&SD=MSDN&LN=EN-US", "ASP");?> or print popup("http://www.allaire.com/Products/coldfusion/", "ColdFusion");?>, except that it's print popup("http://www.opensource.org/", "Open Source");?>. Its also used to control the fonts and popup windows.
To begin with, the site was originally developed in HTML, QA'd on PC, MAC and Linux versions of MSIE 4 and 5 and Netscape 3 thru 6. The HTML tries to be 4.0 compliant, but interoperability requires some illegal tags. Also, since print popup("http://www.w3.org/Style/CSS/", "CSS");?> is still not properly implemented, it is avoided altogether.
The pages themselves become amazingly simple using PHP; just set page variables, include your library pages, and then include header, nav and footer files:
<? // Page Variables $page_title = "- About the Code"; // Library files include ("../lib/page.lib"); // page default variables include ("../lib/font.lib"); // Font Adjuster include ("../tpl/header.tpl"); include ("../tpl/nav.tpl"); ?> <!-- Page Contents Begin Here --> <!-- Page Contents End Here --> <? include ("../tpl/footer.tpl"); ?>
<?print "$Font $FontColorBodyLink $FontSizeLarger";?>will produce the following html:
<font color='#006600' size=4>because it called $Font, $FontColorBodyLink and $FontSizeLarger from the library file font.lib. Now, you may be saying "but that's more code, not less! How is this more efficient?"
<? ==>$Font = "<font"; $FontFace = "face=\"arial, helvetica, sans-serif\""; $FontFaceFun = "face=\"comic sans MS\""; $FontColorNav = "color=\"#66FF66\""; $FontColorLink = "color=\"#ffff00\""; $FontColorBody = "color='#000099'"; ==>$FontColorBodyLink = "color='#006600'"; if ( eregi("mac",$HTTP_USER_AGENT)) { $FontSizeNone = ">"; $FontSizeSmall = "size=2>"; $FontSizeMedium = "size=3>"; $FontSizeLarge = "size=4>"; ==> $FontSizeLarger = "size=5>"; $FontSizeLargest = "size=6>"; } else { $FontSizeNone = ">"; $FontSizeSmall = "size=1>"; $FontSizeMedium = "size=2>"; $FontSizeLarge = "size=3>"; ==> $FontSizeLarger = "size=4>"; $FontSizeLargest = "size=5>"; } ?>
<font color='#006600' size=4>
<font color='#006600' size=5>