Bandersnatch Default Template v0.2
Block name | main_page | |||||||||||||||||||
Variables | ||||||||||||||||||||
PAGE_TITLE | The title of the page (e.g. Statistics for user@host.com...) - Also used for <TITLE> HTML tag | |||||||||||||||||||
PAGE_SUBTITLE | Optional subtitle. Often used for a slightly more destriptive message, or for additional information. (Page generated on...) | |||||||||||||||||||
PAGE_TIMESTAMP | Optional timestamp. Used to timestamp a report | |||||||||||||||||||
ADMIN | The admin toolbar (login, logout, etc.) goes here | |||||||||||||||||||
NAVIGATION | Any page navigation (next, prev, last) go here | |||||||||||||||||||
SEARCH | The search form goes here | |||||||||||||||||||
SORT_BY | The sort-by options (ascending, descending...) go here | |||||||||||||||||||
DATE_SELECT | The date selection form goes here | |||||||||||||||||||
CENTER_BLOCK | The main content goes here | |||||||||||||||||||
Notes | ||||||||||||||||||||
|
Block name | color_row_1, color_row_2, color_chat_1, color_chat_2, color_normal_1, color_normal_2, color_groupchat_1, color_groupchat2 |
Sub-blocks | |
color_row_1 | The first of two colors used to alternate rows on generic tables |
color_row_2 | The second of two colors used to alternate rows on generic tables |
color_chat_1 | The first of two colors used to alternate rows on chat logs |
color_chat_2 | The second of two colors used to alternate rows on chat logs |
color_normal_1 | The first of two colors used to alternate rows on "normal" message logs |
color_normal_2 | The second of two colors used to alternate rows on "normal" message logs |
color_groupchat_1 | The first of two colors used to alternate rows on groupchat logs |
color_groupchat_2 | The second of two colors used to alternate rows on groupchat logs |
Notes | Dreamweaver likes to put newlines after every comment. It does it automatically every time you change anything NEAR these lines. Intergrated Templates DOESN'T LIKE THIS. Make sure the following blocks are always declared <!-- BEGIN blockname -->#color<!-- END blockname -->. No newlines! If your colors are suddenly screwy, check this first :) |
#339ACC #99CCE6 #33CCB2 #99FFCC #E6B399 #E6D999 #D999E6 #99A6E6 |
Block name | generic_table | |||||||||||||||
Variables | ||||||||||||||||
TABLE_TITLE | The title of the table. If not used, most browsers will leave this row out. | |||||||||||||||
SORTED_BY | When it's possible to sort results by various criteria, the options appear here. If not used, most browsers will leave this row out. | |||||||||||||||
PAGE_NUMBERS | When results span multiple pages, the navigation options appear here. If not used, most browsers will leave this row out. | |||||||||||||||
HEADING_ATTRIBUTE | The heading for the first (attribute) column | |||||||||||||||
HEADING_VALUE | The heading for the second (value) column | |||||||||||||||
Sub-block (parent generic_table) | row (row is parsed repeatedly for tables with multiple rows) | |||||||||||||||
ROW_ATTRIBUTE | The entry in the first (attribute) column | |||||||||||||||
ROW_VALUE | The entry in the second (value) column | |||||||||||||||
Sub-block (parent row) | icon (icon is only parsed if we want a 20x20 icon displayed next to this row) | |||||||||||||||
ICON_IMAGE | The SRC (source) of the <IMG> tag | |||||||||||||||
ICON_ALT | The ALT (alternate text) of the <IMG> tag | |||||||||||||||
Notes | All tables' first row is 8% in width. This keeps the icons and the colors in line. Remember, 8%! | |||||||||||||||
|
Block name | presence_table | ||||||||||||||||||||||||
Variables | |||||||||||||||||||||||||
TABLE_TITLE | The title of the table. If not used, most browsers will leave this row out. | ||||||||||||||||||||||||
Sub-blocks (parent presence_table) | presence_table_inside - This is the row that finally gets parsed into the presence table. This was done to avoid duplicating the title every on every presence entry | ||||||||||||||||||||||||
Sub-blocks (parent presence_table_inside) | online,away,xa,chat,dnd,offline,invisible | ||||||||||||||||||||||||
TIME | The "time spent" value that will be inserted. e.g. [08:45 - 10:21] | ||||||||||||||||||||||||
STATUS | The extra-descriptive status entry that MAY be inserted. | ||||||||||||||||||||||||
Notes | Each row represents a change of the user's presence status. The applicable row will be parsed each time. The end result will be a series of rows, reflecting his presence history. Because of the 8% rule (see above), EVERY table must have the width set to 8%. If only the first (online) table has a width set, and it's never parsed, the spacing will be messed up. | ||||||||||||||||||||||||
|
Block name | transport_table | ||||||||||||||||||||||||||||||||||||||||||||||||
Variables | |||||||||||||||||||||||||||||||||||||||||||||||||
TABLE_TITLE | The title of the table. If not used, most browsers will leave this row out. | ||||||||||||||||||||||||||||||||||||||||||||||||
Sub-blocks (parent presence_table) | transport_table_inside - This is the row that finally gets parsed into the transport table. This was done to avoid duplicating the title every on every transport entry | ||||||||||||||||||||||||||||||||||||||||||||||||
Sub-blocks (parent transport_table_inside) | rss, groupchat, icq, msn, yahoo, aim | ||||||||||||||||||||||||||||||||||||||||||||||||
SENT | The amount of messages sent TO this transport, from one of our local users | ||||||||||||||||||||||||||||||||||||||||||||||||
RECEIVED | The amout of messages received FROM this transport, by one of our local users | ||||||||||||||||||||||||||||||||||||||||||||||||
TOTAL | The total amount of messages this transport processed | ||||||||||||||||||||||||||||||||||||||||||||||||
PERCENTAGE | The percentage of total messages processed today that this transport contributed to | ||||||||||||||||||||||||||||||||||||||||||||||||
Notes | Each row represents a service. The applicable row will only be parsed if at least one message was delivered by that service. The icons, and service name are hard-coded here. Because this table will always have a "heading" row (service, to, from, etc.), it's only necessary to define the 8% width rule once, and not for every row :) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Block name | message_log_table | ||||||||
Variables | |||||||||
DATE | The date this message was logged | ||||||||
OTHERPARTY | The "other party". I.e. We know who sent the message (we're examining their logs!), we want to know who received it | ||||||||
DIRECTION_IMAGE | The image (typically an arrow) to use to graphically indicate the "direction" of the message | ||||||||
DIRECTION_IMAGE_ALT | The alt attribute of the IMG tag for the direction image (above) | ||||||||
ICON_IMAGE | The image to use to graphically indicate the "type\" of the message (normal/chat/groupchat) | ||||||||
ICON_IMAGE_ALT | The alt attribute of the IMG tag for the type icon (above) | ||||||||
BODY | The body of the message | ||||||||
SUBJECT | The subject of the message | ||||||||
BGCOLOR | The background color to use. This depends on the type of message, and its "direction". The applicable colors are defined above... | ||||||||
Notes | There are three rows for the sake of having an icon. Maybe I should change that. FIXME | ||||||||
|
Block name | navigation |
Sub-blocks (parent navigation) | nav_first, nav_first_nolink, nav_prevt, nav_prev_nolink, nav_pagenumber, nav_next, nav_next_nolink, nav_last, nav_last_nolink |
PAGENUMBER | A page number. Clickable |
LINK_PAGENUMBER | The href value of the clickable page number above |
PAGENUMBER_NOLINK | A non-clickable page number. Use to indicate the current page |
Notes | There are cases where we don't want our first, prev, next, last links highlighted. i.e. We don't want the first or prev links clickable when we are on page one. To that end, the "nolink" blocks exist. They're touched (the parser doesn't ignore the "empty" blocks), and parsed instead of their clickable counterparts. The page numbers are generated by a loop. Again, the current page number should not be clickable |
[First] [First] [Prev] [Prev] [{PAGENUMBER}{PAGENUMBER_NOLINK}] [Next] [Next] [Last] [Last] |
Block name | sorted_by |
Sub-blocks (parent sorted_by) | sorted_by_value, sorted_by_value_nolink |
SORTED_BY_VALUE | The "sort-by" value |
SORTED_BY_LINK | The link to sort by the above "sort-by" value |
SORTED_BY_NOLINK | The non-clickable counterpart, if this is already the current "sort-by" value |
Notes | A loop is iterated to create the sortby options between the brackets |
(Sort by: {SORTED_BY_VALUE} {SORTED_BY_VALUE_NOLINK} ) |
Block name | admin_bar |
Sub-blocks (parent admin_bar) | admin_logged_in_as, admin_message_log, admin_user_stats, admin_login, admin_logout |
LOGGED_IN_AS | The user who's currently authenticated |
MESSAGE_LOG_LINK | The link to display the message log for the current JID |
USER_STATS_LINK | The link to display the users stats for the current JID |
ADMIN_LOGIN_LINK | The link to login (currently not logged in) |
ADMIN_LOGOUT_LINK | The link to logout (currently logged in) |
Notes | If there's no authenticated user, only the login option should be displayed. If a user is logged in, "logged_in_as" and "logout" will always be displayed, and "user stats" and "message_log" will depend on the current page. |
Logged in as: {LOGGED_IN_AS} [user message log] [user stats] [admin login] [logout] |
Block name | login_form |
Variables | |
FORM_ACTION | The URL to give to the form action |
Notes | Not much to do here, just set the form action. PEAR Auth specifies that the two textfields below MUST be named "username" and "password" |
|
Block name | link |
Variables | |
LINK_TEXT | The text of the link |
LINK_URL | The url for the link |
LINK_SEPERATOR | What to use to seperate multiple iterations of links |
Notes | This is currently only used to simply constuct links via the template, instead of manually constructing them in code. It's currently used for "create_jid_link" |
{LINK_TEXT}{LINK_SEPERATOR} |
Block name | date_bar |
Variables | |
DATE_BAR_ACTION | The action field of the form. Typically this will be a form of PHP_SELF when parsed |
Sub-blocks (parent date_bar) | date_bar_row - This is parsed once for every option, too keep the options in date order |
Sub-blocks (parent date_bar_row) | date_bar_option, date_bar_option_selected |
OPTION | The user who's currently authenticated |
VALUE | The user who's currently authenticated |
Notes | This is used to construct the "date" bar. The date_bar_option is parsed for every option, and date_bar_selected is parsed only once for the currently selected option. |
Block name | search_bar |
Variables | |
SEARCH_BAR_ACTION | The action field of the form. Typically this will be a form of PHP_SELF when parsed |
SEARCH_TEXT | The text that was searched for |
Sub-blocks (parent search_bar) | search_bar_results - This is the "Search results for...", obviously only displayed if there is a search value |
SEARCH_RESULTS_TEXT | The text that was searched for |
SEARCH_CLEAR_LINK | The link to redisplay these results without the search. (i.e. - clearing the search) |
Notes | This is used to construct the "search" bar. The date_bar_option is parsed for every option, and date_bar_selected is parsed only once for the currently selected option. |
Search results for "{SEARCH_RESULTS_TEXT}" [clear search] |
Block name | footer | |||||||||
Variables | ||||||||||
APP_NAME | The name of the application, set in config.inc.php | |||||||||
APP_VERSION | The version of the application, set in config.inc.php | |||||||||
EXECUTION_TIME | The time between the start and the end of the script. Passed via a microtime() script | |||||||||
Notes | Please keep the relevant copyrights & notices intact | |||||||||
|