Index: phptemplate.engine =================================================================== RCS file: /cvs/drupal-contrib/contributions/theme-engines/phptemplate/phptemplate.engine,v retrieving revision 1.16 diff -u -F^f -r1.16 phptemplate.engine --- phptemplate.engine 29 Jan 2005 10:17:13 -0000 1.16 +++ phptemplate.engine 2 Feb 2005 04:38:50 -0000 @@ -75,8 +75,13 @@ function phptemplate_features() { 'toggle_comment_user_picture'); } - - +function phptemplate_theme_handler($function) { + $extras = variable_get('phptemplate_extra_templates', array()); + if ($extras[path_to_theme()][path_to_theme() . "/$function.tpl.php"]->filename) { + return 'generic'; + } + return false; +} /** * PHPTemplate specific theme settings @@ -298,6 +303,16 @@ function phptemplate_box($title, $conten )); } +/** + * Handle any functions that the phptemplate doesn't know how to handle. + */ +function phptemplate_generic() { + $args = func_get_args(); + $function = array_shift($args); + return _phptemplate_callback($function, array( + 'args' => $args + )); +} /** * Default callback for PHPTemplate.