template.php

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.  

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.  

Example Page template

  1. <?php
  2. //your template can be found at myspecialtemplate.tpl.php
  3. function _phptemplate_variables($hook, $vars = array()) {
  4. switch ($hook) {
  5.     case 'page':

My question is: Have a better way to do this? or best pratice to get the user on this function? thanks!

  1. function customized_node_submitted($node) {
  2.   $user = user_load(array('name'=>$node->name));
  3.  
  4.   return t('Submitted by !username on @datetime',
  5.     array(
Syndicate content