WRITING WEB PAGESTHE BASICS:
ADVANCED TOPICS:Spicing Up Your Notes with Embedded HTML TagsSince the server basically takes a note and encapsulates it in a HTML frame, you can add hyperlinks and HTML formatting within your served notes (without having to do full blown HTML) in order to spice up the pages a bit. For instance, in your Note about your car, you could reference a picture of it stored somewhere else by writing <IMG SRC="http://my.other.site.com/username/images/mycar.gif> and when your Notepad page is served up, the browser will run off and fetch that image and nobody will be the wiser! Serving Raw HTML codeNew in version 1.2 of Notepad Server is the ability to serve straight HTML code from your Web directory, allowing you immense flexibility in how you present your information to the world. Couple your server, your creativity, and Foundation Systems' nHTML and you have an un-beatable creation and service platform right in the palm of your hand.
Server Side IncludesAlso new in Notepad Server 1.2 is a series of variables that you can access from either your text notes or, even better, your raw HTML documents. On other platforms, these are called Server Side Includes, so that's what we'll call them here.
How do I USE These Things?Simple. Say you want to include the access counter in a sentence. You'd write something like this in your Notepad:
And you'd get:
Or, say you always want the title of your HTML document to reflect the name it has in the title bar of its Notepad entry. In you header, you'd write:
And even if you changed the name of the note to Zaphod_Beeblebrox, the title returned by your HTML will reflect that. Nifty, huh? Special Characters:Unless you're lucky enough to use only the 0-127 ASCII code in your alphabet, sometimes Notepad server would absolutely butcher your words when it came to displaying umlaut characters, etc (such as Ä, Ü, Ö) After some experimentation, I discovered how to reconcile the Newton character set with the ISO standards and you'll have to give me feedback on how it works. Basically, if a note is a regular Notepad note or if the default page is being served up, we set the character set to ISO-8859-2 which causes these characters to display as they do in the Notepad, at least in the browsers I tested it on. If you write a straight HTML note, then the character set is NOT defined for you. You may do so by including the following line in your HEAD after the <TITLE>XX</TITLE>. Depending on how this works out, we may add a default encoding pref to nHTTPd that you can access via a SSI. We'll have to see. |