jfh-html-templates [Jcink.com Wiki]

Jcink Forum Hosting: HTML Templates

HTML templates allow use of variables for your convenience to restructure the board layout.

To use the templates, go to Admin CP » Skins and Templates » HTML Templates. The system will now be active. You can create a new template set for your board skins that will be unallocated. Allocate the template under “skins & templates” → Manage skin sets. You should see your template sets as an option now in the skin assets.

The HTML Templates are your “blank canvas” to work with the design of a particular section in any way you wish. You do not have to use any of the current styling, class names, if that's what you desire: full control over the template itself is provided.

Resources and images are provided with a highlight of each section to show what that particular template will modify and change. You can either download the entire default template set (if applicable) or view the template via the linked documentation for each one.

HTML Templates Sets are in BETA testing, available to all users!

Category Headers

Forum Rows)

Variable Information contained
 <!-- |cat_id| --> 
The category ID number.
 <!-- |cat_name| --> 
The category name.
 <!-- |collapsed_class| --> 
The collapsed/expanded category class name.
 <!-- |collapse_img| --> 
The collapsed/expanded category image macro.
 <!-- |collapsed_style| --> 
The collapsed/expanded style attribute (display: none; or nothing).
Core Variable Information contained
 <% FORUM_ROWS %> 
The forum row set for the category; this is required or no forum rows will display.

Subforum Headers

Subforum Headers)

Variable Information contained
 <!-- |forum_id| --> 
The current forum ID
Core Variable Information contained
 <% FORUM_ROWS %> 
The subforum row set for the category; this is required or no subforum rows will display.

Forum Rows

Forum Rows)

Variable Information contained
 <!-- |img_new_post| --> 
Forum marker image macro from the skin set.
 <!-- |class_new_post| --> 
Returns a string 'forum-new-post' that can be used as a class
 <!-- |name| --> 
A link to the forum, with the forum's name.
 <!-- |name_text| --> 
The forum's name with no link
 <!-- |forum_url| --> 
The full link to the forum
 <!-- |forum_id| --> 
The forum's numerical ID number.
 <!-- |cat_id| --> 
The forum's category ID number.
 <!-- |description| --> 
The forum's description with HTML included
 <!-- |description_clean| --> 
The forum's description with all HTML stripped
 <!-- |topics| --> 
Current number of topics in the forum
 <!-- |replies| --> 
Current number of replies in the forum
 <!-- |total_posts| --> 
Current number of combined topics and replies in the forum
 <!-- |last_post| --> 
The last post date in the forum
 <!-- |last_topic| --> 
The last post title with a link
 <!-- |last_topic_text| --> 
The last post title with no link to topic
 <!-- |last_topic_url| --> 
The full link to the topic
 <!-- |last_topic_id| --> 
The topic's numerical ID # in the database
 <!-- |last_poster| --> 
The last post author with a link to profile (or text for guests)
 <!-- |last_poster_text| --> 
The last post author with no link to profile
 <!-- |last_poster_url| --> 
The full link to the the last poster's profile
 <!-- |last_poster_id| --> 
The last poster's numerical ID # in the database
 <!-- |last_unread| --> 
The “Go To Last Unread” '»' topic macro / marker
 <!-- |subforums| --> 
The “subforums: (list)” string, if available
 <!-- |subforums_list| --> 
The subforums list string, WITHOUT the “subforums:” prefix.
 <!-- |moderators| --> 
The moderator list for this forum, members and groups
 <!-- |viewing| --> 
The (x viewing) statistic near the forum's title, if enabled

Redirect Rows

See 'Forum Rows' above for other redirect row values – they are the same as the forum rows except where not applicable. Values only used by redirect rows shown below. Redirect row macro can be referenced by inserting <{BR_REDIRECT}>. Don't use the redirect_url if you want hits to be counted, it is provided only for convenience.

Variable Information contained
 <!-- |redirect_on| --> 
The on/off boolean value for redirects.
 <!-- |redirect_url| --> 
The full URL that the user will be redirected to.
 <!-- |redirect_hits| --> 
The total number of clicks/hits redirected.

Topic List Headers

Forum Rows)

Variable Information contained
 <!-- |forum_id| --> 
The forum ID number.
 <!-- |forum_name| --> 
The forum name.
 <!-- |mod_form_end| --> 
The end of the moderation form (invisible to you, but required)
 <!-- |forum_active| --> 
User(s) browsing this forum row
 <!-- |sort_options| --> 
The sort keys / dropdown options
Core Variable Information contained
 <% TOPIC_ROWS %> 
The topic row set for the forum; this is required or no topic rows will display.
 <% ANNOUNCEMENTS %> 
The announcements for the forum if any; this is not required but without it, no announcements will display.

Topic Rows

Topic Rows)

Variable Information contained
 <!-- |tid| --> 
The topic id number
 <!-- |macro_img| --> 
The topic's macro/marker icon.
 <!-- |posticon| --> 
The topic's post icon.
 <!-- |topic| --> 
A link to the topic, with the title.
 <!-- |topic_text| --> 
The topic's title, with no link.
 <!-- |topic_url| --> 
The full link to the topic
 <!-- |pages| --> 
Pagination links (Pages: 1, 2, 3… etc.).
 <!-- |topic_desc| --> 
The topic's description.
 <!-- |starter| --> 
A link to the profile of the topic's starter and their name.
 <!-- |start_date| --> 
The topic's start date.
 <!-- |replies| --> 
The number of replies in the topic (with 'who posted' link)
 <!-- |replies_int| --> 
The number of replies in the topic (integer)
 <!-- |views| --> 
The number of times the topic has been viewed
 <!-- |last_post| --> 
The date of the most recent post
 <!-- |last_poster| --> 
A link to the profile of the last poster and their name
 <!-- |last_post_url| --> 
A url to the last post in the topic (Last Post by)
 <!-- |last_poster_id| --> 
The last poster in the topic's numerical ID # in the database
 <!-- |prefix| --> 
Sets the “Pinned:” or other prefix
 <!-- |go_new_post| --> 
A link and image macro to go to the newest post (only appears IF there's a new post)
 <!-- |mod_checkbox| --> 
Multi-moderation checkbox (blank for non-mods)
 <!-- |type| --> 
A string - either 'announcement', 'pinned', or 'regular' – good for CSS classes.
Macro Key Macro Replacements
T_ANNO_SUBHEAD <div class='topic-title-row'>Announcements</div>
T_PIN_SUBHEAD <div class='topic-title-row'>Important Topics</div>
T_REG_SUBHEAD <div class='topic-title-row'>Forum Topics</div>
NO_TOPICS <div class='no-topics-row'>No topics were found. This is either because there are no topics in this forum, or the topics are older than the current age cut-off.</div>

Board Statistics

Board Stats)

Variable Information contained
 <!-- |total_users| --> 
The total number of users online. (guests, members, anons)
 <!-- |total_guests| --> 
The total number of guests online.
 <!-- |total_anons| --> 
The total number of anonymous users online.
 <!-- |total_mems| --> 
The total number of members users online.
 <!-- |online_list| --> 
Complete online list in last x minutes list, with profile links, separated by commas
 <!-- |online_legend| --> 
The group legend links (if enabled)
 <!-- |list_links| --> 
Show detailed by: Last Click, Member Name links text
 <!-- |events| --> 
The list of events being observed.
 <!-- |events_limit| --> 
The number of forthcoming events in days.
 <!-- |birthdays| --> 
The number of birthdays today.
 <!-- |birthdays_list| --> 
The list of members celebrating their birthday today with age.
 <!-- |total_posts| --> 
The total number of posts forum-wide.
 <!-- |total_mem_reg| --> 
The total number of registered members.
 <!-- |newest_member| --> 
The newest registered member's profile link.
 <!-- |most_online| --> 
The number of most users online at one time.
 <!-- |most_online_date| --> 
The date when the most users were online at one time.
 <!-- |online_today| --> 
The number of users online today.
 <!-- |online_today_list| --> 
Complete users online TODAY list with profile links, separated by commas
 <!-- |most_online_oneday| --> 
The number of users online in one day.
 <!-- |most_online_oneday_date| --> 
The date when the most users were online in one day.
 <!-- |store_products| --> 
The total number of items in the store.
 <!-- |store_value| --> 
The total value of all the items in the store.
 <!-- |points_total| --> 
The total amount of the currency on the forum.
 <!-- |points_banked| --> 
The amount of currency in the forum's bank.
 <!-- |points_circulated| --> 
The amount of currency not held in the forum's bank.
 <!-- |richest_member| --> 
The richest registered member's profile link.
 <!-- |richest_member_total| --> 
The richest registered member's worth number.
 <!-- |quick_login| --> 
The quick-login HTML form, only appears when logged out.
 <!-- |toplinks| --> 
The 'top x' links that sit on or above the board stats main header.

Main Profiles

The main profile template encompasses the entire area and fully replaces it, so we are not providing an image of the default profile.

Variable Information contained
 <!-- |id| --> 
The profile's id number, as displayed in the URL(/index.php?showuser=x)
 <!-- |g_id| --> 
The profile's group id number
 <!-- |avatar| --> 
The profile's avatar with image tag included.
 <!-- |avatar_url| --> 
The profile's full avatar URL.
 <!-- |name| --> 
The profile's user name.
 <!-- |group| --> 
The profile's group name.
 <!-- |photo| --> 
The profile's photo with image tag included.
 <!-- |photo_url| --> 
The profile's full photo URL.
 <!-- |reputation| --> 
The profile's reputation info.
 <!-- |title| --> 
The profile's title - custom or rank based.
 <!-- |location| --> 
The profile's location.
 <!-- |birthday| --> 
The profile's birthday.
 <!-- |website| --> 
The profile's website link.
 <!-- |interests| --> 
The profile's interests.
 <!-- |joined| --> 
The profile's join date.
 <!-- |local_time| --> 
The profile's local time.
 <!-- |posts_day| --> 
The profile's posts per day value.
 <!-- |status| --> 
The profile's “Online”/“Offline” status.
 <!-- |activity| --> 
The profile's current activity.
 <!-- |last_activity| --> 
The profile's last activity date.
 <!-- |posts| --> 
The profile's total post count.
 <!-- |aim| --> 
The profile's AIM.
 <!-- |yahoo| --> 
The profile's YIM.
 <!-- |gtalk| --> 
The profile's GTalk.
 <!-- |msn| --> 
The profile's MSN.
 <!-- |skype| --> 
The profile's Skype.
 <!-- |pm| --> 
The full URL to send the member a PM.
 <!-- |email| --> 
The full URL to send the member an email.
 <!-- |signature| --> 
The profile's signature.
 <!-- |visitors| --> 
The profile's recent visitors in JSON format.
 <!-- |comments| --> 
The profile's recent comments in JSON format.
 <!-- |comment_form| --> 
The profile's comment form HTML.
 <!-- |friends| --> 
The profile's recent friends in JSON format.
 <!-- |subaccounts| --> 
The subaccount dropdown menu for this user

Custom Fields

You can call the custom profile fields in the Main Profile template by their corresponding field_# in the Admin CP.

Variable Information contained
 <!-- |field_#| --> 
Returns value of 'field_#' as show in Admin CP

Below is an example, where our field is “FIELD_1”:

Example Variable Example Information contained
 <!-- |field_1| --> 
Returns value of 'field_1' as show in Admin CP

JSON variables

Some of the variables in the main profile, such as <!– |comments| –> are not returned as a regular text string or boolean value, but rather a JavaScript Object Notation string. For concrete examples of working with JSON variables for the main profiles, please see: 'Main Profile' HTML Templates: JSON Variables

Mini Profiles

Mini Profile)

Variable Information contained
 <!-- |author_name| --> 
Displays author name in plain text
 <!-- |name| --> 
Displays author name linked, with group prefix/suffixes
 <!-- |avatar| --> 
Displays author avatar
 <!-- |id| --> 
Displays author member number
 <!-- |parent_id| --> 
Displays parent id member number
 <!-- |posts| --> 
Displays author post count
 <!-- |points| --> 
Displays author points total
 <!-- |title| --> 
Displays author title
 <!-- |signature| --> 
Displays author signature
 <!-- |member_rank_img| --> 
Displays author pip image
 <!-- |age| --> 
Displays author age (if available)
 <!-- |member_joined| --> 
Displays author join date
 <!-- |aim_name| --> 
Displays author AIM name
 <!-- |icq_number| --> 
Displays author ICQ number
 <!-- |yahoo| --> 
Displays author Yahoo! name
 <!-- |msnname| --> 
Displays author MSN name
 <!-- |website| --> 
Displays author website link
 <!-- |email| --> 
Displays author email
 <!-- |name_prefix| --> 
Displays store-purchased name prefix html
 <!-- |name_suffix| --> 
Displays store-purchased name suffix html
 <!-- |g_id| --> 
Displays group id number
 <!-- |prefix| --> 
Displays group prefix
 <!-- |suffix| --> 
Displays group suffix
 <!-- |g_title| --> 
Displays group name
 <!-- |g_icon| --> 
Displays group icon URL
 <!-- |icon_id| --> 
Displays icon id used
 <!-- |topic_id| --> 
Displays topic ID number
 <!-- |forum_id| --> 
Displays forum ID number
 <!-- |attach_id| --> 
Displays attachment id
 <!-- |attach_hits| --> 
Displays attachment hits
 <!-- |attach_type| --> 
Displays attachment type
 <!-- |attach_file| --> 
Displays attachment file
 <!-- |warn_text| --> 
Displays warn text
 <!-- |warn_minus| --> 
Displays subtract from warn image
 <!-- |warn_img| --> 
Displays warn bar image.
 <!-- |warn_add| --> 
Displays add to warn image
 <!-- |army| --> 
Displays Army System army count.
 <!-- |points| --> 
Displays total IbStore points.
 <!-- |member_inventory| --> 
Displays total IbStore points.
 <!-- |donate| --> 
Displays IbStore donate link.
 <!-- |status| --> 
Displays online/offline status
 <!-- |arcade_crowns| --> 
Displays IbProArcade crowns
 <!-- |rep| --> 
Displays reputation system status
 <!-- |downloads| --> 
Displays Download System total files downloaded
 <!-- |files| --> 
Displays Download System total submissions

Custom Fields

You can call the custom profile fields in the Mini Profile template by their corresponding field_# in the Admin CP.

Variable Information contained
 <!-- |field_#| --> 
Returns value of 'field_#' as show in Admin CP

Below is an example, where our field is “FIELD_1”:

Example Variable Example Information contained
 <!-- |field_1| --> 
Returns value of 'field_1' as show in Admin CP

Post Rows

Post Row)

Variable Information contained
 <!-- |pid| --> 
The post's numerical id.
 <!-- |poster_id| --> 
The author's numerical id.
 <!-- |g_id| --> 
The group id number of the author.
 <!-- |name_prefix| --> 
Displays author's group prefix
 <!-- |author_name| --> 
Displays author's name in plain text
 <!-- |name| --> 
Displays author's name linked, with group prefix/suffixes
 <!-- |name_suffix| --> 
Displays author's group suffix
 <!-- |post_css| --> 
string post1 or post2 is printed for use in class attributes
 <!-- |permalink| --> 
A full link to the post
 <!-- |post_date| --> 
The date the post was made.
 <!-- |mod_checkbox| --> 
The checkbox used for moderating a post. Not visible to non-moderators.
 <!-- |mini_profile| --> 
The mini profile template
 <!-- |signature| --> 
The poster's signature
 <!-- |attachments| --> 
The poster's attachments (if any)
 <!-- |post| --> 
The actual post's content
 <!-- |ip_address| --> 
The post's ip address. Not visible to non-staff.
 <!-- |report_link| --> 
The post's report button
 <!-- |delete_button| --> 
The post's delete button (if enabled)
 <!-- |edit_button| --> 
The post's edit button (if permitted)
 <!-- |quote_button| --> 
The post's quote button
 <!-- |aim| --> 
The author's AIM button.
 <!-- |yahoo| --> 
The author's YIM button.
 <!-- |gtalk| --> 
The author's GTalk button.
 <!-- |msn| --> 
The author's MSN button.
 <!-- |pm| --> 
The author's PM button
 <!-- |email| --> 
The author's email button
 <!-- |rep_options| --> 
The post's reputation system options

Custom Fields

You can call the custom profile fields in the Post Row template by their corresponding field_# in the Admin CP.

Variable Information contained
 <!-- |field_#| --> 
Returns value of 'field_#' as show in Admin CP

Below is an example, where our field is “FIELD_1”:

Example Variable Example Information contained
 <!-- |field_1| --> 
Returns value of 'field_1' as show in Admin CP

Important Notes (Post Rows)

  • For permalinks/direct post links to work, your post row template MUST contain the anchor:
    <a name='entry<!-- |pid| -->'></a>
  • For quick-edit to function, your post row template's post content area MUST be formed exactly like this:
    <div id="pid_<!-- |pid| -->"><!-- THE POST <!-- |pid| --> --><div class='postcolor'><!-- |post| --></div><!-- |signature| --><!-- THE POST --></div>

    Copy this code exactly to ensure usability of quick-edit.

  • <!– |mini_profile| –> is not mandatory in post row templates, but the mini profile variable has access to some user variables that the post rows do not. Try to structure your post rows using the mini profiles to hold most of the user data.
 
jfh-html-templates.txt · Last modified: 2017/02/24 15:26 by jcink