template.php

Sample template.php

  1. <?php
  2. // $Id: template.php,v 1.16 2007/10/11 09:51:29 goba Exp $
  3. drupal_add_js(path_to_theme().'/jscrollerx.js', 'theme');
  4. /*drupal_add_js(path_to_theme().'/jscroller2-1.5.js', 'theme');*/

Fix for Customizing pager

  1. function zen_pager($tags = array(), $limit = 10, $element = 0, $parameters = array()) {
  2.   global $pager_total;
  3.   $output = '';
  4.  
  5.   if ($pager_total[$element] > 1) {

Customizing pager

  1. function zen_pager($tags = array(), $limit = 10, $element = 0, $parameters = array()) {
  2.   global $pager_total;
  3.   $output = '';
  4.  
  5.   if ($pager_total[$element] > 1) {

Individual menu classes on theme

  1. /*******individual menu classes******/
  2. function phptemplate_menu_item($mid, $children = '', $leaf = TRUE, $extraclass = '') {

enable / disable TinyMCE via template.php (Login/Logout Fix)

  1. <?php
  2. /**
  3. * Customize a TinyMCE theme.
  4. *
  5. * @param init
  6. *   An array of settings TinyMCE should invoke a theme. You may override any
  7. *   of the TinyMCE settings. Details here:
  8. *
  9.  

Fix for custom _phptemplate_variables()

  1. // Modified by Michelle (custom)
  2. function _phptemplate_variables($hook, $vars) {
  3.  if (module_exists('advanced_profile')) {
  4.    $vars = advanced_profile_addvars($hook, $vars);
  5.  }

custom _phptemplate_variables()

  1. // Modified by Michelle (custom)
  2. function _phptemplate_variables($hook, $vars) {
  3.  if (module_exists('advanced_profile')) {
  4.    $vars = advanced_profile_addvars($hook, $vars);
  5.  }

maybe a problem with accents on drupal 6 for theme-settings.php

  1. /**
  2. * template.php
  3. */
  4. <?php
  5. /*
  6. * Initialize theme settings
  7. */
  8. if (is_null(theme_get_setting('who_we_are_title'))) {
  9.   global $theme_key;
  10.   /*
  11.  

Fix for maybe a problem with accents on drupal 6 for theme-settings.php

  1. /**
  2. * template.php
  3. */
  4. <?php
  5. /*
  6. * Initialize theme settings
  7. */
  8. if (is_null(theme_get_setting('who_we_are_title'))) {
  9.   global $theme_key;
  10.   /*
  11.  

Fix for maybe a problem with accents on drupal 6 for theme-settings.php

  1. /**
  2. * template.php
  3. */
  4. <?php
  5. /*
  6. * Initialize theme settings
  7. */
  8. if (is_null(theme_get_setting('quem_somos_title'))) {
  9.   global $theme_key;
  10.   /*
  11.  
Syndicate content