Custom Templates 2.0 Custom Templates allows you to use a different template for each and every one of your message boards. If a template doesn't exist for your message board, it will use the default one. This modification needs to enter information into your language file. In this mod, it is set to "english.lng". If you are using a different langauge file, be sure to open this mod file in a text editor and copy the text found at the BOTTOM of this file into your language file. This is a newer version of the CUSTOM TEMPLATE modification. If you have my older version installed, you may uninstall it now. If you don't want to uninstall it, go to http://www.auroris.net/boardmod for update instructions. For help, go to http://www.auroris.net/boardmod, or you may contact me at ICQ #79459540, or e-mail auroris@softhome.net. Stephen Bertrand http://www.auroris.net 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"); } Sources/ManageBoards.pl EOT } } print <<"EOT";
EOT } } print <<"EOT";
fclose(FILE); $yySetLocation = qq~$cgi&action=manageboards~; &redirectexit; ################################################################################# # EDIT MESSAGE BOARD TEMPLATE CODE # ################################################################################# } elsif($FORM{'moda'} eq "$txt_sb{'1002'}") { fopen(FILE, "$boarddir/$FORM{'id'}_template.html"); @boardtemplate = ; fclose(FILE); $yytitle = "$txt_sb{'1002'} for $FORM{'boardname'}"; &header; foreach $line (@boardtemplate) { $line =~ tr/\r//d; $line =~ tr/\n//d; $line =~ s/&/&/g; $line =~ s//>/g; $line =~ s/\|/\|/g; $line =~ s/\%/%/g; $line =~ s/"/"/g; $fulltemplate .= qq~$line\n~; } print <<"EOT";
$txt_sb{'1002'} for $FORM{'boardname'}

$txt_sb{'1003'}




EOT &footer; exit; } elsif($FORM{'moda'} eq "$txt{'10'}") { if ($FORM{'templatedata'} eq "") { unlink("$boarddir/$FORM{'id'}_template.html"); }else{ $FORM{'templatedata'} =~ tr/\r//d; $FORM{'templatedata'} =~ s~\A\n~~; $FORM{'templatedata'} =~ s~\n\Z~~; fopen(FILE, ">$boarddir/$FORM{'id'}_template.html", 1); print FILE "$FORM{'templatedata'}"; fclose(FILE); } $yySetLocation = qq~$cgi\&action=admin~; &redirectexit; } elsif($FORM{'moda'} eq "$txt_sb{'1004'}") { unlink("$boarddir/$FORM{'id'}_template.html"); $yySetLocation = qq~$cgi\&action=admin~; &redirectexit; #################################################################################"
english.lng 1; $txt_sb{'1000'} = "$txt_sb is text used for my mods, ie, custom template 2.0, all.mod, editagree.mod, and others."; $txt_sb{'1002'} = "Modify Board Template"; $txt_sb{'1003'} = "Modify the message board's template here. This template is independent from the main forum template. It is usually best to copy the main forum template, paste it here, and modify it to your needs. If you clear this text box, the board will no longer use a custom template and will instead use the default one. Likewise, if you delete the template, the board will no longer use the custom template and will revert back to the default template."; $txt_sb{'1004'} = "Delete Template";