Page Index Toggle Pages: 1 Print
Understanding Template/CSS marriage (Read 3977 times)
Captain John

Understanding Template/CSS marriage
Aug 27th, 2008 at 2:43am
Print Post  
Style sheets are just saved as stylesheetname.css files in the yabbfiles/Templates/Forum folder, and the Style Sheet editor just reads the name of all .css files present.  It does allow deleting them.

Templates on the other hand are not saved as files, but as data IN the Variables/template.cfg file.

This is the line entry in template.cfg for the Forum default template:

Select All
$templateset{'Forum default'} = "default|default|default|default|default|default|default|"; 

So the line contains the Template name, then the first (highlighted) entry is the name of the style sheet, in this case default.css.

Going left to right from there, you have the folder names containing the Images, header, BoardIndex.template, MessageIndex.template file, Display.template file, and MyCenter.template file.

Together, all of those comprise a "template name," or the name that you select in Template drop down windows, in Admin Center and Profile.
Back to top
IP Logged
Captain John

Re: Understanding Template/CSS marriage Y2.4
Reply #1 - Apr 27th, 2010 at 5:08pm
Print Post  
In Y2.4 the template.cfg file is no longer created.  The configuration is placed inside

Select All
%templateset = (
'Old YaBB 2.1 style' => "yabb21|yabb21|yabb21|yabb21|yabb21|yabb21|yabb21|",
'sidebar' => "sidebar|sidebar|sidebar|sidebar|sidebar|sidebar|sidebar|2",
'fire_n_ice' => "fire_n_ice|fire_n_ice|fire_n_ice|fire_n_ice|fire_n_ice|fire_n_ice|fire_n_ice|2",
'Forum default' => "default|default|default|default|default|default|default|2",
'midnyte' => "midnyte|midnyte|midnyte|midnyte|midnyte|midnyte|midnyte|2",
);                                                # Forum templates settings 

   With the above, this allows a member to "select" any of the above as their default template in their profile.
    To allow only one Template selection, there only needs to be one Template, delete all others.  Doing this disables a choice in members profile, displays one template to Guests and members logged in.
« Last Edit: Apr 29th, 2010 at 4:58pm by »  
Back to top
IP Logged
Page Index Toggle Pages: 1
  « Board Index ‹ Board  ^Top