= 6) return $language->language; return $language; } function get_full_path_to_theme() { return base_path().path_to_theme(); } /** * Allow themable wrapping of all breadcrumbs. */ function casio3_breadcrumb($breadcrumb) { if (!empty($breadcrumb)) { return ''; } } function casio3_service_links_node_format($links) { return ''; } /** * Theme a form button. * * @ingroup themeable */ function casio3_button($element) { // Make sure not to overwrite classes. if (isset($element['#attributes']['class'])) { $element['#attributes']['class'] = 'form-'.$element['#button_type'].' '.$element['#attributes']['class'].' art-button'; } else { $element['#attributes']['class'] = 'form-'.$element['#button_type'].' art-button'; } return ''. ''. ''. ''. ''; } /** * Image assist module support. * Using Artisteer styles in IE */ function casio3_img_assist_page($content, $attributes = NULL) { $title = drupal_get_title(); $output = ''."\n"; $output .= ''."\n"; $output .= "\n"; $output .= ''. $title ."\n"; // Note on CSS files from Benjamin Shell: // Stylesheets are a problem with image assist. Image assist works great as a // TinyMCE plugin, so I want it to LOOK like a TinyMCE plugin. However, it's // not always a TinyMCE plugin, so then it should like a themed Drupal page. // Advanced users will be able to customize everything, even TinyMCE, so I'm // more concerned about everyone else. TinyMCE looks great out-of-the-box so I // want image assist to look great as well. My solution to this problem is as // follows: // If this image assist window was loaded from TinyMCE, then include the // TinyMCE popups_css file (configurable with the initialization string on the // page that loaded TinyMCE). Otherwise, load drupal.css and the theme's // styles. This still leaves out sites that allow users to use the TinyMCE // plugin AND the Add Image link (visibility of this link is now a setting). // However, on my site I turned off the text link since I use TinyMCE. I think // it would confuse users to have an Add Images link AND a button on the // TinyMCE toolbar. // // Note that in both cases the img_assist.css file is loaded last. This // provides a way to make style changes to img_assist independently of how it // was loaded. $output .= drupal_get_html_head(); $output .= drupal_get_js(); $output .= "\n\n"; // Ensure that img_assist.js is imported last. $path = drupal_get_path('module', 'img_assist') .'/img_assist.css'; $output .= "\n"; $output .= ''."\n"; $output .= ''."\n"; $output .= ''."\n"; $output .= "\n"; $output .= '\n"; $output .= theme_status_messages(); $output .= "\n"; $output .= $content; $output .= "\n"; $output .= ''; $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 casio3_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 // SNO-KEZDODIK ---------------------------------- // initialize & reset path $filepath = FALSE; // try to find a filename (path) to the image, either via IMCEImage.. if (isset($result->node_data_field_pager_item_text_field_imce_imagepath_imceimage_path)) { $filepath=$result->node_data_field_pager_item_text_field_imce_imagepath_imceimage_path; // is there an initial '/'? $position = strpos($filepath, '/'); // this should normally be 0 if( ($position !== FALSE) && ($position == 0)) { // if so, strip it $filepath = substr($filepath, 1); } } // .. or via ImageField.. else // SNO-VEGZODIK ---------------------------------- if (isset($result->node_data_field_image_field_image_fid)) { // get image id $fid = $result->node_data_field_image_field_image_fid; // get path to image $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid)); // SNO-KEZDODIK ---------------------------------- } // if filepath was found either via text field or via ImageField module, then // add slide_image variable to the slider_items if ($filepath) { // SNO-VEGZODIK ---------------------------------- // 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 casio3_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) { // SNO-KEZDODIK ---------------------------------- //initialize & reset path $filepath = FALSE; // try to find a filename (path) to the image, either via IMCEImage.. if (isset($result->node_data_field_pager_item_text_field_imce_imagepath_imceimage_path)) { $filepath=$result->node_data_field_pager_item_text_field_imce_imagepath_imceimage_path; // is there an initial '/'? $position = strpos($filepath, '/'); // this should normally be 0 if( ($position !== FALSE) && ($position == 0)) { // if so, strip it $filepath = substr($filepath, 1); } } // .. or via ImageField else // SNO-VEGZODIK ---------------------------------- // add pager_item_image variable if (isset($result->node_data_field_image_field_image_fid)) { $fid = $result->node_data_field_image_field_image_fid; $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid)); // SNO-KEZDODIK ---------------------------------- } // if filepath was found either via text field or via ImageField module, then // SNO-VEGZODIK ---------------------------------- // add pager_items image variable if ($filepath) { // 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; } } /*! * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * * VIEWS SLIDESHOW DYNAMIC DISPLAY BLOCK preprocess functions * Author P.P. Blaauw * Version 1.3 (07-SEP-2009) * Licenced under GPL license * http://www.gnu.org/licenses/gpl.html */ /** * Override or insert variables into the views_slideshow_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 casio3_preprocess_views_slideshow_ddblock(&$vars) { drupal_rebuild_theme_registry(); $settings = $vars['views_slideshow_ddblock_slider_settings']; // for showing debug info views_slideshow_ddblock_show_content_debug_info($vars); if ($settings['output_type'] == 'view_fields') { if ($settings['view_name'] == 'hangszerek' && $settings['view_display_id'] == 'block_1') { if (!empty($vars['views_slideshow_ddblock_content'])) { foreach ($vars['views_slideshow_ddblock_content'] as $key1 => $result) { // add slide image variable $slider_items[$key1]['slide_image'] = views_slideshow_ddblock_add_image( $vars, // determines which imagcache preset to use, leave to 'slider_item_image' 'slider_item_image', // name of CCK generated image field, change if needed. $result->node_data_field_image_field_image_fid, // alt attribute of image or NULL $result->node_title, // cck content type for default image or NULL, change if needed NULL, //'ddblock_news_item', // cck fieldname for default image or NULL, change if needed NULL, //'field_image', // to link the image to or NULL, change if needed NULL // base_path() . 'node/' . $result->nid ); // 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'] = '' . t('Read more') . ''; $slider_items[$key1]['slide_node'] = base_path() . 'node/' . $result->nid; } } } } $vars['views_slideshow_ddblock_slider_items'] = $slider_items; } } /** * Override or insert variables into the views_slideshow_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 casio3_preprocess_views_slideshow_ddblock_pager_content(&$vars) { $settings = $vars['views_slideshow_ddblock_pager_settings']; // for showing debug info views_slideshow_ddblock_show_pager_debug_info($vars); if (($settings['output_type'] == 'view_fields') && ($settings['pager'] == 'number-pager' || $settings['pager'] == 'custom-pager' || $settings['pager'] == 'scrollable-pager' )) { if ($settings['view_name'] == 'hangszerek' && $settings['view_display_id'] == 'block_1') { if (!empty($vars['views_slideshow_ddblock_content'])) { foreach ($vars['views_slideshow_ddblock_content'] as $key1 => $result) { // add pager_item_image variable $pager_items[$key1]['image'] = views_slideshow_ddblock_add_image( $vars, // determines which imagcache preset to use, leave to 'pager_item_image' 'pager_item_image', // name of CCK generated image field, change if needed. $result->node_data_field_image_field_image_fid, // alt attribute of image or NULL $result->node_data_field_pager_item_text_field_pager_item_text_value, // cck content type for default image or NULL, change if needed NULL, //'ddblock_news_item', // cck fieldname for default image or NULL, change if needed NULL, //'field_image', // to link the image to or NULL, change if needed NULL // base_path() . 'node/' . $result->nid ); // 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['views_slideshow_ddblock_pager_items'] = $pager_items; } }