-
Invité
- rank:
- 1
- registered:
- December 2003
- Status:
- offline
- last visit:
- 06.03.05
- Posts:
- 0
Hey there,
First off, I want to thank you for your work with this module... works like a charm.
I was wondering though if there was a way to get the text for the current conditions to be displayed as well. Such as when it's "Partly Cloudy", that there would be a variable to display "Partly Cloudy", etc.
After looking through the code, it seems that this was not defined, like along with humidity and wind speed, etc. My initial thoughts are that this would be a HUGE endeavour to add, but I just wanted to know if I was was wrong about that, and didn't see the variable in the code (like for "wind speed", it's "$wind_speed")...?
Thanks, and keep up the great work!
E. -
- rank:
-
Site Admin
- registered:
- December 2003
- Status:
- offline
- last visit:
- 09.10.08
- Posts:
- 266
Hello,
Yes it would take some work to display this text but not that much
- in fact the file weather.class.php is already modified to get this info from MSNBC or weather.com because I had the intention to display it !!
- what is missing is to modify pnuserapi.php to :
* cache this info in the database
* retreive it from the database
Because I realised that I needed a new field in the database to store this data so I needed to also update pninit.php to create this field when you install the module or update the database if it's an upgrade of an old version and as I wanted to release the 1.30 version rapidly I took the decision to left it for "later"
Rethinking of it, this was a wrong decision, because as I added the field "last updated at" to the cache table, I should have taken the opportunity to add as many fields as I could think of to the cache table !!
So here is a nearly complete list of all the data that are in MSNBC (1) or weather.com (2) data (as you can see weather.com has a lot more) :
- weather as text (1 and 2)
- sunset/sunrise (2 only)
- timezone (2 only)
- latitude longitude (2 only)
- barometric variation like falling, steady, ... (2 only)
- dewey point (2 only) (I don't even know what it is !!)
- for the 5 days forecast details for day and night (2 only)
So OK the weather text will be in 1.31 with the barometric variation (because I like it), but please say me wich one of these data you find interesting, so that I can add all of them at the same time to the cache table in the next release.
This is specially important because as I have already said I plan to use templates for the display so anybody will be able to customize the display to suit his needs just editing an HTML file. So may be the best strategy is to include as much data as I can in the cache table and let everybody choose what they want !



