2008-07-14, 07:44 AM
2008-07-14, 07:56 AM
Yes. i don't see any delete link either. Except for admincp, you can delete them via phpmyadmin.
2008-07-14, 10:23 AM
Seems to me you can only delete custom template sets and custom templates which I would have thought is about right to stop you from breaking your forum.
2008-07-14, 04:29 PM
alecf is correct. If you delete the required templates that MyBB uses then you risk screwing up your forum. You can revert modified templates and you can delete custom templates. And that is exactly how it should work.
2008-07-16, 06:00 PM
no no these were old templates not the default one.
infact to delete a template first you must delete theme relating to it then you can delete the template
infact to delete a template first you must delete theme relating to it then you can delete the template
2008-07-16, 06:02 PM
(2008-07-16, 06:00 PM)unramped Wrote: [ -> ]no no these were old templates not the default one.
infact to delete a template first you must delete theme relating to it then you can delete the template
Nope.
if($mybb->input['action'] == "delete_template")
{
$plugins->run_hooks("admin_style_templates_delete_template");
$query = $db->query("
SELECT t.*, s.title as set_title
FROM ".TABLE_PREFIX."templates t
LEFT JOIN ".TABLE_PREFIX."templatesets s ON(t.sid=s.sid)
WHERE t.tid='".intval($mybb->input['tid'])."' AND t.sid > '-2' AND t.sid = '{$sid}'
");
$template = $db->fetch_array($query);
// Does the template not exist?
if(!$template)
{
flash_message($lang->error_invalid_template, 'error');
admin_redirect("index.php?module=style/templates");
}
// User clicked no
if($mybb->input['no'])
{
admin_redirect("index.php?module=style/templates&sid={$template['sid']}{$expand_str2}");
}
if($mybb->request_method == "post")
{
// Delete the template
$db->delete_query("templates", "tid='{$template['tid']}'");
$plugins->run_hooks("admin_style_templates_delete_template_commit");
// Log admin action
log_admin_action($template['tid'], $template['title'], $template['sid'], $template['set_title']);
flash_message($lang->success_template_deleted, 'success');
admin_redirect("index.php?module=style/templates&sid={$template['sid']}{$expand_str2}");
}
else
{
$page->output_confirm_action("index.php?module=style/templates&action=delete_template&sid={$template['sid']}{$expand_str}", $lang->confirm_template_deletion);
}
}
Nothing in there that says you have to delete the themes it's connected too first.
Unless of course you mean template set.