DarkReaper
12-15-2001, 10:00 PM
I've always been annoyed that when I create a new template set, all my changes from the default template set aren't included. So, I went and made this TINY hack :)
In admin/functions.php:
Find:
AND (templatesetid=-1 OR templatesetid='$templatesetid'))
and change the -1 to a 1.
Then find:
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
Change to:
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
Find:
$gettemp=$DB_site->query_first("SELECT template FROM template WHERE title='".addslashes($templatename)."' AND (templatesetid=-1 OR templatesetid='$templatesetid') ORDER BY templatesetid DESC LIMIT 1");
Change to:
$gettemp=$DB_site->query_first("SELECT template FROM template WHERE title='".addslashes($templatename)."' AND (templatesetid=-1 OR templatesetid=1 OR templatesetid='$templatesetid') ORDER BY templatesetid DESC LIMIT 1");
1 is the id of the default templateset/replacement set, and you can change it to whatever you want. :)
In admin/functions.php:
Find:
AND (templatesetid=-1 OR templatesetid='$templatesetid'))
and change the -1 to a 1.
Then find:
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
Change to:
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
Find:
$gettemp=$DB_site->query_first("SELECT template FROM template WHERE title='".addslashes($templatename)."' AND (templatesetid=-1 OR templatesetid='$templatesetid') ORDER BY templatesetid DESC LIMIT 1");
Change to:
$gettemp=$DB_site->query_first("SELECT template FROM template WHERE title='".addslashes($templatename)."' AND (templatesetid=-1 OR templatesetid=1 OR templatesetid='$templatesetid') ORDER BY templatesetid DESC LIMIT 1");
1 is the id of the default templateset/replacement set, and you can change it to whatever you want. :)