Index: modules/over_text/over_text.module =================================================================== --- modules/over_text/over_text.module (revision 76) +++ modules/over_text/over_text.module (working copy) @@ -20,14 +20,14 @@ */ function over_text_settings() { $libs = array(); - $libs['overtext'] = t('overtext (2k)'); - $libs['wz_tooltip'] = t('wz_tooltip (15k)'); - if(file_exists("modules/over_text/lib/overlib_mini.js")) { - $libs['overlib_mini'] = t('overlib_mini (27k)'); + $opts = array( 'overtext'=>'overtext.js', 'wz_tooltip'=>'wz_tooltip.js', + 'overlib_mini'=>'overlib_mini.js', 'overlib'=>'overlib.js' ); + foreach( $opts as $name=>$file ) { + $path = drupal_get_path('module', 'over_text')."/lib/$file"; + if( file_exists($path) ) { + $libs[$name] = sprintf( "$name (%dk)", (filesize($path)/1024)+0.5 ); + } } - if(file_exists("modules/over_text/lib/overlib.js")) { - $libs['overlib'] = t('overlib (44k)'); - } $form = array(); $form['over_text_library'] = array( '#type' => 'select', @@ -45,15 +45,16 @@ function over_text_init() { $output = array(); $over_text_library = variable_get("over_text_library", "overtext"); + $base = base_path().drupal_get_path('module', 'over_text'); switch($over_text_library) { case "overtext": - $output = ""; + $output = ""; break; case "overlib_mini": - $output = ""; + $output = ""; break; case "overlib": - $output = ""; + $output = ""; break; case "wz_tooltip": return; @@ -70,14 +71,15 @@ case "overtext": $output .= "
| overtext |
| text |