Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Top 10 Records Page

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Top 10 Records Page

Post by water01 »

You have table definitions for the menu outside of the table delimiters.

You need to change

Code: Select all

</table>
 <tr>
<td colspan="4" class="td_navigation_bar">:<a href="index.htm">now</a>: :<a href="gauges-ss.htm">gauges</a>: :<a href="today_yesterday.htm">today/yesterday</a>: :<a href="monthYear.htm">this&nbsp;month/this&nbsp;year</a>: :<a href="record.htm">records</a>: :<a href="monthlyrecord.htm">monthly&nbsp;records</a>: :<a href="systeminfo.htm">system&nbsp;info</a>: :<a href="trends.htm">trends</a>:
	:<a href="meteogram.htm">48hr&nbsp;forecast</a>: :<a href="metoffice.htm">met&nbsp;office</a>: :<a href="seismic_monitor.htm">seismic&nbsp;monitor</a>: :<a href="NOAA.php">NOAA&nbsp;reports</a>: :<a href="winds.htm">wind&nbsp;map</a>:</td>
  </tr>
to

Code: Select all

 
 <tr>
<td colspan="4" class="td_navigation_bar">:<a href="index.htm">now</a>: :<a href="gauges-ss.htm">gauges</a>: :<a href="today_yesterday.htm">today/yesterday</a>: :<a href="monthYear.htm">this&nbsp;month/this&nbsp;year</a>: :<a href="record.htm">records</a>: :<a href="monthlyrecord.htm">monthly&nbsp;records</a>: :<a href="systeminfo.htm">system&nbsp;info</a>: :<a href="trends.htm">trends</a>:
	:<a href="meteogram.htm">48hr&nbsp;forecast</a>: :<a href="metoffice.htm">met&nbsp;office</a>: :<a href="seismic_monitor.htm">seismic&nbsp;monitor</a>: :<a href="NOAA.php">NOAA&nbsp;reports</a>: :<a href="winds.htm">wind&nbsp;map</a>:</td>
  </tr>
</table>
Tested it and it works here.

You need to clean up your table sizes 680px isn't going to cut it for this table definition.
David
Image
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: Top 10 Records Page

Post by Dennisdg »

David, Mark,

Thanks - its looking better but I can't see where/how to set the font to be smaller, then I can reduce the page width back to 680px.
The working/test page is http://www.g4glp.co.uk/new_3.php
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
User avatar
mcrossley
Posts: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Post by mcrossley »

Hi Dennis, you still have all the header tags in the document body, even the "source=view" is broken so I can't look at the code. You need to look at lines 60 through 66 which are causing some problems.
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Top 10 Records Page

Post by water01 »

You would appear to have some css code in the style at the beginning of the code

Code: Select all

<link href="weatherstyle.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="favicon1.ico">
<style>
<p class="credits">
.cell1 {
	text-align: right;
    width: 33%;
}
the <p class="credits"> should not be there.
David
Image
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: Top 10 Records Page

Post by Dennisdg »

David

Thanks, I've removed the offending line.

Now looking at Mark's reference to lines 60-66
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
User avatar
mcrossley
Posts: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Post by mcrossley »

Dennisdg wrote: Now looking at Mark's reference to lines 60-66
OK, red herring, something is going wrong before those lines to cause something to be output to the browser, then the view source tries to set the headers, but they have already been sent.

Ah, do you have a BOM (Byte order maker) on the file when you save it? Or an odd control character right at the start of the file before the opening <?php ?
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: Top 10 Records Page

Post by Dennisdg »

Mark

Can I send you the file? The editor is Notepad++ with the encoding set in UTF-8 without BOM.

I have commented out line 73-75 to suppress the headers already sent warnings.
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: Top 10 Records Page

Post by Dennisdg »

Sorry Mark

Just re-saved it and it now looks wonderful.

Thank you so much.
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
User avatar
mcrossley
Posts: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Post by mcrossley »

Great, thanks for letting me know, looks good.
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: Top 10 Records Page

Post by Dennisdg »

Is it easy/possible to change the date format to be date, month, year instead of the reverse?
Thanks
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Top 10 Records Page

Post by water01 »

I believe it done that way to make the sort order in the columns correct, and my guess would be that further definition of the output results from the MySQL queries in the data arrays would be required to make that happen.

To my way of thinking output in the current form makes sense since it immediately tells you the year in which it happened, which with a lot of data makes more sense than doing the reverse.
David
Image
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: Top 10 Records Page

Post by Dennisdg »

I can see your reasoning. I notice mysql server's database date default setting is the same as the displayed result on Mark's code.
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
User avatar
mcrossley
Posts: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Post by mcrossley »

MySQL should sort the results ok whatever date format you use for the output. The sorting is done on the internal numeric value.
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: Top 10 Records Page

Post by Dennisdg »

Good, thank you.
Last edited by Dennisdg on Wed 22 Jan 2014 2:52 pm, edited 1 time in total.
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
User avatar
pernaczy
Posts: 133
Joined: Thu 15 Nov 2012 5:42 pm
Weather Station: Fine Offset WH 2080, TFA Spring
Operating System: Windows 7
Location: Niesiolowice, Northern Poland
Contact:

Re: Top 10 Records Page

Post by pernaczy »

Finally I did it. You can see it at: http://www.pogoda-niesiolowice.kaszuby. ... ecords.php
Just some work still needs to be done with translation.

Mark,
Thanks for excellent (as usual) script.

Best Regards,
Piotr
The day when I have learned something is not the lost one.
Ignorance can be corrected with the help of a book. Stupidity requires a shotgun and a shovel.

Image
Post Reply