Index: iconify.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/iconify/iconify.info,v retrieving revision 1.1 diff -u -F^f -r1.1 iconify.info --- iconify.info 23 Feb 2008 17:06:37 -0000 1.1 +++ iconify.info 24 Feb 2008 10:08:20 -0000 @@ -1,4 +1,5 @@ ; $Id: iconify.info,v 1.1 2008/02/23 17:06:37 mortendk Exp $ name = Iconify description = adds icons to the fieldsets -package = Other \ No newline at end of file +package = Other +core = 6.x \ No newline at end of file Index: iconify.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/iconify/iconify.module,v retrieving revision 1.1 diff -u -F^f -r1.1 iconify.module --- iconify.module 23 Feb 2008 17:06:37 -0000 1.1 +++ iconify.module 24 Feb 2008 10:08:20 -0000 @@ -13,7 +13,7 @@ function iconify_help( $section='' ){ return $output; } -function iconify_menu(){ +function iconify_init(){ drupal_add_css(drupal_get_path('module', 'iconify') .'/iconify.css'); } @@ -22,20 +22,20 @@ function iconify_menu(){ * get the original english title for the icons * check the DB if we use localization. */ -function iconofy_get_orig_title($title){ - //get the original title if we use localization - 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,$title); - $title = db_result($result, $row = 0); - }else{ - $title = $title; - } - //rename the title - $title=strtolower(str_replace(' ','_',$title)); - $icon=strtolower(str_replace('\'','',$title)); - - return $icon; +function iconify_get_orig_title($title){ + //get the original title if we use localization + 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,$title); + $title = db_result($result, $row = 0); + }else{ + $title = $title; + } + //rename the title + $title=strtolower(str_replace(' ','_',$title)); + $icon=strtolower(str_replace('\'','',$title)); + + return $icon; } /** @@ -53,7 +53,7 @@ function phptemplate_fieldset($element) } } - $icon = iconofy_get_orig_title($element['#title']); + $icon = iconify_get_orig_title($element['#title']); return '
' . ($element['#title'] ? ''. $element['#title'] .'' : '') . @@ -70,7 +70,7 @@ function phptemplate_admin_block_content $output = ''; } @@ -78,10 +78,10 @@ function phptemplate_admin_block_content $output = '
'; foreach ($content as $item) { - $icon = iconofy_get_orig_title($item['title']); + $icon = iconify_get_orig_title($item['title']); $output .= ''; - $output .= '
'. l($item['title'], $item['path']) .'
'; + $output .= '
'. l($item['title'], $item['href']) .'
'; $output .= '
'. $item['description'] .'
'; } $output .= '
'; @@ -94,7 +94,7 @@ function phptemplate_admin_block($block) if (!$block['content']) { return ''; } - $icon = iconofy_get_orig_title($block['title']); + $icon = iconify_get_orig_title($block['title']); $output = <<< EOT