Hi,
This is a neat module, I'm really enjoying it! A few of things I need a little help with though.
1) Background color for the Current Conditions - Very dark and all one color.. this isn't the case in IE, but in Firefox it is dark grey. Maybe firefox needs '#' for bgcolors or something, I don't know. This is the same on qmel.com where I got the module.
edit:
edit: the problem is coming from the Doctype declared with XOOPS. Yahoo probably doesn't even decalre one. Firefox listens and won't post the colors if they don't have #'s, IE does though. so that is why the #'s don't matter on yahoos page but they do in xoops. solution: see end of post....
2) If I search for a US Postal Zip Code I get results with Fahrenheit, which is what is desired for me. If I search for city name I get Celsius. Any way to fix this behavior? edit: I just noticed that if you search for "us zip code" or "city, state, usa" it shows up in fahrenheit. if you search for "city, state" or "city" the result is in Celsius.
3) When you click on "Other Cities" in the block it defaults to Montpelier. Anyway to change that?
edit:
found... changed a line with Montpelier in class.msweather.php to end like this:
&citycode=USNY0996&cityname=New York&unit=1">"._MSW_B_MORECITY."
";
I looked through some of the files for possibilities to change some of these things, but I didn't see anything pop up for me, I don't know PHP. The config file for the colors is very nice, I just wish there were a few more attributes in there.
you can see my setup
Hereedit: enabled public viewing for the module. sorry.
Thanks!!
edit: found a way to fix the formatting on this module allowing colors in Mozilla and better font size and colors as well.
for the main ms_weathher index view. find this section in the
class.msweather.php :
/* function get_msw_getmoduledata()
several lines down, before this line:
$MSWModule .= "".$all[ 1 ]."
";
add this:
$all[ 1 ] = preg_replace("/bgcolor=(?!#)/", "bgcolor=#", $all[1]);
$all[ 1 ] = str_replace( "td width="25%"", "td width="33%"", $all[ 1 ]);
$all[ 1 ] = str_replace( "Currently:", "#000" face=Arial size=3>Currently:", $all[ 1 ] );
$all[ 1 ] = str_replace( "5"", "5" color="#000"", $all[ 1 ] );
$all[ 1 ] = str_replace( "High:", "#000" size=3>High:", $all[ 1 ] );
$all[ 1 ] = str_replace( "Low:", "#000" size=3>Low:", $all[ 1 ] );
$all[ 1 ] = str_replace( "td align=left width="50%">", "td align=left width="50%">#000">", $all[ 1 ] );
this will add the missing # to allow Mozilla browsers to use colors in the tables. Since XOOPS declares a higher XHTML or HTML 4.01 Doctype and Yahoo declares none, this is necessary to make the page look like it does on Yahoo. This will also do some better text formatting and colors as well. In retrospect you could just use a few replaces and add a class and use that in your CSS, but this is working. This also fixes one of the table widths to match the others, so it looks better.
for the blocks view, I am working on that, almost have it tweaked now. edit later.
maybe some of these problems are with international versions of Yahoo? I don't know, but it looks ok for me now.