Page Index Toggle Pages: 1 Print
 How to add a new Template to YaBB 2.x.x / 2.3.x (Read 5104 times)
Captain John
Ex Member


 How to add a new Template to YaBB 2.x.x / 2.3.x
Jan 13th, 2008 at 8:12pm
Print Post  
YaBB 2.2.x / 2.3.x introduces a new way of 'Skinning YaBB'. A complete template-set for YaBB 2.2.x / 2.3.x includes:

   * a CSS file
   * a html template
   * a BoardIndex template
   * a MessageIndex template
   * a Display template
   * a MyCenter template
   * a HelpCentre template
   * a set of images


All elements in a Template-set are optional - meaning, if you only want to make changes to the looks of the Board Index you only have to include the "cgi-bin/yabb2/Templates/templatename/BoardIndex.template" file in your Template-set.

The folder-structure for a Template-set (New Style) is:

public_html/yabbfiles/Templates/Forum/templatename.css      (style sheet)
public_html/yabbfiles/Templates/Forum/templatename/*.gif      (images)

cgi-bin/yabb2/Templates/templatename/AdminCentre.template
cgi-bin/yabb2/Templates/templatename/BoardIndex.template
cgi-bin/yabb2/Templates/templatename/MessageIndex.template
cgi-bin/yabb2/Templates/templatename/Display.template
cgi-bin/yabb2/Templates/templatename/HelpCentre.template
cgi-bin/yabb2/Templates/templatename/Mycenter.template
cgi-bin/yabb2/Templates/templatename/templatename.html

Further more you can add a configuration file to have YaBB 2.2.x / 2.3.x automatically add the new template-set to the system:

cgi-bin/yabb2/Templates/templatename/templatename.cfg

The configuration file is a simple text file in this format:

Code
Select All
###############################################################################
# Template Configuration                                                      #
###############################################################################

$template_name = "Templatename";	# This is the name of your new template set (max. 50 characters).
$template_css = 1;			# Set to 1 if your template set includes a style sheet else 0 to use default.
$template_images = 1;			# Set to 1 if your template set includes a images folder else 0 to use default.
$template_head = 1;			# Set to 1 if your template set includes a head file (.html) else 0 to use default.
$template_board = 1;			# Set to 1 if your template set includes a BoardIndex template else 0 to use default.
$template_message = 1;			# Set to 1 if your template set includes a MessageIndex template else 0 to use default.
$template_display = 1;			# Set to 1 if your template set includes a Display template else 0 to use default.
$template_mycenter = 1; 		# Set to 1 if your template set includes a MyCenter template else 0 to use default.

1; 



The config. file will add the template-set to YaBB 2.2.x / 2.3.x's 'template.cfg' file and then automatically be deleted.

In the images folder you only need to add the images you want changed - YaBB 2.2.x will automatically use the 'default' images for the rest.

If you add new Template with old YaBB 2.1 Style, add 21 after your template folder- / filename. Then they will be compatibel also with some Mods in BoardMod

Example:
cgi-bin/yabb2/Templates/templatename21/templatename21.html
cgi-bin/yabb2/Templates/templatename/templatename21.cfg

public_html/yabbfiles/Templates/Forum/templatename21/
public_html/yabbfiles/Templates/Forum/templatename21.css
     


per Jet Li
« Last Edit: Dec 27th, 2008 at 3:39pm by »  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re:  How to add a new Template to YaBB 2.x.x / 2.3.x
Reply #1 - Feb 27th, 2009 at 12:24am
Print Post  
Simply adding a New Template to the forum

There should be included in the Template zip you are going to install
2 folders

yabb2/Templates/NewTemplateName  <--- The actual Template files
yabbfiles/Templates/Forum/NewYemplateName  <--- The graphics required for the Template

 Note there will be a NewTemplateName.css file in the yabbfiles/Template/Forum folder that also requires uploading.

Some (not many) might include a
yabbfiles/Buttons/English    <--- which would contain NEW Graphic Buttons for the New Template
  Note these buttons would be upload to the same folder which already exists, overwrting the default buttons.

Note ALL graphic images should be uploaded using Binary Transfer mode and CHMOD of 755

  Once the New folders have been uploaded and CHMOD, Go to the Admin Center > Template Configuration and Select in ALL the drop down windows, the NewTemplateName,  Type in the NewTemplateName in the bottom "Save as" window and Save.
  
Back to top
 
IP Logged
 
OH Eng
Ex Member


Re:  How to add a new Template to YaBB 2.x.x / 2.3.x
Reply #2 - May 9th, 2009 at 6:01pm
Print Post  
For version 2.4, follow this procedure
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Print
 
  « Board Index ‹ Board  ^Top