dl { margin-top: 10px; } dt { font-weight: bold;} dd { margin-bottom: 10px; } NOTE: Users who have experience with HTML and web template systems should only modify the guild page template. The templates are very critical in showing a guild page. Misuse can lead to a crappy looking guild with missing bits.
In case you run into problems, you can always reset back to the default templates by visiting http://myguild.epicmount.com/admin/template/reset
IntroductionAny guild here at EpicMount can have the guild's template pages (and associated bits) modified to dramatically change how the guild is presented to the world. (Premium guilds can customize their forum template pages.)
In very simple terms, the template page is very similar to a form letter. The page defines where things should go and how the various items should be laid out.
The template page uses a very simple template language to build up the page for display. There are seven template pages:
- Body template: This describes how the entire page should be display using the other templates to do this.
- Navigation bar element template: This describes how each element in the navigation bar should be display.
- Sidebar box template: This describes how each box in the sidebar should be displayed.
- Main Content Box Template: This describes how each box in the main content area should be displayed.
- Forums Template: This describes how the forums page is displayed (i.e. myguild.epicmount.com/forums)
- Topic Listing Template: This describes how a forum's topic listing page is displayed (i.e. myguild.epicmount.com/forum/1)
- Topic Template: This describes how a topic page is displayed (i.e. myguild.epicmount.com/forum/1/2)
The Body Template uses the other three templates to construct the page for display. It is the top most template and one where you want to focus most of your attention.
Default EpicMount Page Layout
There are several things you should be aware of before editing the template pages:
- The base CSS (not to be confused with the theme CSS), and supporting javascript assumes a one to three column layout using DIVs.
- The default body template renders the main content first, followed by the left sidebar (if defined), and then the right (if defined).
- The left and right columns are of the CSS ID's sidebar_left and sidebar_right respectively, and both use the "sidebar" class. The javascript code to collapse the columns uses these IDs.
- The default sidebar box and main content box model uses a layered DIVs model to support custom corners.
- It is possible a main content box *may not* have a title. Typically this is used to display website announcements, or alerts and is usually the first box displayed.
The following is a reference for the various template commands (aka macros) available to use. More commands may become available in the future.
General Notes:- For command arguments, only alphanumerics and the underscore (_) are allowed as parameters. No spaces.
- The dollar sign ($) is used to start a command. To just display a single $, use $$ (two dollar signs).
- Make sure your changes work on the popular web browsers: Internet Explorer 6 (~20% of users), Internet Explorer 7 (~30% of users), Firefox (~%40 of Users), and Safari (~5%). Otherwise, you might scare away potential members.
- Most $if* commands may have any $else as well.
- <% and %> are used internally and if entered in will be converted to <% and %>
- $topbar_link
- A top bar link which has been defined in the Layout area.
- $title
- The title of the box
- $if_have_title lines [ $else lines ] $end
- If the box has a title, then display lines. (Currently, only main content boxes use this.)
- $body
- The body of the box
- $body_class
- The CSS body class (may be multiple names separate by a space). Currently only the Event Calendar sidebar box uses this.
- $if_have_body_class lines [ $else lines ]
- If the box body has a class name(s), then display lines
- $if_have_id lines [ $else lines ] $end
- If the box has a CSS id, then display lines
- $id
- The ID of the box
- $if_have_body_id lines [ $else lines ]
- If the box has a title, then display lines. (Currently, only main content boxes use this.)
-
- $logo
- The image tag for the guild's logo (if there is one), or the name of the guild
- $logo_align
- How to align the logo (left, right, center) Body Template - Account Bar
- $account_bar
- The account bar area
- $if_account_bar(location) lines [ $else lines ] $end
- This display lines base on the requested position of the account bar. location can be:
top - if the account bar is to be located in the top area of the page (left, right, or expanded)
below - if the account bar is to be located below the logo. - $left_boxes
- The left sidebar boxes processed through the sidebar box template first
- $right_boxes
- The right sidebar boxes rendered through the sidebar box template first
- $if_have_left lines [$else lines] $end
$if_have_right lines [$else lines] $end
$if_have_either lines [$else lines] $end - lines are display if there is a left, right, or either a sidebar
- $if_left_collapsed lines [$else lines] $end
$if_right_collapsed lines [$else lines] $end - lines are displayed if the left or right sidebar has been collapsed.
- $is_left_collapsed(collapsed,not_collapsed)
$is_right_collapsed(collapsed,not_collapsed) - Displays collapsed if the sidebar has been collapsed, or not-collapsed if sidebar has not been.
- $sidebar_showing(neither, left, right, both)
- The neither, left, right, or both arguments are displayed depending on which sidebar is present and showing (i.e. not collapsed)
neither - Neither sidebar is showing
left - Only the left sidebar is showing
right - Only the right sidebar is showing
both - Both sidebars are showing - $topbar
- Creates a top navigation bar
- $main_content
- The main content boxes rendered through the main box template first
- $each_forum_category lines $end
- This will loop over each forum category in position order. There will *always* be one category (typically named "Forum") if no other categories are defined.
- $category_title
- The current category's title (aka name)
- $each_forum lines $end
- Loop over each forum within a category.
- $forum_title
- The current forum's title.
- $forum_url
- The URL to the current forum
- $if_forum_locked lines [ $else lines ] $end
- lines are displayed if the current forum has been locked
-
- $forum_topics
- The topic count for the current forum
- $forum_messages
- The message count for the current forum
- $forum_description
- The current forum's description
- $forum_last_post_url
- The current forum's last post url
- $forum_last_poster_name
- The current forum's last post creator's name
- $forum_access
- The access level for the current forum
- $forum_creator
- The current forum's creator name and link.
- $if_have_locked_forum lines [ $else lines ] $end
- lines will be displayed if any of the forums has been locked
Body Template - Sidebars
$left_boxes would display:
<b>My Links</b><br/>
Link 1
Link 2
Link 3
<br/>
<b>Events Calendar</b><br/>
(the events calendar)
<br/>
Body Template - Sidebar Controls
Will display, if the left sidebar was collapsed:
<font color="red">You shrunk the left side!</span>
<div class="$sidebar_showing(nothing,there_is_left,there_is_right,both_are_here)">
Will display:
<div class="nothing"> for no sidebars showing
<div class="there_is_left"> for just the left sidebar showing
<div class="there_is_right"> for just the right sidebar showing
<div class="both_are_here"> for both sidebars showing
Body Template - Top Navigation Element
Assume there are 3 top bar links defined, and the top bar element template was set to "[ $topbar_link ]".
[ link1 ] [ link2 ] [ link3 ]
Box 1 is the guild news. Box 2 is the recent topics box.
$main_content would display:
<div class='title'>News</div>
<div class='body'>
The guild news goes here..
</div>
<div class='title'>Recent Topics</div>
<div class='body'>
topic1
topic2
topic3
</div>
Forums Listing Template
Topic Listing Template
- $topic_sort
- A link to sort the page by topic subjects
- $last_post_sort
- A link to sort the page by topic last post date
- $each_topic lines $end
- This will loop through each topic for the current page in the forum.
- $if_topic_locked lines [ $else lines ] $end
- lines will be displayed if the current topic has been locked
- $if_topic_sticky lines [ $else lines ] $end
- lines will be displayed if the current topic has been marked as "sticky"
- $topic_subject
- The current topic's subject
- $topic_creator
- A link to the current topic's ceator
- $topic_created_at
- A date for the current topic's creation time
- $topic_replies
- The current topic's number of replies. (aka message count)
- $if_topic_has_replies lines [ $else lines ] $end
- lines will be display if the current topic has any replies.
- $topic_reply_at
- The date of the last reply for the current topic
- $topic_reply_name
- The name of the poster who replied last for the current topic.
- $topic_url
- The current topic's url.
- $topic_pages
- Displays a set of page navigation links if the topics listing spans multiple pages.
- $if_forum_has_sticky lines [ $else lines ] $end
- lines will be display if any topic on the page has been marked as "sticky"
- $if_forum_has_locked lines [ $else lines ] $end
- lines will be display if any topic on the page has been locked
- $if_forum_locked lines [ $else lines ] $end
- lines will be displayed if the forum itself has been locked.
- $if_user_can_post lines [ $else lines ] $end
- lines will be displayed if the user is allowed to post to this forum.
- $topic_create_url
- A url to a page which the user can create a new topic for the forum.
Topic Template
- $if_topic_locked lines [ $else lines ] $end
- lines will be displayed if the topic has been locked
- $next_unread_link
- This is a link to the next topic or message which is unread.
- $if_have_next_unread lines [ $else lines ] $end
- lines will be displayed if the user has unread topics or messages.
- $each_message LINES $end
- Loop through each message on the current page.
- $if_msg_unread lines [ $else lines ] $end
- lines will be displayed if the current message has not been read by the user.
- $msg_anchor
- The current message's anchor (aka message id). This is used by the next unread feature to have the browser position the page on the unread message.
- $msg_subject
- The subject of the current message
- $msg_poster
- A link to the current message's poster.
- $msg_poster_mail
- A mail icon link to send mail to the current message's poster.
- $msg_poster_count
- The total number of messages this poster has written.
- $if_msg_have_avatar lines [ $else lines ] $end
- lines will be displayed if the current message's poster has an avatar image
- $msg_avatar_url
- The image url for the current message's poster avatar.
- $if_poster_have_award
- lines will be displayed if the current message's poster has been given a trophy award
- $poster_award_url
- The image url for the current message's poster trophy award.
- $msg_text
- The message's text
- $msg_created_at
- The creation date of the current message.
- $msg_edited_at
- The last edit date of the current message
- $if_msg_edited lines [ $else lines ] $end
- lines will be displayed if the current message has been edited.
- $if_msg_edit_by_other lines [ $else lines ] $end
- lines will be displayed if the current message has been edited by someone other than the creator.
- $msg_editor
- A link to the user who last edited the current message.
- $if_msg_show_forum lines [ $else lines ] $end
- lines will be displayed if the template has been requested to display the forum's title of the current message. (This is used when a search has been performed and the results are being displayed.)
- $msg_forum_title
- The current message's forum title
- $if_msg_have_quote lines [ $else lines ] $end
- lines will be displayed if the current message is quoting another message.
- $msg_quote
- (Deprecated on March 15, 2008 - Quoted messages are now directly incorporated into the replying message.)
- The quoted message's text.
- $if_msg_have_sigline lines [ $else lines ] $end
- lines will be displayed if the current message has a signature line.
- $if_hide_sigline lines [ $else lines ] $end
- lines will be displayed if the user has requested signature lines not be shown.
- $msg_sigline
- The current message's signature line text.
- $if_msg_need_links lines [ $else lines ] $end
- lines will be displayed if the user is allowed to reply to the current message, AND/OR edit and delete the message if the user has the appropriate privileges.
- $msg_links
- The links to reply to the message, and edit and delete the message if the user has the appropriate privileges.
- $message_pages
- Displays a set of page navigation links if the topic's messages spans multiple pages.
Back to Help
