Install (4): Rebuilding
the source files, and/or making modifications, part II
(This section contains more specific information about how to
build your own customized topics list.)
You'll find a list of the arrays in TH_TB.js (look at the
comment block in the front). The images that are specific to
the current board appearance scheme are all put into variables
(e.g. C_NewGIFStr). You'll have access to these variables
in TH_TB2.js.
The variable G_TP_Mode is set to 0 for "all messages", 1 for
"new messages", and 2 for "attention messages."
TH_TB2.js is the module that you actually modify. You
can rewrite this module completely, if you wish: the only requirements are
that you leave the variable G_TB2InitFlag in place, that you
have a function called TB2_Init (this function doesn't have to do
anything, although you may find it very useful if it performs certain
global initialization operations). Finally, you must have
a function called TopHTM, which returns the modified HTML for the
topics list.
You may also wish to implement an approach that's structurally similar
to mine: what I've done is to use a series of templates that capture
the structure of the display. For example, C_ConfNa_W6
is an array that holds the format of expanded, collapsed, and empty
conferences' HTML. There are "variables" (delimited by
@-signs) inside these templates
that actually get replaced with the relevant data. My
initialization function, TB2_Init will preprocess these
templates at BOJ, in order to replace everything that's not specific to
a particular conference.
There are also extensive remarks in this file that explain WebBoard's
somewhat quirky approach to the "annotation" GIFs, such as those that
alert the reader to the fact that a message is new, the existence of
attachments, etc.
There are actually five different templates
used to display messages, and three for conferences. But if
you're implementing your own display style, you might want to create
more, or use fewer: my goal here was to dutifully replicate what WebBoard
does, except to replace all images with text equivalents, put the poster
name in curly braces, and remove the year from dates that occur this
year.
All existing versions of WebBoard have the a certain
idiosyncracy that I didn't replicate: when "new" or "attn" messages are
being displayed, the first conference is displayed in a different
font, but only if it's expanded. As far as I can tell, that's
a bug, not a feature.
As released, the system provides a dual display: the original HTML that
WebBoard produces is followed by the reformatted HTML. This is
extremely useful for validating any changes that you might wish to
make to the format. You'll find instructions on
how to remove the dual display in topics.html. Search
for "@@@": all you have to do is to delete 3 lines. This file
should not be edited with MS-WORD, WordPerfect, or any word
processor, because it's a "plain text" file. For best
results, use Windows Notepad, and make sure that the
Edit | Word Wrap option is off.
For reasons unknown to me, my implementation doesn't seem to work very
well with some of the older, bug-infested versions of Netscape
(e.g. 4.01). But I've done my best to support NS
version 6 and above.
Return
to table of contents