function theme_pagestyle_image in Page Style 5
Implement theme().
See also
1 theme call to theme_pagestyle_image()
- pagestyle_block in ./
pagestyle.module - Implement hook_block().
File
- includes/
pagestyle.block.inc, line 419 - Block, page and theme functions.
Code
function theme_pagestyle_image() {
$pagestyle_block_title = pagestyle_block_title($title = 'title');
$pagestyle_current_pagestyle_text = pagestyle_block_title($title = 'current');
$pagestyle_block_type = variable_get('pagestyle_block_type', 'text');
$pagestyle_black_white = variable_get('pagestyle_black_white', 1);
$pagestyle_white_black = variable_get('pagestyle_white_black', 1);
$pagestyle_yellow_blue = variable_get('pagestyle_yellow_blue', 1);
$pagestyle_standard = variable_get('pagestyle_standard', 1);
$block_[$pagestyle_block_type] = 'block_' . $pagestyle_block_type;
$dest = drupal_get_destination();
$block_title = $pagestyle_block_title;
$list_inline = "list";
$subtitle_add = NULL;
if (variable_get('pagestyle_display_list_inline', 0) == 1) {
$list_inline = "inline";
$subtitle_add = ": ";
}
$current_inline = "pagestyle_current_list";
if (variable_get('pagestyle_display_current_inline', 0) == 1) {
$current_inline = "pagestyle_current_inline";
}
$subtitle = NULL;
$subtitle_text = NULL;
if (variable_get('pagestyle_display_subtitle', 0) == 1) {
$subtitle = "subtitle";
$subtitle_text = $pagestyle_block_title . $subtitle_add;
}
$display_links = "display";
if (variable_get('pagestyle_display_links', 1) == 0) {
$display_links = "display_hidden";
}
$black_white = NULL;
if ($pagestyle_black_white == 1) {
$black_white = "black_white";
}
$white_black = NULL;
if ($pagestyle_white_black == 1) {
$white_black = "white_black";
}
$yellow_blue = NULL;
if ($pagestyle_yellow_blue == 1) {
$yellow_blue = "yellow_blue";
}
$standard = NULL;
if ($pagestyle_standard == 1) {
$standard = "standard";
}
$current_pagestyle = NULL;
$display_current_pagestyle = "display";
$display_current_pagestyle_text = "display";
switch (variable_get('pagestyle_display_current_text_value', 'text_value')) {
case "text_value":
$current_pagestyle = "current_pagestyle";
$display_current_pagestyle = "display";
$display_current_pagestyle_text = "display";
break;
case "value":
$current_pagestyle = "current_pagestyle";
$display_current_pagestyle = "display";
$display_current_pagestyle_text = "display_hidden";
break;
case "hidden":
$current_pagestyle = "current_pagestyle";
$display_current_pagestyle = "display_hidden";
$display_current_pagestyle_text = "display_hidden";
break;
case "remove":
$display_current_pagestyle = "display_hidden";
$display_current_pagestyle_text = "display_hidden";
break;
}
$current_pagestyle_text = $pagestyle_current_pagestyle_text;
$pagestyle = pagestyle_get_current($value = 'name');
if ($subtitle) {
$output .= '<h3 class="' . $list_inline . '">' . $subtitle_text . '</h3>' . "\n";
}
$output .= '<ul class="pagestyle_' . $list_inline . '">' . "\n";
if ($black_white) {
$output .= ' <li class="ps_black_white">' . l('<img src="' . base_path() . drupal_get_path("module", "pagestyle") . '/images/black_white_16.gif" alt=' . t('Black') . '/' . t('White') . ' class="ps_black_white ps_rollover" />', 'pagestyle/black_white', $attributes = array(
'title' => $block_title . ': ' . t('Black') . '/' . t('White'),
'class' => 'ps_black_white text_display_hidden ps_rollover',
), $query = $dest, $fragment = NULL, $absolute = FALSE, $html = TRUE) . '</li>' . "\n";
}
if ($white_black) {
$output .= ' <li class="ps_white_black">' . l('<img src="' . base_path() . drupal_get_path("module", "pagestyle") . '/images/white_black_16.gif" alt=' . t('White') . '/' . t('Black') . ' class="ps_white_black ps_rollover" />', 'pagestyle/white_black', $attributes = array(
'title' => $block_title . ': ' . t('White') . '/' . t('Black'),
'class' => 'ps_white_black text_display_hidden ps_rollover',
), $query = $dest, $fragment = NULL, $absolute = FALSE, $html = TRUE) . '</li>' . "\n";
}
if ($pagestyle_yellow_blue == 1) {
$output .= ' <li class="ps_yellow_blue">' . l('<img src="' . base_path() . drupal_get_path("module", "pagestyle") . '/images/yellow_blue_16.gif" alt=' . t('Yellow') . '/' . t('Blue') . ' class="ps_yellow_blue ps_rollover" />', 'pagestyle/yellow_blue', $attributes = array(
'title' => $block_title . ': ' . t('Yellow') . '/' . t('Blue'),
'class' => 'ps_yellow_blue text_display_hidden ps_rollover',
), $query = $dest, $fragment = NULL, $absolute = FALSE, $html = TRUE) . '</li>' . "\n";
}
if ($standard) {
$output .= ' <li>' . l('<img src="' . base_path() . drupal_get_path("module", "pagestyle") . '/images/standard_16.gif" alt=' . t('Standard') . ' class="ps_standard ps_rollover" />', 'pagestyle/standard', $attributes = array(
'title' => $block_title . ': ' . t('Standard'),
'class' => 'ps_standard text_display_hidden ps_rollover' . $link_type,
), $query = $dest, $fragment = NULL, $absolute = FALSE, $html = TRUE) . '</li>' . "\n";
}
$output .= '</ul>' . "\n";
if ($current_pagestyle) {
$output .= '<p class="pagestyle_current ' . $current_inline . ' ' . $display_current_pagestyle . ' current_text_' . $display_current_pagestyle_text . '"><span class="' . $display_current_pagestyle_text . '">' . $current_pagestyle_text . ': </span><span id="pagestyle_current" title="' . $current_pagestyle_text . ': ' . $pagestyle . '">' . $pagestyle . '</span></p>' . "\n";
}
$output .= '<div class="ps_clear"></div>' . "\n";
return $output;
}