Author Topic: All Time Records pages are showing humidity vaules in degrees F, not percent  (Read 6068 times)

Offline Eternalfreeze

  • New member
  • *
  • Posts: 6
    • Northern Androscoggin County Weather
I just noticed this. All pages in the All Time Records on my site show humidity values as degrees F instead of percent. The other pages are correct. I thought it was a Cumulus issue and I posted there, but someone said it was my template. I'm using the Weather Eden template and the only changes that have been made since I installed it, is I got the newest Cumulus update a month ago and I did an update on some files with the Weather Eden management utility. I'm not fully convinced it isn't Cumulus but I'm posting here anyway. The person who replied there told me there is a problem in the strings that are similar to:
<td class="right_align"><span id="HumH">98</span> &deg;F</td>
After searching relevant files for that and similar strings using the search function in Notepad2 and finding no matches, I let Windows do a search for that and similar strings in every file in my Cumulus folder and that string does not exist in any file in the Cumulus folder. I know nothing about php coding (or HTML for that matter, but I can edit a file if someone tells me what to change). So I'm hoping someone here can help me. The pages where this error can be seen on my site are at:
http://home.myfairpoint.net/~jody2011/multirecords.php

Thanks for any help you can give me.


Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Hi,

Thanks to report this mistake!  ::)
File is fixed and available in TMM (manage.php) now!

I'll send a new zip shortly.

Regards,
Jacques
« Last Edit: December 08, 2014, 07:56:32 PM by Mr.Meteo »
Please, consider supporting this site 

Offline Andy9164

  • Full Member
  • ***
  • Posts: 87
    • Midlifedad
Hi Eternalfreeze and Hi Jaques. Just dropped by today and saw this post. WOW!!!! you must have eyes like a hawk Eternalfreeze, I have been using my own variation of one of Jacques templates for many months and never spotted it. Its now all corrected though.

Dont be afraid of php and HTML, have a go. I was in the same situation as you a year ago, had no idea about websites, php etc but once you understand the principle it becomes much clearer. So much so I managed to develop my own website based on Jaques templates.http://midlifedad.me.uk

I am not saying its easy and I have spent a lot of time learning. Read the home page on my website.

I know there is some good information on this website here. Have a look at the DIYers Corner on the home page http://weatherbyyou.com/index.php

In simple terms php allows you to use a value or phrase on many pages. A good example is the language files. As an example, to stop me having to type "Welcome To" everywhere I can just insert the php string it relates to which is $Tr_welcome, I now can hear you saying, yes but you still have to type $Tr_welcome where ever you want it to appear, and you are right, but if I want to change the phrase to just say "Welcome" then I only need to change it in the language file and then my whole website makes the change where ever the phrase appears. Imagine how many times you would need to change a C to an F if you changed the temperature measurement unit. I hope that makes sense.

So to your original question. In the file multirecords_txt is this string:

<td class="right_align"><span id="HumH"><?php echo $ByMonth01HumH; ?></span><?php echo' '.$tempunit; ?></td>
You can see at the end, $tempunit, this will display the current value of the temperature unit as you have set on your weather station software. (There a bit of hidden magic that I dont know how it works that gets this information from your weather station to your weather program and into a useable file) but you will find the current value of this "variable" in the wt_data_inc file right near the top. As far as I know there is no need for a variable for the Humidity unit as its always going to be constant (%) so in my multirecords_txt file I changed the line to this:
td class="right_align"><span id="HumL"><?php echo $ByMonth01HumL; ?></span>%</td>.
I cant use a php variable as there isnt one, so I removed the need for php and just put in a %. I also had to do the next line down as well.

Once again thanks for spotting this an I hope this helps and encourages you to have a go.

Andy