Sandaysoft

Support forum for Cumulus weather station software
It is currently Fri May 24, 2013 7:41 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Build 970 - Temperature webtag problem
PostPosted: Wed Dec 22, 2010 3:35 pm 
Offline

Joined: Tue Nov 16, 2010 2:44 pm
Posts: 53
Location: Beaverton, Oregon
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7-64 Ultimate
I updated to build 970 today, and I really like the new functionality.

I have a custom web page that displays the current temperature, and now there is some junk following the temperature. I think it is because there is now a place for units, but if no units are entered, shouldn't it default to not showing anything?

Current Temperature 41.5 °F ÿþ
http://shotsky.gotdns.com/webcam.htm
Thanks,
John


Top
 Profile  
 
 Post subject: Re: Build 970 - Temperature webtag problem
PostPosted: Wed Dec 22, 2010 3:41 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17589
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
shotsky wrote:
I think it is because there is now a place for units, but if no units are entered, shouldn't it default to not showing anything?
I don't understand what you mean by that. Could you show me the template that generates that page?

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Build 970 - Temperature webtag problem
PostPosted: Wed Dec 22, 2010 3:53 pm 
Offline

Joined: Tue Nov 16, 2010 2:44 pm
Posts: 53
Location: Beaverton, Oregon
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7-64 Ultimate
steve wrote:
shotsky wrote:
I think it is because there is now a place for units, but if no units are entered, shouldn't it default to not showing anything?
I don't understand what you mean by that. Could you show me the template that generates that page?


Here is the code that displays the temperature, unchanged from before build 970.
<tr class="td_temperature_data">
<td>Current Temperature</td>
<td><#temp>&nbsp;<#tempunit></td>
</tr>
As my original post shows, the temperature and units display correctly, but that is followed by some more characters that shouldn't be there. Or you can see it below the webcam on my page.

Oh, and by the way, is there a downloadable, current list of webtags? I updated the php cumuluswebtags.txt up to build 968, but now I think that's out of date too. What I'd really like is a web page that has every webtag on it with its caption. I was thinking of making one, but I have questions about usage of some of them. I might still try it.

Thanks,
John


Top
 Profile  
 
 Post subject: Re: Build 970 - Temperature webtag problem
PostPosted: Wed Dec 22, 2010 3:57 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17589
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
shotsky wrote:
Here is the code that displays the temperature, unchanged from before build 970.
<tr class="td_temperature_data">
<td>Current Temperature</td>
<td><#temp>&nbsp;<#tempunit></td>
</tr>
As my original post shows, the temperature and units display correctly, but that is followed by some more characters that shouldn't be there.

The problem is after that:

<tr class="td_temperature_data">
<td>Current Temperature</td>
<td>41.3&nbsp;&deg;F</td>
</tr>
<!--Start of menu-->
ÿþ

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Build 970 - Temperature webtag problem
PostPosted: Wed Dec 22, 2010 4:43 pm 
Offline

Joined: Tue Nov 16, 2010 2:44 pm
Posts: 53
Location: Beaverton, Oregon
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7-64 Ultimate
steve wrote:
shotsky wrote:
Here is the code that displays the temperature, unchanged from before build 970.
<tr class="td_temperature_data">
<td>Current Temperature</td>
<td><#temp>&nbsp;<#tempunit></td>
</tr>
As my original post shows, the temperature and units display correctly, but that is followed by some more characters that shouldn't be there.

The problem is after that:

<tr class="td_temperature_data">
<td>Current Temperature</td>
<td>41.3&nbsp;&deg;F</td>
</tr>
<!--Start of menu-->
ÿþ


But, the file is processed by Cumulus. There is a php call for inserting the menu in the source file. Cumulus should ignore the php call, and just process the tags, right? The previous version of Cumulus didn't show those characters, or maybe I didn't see them after inserting the bottom menu. I'll try enclosing the temperature in <p> tags to see if Cumulus processes it differently.

Here's more of the code. As you can see, it is at the point there the php call appears that the characters appear.
<!--End WebCam here -->
<br />
<tr class="td_temperature_data">
<td>Current Temperature</td>
<td><#temp>&nbsp;<#tempunit></td>
</tr>
<!--Start of menu-->
<?php include ("menu/bottom_menu.htm"); ?>
<!--End of menu-->

Thanks,
John


Top
 Profile  
 
 Post subject: Re: Build 970 - Temperature webtag problem
PostPosted: Wed Dec 22, 2010 5:01 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17589
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
shotsky wrote:
Cumulus should ignore the php call, and just process the tags, right?

Yes, that's what it does. It only processes anything between <# and >. You can check what Cumulus is actually producing by looking at the processed file on your PC. That will prove one way or the other whether Cumulus is inserting the garbage or not.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Build 970 - Temperature webtag problem
PostPosted: Wed Dec 22, 2010 6:27 pm 
Offline

Joined: Tue Nov 16, 2010 2:44 pm
Posts: 53
Location: Beaverton, Oregon
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7-64 Ultimate
steve wrote:
shotsky wrote:
Cumulus should ignore the php call, and just process the tags, right?

Yes, that's what it does. It only processes anything between <# and >. You can check what Cumulus is actually producing by looking at the processed file on your PC. That will prove one way or the other whether Cumulus is inserting the garbage or not.


Ok, problem solved, but unfortunately, I don't know exactly what fixed it. It wasn't a Cumulus problem after all. I insert menus using php so I only need to edit one menu to change them all. The top menu didn't have a problem, but the bottom menu did. They both use the same css, so it isn't the css file. When I placed the top menu at the bottom in place of the bottom menu, it worked correctly. So, I added the bottom menu items and it still worked correctly. Then, I saved the top menu as the bottom menu and that worked ok. Then, I removed the top menu items from the bottom menu, and that works too.

The only real clue I have is that when viewing the HTML source in a text editor, PHP appears to have putting the bottom menu in Unicode, but not the top one. As I view it now, they are both correct. There may be some 'thing' in PHP that makes it code a page as unicode, but I don't know what it would be. I mention this only because it might happen to someone else and maybe this will help them.

Back to 970 - excellent work. The new appearance and tweaks are awesome. If I were to ask for anything, it would be the ability to choose colors by number, so I could better match things to my web pages. I looked in the .ini file, but don't recognize the color codes. Maybe if there were a way to convert html color codes to the codes you use, I could do it by editing the .ini file.

Thanks!
John


Top
 Profile  
 
 Post subject: Re: Build 970 - Temperature webtag problem
PostPosted: Wed Dec 22, 2010 6:47 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17589
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
shotsky wrote:
I looked in the .ini file, but don't recognize the color codes. Maybe if there were a way to convert html color codes to the codes you use, I could do it by editing the .ini file.
They're 24-bit numbers like HTML colour codes, but the bytes are in reverse order, i.e where HTML goes RRGGBB in hex, Delphi goes BBGGRR. So 255 (#0000FF) is red in Delphi and blue in HTML.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group