and Setup Manual for
Page design and layout
In AnyBoard 9 the HTML pages are generated from layouts which contain predefined macros.
A macro in AnyBoard is just an identifier (usually in capital letters) which represent an HTML code block, during the page generation process all occurrences of a macro are replaced by the HTML code it represents.
For example, for the message index page, there is a macro named ADMLNK, which stands for the link to the administration panel. If we put this macro somewhere in the HTML header configuration of the forum, the link will then show up in the generated pages. The same applies to POSTLNK, which stands for the post message form link, the same also spplies to other macros. In AnyBoard, by default there are two navigation bars which host common command links, these navigation bars are no more than a table containing a set of macros. The navigation bar is just a convenient way to put all common commands at one place, and you can disable the navigation bar via the configuration and put the command links anywhere you want: you just place the macros, such as ADMLNK and POSTLNK in the forum's HTML code configurations.
Since AnyBoard 9.9.5, one can layout the message index lines in a more flexible way. In this new layout, every line of the message index is a row in the table, the columns of the row contain the message fields, which are represented by macros. For example, MSG_POSTER stands for the author of the message and MSG_LNK stands for the link to the message content. By configuring the layout of the message row, you can arrange the message fields in any way you want.
Similarly, there are various macros for the message pages.
In the next few sections, we will go over the macros and how to use them.
Let's do a simple exercise. On the AnyBoard's default navigation
bar, there is a drop-down list for page index and there is an associated
"Go" button, which looks like this.
Let's remove this piece of HTML code from the navigation bar and put it under the bar. This is how
Similarly, you can play with other macros and put them in other configuration entries.
Now, let's re-arrange the columns of the message index. Right
now, the page looks like this
we want to get rid of the "Replies" column and move the Originator column to the left of the Subject column. We follow these steps
Now, let's take a look at the layout of the message page.
The message page now looks like the following
If you go to Configure->Message page, you will see a large
number of macros, stands for the various building blocks of the message
page, and there is a layout configuration for the message page, from which
the above format is generated. By changing the layout configuration, we
change the look of the message page. Click on the "Preview" link
beneath the layout entry, we see the layout corresponding to the above image.
With IE5 and above, you can edit the layout in place and then click on the
"Copy HTML" button to modify the layout.
One thing we should also notice is that some of the macros, such as ORIG_AUTHOR_STR and MSG_ATTACHMENTS are themselves made of other macros. Why is it this way? Let's look at the MSG_ATTACHMENTS, which stands for the HTML block contains the uploaded files, the macro is made of some descriptive text label plus the macro UPLOADED_FILES. Suppose we just put the UPLOADED_FILES plus the label into the layout, then the label will always be there, regardless of the presence of attachments. However, by using another level of macro (MSG_ATTACHMENTS), we can solve this problem. When there is no attachments, the MSG_ATTACHMENTS macro will be replaced with an empty string, and when there are files attached, it's replaced with the file links and some static text.
Designing a message template directly from the admin panel can be tedious. A much easier way to do it to design the message page using an HTML editor, then replace the HTML blocks with the macros, and you get a layout template. All you do next is to copy and paste the layout into the configurations.
Suppose we want to add our company name and logo on every page of the forum, how do we do it? We can certainly add the HTML code into the configuration entries. But with AnyBoard 9.9, there is a better way: use the organization information macros , such as ORG_NAME and ORG_LOGO .
You can define the values of the ORG_ macros at the master admin panel, the values defined there are shared by all the forums. However, if you redefined the values at a particular forum, the forum specific definition takes precedence over the global definition.
When you load a template, the configuration values of the organization information won't be affected, just like the forum name & file configuration.
Some macros are only available when pages are made dynamic. In this case, AnyBoard processes the HTML file for each page view, so it's possible to provide user specific information. For example, the <LOGIN_USER> dynamic tag will be replaced with a logout link when the user is logged in, but otherwise empty. Similarly, <PRIVATE_MSG_ALERT> will produce an alert message when there is a new private message for the user.
With normal macros, one can enter them with or without the enclosing < >, so MSG_DATE and <MSG_DATE> are equivalent. Dynamic macros must be entered with <>.
There is a link in the admin panel for the description of the macros.
Copyright (C), Netbula LLC, 2002, All rights reserved
For more information in AnyBoard, please visit http://netbula.com/anyboard/