My BlogAbout MePortfolioTemplatesArticlesWeb StoreMessage Board (Forums)Guestbook


User login

Search this site with Google

Do it with style

As I explained in Part 1, a template consists of template files and at least one theme. A theme is basically formalized CSS. A template can have several themes associated with it, all of which may have different fonts, colors and table background images.

The colors, fonts and images you specify when you edit a theme in the administration panel are output in the overall_header.tpl file. If you open that file you will find a whole lot of CSS in wrapped in <STYLE> tags. Instead of values like regular CSS you will see code like this: {T_BODY_BGCOLOR}. These are called variables and are placeholders for values, the template engine will replace these when it parses the file, which happens every time someone access your board or one of its pages. These variables are replaced by the settings you entered when you edited the theme in the admin panel.

As I mentioned earlier, there's an alternative method, instead of using phpBB themes you can use your own CSS file. If you scroll to the top overall_header.tpl you will find this line:


  <!-- link rel="stylesheet" href="templates/myTemplate/{T_HEAD_STYLESHEET}" type="text/css" --> 

By deleting the style tags below and all CSS code between them and replace the line above with


<link rel="stylesheet" href="templates/myTemplate/{T_HEAD_STYLESHEET}" type="text/css"> 

you will be able to use the myTemplate.css file for your CSS code. This file already contains the same code as in overall_header.tpl when parsed with the default subSilver theme, so switching to the CSS file shouldn't affect the appearance of your forum.

Whether you want to use a theme or a CSS file with your template is up to you. The easiest way to change your board's appearance is to create a new theme for it, the theme will use mostly the same graphics and template files as subSilver so you can't customize your board that much, but it's an easy way to do something as simple as changing the font.

You can also create your own template and deliver it with several themes included; I will explain how this works later in this guide.

Post new comment



The content of this field is kept private and will not be shown publicly.


*

  • Web and e-mail addresses are automatically converted into links.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Verify comment authorship
Captcha Image: you will need to recognize the text in it.
*
Please type in the letters/numbers that are shown in the image above.