This is a simple page which demonstrates the header file. It is useful for displaying bits of html or code in any language for demonstration purposes.
By default the header only takes care of the "standard" dangerous characters:
You can define your own look and feel in a number of ways, for this page I am simply relying on the PRE CSS style.
Now to prove that this is not a micky mouse facility the real test is to be able to include anything, the ultimate test of this is typically to try to include "yourself", so for my first example, here is the source for this page:
;---------------------------------------------------------------------------- ; MODULE NAME: HPRESAMP.IT ; ; $Author: USER "Dennis" $ ; $Revision: 1.0 $ ; $Date: 14 Oct 2002 17:50:00 $ ; $Logfile: C:/DBAREIS/Projects.PVCS/PpwAddOn/HtmlPRE/hpresamp.it.pvcs $ ; ; DESCRIPTION: This is an example file which shows one way how the ; "HTMLPRE.IH" header file could be used. ;---------------------------------------------------------------------------- <HTML> <HEAD> <STYLE> <!-- A:hover {color: #FF8429; text-decoration:underline} PRE { background-color: #fffff7; color:black; display:block; white-space:pre; border:1px solid #800000; padding:5 } --> </STYLE> </HEAD> <BODY> <CENTER><H1>Basic Page To Demonstrate "HTMLPRE.IH" Header</CENTER></H1> <p>This is a simple page which demonstrates the header file. It is useful for displaying bits of html or code in any language for demonstration purposes. <p>By default the header only takes care of the "standard" dangerous characters: <UL> <li>< <li>> <li>& </UL> If you have other characters (such as international characters (umlauts etc) then you can let it to handle these as well. In the sample below I also demonstrate how you can automatically modify the sample (such as adding hypertext links or changing the color). <P>You can define your own look and feel in a number of ways, for this page I am simply relying on the PRE CSS style. <P>Now to prove that this is not a micky mouse facility the real test is to be able to include <b>anything</b>, the ultimate test of this is typically to try to include "yourself", so for my first example, here is the source for this page: ;--- Before I do anything else I need to "load" the header file ------------- #define HTMLPRE_JUST_PRE_TAGS ;;Specify an option (I will use CSS only for look and feel) #include "HTMLPRE.IH" ;--- Now I want certain things tagged in the sample ------------------------- #AutoTagState + ;;Save state (not really needed for this simple situation) #AutoTag "HTMLPRE.IH" "<b>HTMLPRE.IH</b>" #AutoTag "ExampleFile" "<b>ExampleFile</b>" #AutoTag "$Example " "$<b>Example</b> " #AutoTag "eExample" "<b>eExample</b>" ;--- Include "myself" as an example ----------------------------------------- <$ExampleFile File="hpresamp.it" indent="4" state="REMEMBER"> ;--- Restore original state ------------------------------------------------- #AutoTagState - <p>It is also possible to real part of a file rather than the whole file as shown above. <p>Now I will show a simple inline example where the code does not come from a file: <$Example indent="0" state="REMEMBER"> <HTML> <BODY> <p>Hi there... </BODY> </HTML> <$eExample> ;--- Load standard "where do ya get it?" ------------------------------------ #if FindFile("ppwaddon.ih") <> '' ;--- This file won't be around on YOUR machine! ---------------------- #define PPWADDON_PAGE HTMLPRE.IH #include "ppwaddon.ih" #endif </BODY> </HTML>
It is also possible to real part of a file rather than the whole file as shown above.
Now I will show a simple inline example where the code does not come from a file:
<HTML> <BODY> <p>Hi there... </BODY> </HTML>
In case you got here via a search engine or a link from another site you can download the header file used in this sample page ("HTMLPRE.IH") and ppwizard itself (my free html preprocessor) from the ppwizard download page at:
PPWIZARD can be thought of as a "Super SSI", it can include external files and do most of the things that server side includes can (and heaps more) but do them in a simpler manner and have no impact or requirements on the server.
PPWIZARD is the most powerful mechanism available for code reuse and automation of common tasks. See the PPWIZARD pages for more details.