posted this in code hacks about a week back, but i figured y'all might like it as well:
to make your template.php create instantly useable templates from the form (instead of having to go into global.php and register them) open /admin/template.php and find
under it add
then open up global.php and find
and under it add
now create an empty file called /admin/rattemp.php and upload it, make sure its CHMOD-ed to 666, and you're set. also note if you delete custom templates, this wont remove the reference from the rattemp.php file, you'll have to do that manually, but i did this for my design guy who isnt really one to go trekking through code when he wants to make a template
to make your template.php create instantly useable templates from the form (instead of having to go into global.php and register them) open /admin/template.php and find
Code:
$DB_site->query("INSERT INTO template (templateid,title,template) VALUES (NULL,'".addslashes("$title")."','".addslashes("$template")."')");
Code:
# added template code # echo "title is $title <br>"; # debugging $filename = "rattemp.php"; $str = '<?php eval("\$'; $str .= $title; $str .= ' = \"".gettemplate("'; $str .= $title; $str .= '")."\";"); ?>'; $fp=fopen($filename, 'a+'); fwrite($fp,"$str \n"); fclose($fp); # end
Code:
eval("\$fivelinks = \"".gettemplate("fivelinks")."\";");
Code:
require ("admin/rattemp.php");