WRITING WEB PAGESAlthough your Personal Data Sharing is delightfully simple to use, it's also quite powerful for a PDA program. You have the option of serving up plain text notes, mixed HTML/plain-text notes, or raw HTML code. In addition, you have the ability to now provide a custom default page for your Notepad Server. THE 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 codeSince version 1.2 of Notepad Server you've had 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 supported by Personal Data Sharing 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. A Table of all SSI supported in Version 1.5 of Personal Data Sharing is available 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: So far, <COUNTER> chunks o' knowledge have been spewed into the ether by this server. And you'd get: So far, 296 chunks o' knowledge have been spewed into the ether by this server. 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: <HTML><HEAD><TITLE><NOTE_TITLE></TITLE></HEAD> 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, you need to be able to display "International Characters" (such as: ü, ø, å, ß) One solution to this is to go through your notes and subsitute in the � HTML code for each character and we tried to have PDS do that that but it's VERY annoying. (Slow, inaccurate, and generally stupid.) So, we developed a compromise: Unlike 90% of the world's HTTP servers, we have chosen to follow the RFC 2068 standard for HTTP 1.1 Servers and provide a way for the browsers to interpret these characters AS TYPED by setting what's called the charset token in the server's message headers. We also include the same data in a <META> tag in the HEADER of any generated HTML pages. This helps the browser decide what encoding to use when viewing your page.
In nHTTPd Setup, you can select from any of these MIME charsets or None to turn off this option entirely. When I first introduced this feature with Notepad Server 1.2, I suggested that you add by hand into your raw HTML the <META> tag containing the charset token. That is no longer required as this data is provided in the server's message header. |
| Start| Serving YourPages |