'.t("Adds icons to the admin areas").'

'; break; } return $output; } function iconify_menu(){ drupal_add_css(drupal_get_path('module', 'iconify') .'/iconify.css'); } /** * get the original english title for the icons * check the DB if we use localization. */ function iconofy_get_orig_title($str){ //get the original title if we have the localization module if(module_exists(locale)){ $sql ="SELECT s.source FROM locales_target t JOIN locales_source s ON t.lid = s.lid WHERE translation ='%s' "; $result = db_query($sql,$str); $title = db_result($result, $row = 0); //if the string isnt translated set it to the orig string if(!$title){ $title = $str; } }else{ $title = $str; } //rename the title $title=strtolower(str_replace(' ','_',$title)); $title_cleaned=strtolower(str_replace('\'','',$title)); return filter_xss($title_cleaned); } /** * theming */ function phptemplate_fieldset($element) { if ($element['#collapsible']) { drupal_add_js('misc/collapse.js'); $element['#attributes']['class'] .= ' collapsible'; if ($element['#collapsed']) { $element['#attributes']['class'] .= ' collapsed'; } } $icon = iconofy_get_orig_title($element['#title']); return '

' . ($element['#title'] ? ''. $element['#title'] .'' : '') . ($element['#description'] ? '
'. $element['#description'] .'
' : '') . $element['#children'] . $element['#value'] . "
\n"; } function phptemplate_admin_block_content($content) { if (!$content) { return ''; } if (system_admin_compact_mode()) { $output = ''; } else { $output = '
'; foreach ($content as $item) { $icon = iconofy_get_orig_title($item['title']); $output .= ''; $output .= '
'. l($item['title'], $item['path']) .'
'; $output .= '
'. $item['description'] .'
'; } $output .= '
'; } return $output; } function phptemplate_admin_block($block) { // Don't display the block if it has no content to display. if (!$block['content']) { return ''; } $icon = iconofy_get_orig_title($block['title']); $output = <<< EOT

$block[title]

$block[description]

$block[content]
EOT; return $output; }