summaryrefslogtreecommitdiff
path: root/themes/engines/phptemplate
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-08-28 11:35:34 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-08-28 11:35:34 +0000
commit43d73f81c93ceda3b3380058135169dc340a7146 (patch)
tree575436ae3e78a36875a2de14f6f4f0cbd91f3450 /themes/engines/phptemplate
parent42be9d1311b5fd689f68f57e513503a3a7c52356 (diff)
downloadbrdo-43d73f81c93ceda3b3380058135169dc340a7146.tar.gz
brdo-43d73f81c93ceda3b3380058135169dc340a7146.tar.bz2
#166071 by jjeff and dvessel: move default template preprocess code to template_preprocess, and add *lots* of documentation to template files and functions
Diffstat (limited to 'themes/engines/phptemplate')
-rw-r--r--themes/engines/phptemplate/phptemplate.engine26
1 files changed, 0 insertions, 26 deletions
diff --git a/themes/engines/phptemplate/phptemplate.engine b/themes/engines/phptemplate/phptemplate.engine
index 007c7a735..ed34815a8 100644
--- a/themes/engines/phptemplate/phptemplate.engine
+++ b/themes/engines/phptemplate/phptemplate.engine
@@ -25,29 +25,3 @@ function phptemplate_theme($existing, $type, $theme, $path) {
return $templates;
}
-/**
- * Adds additional helper variables to all templates.
- *
- * Counts how many times certain hooks have been called. Sidebar left / right are special cases.
- *
- * @param $variables
- * A series of key-value value pairs.
- * @param $hook
- * The name of the theme function being executed.
- */
-function phptemplate_engine_preprocess(&$variables, $hook) {
- global $user;
- static $count = array();
-
- // Create variables so anything which is themed can be zebra striped automatically.
- $count[$hook] = isset($count[$hook]) && is_int($count[$hook]) ? $count[$hook] : 1;
- $variables['zebra'] = ($count[$hook] % 2) ? 'odd' : 'even';
- $variables['id'] = $count[$hook]++;
-
- // Tell all templates where they are located.
- $variables['directory'] = path_to_theme();
- $variables['is_front'] = drupal_is_front_page();
- // Tell all templates by which kind of user they're viewed.
- $variables['logged_in'] = ($user->uid > 0);
- $variables['is_admin'] = user_access('access administration pages');
-}