Page Index Toggle Pages: [1] 2 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) How to add a new Template to YaBB2 (Read 34371 times)
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
How to add a new Template to YaBB2
Jan 11th, 2005 at 4:24am
Print Post  
YaBB 2 introduces a new way of 'Skinning YaBB'. A complete template-set for YaBB 2 includes:
  • a CSS file
  • a html template
  • a BoardIndex template
  • a MessageIndex template
  • a Display 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 is:

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

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/templatename.html


Further more you can add a configuration file to have YaBB 2 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.

1;
 



The config. file will add the template-set to YaBB 2'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 will automatically use the 'default' images for the rest.

Use the attached template-set as example - enjoy!
« Last Edit: Sep 9th, 2005 at 3:43pm by Carsten »  

cd01_template.zip ( 20 KB | Downloads )

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
TopHouse
Senior Member
****
Offline


The Top House

Posts: 297
Location: Manchester
Joined: Feb 15th, 2003
Gender: Male
Re: How to add a new Template to YaBB2
Reply #1 - Mar 24th, 2005 at 1:29am
Print Post  
Carsten, I used your nicer color setup mod on my Yabb board, I think you said a version of it is included in Yabb2, it the above the same thing?

I'm have my board set up with a really nice design and colors that took me ages to get right and I'm really happy with it. It's at :-

http://www.thetophouse.com/cgi-bin/yabb/YaBB.cgi

When Yabb2 is is in final, will I be able to make it look the same as this?

I'm so happy with it that if I knew how I'd submit a template to the template vault for it.
  
Back to top
WWW  
IP Logged
 
George Williams
Guest


Re: How to add a new Template to YaBB2
Reply #2 - Aug 6th, 2005 at 12:24pm
Print Post  
I installed Yabb 2 RC 3 and everything is working - If I want to modify the the main board screen what is the name of the file and location ?

Thanks
  
Back to top
 
IP Logged
 
Curtiss Grymala
God Member
*****
Offline


YaBB?... Y Not?

Posts: 1314
Joined: Apr 12th, 2004
Gender: Male
Re: How to add a new Template to YaBB2
Reply #3 - Aug 6th, 2005 at 2:29pm
Print Post  
Quote:
I installed Yabb 2 RC 3 and everything is working - If I want to modify the the main board screen what is the name of the file and location ?

Thanks


Go to your Admin Center and click on Templates.  The first file that will be displayed in the editor is your main template file.  This will control everything above, below, and around the YaBB contents.  Then, if you choose default.BoardIndex from the dropdown menu, that will bring up the template for your YaBB content that displays on the main page.
  

Currently using Y2.3 With no mods (though that will hopefully change, soon).

Click Here To See A List Of All The Mods I've Written
Back to top
WWW  
IP Logged
 
Skyflame
New Member
*
Offline


SGW Rocks

Posts: 14
Location: UK
Joined: Sep 8th, 2005
Gender: Female
Re: How to add a new Template to YaBB2
Reply #4 - Sep 10th, 2005 at 10:45am
Print Post  
How do I replace the menu buttons...without erasing the originals? Undecided
  

Yes, that is a banana.
Back to top
 
IP Logged
 
Curtiss Grymala
God Member
*****
Offline


YaBB?... Y Not?

Posts: 1314
Joined: Apr 12th, 2004
Gender: Male
Re: How to add a new Template to YaBB2
Reply #5 - Sep 10th, 2005 at 2:56pm
Print Post  
I don't think you can, unless you make some modifications to your Source YaBB files (I don't remember for sure which images are always used from the default template and which images are customisable for each template).

However, before I tell you what modifications you might need to make (which puts a lot more responsibility on you as an admin), try going to /yabbfiles/Templates/Forum in your FTP program, and then uploading the images you want to use into your directory that's been set up for the new template you're creating.  Then, make sure you elect to use images from that template in your Admin Centre (Template Configuration).

Then, return to your forum, make sure you choose that template in your profile, and press Shift+Reload to completely reload all of the images in the template.  If that works, then you won't have to make any modifications.
  

Currently using Y2.3 With no mods (though that will hopefully change, soon).

Click Here To See A List Of All The Mods I've Written
Back to top
WWW  
IP Logged
 
Outumuro
God Member
*****
Offline


Publisher - YaBB Toolbar

Posts: 569
Location: Los Angeles
Joined: Apr 14th, 2004
Gender: Male
Re: How to add a new Template to YaBB2
Reply #6 - Oct 14th, 2005 at 2:50pm
Print Post  
Hi Carsten,

I know you have a lot on your plate right now, but when you get the time can you check the template here for Y2F compliance? Grin

I'm using it now, seems to be working fine... but still looking just in case. Smiley
  


Back to top
WWW  
IP Logged
 
MrDale
Guest


Re: How to add a new Template to YaBB2
Reply #7 - Nov 1st, 2005 at 6:36pm
Print Post  
im in the midst of creating another stylesheet for mu members to have another opyion as far as colors concerned.

however i want to change out my banner logo for something i have  that coordinates better with the new color chemes. the place where i have to edit the banner is in the default.html file. how do i create another html that i can edit in the admin center?
  
Back to top
 
IP Logged
 
dougconran
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 1
Joined: Feb 22nd, 2006
Re: How to add a new Template to YaBB2
Reply #8 - Feb 22nd, 2006 at 10:17pm
Print Post  
I'm sure I'm missing something here but how do I get new templates?

I've just installed YaBB 2.1 onto a Linux server and have had a look at the Template Vault and seen a number of tasty designs.

But how on earth do I actually get a template set??? :help:
  
Back to top
 
IP Logged
 
Xavier
Senior Member
****
Offline



Posts: 442
Location: Ipswich
Joined: Apr 5th, 2005
Gender: Male
Re: How to add a new Template to YaBB2
Reply #9 - Mar 3rd, 2006 at 4:06am
Print Post  
The template vault is only templates for YaBB 1. The templates for YaBB 2.x are among the post in the template section on this board. If i'm right Michael is working on a Template Vault for YaBB 2.x
  
Back to top
WWWYIM  
IP Logged
 
thaliagoo
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 1
Joined: Apr 6th, 2006
Re: How to add a new Template to YaBB2
Reply #10 - Apr 6th, 2006 at 5:18pm
Print Post  
This isnt working for me- all i see is the default start page. WHen I click on a post, the new template shows up. Under configurations, the general template shows up correctly but doesn't appear on the webpage. I uploaded the files into the location you said- do I need to do anything else? I even used a mod to choose my own template and it still fails!!
« Last Edit: Apr 6th, 2006 at 6:43pm by thaliagoo »  
Back to top
 
IP Logged
 
javajoe96
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 2
Joined: May 2nd, 2006
Re: How to add a new Template to YaBB2
Reply #11 - May 2nd, 2006 at 11:43pm
Print Post  
After creating a new template in YaBB 2, there are two places you need to select the new template:

1. In the Admin Centre -> Forum Settings -> Registration and Member Settings -> Select the default forum template.
This sets it as the default template for the forum. This means that guests and users not currently logged in will see this template, and new users that register will have this set as their current template (Untill they change it)
2. In your profile -> Options -> Which template would you like to use?
This sets the active template of the current user. Existing users will only see the new template after their profiles have been modified.

One smart trick if you wish to have existing users updated when you edit your template is to immediately create a new template when you start your forum, setting this as the default template (This template can be identical to the default template, no need to create new css files etc if you don't want to change it at this point). This will cause all users registering to use your template instead of the default one. When you at a later stage edit this template, users will immediately see the changes (Unless they have manually changed their template back to the default one)
  
Back to top
 
IP Logged
 
au
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 4
Joined: Jun 8th, 2006
Re: How to add a new Template to YaBB2
Reply #12 - Jun 8th, 2006 at 5:37am
Print Post  
Hi, am new here. Thank you Carsten for the detail on installing new template  Smiley

So till now, new template for YaBB2 available only on this forum?  What available on http://www.boardmod.org/templates/templatevault.php is for the old version only?
  
Back to top
 
IP Logged
 
Xavier
Senior Member
****
Offline



Posts: 442
Location: Ipswich
Joined: Apr 5th, 2005
Gender: Male
Re: How to add a new Template to YaBB2
Reply #13 - Jun 8th, 2006 at 7:43am
Print Post  
That's right i think Michael is creating a new Template Vault for Y2.1 soon
  
Back to top
WWWYIM  
IP Logged
 
au
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 4
Joined: Jun 8th, 2006
Re: How to add a new Template to YaBB2
Reply #14 - Jun 9th, 2006 at 7:52am
Print Post  
Quote:
That's right i think Michael is creating a new Template Vault for Y2.1 soon

Ic, I can't wait!

Btw, can we use flash for forum logo? I tried and it didn't work.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send TopicPrint