template.mod
1.0
This modification of YaBB 1 Gold Release allows you to use custom templates for each and every message board.
The message board defaultly loads 'template.html' every time a new page is loaded. This modification will load a custom template for each of your message boards rather than the default. If the custom template does not exist, then the default template will be used. This modification will not affect your users.
To install, apply the modification using BoardMod. If you don't have it, or don't want to use it, manual installation instructions follow.
To create a new message board template, create a file named [BOARDID]_template.html, where [BOARDID] is your message board's ID. For example, if you had a message board with an ID of "MAIN_FORUM", then the custom template file for that would be "MAIN_FORUM_template.html". The file name is case-sensitive. Upload the template into the same folder as YaBB.pl (or template.html).
For extra help, ICQ me at 79459540, or e-mail auroris@softhome.net.
MANUAL INSTALLATION:
Open the file 'Subs.pl' in your Sources directory. Find the subroutine 'header'. Near the bottom of that subroutine, there is a line which reads:
fopen(TEMPLATE,"template.html") || die("$txt{'23'}: template.html");
Replace it with the following code block:
if ($currentboard ne "") {
fopen(TEMPLATE, $currentboard . "_template.html") || fopen(TEMPLATE,"template.html") || die("$txt{'23'}: template.html");
}else{
fopen(TEMPLATE,"template.html") || die("$txt{'23'}: template.html");
}
Stephen Bertrand
http://marauders.uoguilds.com
Sources/Subs.pl
fopen(TEMPLATE,"template.html") || die("$txt{'23'}: template.html");
if ($currentboard ne "") {
fopen(TEMPLATE, $currentboard . "_template.html") || fopen(TEMPLATE,"template.html") || die("$txt{'23'}: template.html");
}else{
fopen(TEMPLATE,"template.html") || die("$txt{'23'}: template.html");
}