Sbhedges
8th November 2006, 08:57 PM
Vbulletin Template Guide by Sbhedges
Mainly Focused at beginners but can be useful for other users of Vbulletin
Please note that the beginning of the article (Template Names) is a big bit of the article but there is more
--------------------------------------------
In this guide we will cover the following aspects of templates in vbulletin
1. Templates Names and What they control
2. How to edit them
4. How to edit User Control Panel Option Parts (Example Editing Item)
5. Creating your own Templates and linking them through pages
6. Closing
-----------------------------------------------
1. Template names and what they control
So first to acctualy do anything good you need to know what certain templates control etc. Please note that uncategorised templates are templates with no category
Uncategorised Templates
activateform
activate_requestemail
attachmentbit
ATTACHMENTS
board_inactive_warning
contactus
contactus_option
editpoll
editpost
footer
forumjump
forumrules
GENERIC_SHELL
gobutton
header
headerinclude
imagereg
JOINREQUESTS
joinrequestsbit
lostpw
mailform
optgroup
option
reportbadpost
sendtofriend
shell_blank
spacer_close
spacer_open
STANDARD_ERROR
STANDARD_ERROR_LITE
STANDARD_ERROR_LOGIN
STANDARD_REDIRECT
ANNOUNCMENT TEMPLATES
These Templates control the announcments section of your site
announcment
announcment_edit
BB CODE TEMPLATES
All these templates manage the BBcode items
- bbcode_code
- bbcode_code_printable
- bbcode_html
- bbcode_html_printable
- bbcode_php
- bbcode_php_printable
- bbcode_quote
- bbcode_quote_printable
BUDDY LIST TEMPLATES
Templates that control the buddy list system
BUDDYLIST
buddylistbit
CALENDER TEMPLATES
Calender System Templates
CALENDER
calenderjump
calenderjumpbit
calender_edit
calender_edit_customfield
calender_edit_recurrence
calender_manage
calender_monthly
calender_monthly_birthday
calender_monthly_day
calender_monthly_day_other
calender_monthly_event
calender_monthly_header
calender_monthly_week
CALENDER_REMINDER
calender_reminder_choosetype
calender_reminder_eventbit
calender_showbirthdays
calender_showevents
calender_showeventsbit
calender_showeventsbit_customfield
calender_smallmonth_day
calender_smallmonth_day_other
calender_smallmonth_header
calender_smallmonth_week
calender_weekly
calender_weekly_day
calender_weekly_events
calender_yearly
Editor Templates
These templates control the editor parts of Threads etc.
editor_clientscript
editor_smilie
editor_smiliebox
editor_smiliebox_category
editor_smiliebox_row
editor_smiliebox_straggler
editor_toolbar_off
editor_toolbar_on
FAQ Templates
All these templates control the FAQ of your forum
FAQ
faqbit
faqbit_link
Forum Display Templates
All these templates control the Forum Display parts of your forums
FORUMDISPLAY
forumdisplay_loggedinuser
forumdisplay_moderator
forumdisplay_sortarrow
Forum Home Templates
These Templates control your forum home items
FORUMHOME - Main Forumhome template (index.php)
forumhome_event
forumhome_forumbit_level1_nopost
forumhome_forumbit_level1_post
forumhome_forumbit_level2_nopost
forumhome_forumbit_level2_post
forumhome_lastpostby
forumhome_loggedinuser
forumhome_markread_script
forumhome_moderator
forumhome_subforumbit_nopost
forumhome_subforumbit_post
forumhome_subforumseparator_nopost
forumhome_subforumseparator_post
Help Templates
These templates cover the help part of your Forum
help_avatars
help_avatars_avatar
help_avatars_category
help_avatars_row
help_bbcodes
help_bbcodes_bbcode
help_bbcodes_link
help_smilies
help_smilies_category
help_smilies_smilie
Instant Messaging templates
These templates control the instant messaging Popups
im_icq - ICQ
im_message - Message Sending
im_msn - MSN
im_send_aim - SEND TO AIM
im_send_icq - ICQ SEND
im_send_msn - MSN SEND
im_send_skype - SKYPE SEND
im_send_yahoo - YAHOO! SEND
im_skype - SKYPE
im_yahoo - YAHOO!
Member Info Templates
All these templates control member Info (Profiles)
MEMBERINFO - Main
memberinfo_customfields
memberinfo_membergroupbit
Member List Templates
These templates control the members list
memberlist
memberlist_letter
memberlist_resultsbit
memberlist_resultsbit_field
memberlist_results_header
memberlist_search
memberlist_search_optional_input
memberlist_search_radio
memberlist_search_select
memberlist_search_select_multiple
memberlist_search_textbox
Moderation Templates
Moderation Templates for links found in user Cp (Moderator and admin only)
moderation_posts
moderation_threads
Modify User Option Templates
All links in User CP go to these templates so users can edit parts of their Profile etc
modifyattachments
modifyattachmentsbit
modifyavatar
modifyavatarbit
modifyavatarbot_custom
modifyavatarbit_noavatar
modifyavatar_category
modifylist
modifylistbit
modifyoptions
modifyoptions_timezone
modifypassword
modifyprofile
modifyprofilepic
modifyprofile_birthday
modifysignature
modifyusergroups
modifyusergroups_displaybit
modifyusergroups_groupleader
modifyusergroups_joinrequestsbit
modifyusergroups_memberbit
modifyusergroups_nonmemberbit
modifyusergroups_requesttojoin
Navigation/Breadcrumb Templates
These templates control your Navigation bar and the breadcrumb system
navbar
navbar_link
New Posting Templates
Templates for New Posting
newattachment
newattachmentbit
newattachment_errormessage
newattachment_keybit
newpoll
newpost_attachment
newpost_attachmentbit
newpost_disablesmiliesoption
newpost_errormessage
newpost_preview
newpost_quote
newpost_threadmanage
newpost_usernamecode
newreply
newreply_reviewbit
newreply_reviewbit_ignore
newreply_reviewbit_ignore_global
newthread
Page Navigation Templates
Page Navigation Templates for Navigating Pages
pagenav
pagenav_curpage - Current Page
pagenav_pagelink
pagenav_pagelinkrel
Private Message Templates
Templates that control the Private Messages system
pm_editfolderbit
pm_editfolders
pm_emptyfolder
pm_messagelist
pm_messagelistbit
pm_messagelistbit_ignore
pm_messagelistbit_user
pm_messagelist_periodgroup
pm_movepm
pm_newpm
pm_popup_script
pm_receipts
pm_receiptsbit
pm_showpm
pm_trackpm
Poll Templates
Poll templates for polls in posts
polleditbit
pollnewbit
polloption
polloptions_table
polloption_multiple
pollpreview
pollresult
pollresults
pollresults_table
Post Bit Templates
Templates for the post bit part of Posts (User Name, Details etc)
Note that Legacy is vertical
postbit
postbit_attachment
postbit_attachmentimage
postbit_attachmentmoderated
postbit_attachmentthumbnail
postbit_deleted
postbit_external
postbit_ignore
postbit_ignore_global
postbit_ip
postbit_legacy
postbit_onlinestatus
postbit_quickedit
postbit_reputation
postbit_wrapper
Post Icon Templates
Templates that manage the Post Icon part of your forums
posticonbit
posticons
Printable Thread Templates
When threads are printed these templates are used
printthread
printthreadbit
printthreadbit_ignore
Register Templates
Registration Templates used when registering.
Please note certain templates only apply when COPPA is enabled
register
register_coppaform
register_rules
register_verify_age
User Reputation Templates
Templates that control the User Reputation System
reputation
reputationbit
reputation_ajax
reputation_reasonbits
reputation_yourpost
Search Templates
Templates that control the search system
search_forums
search_results
search_results_postbit
search_results_postbit_lastvisit
Show groups Templates
Templates that show groups of your forum
SHOWGROUPS
showgroups_forumbit
showgroups_usergroup
showgroups_usergroupbit
Show thread templates
Templates that control how we see threads
SHOWTHREAD
showthread_list
showthread_quickreply
SHOWTHREAD_SHOWPOST
showthread_similarthreadbit
showthread_similarthreads
Smilie Popup Templates
Smilie Control Templates
smiliepopup
smiliepopup_category
smiliepopup_row
smiliepopup_smilie
smiliepopup_straggler
Subscribed Threads templates
When users subscribe to a thread, These templates control the display etc
SUBSCRIBE
subscribe_choosetype
subscribe_folderbit
subscribe_move
subscribe_showfolders
Paid Subscriptions Templates
Templates that control Paid Subscriptions
subscription
subscription_activebit
subscription_avaliablebit
subscription_payment
subscription_paymentbit
subscription_payment_2checkout
subscription_payment_authorizenet
subscription_payment_ccbill
subscription_payment_moneybookers
subscription_payment_nochex
subscription_payment_paypal
subscription_payment_worldpay
Thread Administration Templates
Templates that control Thread administration it also includes post
THREADADMIN
threadadmin_copyposts
threadadmin_deleteposts
threadadmin_deletethread
threadadmin_deletethreads
threadadmin_editthread
threadadmin_imod_menu_post
threadadmin_imod_menu_thread
threadadmin_logbit
threadadmin_managepost
threadadmin_mergeposts
threadadmin_mergethread
threadadmin_mergethreads
threadadmin_moveposts
threadadmin_movethread
threadadmin_movethreads
threadadmin_postbit
Thread Bit Templates
Thread bit Templates that control threads
threadbit
threadbit_announcment
threadbit_deleted
threadbit_lastvisit
threadbit_pagelink
User Control Panel Templates
Templates that control the User CP
USERCP
usercp_nav_folderbit
usercp_reputationbits
USERCP_SHELL - Nav of User Cp etc
User Profile Field Templates
Templates that control User Profile Fields
userfield_checkbox_option
userfield_optional_input
userfield_radio
userfield_radio_option
userfield_select
userfield_select_multiple
userfield_select_option
userfield_textarea
userfield_textbox
User Infraction Templates
Templates that control the User Infraction System
userinfraction
userinfractionbit
userinfraction_banbit
userinfraction_groupbit
userinfraction_infobit
userinfraction_view
User Note Tempaltes
Templates that control the User Notes System
usernote
usernote_note
Who Posted? Templates
Templates that show, Well Who posted!
WHOPOSTED
whopostedbit
Who's Online Templates
Whos online control templates
WHOSONLINE
whosonlinebit
whosonline_resolveip
-------------------------------------------
2. Editing Templates
Editing Templates is as easy as closing and opening a forum all you need to do is click on a template you wish to use then it will redirect you to a page which will have a big text field with all the code from that template in it
For example the footer template (From vb 3.6.2 using default theme)
<br />
<div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
<div align="center">
<div class="smallfont" align="center">
<!-- Do not remove this copyright notice -->
$vbphrase[powered_by_vbulletin]
<!-- Do not remove this copyright notice -->
</div>
<div class="smallfont" align="center">
<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
$cronimage
<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
$vboptions[copyrighttext]
</div>
</div>
</form>
<if condition="$show['dst_correction']">
<!-- auto DST correction code -->
<form action="profile.php" method="post" name="dstform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="dst" />
</form>
<script type="text/javascript">
<!--
var tzOffset = $bbuserinfo[timezoneoffset] + $bbuserinfo[dstonoff];
var utcOffset = new Date().getTimezoneOffset() / 60;
if (Math.abs(tzOffset + utcOffset) == 1)
{ // Dst offset is 1 so its changed
document.forms.dstform.submit();
}
//-->
</script>
<!-- / auto DST correction code -->
</if>
<script type="text/javascript">
<!--
// Main vBulletin Javascript Initialization
vBulletin_init();
//-->
</script>
<br />
$spacer_close
<!-- /content area table -->
<form action="$vboptions[forumhome].php" method="get">
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[outertablewidth]" class="page" align="center">
<tr>
<if condition="$show['quickchooser']">
<td class="tfoot">
<select name="styleid" onchange="switch_id(this, 'style')">
<optgroup label="$vbphrase[quick_style_chooser]">
$quickchooserbits
</optgroup>
</select>
</td>
</if>
<if condition="$show['languagechooser']">
<td class="tfoot">
<select name="langid" onchange="switch_id(this, 'lang')">
<optgroup label="$vbphrase[quick_language_chooser]">
$languagechooserbits
</optgroup>
</select>
</td>
</if>
<td class="tfoot" align="$stylevar[right]" width="100%">
<div class="smallfont">
<strong>
<if condition="$show['contactus']"><a href="$vboptions[contactuslink]" rel="nofollow">$vbphrase[contact_us]</a> -</if>
<if condition="$vboptions['hometitle']"><a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -</if>
<if condition="$show['admincplink']"><a href="$admincpdir/index.php$session[sessionurl_q]">$vbphrase[admin]</a> -</if>
<if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if>
<if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if>
<if condition="$vboptions[privacyurl]"><a href="$vboptions[privacyurl]">$vbphrase[privacy_statement]</a> -</if>
<a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a>
</strong>
</div>
</td>
</tr>
</table>
So what do all the varibales mean you may ask ?
$vboptions = Options selected from the Options administration Page
$vbphrase = VB Language Phrase
$show = Show to the right people
$stylevar = A var of the style you are using
var = Javascript Object
$admincpdir = Admin CP directory
$modcpdir = Mod CP directory
Quite simple isn't it ?
-------------------------------------------
4. EDITING : How to edit User Control Panel Parts
To edit these user control panel parts you must first decide what do you want to edit because certain parts of the templates control this bit for example all the user control panel templates control the main apperance but all the user option templates operate the main user option items. If your looking to edit the User CP Navigation menu and a optionitem
as this Example covers then continue on
Editing the USER CP Nav
To edit the user cp nav go into templates and select User Control Panel templates then go into USERCP_SHELL as we will be working on this template
Search for the main user cp nav
<!-- usercp nav -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0">
<tr>
<td class="tcat"><a href="usercp.php$session[sessionurl_q]">$vbphrase[control_panel]</a></td>
</tr>
<tr>
<td class="thead">$vbphrase[settings_and_options]</td>
</tr>
<if condition="$show['siglink']">
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td>
</tr>
</if>
<tr>
<td class="$navclass[password]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editpassword">$vbphrase[edit_email_and_password]</a></td>
</tr>
<tr>
<td class="$navclass[profile]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td>
</tr>
<tr>
<td class="$navclass[options]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td>
</tr>
<if condition="$show['avatarlink']">
<tr>
<td class="$navclass[avatar]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td>
</tr>
</if>
<if condition="$show['profilepiclink']">
<tr>
<td class="$navclass[profilepic]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editprofilepic">$vbphrase[edit_profile_picture]</a></td>
</tr>
</if>
<if condition="$show['pmmainlink']">
<tr>
<td class="thead" nowrap="nowrap">
<span id="nav_pmfolders">$vbphrase[private_messages] <if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("nav_pmfolders"); </script></if></span>
<if condition="$show['popups']">
<div class="vbmenu_popup" id="nav_pmfolders_menu" style="display:<if condition="$show['popups']">none<else />block</if>">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[folders]</td>
</tr>
$cpnav[pmfolders]
</table>
</div>
</if>
</td>
</tr>
<tr>
<td class="$navclass[pm_messagelist]" nowrap="nowrap"><a class="smallfont" href="private.php$session[sessionurl_q]">$vbphrase[list_messages]</a></td>
</tr>
<if condition="$show['pmsendlink']">
<tr>
<td class="$navclass[pm_newpm]" nowrap="nowrap"><a class="smallfont" href="private.php?$session[sessionurl]do=newpm">$vbphrase[send_new_message]</a></td>
</tr>
</if>
<if condition="$show['pmtracklink']">
<tr>
<td class="$navclass[pm_trackpm]" nowrap="nowrap"><a class="smallfont" href="private.php?$session[sessionurl]do=trackpm">$vbphrase[track_messages]</a></td>
</tr>
</if>
<tr>
<td class="$navclass[pm_editfolders]" nowrap="nowrap"><a class="smallfont" href="private.php?$session[sessionurl]do=editfolders">$vbphrase[edit_folders]</a></td>
</tr>
</if>
<tr>
<td class="thead" nowrap="nowrap">
<span id="nav_subsfolders">$vbphrase[subscribed_threads] <if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("nav_subsfolders"); </script></if></span>
<if condition="$show['popups']">
<div class="vbmenu_popup" id="nav_subsfolders_menu" style="display:<if condition="$show['popups']">none<else />block</if>">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[folders]</td>
</tr>
$cpnav[subsfolders]
</table>
</div>
</if>
</td>
</tr>
<tr>
<td class="$navclass[substhreads_listthreads]" nowrap="nowrap"><a class="smallfont" href="subscription.php?$session[sessionurl]do=viewsubscription">$vbphrase[list_subscriptions]</a></td>
</tr>
<tr>
<td class="$navclass[substhreads_editfolders]" nowrap="nowrap"><a class="smallfont" href="subscription.php?$session[sessionurl]do=editfolders">$vbphrase[edit_folders]</a></td>
</tr>
<if condition="$show['deleteditems'] OR $show['moderateditems']">
<tr>
<td class="thead">$vbphrase[moderation]</td>
</tr>
<if condition="$show['deleteditems']">
<tr>
<td class="$navclass[deletedthreads]" nowrap="nowrap"><a class="smallfont" href="moderation.php?$session[sessionurl]do=viewthreads&type=deleted">$vbphrase[deleted_threads]</a></td>
</tr>
<tr>
<td class="$navclass[deletedposts]" nowrap="nowrap"><a class="smallfont" href="moderation.php?$session[sessionurl]do=viewposts&type=deleted">$vbphrase[deleted_posts]</a></td>
</tr>
</if>
<if condition="$show['moderateditems']">
<tr>
<td class="$navclass[moderatedthreads]" nowrap="nowrap"><a class="smallfont" href="moderation.php?$session[sessionurl]do=viewthreads&type=moderated">$vbphrase[moderated_threads]</a></td>
</tr>
<tr>
<td class="$navclass[moderatedposts]" nowrap="nowrap"><a class="smallfont" href="moderation.php?$session[sessionurl]do=viewposts&type=moderated">$vbphrase[moderated_posts]</a></td>
</tr>
</if>
</if>
<tr>
<td class="thead">$vbphrase[miscellaneous]</td>
</tr>
<tr>
<td class="$navclass[event_reminders]" nowrap="nowrap"><a class="smallfont" href="calendar.php?$session[sessionurl]do=viewreminder">$vbphrase[event_reminders]</a></td>
</tr>
<if condition="$show['paidsubscriptions']">
<tr>
<td class="$navclass[paid_subscriptions]" nowrap="nowrap"><a class="smallfont" href="payments.php$session[sessionurl_q]">$vbphrase[paid_subscriptions]</a></td>
</tr>
</if>
<if condition="$show['publicgroups']">
<tr>
<td class="$navclass[usergroups]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editusergroups">$vbphrase[group_memberships]</a></td>
</tr>
</if>
<tr>
<td class="$navclass" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editlist">$vbphrase[buddy_ignore_lists]</a></td>
</tr>
<if condition="$show['attachments']">
<tr>
<td class="$navclass[attachments]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editattachments">$vbphrase[attachments]</a></td>
</tr>
</if>
</table>
<!-- / usercp nav -->
Now to edit or remove some of it just remove the required item just look for the $navclass item because $navclass = Navigation Item so if I wanted to remove the attachments like I would remove :
<tr>
<td class="$navclass[attachments]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editattachments">$vbphrase[attachments]</a></td>
</tr>
$vbphrase = Language Phrase
Because we have removed the <tr> tags along with the main item, If you don't remove the <tr> tags you will just get a blank part of your usercp
Quite Simple to do that isn't it ?
-----------------------------------------
[B]5. Creating your own Templates and linking them through pages
Creating your own templates is as easy as making a new template, Just go onto your Style manager again and select Add new Template
Insert this into the template and name the template 'test' (Without Commas)
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions</title>
$headinclude
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">Title</td>
</tr>
<tr>
<td class="alt1">Text</td>
</tr>
</table>
$footer
</body>
</html>
Then make a file called tester.php and place this into it :
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'tester');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'test',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
$navbits[$parent] = 'Test Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('tester') . '");');
?>
As you can see the Global Templates part is where you can edit it to match your templates required you can also edit the navbits at the bottom to change what should display in the navbar. You also have to change the THIS_SCRIPT constant to match your file name
----------------------------------------------
[B]6. Closing
Thank you all for reading this guide on vBulletin Templates, I hope you have learned something from the guide. Please note that I did have to write all those templates out all by myself and it took a while so I would appreciate it if you didn't copy this article without my permission.
Thank you all!
Mainly Focused at beginners but can be useful for other users of Vbulletin
Please note that the beginning of the article (Template Names) is a big bit of the article but there is more
--------------------------------------------
In this guide we will cover the following aspects of templates in vbulletin
1. Templates Names and What they control
2. How to edit them
4. How to edit User Control Panel Option Parts (Example Editing Item)
5. Creating your own Templates and linking them through pages
6. Closing
-----------------------------------------------
1. Template names and what they control
So first to acctualy do anything good you need to know what certain templates control etc. Please note that uncategorised templates are templates with no category
Uncategorised Templates
activateform
activate_requestemail
attachmentbit
ATTACHMENTS
board_inactive_warning
contactus
contactus_option
editpoll
editpost
footer
forumjump
forumrules
GENERIC_SHELL
gobutton
header
headerinclude
imagereg
JOINREQUESTS
joinrequestsbit
lostpw
mailform
optgroup
option
reportbadpost
sendtofriend
shell_blank
spacer_close
spacer_open
STANDARD_ERROR
STANDARD_ERROR_LITE
STANDARD_ERROR_LOGIN
STANDARD_REDIRECT
ANNOUNCMENT TEMPLATES
These Templates control the announcments section of your site
announcment
announcment_edit
BB CODE TEMPLATES
All these templates manage the BBcode items
- bbcode_code
- bbcode_code_printable
- bbcode_html
- bbcode_html_printable
- bbcode_php
- bbcode_php_printable
- bbcode_quote
- bbcode_quote_printable
BUDDY LIST TEMPLATES
Templates that control the buddy list system
BUDDYLIST
buddylistbit
CALENDER TEMPLATES
Calender System Templates
CALENDER
calenderjump
calenderjumpbit
calender_edit
calender_edit_customfield
calender_edit_recurrence
calender_manage
calender_monthly
calender_monthly_birthday
calender_monthly_day
calender_monthly_day_other
calender_monthly_event
calender_monthly_header
calender_monthly_week
CALENDER_REMINDER
calender_reminder_choosetype
calender_reminder_eventbit
calender_showbirthdays
calender_showevents
calender_showeventsbit
calender_showeventsbit_customfield
calender_smallmonth_day
calender_smallmonth_day_other
calender_smallmonth_header
calender_smallmonth_week
calender_weekly
calender_weekly_day
calender_weekly_events
calender_yearly
Editor Templates
These templates control the editor parts of Threads etc.
editor_clientscript
editor_smilie
editor_smiliebox
editor_smiliebox_category
editor_smiliebox_row
editor_smiliebox_straggler
editor_toolbar_off
editor_toolbar_on
FAQ Templates
All these templates control the FAQ of your forum
FAQ
faqbit
faqbit_link
Forum Display Templates
All these templates control the Forum Display parts of your forums
FORUMDISPLAY
forumdisplay_loggedinuser
forumdisplay_moderator
forumdisplay_sortarrow
Forum Home Templates
These Templates control your forum home items
FORUMHOME - Main Forumhome template (index.php)
forumhome_event
forumhome_forumbit_level1_nopost
forumhome_forumbit_level1_post
forumhome_forumbit_level2_nopost
forumhome_forumbit_level2_post
forumhome_lastpostby
forumhome_loggedinuser
forumhome_markread_script
forumhome_moderator
forumhome_subforumbit_nopost
forumhome_subforumbit_post
forumhome_subforumseparator_nopost
forumhome_subforumseparator_post
Help Templates
These templates cover the help part of your Forum
help_avatars
help_avatars_avatar
help_avatars_category
help_avatars_row
help_bbcodes
help_bbcodes_bbcode
help_bbcodes_link
help_smilies
help_smilies_category
help_smilies_smilie
Instant Messaging templates
These templates control the instant messaging Popups
im_icq - ICQ
im_message - Message Sending
im_msn - MSN
im_send_aim - SEND TO AIM
im_send_icq - ICQ SEND
im_send_msn - MSN SEND
im_send_skype - SKYPE SEND
im_send_yahoo - YAHOO! SEND
im_skype - SKYPE
im_yahoo - YAHOO!
Member Info Templates
All these templates control member Info (Profiles)
MEMBERINFO - Main
memberinfo_customfields
memberinfo_membergroupbit
Member List Templates
These templates control the members list
memberlist
memberlist_letter
memberlist_resultsbit
memberlist_resultsbit_field
memberlist_results_header
memberlist_search
memberlist_search_optional_input
memberlist_search_radio
memberlist_search_select
memberlist_search_select_multiple
memberlist_search_textbox
Moderation Templates
Moderation Templates for links found in user Cp (Moderator and admin only)
moderation_posts
moderation_threads
Modify User Option Templates
All links in User CP go to these templates so users can edit parts of their Profile etc
modifyattachments
modifyattachmentsbit
modifyavatar
modifyavatarbit
modifyavatarbot_custom
modifyavatarbit_noavatar
modifyavatar_category
modifylist
modifylistbit
modifyoptions
modifyoptions_timezone
modifypassword
modifyprofile
modifyprofilepic
modifyprofile_birthday
modifysignature
modifyusergroups
modifyusergroups_displaybit
modifyusergroups_groupleader
modifyusergroups_joinrequestsbit
modifyusergroups_memberbit
modifyusergroups_nonmemberbit
modifyusergroups_requesttojoin
Navigation/Breadcrumb Templates
These templates control your Navigation bar and the breadcrumb system
navbar
navbar_link
New Posting Templates
Templates for New Posting
newattachment
newattachmentbit
newattachment_errormessage
newattachment_keybit
newpoll
newpost_attachment
newpost_attachmentbit
newpost_disablesmiliesoption
newpost_errormessage
newpost_preview
newpost_quote
newpost_threadmanage
newpost_usernamecode
newreply
newreply_reviewbit
newreply_reviewbit_ignore
newreply_reviewbit_ignore_global
newthread
Page Navigation Templates
Page Navigation Templates for Navigating Pages
pagenav
pagenav_curpage - Current Page
pagenav_pagelink
pagenav_pagelinkrel
Private Message Templates
Templates that control the Private Messages system
pm_editfolderbit
pm_editfolders
pm_emptyfolder
pm_messagelist
pm_messagelistbit
pm_messagelistbit_ignore
pm_messagelistbit_user
pm_messagelist_periodgroup
pm_movepm
pm_newpm
pm_popup_script
pm_receipts
pm_receiptsbit
pm_showpm
pm_trackpm
Poll Templates
Poll templates for polls in posts
polleditbit
pollnewbit
polloption
polloptions_table
polloption_multiple
pollpreview
pollresult
pollresults
pollresults_table
Post Bit Templates
Templates for the post bit part of Posts (User Name, Details etc)
Note that Legacy is vertical
postbit
postbit_attachment
postbit_attachmentimage
postbit_attachmentmoderated
postbit_attachmentthumbnail
postbit_deleted
postbit_external
postbit_ignore
postbit_ignore_global
postbit_ip
postbit_legacy
postbit_onlinestatus
postbit_quickedit
postbit_reputation
postbit_wrapper
Post Icon Templates
Templates that manage the Post Icon part of your forums
posticonbit
posticons
Printable Thread Templates
When threads are printed these templates are used
printthread
printthreadbit
printthreadbit_ignore
Register Templates
Registration Templates used when registering.
Please note certain templates only apply when COPPA is enabled
register
register_coppaform
register_rules
register_verify_age
User Reputation Templates
Templates that control the User Reputation System
reputation
reputationbit
reputation_ajax
reputation_reasonbits
reputation_yourpost
Search Templates
Templates that control the search system
search_forums
search_results
search_results_postbit
search_results_postbit_lastvisit
Show groups Templates
Templates that show groups of your forum
SHOWGROUPS
showgroups_forumbit
showgroups_usergroup
showgroups_usergroupbit
Show thread templates
Templates that control how we see threads
SHOWTHREAD
showthread_list
showthread_quickreply
SHOWTHREAD_SHOWPOST
showthread_similarthreadbit
showthread_similarthreads
Smilie Popup Templates
Smilie Control Templates
smiliepopup
smiliepopup_category
smiliepopup_row
smiliepopup_smilie
smiliepopup_straggler
Subscribed Threads templates
When users subscribe to a thread, These templates control the display etc
SUBSCRIBE
subscribe_choosetype
subscribe_folderbit
subscribe_move
subscribe_showfolders
Paid Subscriptions Templates
Templates that control Paid Subscriptions
subscription
subscription_activebit
subscription_avaliablebit
subscription_payment
subscription_paymentbit
subscription_payment_2checkout
subscription_payment_authorizenet
subscription_payment_ccbill
subscription_payment_moneybookers
subscription_payment_nochex
subscription_payment_paypal
subscription_payment_worldpay
Thread Administration Templates
Templates that control Thread administration it also includes post
THREADADMIN
threadadmin_copyposts
threadadmin_deleteposts
threadadmin_deletethread
threadadmin_deletethreads
threadadmin_editthread
threadadmin_imod_menu_post
threadadmin_imod_menu_thread
threadadmin_logbit
threadadmin_managepost
threadadmin_mergeposts
threadadmin_mergethread
threadadmin_mergethreads
threadadmin_moveposts
threadadmin_movethread
threadadmin_movethreads
threadadmin_postbit
Thread Bit Templates
Thread bit Templates that control threads
threadbit
threadbit_announcment
threadbit_deleted
threadbit_lastvisit
threadbit_pagelink
User Control Panel Templates
Templates that control the User CP
USERCP
usercp_nav_folderbit
usercp_reputationbits
USERCP_SHELL - Nav of User Cp etc
User Profile Field Templates
Templates that control User Profile Fields
userfield_checkbox_option
userfield_optional_input
userfield_radio
userfield_radio_option
userfield_select
userfield_select_multiple
userfield_select_option
userfield_textarea
userfield_textbox
User Infraction Templates
Templates that control the User Infraction System
userinfraction
userinfractionbit
userinfraction_banbit
userinfraction_groupbit
userinfraction_infobit
userinfraction_view
User Note Tempaltes
Templates that control the User Notes System
usernote
usernote_note
Who Posted? Templates
Templates that show, Well Who posted!
WHOPOSTED
whopostedbit
Who's Online Templates
Whos online control templates
WHOSONLINE
whosonlinebit
whosonline_resolveip
-------------------------------------------
2. Editing Templates
Editing Templates is as easy as closing and opening a forum all you need to do is click on a template you wish to use then it will redirect you to a page which will have a big text field with all the code from that template in it
For example the footer template (From vb 3.6.2 using default theme)
<br />
<div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
<div align="center">
<div class="smallfont" align="center">
<!-- Do not remove this copyright notice -->
$vbphrase[powered_by_vbulletin]
<!-- Do not remove this copyright notice -->
</div>
<div class="smallfont" align="center">
<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
$cronimage
<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
$vboptions[copyrighttext]
</div>
</div>
</form>
<if condition="$show['dst_correction']">
<!-- auto DST correction code -->
<form action="profile.php" method="post" name="dstform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="dst" />
</form>
<script type="text/javascript">
<!--
var tzOffset = $bbuserinfo[timezoneoffset] + $bbuserinfo[dstonoff];
var utcOffset = new Date().getTimezoneOffset() / 60;
if (Math.abs(tzOffset + utcOffset) == 1)
{ // Dst offset is 1 so its changed
document.forms.dstform.submit();
}
//-->
</script>
<!-- / auto DST correction code -->
</if>
<script type="text/javascript">
<!--
// Main vBulletin Javascript Initialization
vBulletin_init();
//-->
</script>
<br />
$spacer_close
<!-- /content area table -->
<form action="$vboptions[forumhome].php" method="get">
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[outertablewidth]" class="page" align="center">
<tr>
<if condition="$show['quickchooser']">
<td class="tfoot">
<select name="styleid" onchange="switch_id(this, 'style')">
<optgroup label="$vbphrase[quick_style_chooser]">
$quickchooserbits
</optgroup>
</select>
</td>
</if>
<if condition="$show['languagechooser']">
<td class="tfoot">
<select name="langid" onchange="switch_id(this, 'lang')">
<optgroup label="$vbphrase[quick_language_chooser]">
$languagechooserbits
</optgroup>
</select>
</td>
</if>
<td class="tfoot" align="$stylevar[right]" width="100%">
<div class="smallfont">
<strong>
<if condition="$show['contactus']"><a href="$vboptions[contactuslink]" rel="nofollow">$vbphrase[contact_us]</a> -</if>
<if condition="$vboptions['hometitle']"><a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -</if>
<if condition="$show['admincplink']"><a href="$admincpdir/index.php$session[sessionurl_q]">$vbphrase[admin]</a> -</if>
<if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if>
<if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if>
<if condition="$vboptions[privacyurl]"><a href="$vboptions[privacyurl]">$vbphrase[privacy_statement]</a> -</if>
<a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a>
</strong>
</div>
</td>
</tr>
</table>
So what do all the varibales mean you may ask ?
$vboptions = Options selected from the Options administration Page
$vbphrase = VB Language Phrase
$show = Show to the right people
$stylevar = A var of the style you are using
var = Javascript Object
$admincpdir = Admin CP directory
$modcpdir = Mod CP directory
Quite simple isn't it ?
-------------------------------------------
4. EDITING : How to edit User Control Panel Parts
To edit these user control panel parts you must first decide what do you want to edit because certain parts of the templates control this bit for example all the user control panel templates control the main apperance but all the user option templates operate the main user option items. If your looking to edit the User CP Navigation menu and a optionitem
as this Example covers then continue on
Editing the USER CP Nav
To edit the user cp nav go into templates and select User Control Panel templates then go into USERCP_SHELL as we will be working on this template
Search for the main user cp nav
<!-- usercp nav -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0">
<tr>
<td class="tcat"><a href="usercp.php$session[sessionurl_q]">$vbphrase[control_panel]</a></td>
</tr>
<tr>
<td class="thead">$vbphrase[settings_and_options]</td>
</tr>
<if condition="$show['siglink']">
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td>
</tr>
</if>
<tr>
<td class="$navclass[password]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editpassword">$vbphrase[edit_email_and_password]</a></td>
</tr>
<tr>
<td class="$navclass[profile]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td>
</tr>
<tr>
<td class="$navclass[options]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td>
</tr>
<if condition="$show['avatarlink']">
<tr>
<td class="$navclass[avatar]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td>
</tr>
</if>
<if condition="$show['profilepiclink']">
<tr>
<td class="$navclass[profilepic]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editprofilepic">$vbphrase[edit_profile_picture]</a></td>
</tr>
</if>
<if condition="$show['pmmainlink']">
<tr>
<td class="thead" nowrap="nowrap">
<span id="nav_pmfolders">$vbphrase[private_messages] <if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("nav_pmfolders"); </script></if></span>
<if condition="$show['popups']">
<div class="vbmenu_popup" id="nav_pmfolders_menu" style="display:<if condition="$show['popups']">none<else />block</if>">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[folders]</td>
</tr>
$cpnav[pmfolders]
</table>
</div>
</if>
</td>
</tr>
<tr>
<td class="$navclass[pm_messagelist]" nowrap="nowrap"><a class="smallfont" href="private.php$session[sessionurl_q]">$vbphrase[list_messages]</a></td>
</tr>
<if condition="$show['pmsendlink']">
<tr>
<td class="$navclass[pm_newpm]" nowrap="nowrap"><a class="smallfont" href="private.php?$session[sessionurl]do=newpm">$vbphrase[send_new_message]</a></td>
</tr>
</if>
<if condition="$show['pmtracklink']">
<tr>
<td class="$navclass[pm_trackpm]" nowrap="nowrap"><a class="smallfont" href="private.php?$session[sessionurl]do=trackpm">$vbphrase[track_messages]</a></td>
</tr>
</if>
<tr>
<td class="$navclass[pm_editfolders]" nowrap="nowrap"><a class="smallfont" href="private.php?$session[sessionurl]do=editfolders">$vbphrase[edit_folders]</a></td>
</tr>
</if>
<tr>
<td class="thead" nowrap="nowrap">
<span id="nav_subsfolders">$vbphrase[subscribed_threads] <if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("nav_subsfolders"); </script></if></span>
<if condition="$show['popups']">
<div class="vbmenu_popup" id="nav_subsfolders_menu" style="display:<if condition="$show['popups']">none<else />block</if>">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[folders]</td>
</tr>
$cpnav[subsfolders]
</table>
</div>
</if>
</td>
</tr>
<tr>
<td class="$navclass[substhreads_listthreads]" nowrap="nowrap"><a class="smallfont" href="subscription.php?$session[sessionurl]do=viewsubscription">$vbphrase[list_subscriptions]</a></td>
</tr>
<tr>
<td class="$navclass[substhreads_editfolders]" nowrap="nowrap"><a class="smallfont" href="subscription.php?$session[sessionurl]do=editfolders">$vbphrase[edit_folders]</a></td>
</tr>
<if condition="$show['deleteditems'] OR $show['moderateditems']">
<tr>
<td class="thead">$vbphrase[moderation]</td>
</tr>
<if condition="$show['deleteditems']">
<tr>
<td class="$navclass[deletedthreads]" nowrap="nowrap"><a class="smallfont" href="moderation.php?$session[sessionurl]do=viewthreads&type=deleted">$vbphrase[deleted_threads]</a></td>
</tr>
<tr>
<td class="$navclass[deletedposts]" nowrap="nowrap"><a class="smallfont" href="moderation.php?$session[sessionurl]do=viewposts&type=deleted">$vbphrase[deleted_posts]</a></td>
</tr>
</if>
<if condition="$show['moderateditems']">
<tr>
<td class="$navclass[moderatedthreads]" nowrap="nowrap"><a class="smallfont" href="moderation.php?$session[sessionurl]do=viewthreads&type=moderated">$vbphrase[moderated_threads]</a></td>
</tr>
<tr>
<td class="$navclass[moderatedposts]" nowrap="nowrap"><a class="smallfont" href="moderation.php?$session[sessionurl]do=viewposts&type=moderated">$vbphrase[moderated_posts]</a></td>
</tr>
</if>
</if>
<tr>
<td class="thead">$vbphrase[miscellaneous]</td>
</tr>
<tr>
<td class="$navclass[event_reminders]" nowrap="nowrap"><a class="smallfont" href="calendar.php?$session[sessionurl]do=viewreminder">$vbphrase[event_reminders]</a></td>
</tr>
<if condition="$show['paidsubscriptions']">
<tr>
<td class="$navclass[paid_subscriptions]" nowrap="nowrap"><a class="smallfont" href="payments.php$session[sessionurl_q]">$vbphrase[paid_subscriptions]</a></td>
</tr>
</if>
<if condition="$show['publicgroups']">
<tr>
<td class="$navclass[usergroups]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editusergroups">$vbphrase[group_memberships]</a></td>
</tr>
</if>
<tr>
<td class="$navclass" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editlist">$vbphrase[buddy_ignore_lists]</a></td>
</tr>
<if condition="$show['attachments']">
<tr>
<td class="$navclass[attachments]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editattachments">$vbphrase[attachments]</a></td>
</tr>
</if>
</table>
<!-- / usercp nav -->
Now to edit or remove some of it just remove the required item just look for the $navclass item because $navclass = Navigation Item so if I wanted to remove the attachments like I would remove :
<tr>
<td class="$navclass[attachments]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editattachments">$vbphrase[attachments]</a></td>
</tr>
$vbphrase = Language Phrase
Because we have removed the <tr> tags along with the main item, If you don't remove the <tr> tags you will just get a blank part of your usercp
Quite Simple to do that isn't it ?
-----------------------------------------
[B]5. Creating your own Templates and linking them through pages
Creating your own templates is as easy as making a new template, Just go onto your Style manager again and select Add new Template
Insert this into the template and name the template 'test' (Without Commas)
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions</title>
$headinclude
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">Title</td>
</tr>
<tr>
<td class="alt1">Text</td>
</tr>
</table>
$footer
</body>
</html>
Then make a file called tester.php and place this into it :
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'tester');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'test',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
$navbits[$parent] = 'Test Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('tester') . '");');
?>
As you can see the Global Templates part is where you can edit it to match your templates required you can also edit the navbits at the bottom to change what should display in the navbar. You also have to change the THIS_SCRIPT constant to match your file name
----------------------------------------------
[B]6. Closing
Thank you all for reading this guide on vBulletin Templates, I hope you have learned something from the guide. Please note that I did have to write all those templates out all by myself and it took a while so I would appreciate it if you didn't copy this article without my permission.
Thank you all!