HTML3
Sections
  Home
    Intro
    History
    FAQ

  Choices
  Side bar

  Styles
  Headers
  Footers
  Effects
  Chars
  Address
  Links
  Images
    Rollovers
  Tables
  Forms
  SSI
  Plugins
Resources
  Colour editing
  Image creation
  JS Tricks
  Servers
  Tokens
  Latin-1
|
|
HTML³: Tokens and Encodings |
-
-
|

Tokenised controls

for use in the User-Defined sections of the Footer and Address sections.

CodeExplanationExample/further info
%DYDate08
%STst, th or nd by datest
%MNMonth as number04
%MOMonth as long entryApril
%M3Month as 3 lettersApr
%WKWeek of year23
%DNDay with in year098
%WNWeek day as number7 = Saturday
%W3Week day as 3 lettersSat
%WEWeek day as longSaturday
%CECentury as 2 digits19
%YRYear as 2 digits95
%24Hour as 24 hour15
%12Hour as 12 hour03
%AMam or pmam
%PMam or pmam
%MIMinute as 2 digits25
%SESecond as 2 digits50
%CSCentisecond as 2 digits87
%TZTime zoneBST/DST/+01:00, etc
New tokens
%NLNew Linelinefeed
%OEOwner email addressrichard@goodwin.uk.com
%ONOwner nicknameHouse of Mabel; The Webmaster; Rich
%OROwner real nameRichard Goodwin
%OWOwner web addresshttp://www.goodwin.uk.com/richard/
%OPOwner phone numberYour contact number (e.g. 01252705705)
%PRProfile real nameArgo Interative Ltd.; or you if not available
%PEProfile email addressinfo@argonet.co.uk; or you if not available
%PWProfile web addresshttp://www.argonet.co.uk/; you if not available
%PPProfile phone numberYour client's contact number (e.g. 01252705705)
%BBBody background colour#FFFFFF
%BTBody text colour#000000
%BLBody link colour#0000FF
%BABody active colour#CCCCFF
%BVBody visited colour#000088
%TCTable colour#FFFFFF
%TRTable row colour#FFFFFF
%TDTable data (cell) colour#FFFFFF
%SCStyle colour#FF0000
%E0Effects colour 0#00FF00
%E1Effects colour 1#44FF00
...  
%EFEffects colour 15#FF00FF
%H3!HTML³ advertlinked advert to my site
Special codes preceding other codes
%zRemove leading 0 from date/time (as standard)
%xDon't interpret, just output.


Special encoding

HTML³ has a few more encoding methods when you enable some of the output options from the Choices window.

Dollar encoding

This is tripped when using WML and/or PERL modes.
  • WML
    In WML the dollar sign can be used for variable names in attributes, and must be encoded to $(varname); outside of attributes you have to encode it to a double dollar, $$, which HTML³ will do automatically.
    • In WML, any SINGLE dollar signs will be encoded to double dollars
    • In WML, DOUBLE dollar signs in attributes will be encoded to "$(varname)"
    • In WML, DOUBLE dollar signs outside attributes will be encoded to FOUR dollars (in case you're trying to write "Save $$$", you'd need "Save $$$$$$").
  • PERL
    In PERL, you can use dollar signs for variables too, and so to print a dollar sign you need "\$".
    • In PERL, any SINGLE dollar sign gets encoded to "\$"
    • In PERL, any DOUBLE dollar sign is unencoded ("$").
  • PERL and WML together
    If you have both PERL and WML switched on, PERL trumps WML, so in general see the rules for PERL.
    • In PERL PLUS WML, ANY DOUBLE dollar sign becomes a single, unencoded dollar sign.
    • In PERL PLUS WML, ANY SINGLE dollar sign becomes a double dollar sign with "\" encoding.

    As you can see, in PERL PLUS WML mode, you can't get "$(varname)", as it's interpreting dollars as per the PERL model not the WML model.

    In short, check what the dollar signs are doing, as it's probably quicker to modify them by hand.

    Other encoding

    There's also two other encoding characters, needed to output the print statements for PERL. One of these may interfere with your output.

    Speechmarks and newline characters can be prefaced with a pipe mark - "|" - to get them to pass unencoded through the Perl encoding mechanism. Otherwise newlines become "\n" and speechmarks "\"". I've not come across any problems as yet, but that's not to say there aren't any. I'd guess that with Perl mode switched off they shouldn't alter any other output (e.g. plain HTML, WML etc. even with tokens.)


    HTML³: © Richard Goodwin 1997-2002

  • |