Index: themes/engines/phptemplate/phptemplate.engine =================================================================== --- themes/engines/phptemplate/phptemplate.engine (revision 510) +++ themes/engines/phptemplate/phptemplate.engine (working copy) @@ -34,6 +34,28 @@ } /** + * Implmentation of settings function to allow themes to add their own settings. + * + * @return + * Form elements. + */ +function phptemplate_settings() { + $segments = explode('/', $_GET['q']); + $key = array_pop($segments); + + $file = drupal_get_path('theme', $key) . '/template.php'; + if (file_exists($file)) { + include_once "$file"; + } + + $function = $key . '_settings'; + if (function_exists($function)) { + return $function(); + } + return; +} + +/** * Execute a template engine call. * * Each call to the template engine has two parts. Namely preparing