NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

#1 10-25-2008 13:06:03

Twighlight
Member

template editor

i cant figure out how to edit templates.
i also wanna know how to change everything about the font.
PLZ HELP!

Last edited by Twighlight (10-25-2008 13:06:34)

Offline

#2 10-26-2008 01:28:13

Waccoon
Administrator

Re: template editor

Changing the fonts requires at least some knowledge of CSS.

The first thing you can do is change the PHP variable that contains the font face.  This will change the font style.  Be aware that there's not many standard fonts from which to choose that will show up in every browser.

Open up "file.php" in the templates folder, where "file" is the name of the template you want to modify.  You have to open up the ".php" version of the file, not the ".css" version.

This is the part of the file you want to modify:

Code:

$fontFace  = '"Arial", "Helvetica", sans-serif';

Everything to the right of the equals sign is the variable definition.  Font names should be encased in double quotes, the default font type should not be in any kind of quotes, and the whole font definition must be encased in single quotes.  If that's hard to see, then this is the way you need to do it:

Code:

$variable  =  '  "fontname",  "fontname2",  default-type  '  ;

Second, there are also font sizes, which usually show up as "10pt", "9pt", and such.  The postfix "pt" means "points", a standard measurement of font size.  You can also use "px" for "pixels" if you prefer, but you should use points.

All the variables you can change are within the first 100-120 lines of the template file.  Beyond that is CSS that has to be parsed by PHP.  You can edit this stuff, too, but you must know how to use CSS to modify anything.  If you don't know CSS, changing things might not work.  Since web browsers don't usually complain about broken CSS, it's hard to know if you made a mistake or not.  PHP tells you if you made a mistake somewhere.

After modifying the PHP template file, you must delete the CSS template file from the templates folder.  The board will then see that the CSS file is missing, and will automatically make a new one.  If you forget to delete the CSS version of the template, your changes will not work.

Offline

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB