=== modified file 'includes/theme.inc' --- includes/theme.inc 2009-05-28 17:00:08 +0000 +++ includes/theme.inc 2009-05-28 19:53:28 +0000 @@ -381,8 +381,7 @@ elseif ($type == 'theme_engine' || $type == 'base_theme_engine') { // Theme engines get an extra set that come before the normally named variable processors. $prefixes[] = $name . '_engine'; - // The theme engine also registers on behalf of the theme. The theme or engine name can be used. - $prefixes[] = $name; + // The theme engine also registers on behalf of the theme. The theme name should be used. $prefixes[] = $theme; } else { @@ -605,26 +604,11 @@ * This is the same as the previous function, but it is called for a single * theming hook. * - * - ENGINE_preprocess(&$variables) - * This is meant to be used by themes that utilize a theme engine. It is - * provided so that the preprocessor is not locked into a specific theme. - * This makes it easy to share and transport code but theme authors must be - * careful to prevent fatal re-declaration errors when using sub-themes that - * have their own preprocessor named exactly the same as its base theme. In - * the default theme engine (PHPTemplate), sub-themes will load their own - * template.php file in addition to the one used for its parent theme. This - * increases the risk for these errors. A good practice is to use the engine - * name for the base theme and the theme name for the sub-themes to minimize - * this possibility. - * - * - ENGINE_preprocess_HOOK(&$variables) - * The same applies from the previous function, but it is called for a - * specific hook. - * * - THEME_preprocess(&$variables) - * These functions are based upon the raw theme; they should primarily be - * used by themes that do not use an engine or by sub-themes. It serves the - * same purpose as ENGINE_preprocess(). + * This is for themes that want to alter or provide extra variables. For + * example, if a theme named "foo" wanted to alter the $submitted variable for + * the hook "node" a preprocess function of foo_preprocess_node() can be + * created to intercept and alter the variable. * * - THEME_preprocess_HOOK(&$variables) * The same applies from the previous function, but it is called for a @@ -1197,19 +1181,17 @@ * Drupal and implemented in phptemplate.engine, which uses Drupal's default * template renderer. * - * In order to create theme-specific implementations of these hooks, - * themes can implement their own version of theme hooks, either as functions - * or templates. These implementations will be used instead of the default - * implementation. If using a pure .theme without an engine, the .theme is - * required to implement its own version of hook_theme() to tell Drupal what - * it is implementing; themes utilizing an engine will have their well-named - * theming functions automatically registered for them. While this can vary - * based upon the theme engine, the standard set by phptemplate is that theme - * functions should be named either phptemplate_HOOK or THEMENAME_HOOK. For - * example, for Drupal's default theme (Garland) to implement the 'table' hook, - * the phptemplate.engine would find phptemplate_table() or garland_table(). - * The ENGINE_HOOK() syntax is preferred, as this can be used by sub-themes - * (which are themes that share code but use different stylesheets). + * In order to create theme-specific implementations of these hooks, themes can + * implement their own version of theme hooks, either as functions or templates. + * These implementations will be used instead of the default implementation. If + * using a pure .theme without an engine, the .theme is required to implement + * its own version of hook_theme() to tell Drupal what it is implementing; + * themes utilizing an engine will have their well-named theming functions + * automatically registered for them. While this can vary based upon the theme + * engine, the standard set by phptemplate is that theme functions should be + * named THEMENAME_HOOK. For example, for Drupal's default theme (Garland) to + * implement the 'table' hook, the phptemplate.engine would find + * garland_table(). * * The theme system is described and defined in theme.inc. * === modified file 'themes/engines/phptemplate/phptemplate.engine' --- themes/engines/phptemplate/phptemplate.engine 2009-05-27 19:00:13 +0000 +++ themes/engines/phptemplate/phptemplate.engine 2009-05-28 19:53:27 +0000 @@ -20,8 +20,7 @@ * we need to. */ function phptemplate_theme($existing, $type, $theme, $path) { - $templates = drupal_find_theme_functions($existing, array('phptemplate', $theme)); + $templates = drupal_find_theme_functions($existing, array($theme)); $templates += drupal_find_theme_templates($existing, '.tpl.php', $path); return $templates; } - === modified file 'themes/garland/template.php' --- themes/garland/template.php 2009-05-24 18:00:08 +0000 +++ themes/garland/template.php 2009-05-28 19:53:57 +0000 @@ -66,7 +66,7 @@ /** * Format the "Submitted by username on date/time" for each comment. */ -function phptemplate_comment_submitted($comment) { +function garland_comment_submitted($comment) { return t('!datetime — !username', array( '!username' => theme('username', $comment),