Create a file with the contents:
PHP Code:
<?php
error_reporting( E_ALL & ~E_NOTICE );
include_once( './global.php' );
cpheader();
$DB_site->reporterror = 1;
function killtemplate( $title , $templatesetid=-1 )
{
global $DB_site;
$DB_site->query("
DELETE FROM template
WHERE title='" . addslashes( $title ) . "' AND templatesetid=-1
");
echo "Removing <font color='#006699'><tt>$title</tt></font> template... Done.<br>\n";
}
// Change the teplate names for the ones you want removed
// (make sure you revert them to original before that)
$tplname01 = 'home_archive';
$tplname02 = 'home_archiveforum';
// $tplname03 = 'home_archivethread'; // add in the same way other template names
killtemplate( $tplname01 );
killtemplate( $tplname02 );
// killtemplate( $tplname03 ); // add for each new template title a line, like this one
cpfooter();
?>
Make SURE you include in the file all templates you want to remove.
Also, make SURE they are reverted to original.
Save the file as removetemplate.php and run it onto your /admin folder.
Hope that helps.