'blue', 'vy01Mezun05_width' => 0, 'vy01Mezun05_fixedwidth' => '850', 'vy01Mezun05_breadcrumb' => 0, 'vy01Mezun05_iepngfix' => 0, 'vy01Mezun05_themelogo' => 0, 'vy01Mezun05_fontfamily' => 0, 'vy01Mezun05_customfont' => '', 'vy01Mezun05_uselocalcontent' => 0, 'vy01Mezun05_localcontentfile' => '', 'vy01Mezun05_leftsidebarwidth' => '210', 'vy01Mezun05_rightsidebarwidth' => '210', 'vy01Mezun05_suckerfish' => 0, 'vy01Mezun05_usecustomlogosize' => 0, 'vy01Mezun05_logowidth' => '100', 'vy01Mezun05_logoheight' => '100', ); variable_set( str_replace('/', '_', 'theme_'. $theme_key .'_settings'), array_merge(theme_get_settings($theme_key), $defaults) ); // Force refresh of Drupal internals theme_get_setting('', TRUE); } function get_vy01Mezun05_style() { $style = theme_get_setting('vy01Mezun05_style'); if (!$style) { $style = 'blue'; } if (isset($_COOKIE["vy01Mezun05style"])) { $style = $_COOKIE["vy01Mezun05style"]; } return $style; } $style = get_vy01Mezun05_style(); drupal_add_css(drupal_get_path('theme', 'vy01Mezun05') .'/css/'. $style .'.css', 'theme'); if (theme_get_setting('vy01Mezun05_iepngfix')) { drupal_add_js(drupal_get_path('theme', 'vy01Mezun05') .'/js/jquery.pngFix.js', 'theme'); } if (theme_get_setting('vy01Mezun05_suckerfish')) { drupal_add_css(drupal_get_path('theme', 'vy01Mezun05') .'/css/suckerfish_' . $style .'.css', 'theme'); } if (theme_get_setting('vy01Mezun05_uselocalcontent')) { $local_content = drupal_get_path('theme', 'vy01Mezun05') .'/'. theme_get_setting('vy01Mezun05_localcontentfile'); if (file_exists($local_content)) { drupal_add_css($local_content, 'theme'); } } function phptemplate_menu_links($links, $attributes = array()) { if (!count($links)) { return ''; } $level_tmp = explode('-', key($links)); $level = $level_tmp[0]; $output = "'; return $output; } /*! * Dynamic display block preprocess functions * Copyright (c) 2008 - 2009 P. Blaauw All rights reserved. * Version 1.6 (01-OCT-2009) * Licenced under GPL license * http://www.gnu.org/licenses/gpl.html */ /** * Override or insert variables into the ddblock_cycle_block_content templates. * Used to convert variables from view_fields to slider_items template variables * * @param $vars * An array of variables to pass to the theme template. * */ function vy01Mezun05_preprocess_ddblock_cycle_block_content(&$vars) { if ($vars['output_type'] == 'view_fields') { $content = array(); // Add slider_items for the template // If you use the devel module uncomment the following line to see the theme variables // dsm($vars['settings']['view_name']); // dsm($vars['content'][0]); // If you don't use the devel module uncomment the following line to see the theme variables drupal_set_message('
' . var_export($vars['settings']['view_name'], true) . '
'); drupal_set_message('
' . var_export($vars['content'][0], true) . '
'); if ($vars['settings']['view_name'] == 'news_items') { if (!empty($vars['content'])) { foreach ($vars['content'] as $key1 => $result) { // add slide_image variable if (isset($result->node_data_field_pager_item_text_field_image_fid)) { // get image id $fid = $result->node_data_field_pager_item_text_field_image_fid; // get path to image $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid)); // use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes) if (module_exists('imagecache') && is_array(imagecache_presets()) && $vars['imgcache_slide'] <> ''){ $slider_items[$key1]['slide_image'] = theme('imagecache', $vars['imgcache_slide'], $filepath, check_plain($result->node_title)); } else { $slider_items[$key1]['slide_image'] = '' . check_plain($result->node_title) . 
                ''; } } // add slide_text variable if (isset($result->node_data_field_pager_item_text_field_slide_text_value)) { $slider_items[$key1]['slide_text'] = check_markup($result->node_data_field_pager_item_text_field_slide_text_value); } // add slide_title variable if (isset($result->node_title)) { $slider_items[$key1]['slide_title'] = check_plain($result->node_title); } // add slide_read_more variable and slide_node variable if (isset($result->nid)) { $slider_items[$key1]['slide_read_more'] = l('Read more...', 'node/' . $result->nid); $slider_items[$key1]['slide_node'] = base_path() . 'node/' . $result->nid; } } } } $vars['slider_items'] = $slider_items; } } /** * Override or insert variables into the ddblock_cycle_pager_content templates. * Used to convert variables from view_fields to pager_items template variables * Only used for custom pager items * * @param $vars * An array of variables to pass to the theme template. * */ function vy01Mezun05_preprocess_ddblock_cycle_pager_content(&$vars) { if (($vars['output_type'] == 'view_fields') && ($vars['pager_settings']['pager'] == 'custom-pager')){ $content = array(); // Add pager_items for the template // If you use the devel module uncomment the following lines to see the theme variables //dsm($vars['pager_settings']['view_name']); //dsm($vars['content'][0]); // If you don't use the devel module uncomment the following lines to see the theme variables drupal_set_message('
' . var_export($vars['pager_settings'], true) . '
'); drupal_set_message('
' . var_export($vars['content'][0], true) . '
'); if ($vars['pager_settings']['view_name'] == 'news_items') { if (!empty($vars['content'])) { foreach ($vars['content'] as $key1 => $result) { // add pager_item_image variable if (isset($result->node_data_field_pager_item_text_field_image_fid)) { $fid = $result->node_data_field_pager_item_text_field_image_fid; $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid)); // use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes) if (module_exists('imagecache') && is_array(imagecache_presets()) && $vars['imgcache_pager_item'] <> ''){ $pager_items[$key1]['image'] = theme('imagecache', $vars['pager_settings']['imgcache_pager_item'], $filepath, check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value)); } else { $pager_items[$key1]['image'] = '' . check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value) . 
                ''; } } // add pager_item _text variable if (isset($result->node_data_field_pager_item_text_field_pager_item_text_value)) { $pager_items[$key1]['text'] = check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value); } } } } $vars['pager_items'] = $pager_items; } }