BML is the language used to serve the pages to the user that they don't manage themselves. To get an idea of what BMLis, the following is a quote from the official documentation:
BML is a server-side markup language that lets you define your own BML blocks and use them as templates within your BML pages. Your templates don't even have to be static. Because BML pages are converted to HTML on the server when users request them, this also enables you to embed live code within your BML pages, just like a CGI script. | ||
| --The Better Markup Language | ||
With FotoBilder, we used BML because it makes it easier for us to write the webpages that comprise FotoBilder, without requiring frequent changes or rewrites on your part to come up with a customized look and feel. In the next section you will read how to make the necessary changes to the FotoBilder webpages, so that your FotoBilder installation will be tailored to your wants and needs.
BML is essentially a simple macro language. Macros are called templates in BML. Templates are defined in lookup files and are invoked in BML files. Templates accept parameters and are divided into several types according to how parameters are transmitted and how the definition of the template is able to make use of them. Definitions of templates are essentially chunks of HTML with potentially more recursive BML template invocations inside them.
For FotoBilder, the most common templates are defined in the file $FBHOME/lib/bml/global.look; all other schemes either replace all of the templates, or inherit whichever is not replaced.
To write your own scheme, all you'd have to is write your own set of BML invocations that use the same templates as $FBHOME/lib/bml/global.look. Then, implementing a new scheme becomes pretty painless:
Procedure 3.1. Creating a new BML scheme: foo:
Create a new directory under $FBHOME/lib/bml, labelled after the scheme name (foo). Ex: $FBHOME/lib/bml/foo
Create a new file labelled generic.look, which contains all of the BML directives you've written. Put this file in the directory you created in the previous step. Ex: $FBHOME/lib/bml/foo/generic.look
If you don't have a local BML configuration file (bml-local.cfg) in your $FBHOME/lib directory, you should create one now. The contents of that file should look like:
Manually restart the apache process.
For a reference on all of the available BML templates, please consult: Appendix C.