lecture
in color
outline
contents of template.php3:
<html>
<body>
<head><title>Title of page/lecture</title></head>
<body>
<?php require "functions.php3" ?>
<?php navbar()?>
<?php insert($_REQUEST['include']); ?>
<?php outline('template.txt') ?>
<?php sign() ?>
</body>
</html>
template.txt (the argument to outline)
to contain the content of the lecture.
WAP and WML
- |WAP|: {==Wireless Application Protocol==}
- like (==http==)
- but for cell-phones
- |WML|: {==Wireless Markup Language==}
- like (==html==)
- but actually an {==XML meta-language==}
- so syntax is more strict.
A simple WML program
- hello world
> <?xml version="1.0"?>
> <!DOCTYPE wml PUBLIC
> "-//WAPFORUM//DTD WML 1.1//EN"
> "http://www.wapforum.org/DTD/wml_1.1.xml">
> [==<wml>==]
> <card title="Hello there">
> <p>hello there!</p>
> </card>
> [==</wml>==]
- |DOCTYPE|: defines the DTD for WML (from a URL!)
- |wml|: the WML document starts here!
- |card|: the fundamental unit of WML publishing. WML documents
are not made of pages but of {==stacks of cards==}.
- |p|: the familiar old HTML paragraph.
- Everything *closes*. No *implicit* tag closures.
- Internal content tags are disturbingly familiar.
WAP: Wireless Application Protocol
http
WML: Wireless Markup Language
html
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC
"-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="Hello there">
<p>hello there!</p>
</card>
</wml>
DOCTYPE: defines the DTD for WML (from a URL!)
wml: the WML document starts here!
card: the fundamental unit of WML publishing. WML documents
are not made of pages but of stacks of cards.
p: the familiar old HTML paragraph.
Hi thereis formatted as
-
- ho
- ha
- he is trying
something tricky
with indents
is formatted as
- one
- two
- three
- four
- five
- six
- seven
- eight
is formatted as
- one > this is an example - two > this is another example > of another thing - three > yet another example...is formatted as
this is an example
this is another example of another thing
yet another example...
@ or # autonumbers
# hi there
@ ho there
@ yo there
- hi
# hello
@ hello
- ho
@ hello
# aloha
is formatted as
% comments out# trix are for kids % silly rabbit # got my lucky charms % not lucky nutritionally...is formatted as
- This is a {==really important==} point.
is formatted as
- See (==man man==) to learn how to read man pages.is formatted as
man man to learn how to read man pages.
> % [==make love==] > make: don't know how to make love. Stop.is formatted as
% make love make: don't know how to make love. Stop.
- See |man man| to learn how to read man pages.is formatted as
man man to learn how to read man pages.
- This is a *really* *important* point. - Stars *don!t* work with punctuation in the middle or with *space between* the words.is formatted as
functions.php3 macrosioutline.
icode
code
insert
<h1>Something to talk about</h1>
<ul>
<li> the code for the heading above was
<?php icode("
<h1>Something to talk about</h1>
")?>
<li> The <code>template.php3</code> file contains:
<?php code("template.php3")?>
<?php ioutline("
- remember to drink your ovaltine.
- this is the secret message.
- not so secret anymore.
- this can't have double quotes in it!
")?>
<h1>Something to talk about</h1>
template.php3 file contains:
contents of template.php3:
<html>
<body>
<head><title>Title of page/lecture</title></head>
<body>
<?php require "functions.php3" ?>
<?php navbar()?>
<?php insert($_REQUEST['include']); ?>
<?php outline('template.txt') ?>
<?php sign() ?>
</body>
</html>
Of course, the advantage of this is that one never has to escape embedded HTML or XML because php3 does it for you.
lecture
in color