Weather Generator [library support]
Jan 2, 2013 2:17:37 GMT -8
Boy_Wonder and P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ like this
Post by Wormopolis on Jan 2, 2013 2:17:37 GMT -8
Browsers tested: FF, IE, Chrome
www.proboards.com/library/plugins/item/106
Lets you display an image that changes once a day (or when you want it to change). You can set up how much randomization occurs with weighting.
go into your templates, and create any object with the id="weather". could be a div, span, td, whatever. as long as it has id="weather"
if you are using time based image changes, create images with the same name as your current weather images, with _night appended to end in the same directory. so:
sunny.jpg
sunny_night.jpg
windy.jpg
windy_night.jpg
you must have _night images for ALL your images or the code will show a "missing file" image where it would normally show image. if you want a particular image to be same regardless of time, just make 2 images the same, but with different names.
if you opt to use temperatures, all numbers must be in your chosen unit (celsius or fahrenheit). it will display the other in parenthesis. you can also choose to have it fluctuate temp based on time of day, where lows are around mindnight, while highs are around noon, and it scales in between.
Regional Types allow you to setup multiple weather images based on specific places. you can give the places timezone offsets to adjust for their time of day. give each one a unique target identifier that will place it inside an element with id="identifier" on the page. each region can setup weather types for that region based on month, and putting multiple types affects frequency. each type must use same label as weather type, and separated by commas. Like: Sunny,Sunny,Rainy,Windy
BASIC WEATHER DISPLAY:
dont worry about any of the regional or temperature gradiant stuff. just create your weather types, put the frequencies for each month, and if you want a temperature to show, you can put in a high and low. This is if you only are wanting to show a weather for a single location. you can still do the optional day/night images as well.
REGIONAL WEATHER DISPLAY:
if you want different weathers to show for different locations, it gets a little more complicated. set all the frequencies in the weather types to 1. then use the regional array to control the weather type frequencies each month by just listing them multiple times.
TEMPERATURE GRADIANTS:
these will work in either single display or regional display mode. you choose the weather label, the month, and set a low and high temp in this array. if you are using regions, you can list the region(s) to apply to. if left blank it will apply to single display. now you can have your sunny day in august be from 80F to 100F, but a sunny day in January be 40F to 50F. If a listing for that weather-month-[region] doesnt exist, it will default back to the range set on the weather type itself.
converted from the v4.5 code
www.proboards.com/library/plugins/item/106
Lets you display an image that changes once a day (or when you want it to change). You can set up how much randomization occurs with weighting.
go into your templates, and create any object with the id="weather". could be a div, span, td, whatever. as long as it has id="weather"
if you are using time based image changes, create images with the same name as your current weather images, with _night appended to end in the same directory. so:
sunny.jpg
sunny_night.jpg
windy.jpg
windy_night.jpg
you must have _night images for ALL your images or the code will show a "missing file" image where it would normally show image. if you want a particular image to be same regardless of time, just make 2 images the same, but with different names.
if you opt to use temperatures, all numbers must be in your chosen unit (celsius or fahrenheit). it will display the other in parenthesis. you can also choose to have it fluctuate temp based on time of day, where lows are around mindnight, while highs are around noon, and it scales in between.
Regional Types allow you to setup multiple weather images based on specific places. you can give the places timezone offsets to adjust for their time of day. give each one a unique target identifier that will place it inside an element with id="identifier" on the page. each region can setup weather types for that region based on month, and putting multiple types affects frequency. each type must use same label as weather type, and separated by commas. Like: Sunny,Sunny,Rainy,Windy
BASIC WEATHER DISPLAY:
dont worry about any of the regional or temperature gradiant stuff. just create your weather types, put the frequencies for each month, and if you want a temperature to show, you can put in a high and low. This is if you only are wanting to show a weather for a single location. you can still do the optional day/night images as well.
REGIONAL WEATHER DISPLAY:
if you want different weathers to show for different locations, it gets a little more complicated. set all the frequencies in the weather types to 1. then use the regional array to control the weather type frequencies each month by just listing them multiple times.
TEMPERATURE GRADIANTS:
these will work in either single display or regional display mode. you choose the weather label, the month, and set a low and high temp in this array. if you are using regions, you can list the region(s) to apply to. if left blank it will apply to single display. now you can have your sunny day in august be from 80F to 100F, but a sunny day in January be 40F to 50F. If a listing for that weather-month-[region] doesnt exist, it will default back to the range set on the weather type itself.
converted from the v4.5 code