UPDATED 28-02-2001
This hack for vB2.0 Beta 2 will allow you to edit a single template set, or all of them at the same time, is dramatically less bandwidth-hungry than the current system, and allows quick searches through the templates by clicking in the <select> element and pressing a key; for example, if you want to find the 'header' template, just click in the select and press 'h' on your keyboard...
To install, follow the following instructions:
First, open the file forums/admin/adminfunctions.php and find the line
and replace it with this:
This will allow the text of the <select> elements to be green or red in the templates page...
Next, open the file forums/admin/template.php and find the block of code that looks like this:
and comment out the code between the { } like this:
Next, just after the first open brace, add a line so that the final code looks like this:
Next, find the section of text within the template.php code that looks like this:
and replace it with this:
Finally, upload the attached file to your forums/admin/ folder, rename it to ktemplate.php and you're all ready to go.
19th Feb 2001 Additions:
The hack will now auto-select the last template you edited when you return to the list from submitting an edit, or adding a new custom template.
Cookie functions can be disabled for users who do not use output_buffering
Lots of minor bug fixes (this one actually works )
Please note: if you do not have output_buffering=On in your php.ini, you should comment out the '$usecookies' line at the top of ktemplate.php
28th Feb 2001 Additions:
I have now restored the original template.php's 'view original' functionality through the use of a little javascript. I have tested the script with browsers going back to Nutscrape 4.6, and they all work fine.
Just as an added extra, the hack now tells you how many global and custom templates you have...
28th Feb 2001 Additions: (more )
I just modified the code a little so that you can double-click in the menus for a default event:
Double-clicking a global template name will activate the 'add' function, giving you the option to create a customized template.
Double-clicking a customized/added template will open the edit page for the selected template.
Right-clicking a customized template will display the original template of that name. (Right-click functionality is IE only.)
This hack for vB2.0 Beta 2 will allow you to edit a single template set, or all of them at the same time, is dramatically less bandwidth-hungry than the current system, and allows quick searches through the templates by clicking in the <select> element and pressing a key; for example, if you want to find the 'header' template, just click in the select and press 'h' on your keyboard...
To install, follow the following instructions:
First, open the file forums/admin/adminfunctions.php and find the line
Code:
OPTION {COLOR: #51485F; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 10px}
Code:
OPTION {FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 10px}
Next, open the file forums/admin/template.php and find the block of code that looks like this:
PHP Code:
// ###################### Start Modify #######################
if ($action=="modify") {
(lots of code in here)
}
// ###################### Start search #######################
PHP Code:
// ###################### Start Modify #######################
if ($action=="modify") {
/*
(lots of code in here)
*/
}
// ###################### Start search #######################
PHP Code:
// ###################### Start Modify #######################
if ($action=="modify") {
include "./ktemplate.php";
/*
(lots of code in here)
*/
}
// ###################### Start search #######################
PHP Code:
$DB_site->query("INSERT INTO template (templateid,templatesetid,title,template) VALUES (NULL,'$templatesetid','".addslashes("$title")."','".addslashes("$template")."')");
PHP Code:
$result = $DB_site->query("INSERT INTO template (templateid,templatesetid,title,template) VALUES (NULL,'$templatesetid','".addslashes("$title")."','".addslashes("$template")."')");
$templateid = $DB_site->insert_id($result);
19th Feb 2001 Additions:
The hack will now auto-select the last template you edited when you return to the list from submitting an edit, or adding a new custom template.
Cookie functions can be disabled for users who do not use output_buffering
Lots of minor bug fixes (this one actually works )
Please note: if you do not have output_buffering=On in your php.ini, you should comment out the '$usecookies' line at the top of ktemplate.php
28th Feb 2001 Additions:
I have now restored the original template.php's 'view original' functionality through the use of a little javascript. I have tested the script with browsers going back to Nutscrape 4.6, and they all work fine.
Just as an added extra, the hack now tells you how many global and custom templates you have...
28th Feb 2001 Additions: (more )
I just modified the code a little so that you can double-click in the menus for a default event:
Double-clicking a global template name will activate the 'add' function, giving you the option to create a customized template.
Double-clicking a customized/added template will open the edit page for the selected template.
Right-clicking a customized template will display the original template of that name. (Right-click functionality is IE only.)
Comment