TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 23, 2024, 06:56:48 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,172
  • Total Topics: 21,219
  • Online today: 121
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 96
  • Total: 97
  • @rjen

Weather Block

Started by MetalHellsangel, March 17, 2006, 04:43:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MetalHellsangel

Users enter their zip code and get a short weather report

Download & Support Here

Mitch

Too wide for my liking but none the less a good script.

MetalHellsangel

You can add some php to resize it, feel free to edit it to suit your needs.

TwinsX2Dad

Or just resize the script:

Displays a weather block where the user can input a zipcode and see the weather in that area

echo "<form id=\"weather\" name=\"weather\" method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">
  <label>Zip Code
  <input name=\"zip\" type=\"text\" size=\"5\"/>
  </label>
  <input type=\"submit\" name=\"Submit\" value=\"Submit\" />
  <label></label>
</form>";

$zipcode = $_POST['zip'];

echo  "<a href=\"http://www.weatherusa.net/forecasts/?pands=$zipcode\"><img src=\"http://www.weatherusa.net/forecasts/?forecast=hourly&alt=hwicc&config=png&pands=$zipcode&hwvdisplay=\" width=\"150\" height=\"100\" border=\"0\" title=\"weatherUSA.net\"></a>";

MetalHellsangel

True you can change the height and width

TwinsX2Dad

#5
I did notice their graphic is too wide. You could resize via html or you could edit & rehost the graphic or, a simpler block would be to create a javascript/html block and insert the following:

<form target="weather" action=http://www.wunderground.com/cgi-bin/findweather/getForecast ><font color=#000000><p align="center"><font size="1">Find your Weather<br>Enter City, State, Zip, or Country</font></font><br><font color=#000000><input type=text name=query size=10><input type=submit value="Forecast"></font></form>


MetalHellsangel

well here's where the graphic is if your interested in putting it on your site, but I'm not sure how it would work because it's a live graphic

http://www.weatherusa.net/wxonyoursite/

TwinsX2Dad

Right again - I just went looking at that.

MetalHellsangel

I have 200 wide side blocks, I suppost that why it looks differently on your site.

TwinsX2Dad

Unfortunately, I have too many people still running around with their resolutions set at 640X480 - nice wide columns are out of the question.

640X480 computer users whine a lot.   ;D