type; if (function_exists($function)) { $function($vars, $hook); } } */ function mothership_preprocess_node(&$vars, $hook) { // Special classes for nodes $classes =array(); if ($vars['sticky']) { $classes[] = 'sticky'; } if (!$vars['status']) { $classes[] = 'node-unpublished'; $vars['unpublished'] = TRUE; } else { $vars['unpublished'] = FALSE; } //teaser or node if ($vars['teaser']) { $classes[] = 'node-teaser'; }else{ $classes[] = 'node'; } // Class for node type: "node-page", "node-story" $classes[] = 'node-' . $vars['type']; $vars['classes'] = implode(' ', $classes); //Add regions to a node? //TODO take this out and add is a part of the documentation if ($vars['page'] == TRUE) { $vars['node_region_one'] = theme('blocks', 'node_region_one'); $vars['node_region_two'] = theme('blocks', 'node_region_two'); } // quick and easy view of the templates.. // dsm($vars['template_files']) ; } function mothership_preprocess_block(&$vars, $hook) { $block = $vars['block']; // classes for blocks. $classes = array('block'); $classes[] = 'block-' . $block->module; $classes[] = $vars['zebra']; $vars['edit_links_array'] = array(); $vars['edit_links'] = ''; if (user_access('administer blocks')) { include_once './' . drupal_get_path('theme', 'mothership') . '/template/template.block-editing.php'; zen_mothership_preprocess_block_editing($vars, $hook); $classes[] = 'with-block-editing'; } // Render block classes. $vars['classes'] = implode(' ', $classes); } /* ===================================== views * ------------------------------------- */ function mothership_preprocess_views_view_list(&$vars){ mothership_preprocess_views_view_unformatted($vars); } function mothership_preprocess_views_view_unformatted(&$vars) { $view = $vars['view']; $rows = $vars['rows']; $vars['classes'] = array(); // Set up striping values. // foreach ($rows as $id => $row) { // $vars['classes'][$id] = 'views-row-' . ($id + 1); // $vars['classes'][$id] .= ' views-row-' . ($id % 2 ? 'even' : 'odd'); // if ($id == 0) { // $vars['classes'][$id] .= ' first'; // } // } // $vars['classes'][$id] .= ' last'; } /* ===================================== Breadcrumb * ------------------------------------- */ function mothership_preprocess(&$variables, $hook) { //Make active page title in breadcrumbs if(!empty($variables['breadcrumb'])) $variables['breadcrumb'] = '
'; } /*changes the home title to the sitename*/ function mothership_breadcrumb($breadcrumb) { GLOBAL $base_path; if (strip_tags($breadcrumb[0]) == "Home") { $breadcrumb[0] =''.variable_get(site_name,'').''; } if (!empty($breadcrumb)) { return '