»2. BML Template Reference

For reference, here are the most commonly used BML templates in the LiveJournal repository:

Pre-configured

The following are BML templates that are set from configuration options in $LJHOME/cgi-bin/ljconfig.pl. All templates here are defined as ‘S’ (static).

The following BML templates are defined in $LJHOME/cgi-bin/bml/scheme/global.look and are available in every scheme.

Global

SECURITYPRIVATE
HTML image sourcing from /img/icon_private.gif
SECURITYPROTECTED
HTML image sourcing from /img/icon_protected.gif
LJUSER
Given a username, it creates a properly formated LiveJournal username reference
LJCOMM
Given a community username, it creates a properly formatted LiveJournal community username reference
LJUSERF
Same as LJUSER, except that the link to the userinfo page includes the additional user information
HELP
Given a URL, this provides a small link with the caption ‘help’
INERR
Displays an error message in an easily identifiable manner (bold red text)
NEEDLOGIN
A small blurb that's included on pages where the user is not logged in and is required to be
BADINPUT
An error message that displays when there is an encoding problem with the user's browser
REQUIREPOST
An error message explaining that certain user actions require POSTing information through an HTML form, rather than manually GETting the page
LOAD_PAGE_INFO
Initializes and populates a perl array that is used to create a sidebar of links along a page layout
H1
Top level header on a page
H2
Sub level header on a page
P
Generic HTML paragraph wrapper
STANDOUT
Given a block of text, this template tries grab the user's attention by using different text and background colors
BADCONTENT
An error message that displays when a problem (that the user can fix) has occurred during a request
DE
A template that de-emphasizes text
EMCOLOR, EMCOLORLITE, HOTCOLOR
Various emphasis colors
SCREENEDBARCOLOR
A color that is used to highlight screened comments in comment threads
CHOICE
Given 3 arguments (a URL, a title, and an explanatory blurb), this template fashions an item to be used in a CHOICES list
CHOICES
Given 2 arguments, this template tries to construct a side by side list of options and appropriate links
PAGE
This template is the BML template that governs the look of the entire scheme, and takes 4 arguments:
title
The page title
head
Page-specific elements that belong in a HTML head
bodyopts
Additional attributes for the HTML body element
body
The main content of the page