template.php

Trying to override theme_menu_item_link

  1. <?php
  2. function phptemplate_menu_item_link($link) {
  3.   if (empty($link['localized_options'])) {
  4.     $link['localized_options'] = array('html'=>TRUE);
  5.   }
  6.  
  7.   $thetitle = '<span>';
  8.   $thetitle .=

Fix for Trying to override theme_menu_item_link

  1. <?php
  2. function phptemplate_menu_item_link($link) {
  3.   if (empty($link['localized_options'])) {
  4.     $link['localized_options'] = array('html'=>TRUE);
  5.   }
  6.  
  7.   $thetitle = '<span>';
  8.   $thetitle .=

Trying to override theme_menu_item_link

  1. <?php
  2. function phptemplate_menu_item_link($link) {
  3.   if (empty($link['localized_options'])) {
  4.     $link['localized_options'] = array();
  5.   }
  6.  
  7.   $thetitle = '<span>';
  8.   $thetitle .= $link['titl

Fix for Different body class for each page

  1. /*  In template.php:  */
  2.  
  3. function YOURTHEME_preprocess_page(&$vars) {
  4.   $vars['body_bg_class'] = arg(0);
  5. }
  6.  
  7. /* In page.tpl.php */
  8.  
  9. <body class="<?php print $body_bg_class; ?>">

Different body class for each page

  1. /*  In template.php:  */
  2.  
  3. function YOURTHEME_preprocess_page(&$vars) {
  4.   $vars['body_bg_class'] = arg(0);
  5. }
  6.  
  7. /* In page.tpl.php */
  8.  
  9. <body class="<?php print $body_bg_class; ?>">

Fix for Theme links - print descriptions of primary menu items

  1. <?php
  2.  
  3. /**
  4. * Return a themed set of links.
  5. * An override of theme_links()
  6. * Modified to use simple text styling instead of HTML & CSS
  7. *
  8. * @see theme_links
  9. */
  10. function phptemplate_links($links

Fix for Add JavaScript to only one node

  1.  

Fix for in_array problem

  1. function security_list_term_voc($vid) {
  2.         $items = array();
  3.         $terms = taxonomy_get_tree($vid);
  4.         foreach ( $terms as $term ) {  
  5.             $items[] = $term->name;
  6.         }
  7.          return $items;
  8. }

in_array problem

  1. function security_list_term_voc($vid) {
  2.         $items = array();
  3.         $terms = taxonomy_get_tree($vid);
  4.         foreach ( $terms as $term ) {  

phptemplate css code

  1. function _phptemplate_variables($hook, $vars = array()) {
  2.   switch ($hook) {
  3.     case 'page':
  4.       $css = drupal_add_css('sites/all/themes/madebynikki/cmspros.css', 'theme');
Syndicate content