\n";
}
if ($secondary = menu_secondary_local_tasks()) {
$output .= "
\n" . $secondary . "
\n";
}
return $output;
}
/**
* Override or insert variables into the block templates.
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("block" in this case.)
*/
function sareeque_preprocess_block(&$vars, $hook) {
$block = $vars['block'];
// Drupal 7 uses a $content variable instead of $block->content.
$vars['content'] = $block->content;
// Drupal 7 should use a $title variable instead of $block->subject.
$vars['title'] = $block->subject;
// Special classes for blocks.
$vars['classes_array'][] = 'block-' . $block->module;
$vars['classes_array'][] = 'region-' . $vars['block_zebra'];
$vars['classes_array'][] = $vars['zebra'];
$vars['classes_array'][] = 'region-count-' . $vars['block_id'];
$vars['classes_array'][] = 'count-' . $vars['id'];
// Create the block ID.
$vars['block_html_id'] = 'block-' . $block->module . '-' . $block->delta;
$vars['edit_links_array'] = array();
if (user_access('administer blocks')) {
include_once './' . drupal_get_path('theme', 'sareeque') . '/template.block-editing.inc';
sareeque_preprocess_block_editing($vars, $hook);
$vars['classes_array'][] = 'with-block-editing';
}
$vars['edit_links'] = !empty($vars['edit_links_array']) ? '
' . implode(' ', $vars['edit_links_array']) . '
' : '';
}
/*!
* 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 sareeque_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('
');
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_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));
// 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'] =
'';
}
}
// 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;
}
}