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 4018) - 28 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

User avatar
mcrossley
Posts: 12694
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 »

This script requires a MySQL database to work, it will not work with the Cumulus data files. You need to look at the ImportCumulus script in the Wiki to set up your database first.
MeteoBisignano
Posts: 79
Joined: Mon 09 Mar 2015 10:45 am
Weather Station: wh3080
Operating System: windows
Location: Cosenza

Re: Top 10 Records Page

Post by MeteoBisignano »

The version of the files uploaded on my site are as follows: NOAAMO0315.txt how do I create the archive with the script importcumulus2.0.php?
MeteoBisignano
Posts: 79
Joined: Mon 09 Mar 2015 10:45 am
Weather Station: wh3080
Operating System: windows
Location: Cosenza

Re: Top 10 Records Page

Post by MeteoBisignano »

:groan: :groan: :groan:
Last edited by MeteoBisignano on Tue 10 Mar 2015 10:56 am, edited 1 time in total.
MeteoBisignano
Posts: 79
Joined: Mon 09 Mar 2015 10:45 am
Weather Station: wh3080
Operating System: windows
Location: Cosenza

Re: Top 10 Records Page

Post by MeteoBisignano »

Now I have solved the above error please inserivo '........'; Now I do not return errors but the following warning:


Error: You must supply a 'file' parameter / value

This is the part of the code to be changed:


// You must pass several options with your URL ...
// They can be in any order but the first one must start with? other with &
//
   $Type = 'dayfile';
// This must be either the phrase dayfile, monthly, or realtime
//
    $File = 'dayfile.txt';
// The location on your webserver, related to this script location, of your Cumulus File
// Example file = dayfile.txt or file = .. / data / dayfile.txt
//
   $Table = "./ forbbiden /";
// Within the SQL table to import the data. If it does not exist the script will create it
//
// Key = xxxxx
// A security key, unique to you, to pass as part of the URL. This stops others from
// Running the script on your server if the do not know the key.
//
// RetainVal = nnn [optional]
// The elapsed of 'retainUnit's to keep in the table realtime. Records older than nnnUnits will be deleted.
//
// RetainUnit = xxxx [optional, mandatory if retainVal supplied]
// The units to be applied to retainVal, valid values ​​are: second, minute, hour, day, week, month, quarter, or year
//
// Example URLs ...
// htp://www.myserver.com/ImportCumulusFile.php? ... ayfile.txt
// htp://www.myserver.com/ImportCumulusFile.php? ... t12log.txt
// htp://www.myserver.com/ImportCumulusFile.php? ... nUnit=hour
//
// COMMAND LINE
// It is possible to run this anche script from a PHP command line, eg via a cron job on Linux, or a scheduled task in Windows.
// Example of a 'Windows' command line ...
Php // importcumulusfile.php file = realtime.txt table = Realtime type = realtime key = letmein retainVal = 48 = retainUnit hour
//


My dayfile.txt is loaded into the root of the site but can not read it
Thanks Mark and I'm sorry for the inconvenience
User avatar
mcrossley
Posts: 12694
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 »

As this has nothing to do with the Top10s script can you start a new topic please.
MeteoBisignano
Posts: 79
Joined: Mon 09 Mar 2015 10:45 am
Weather Station: wh3080
Operating System: windows
Location: Cosenza

Re: Top 10 Records Page

Post by MeteoBisignano »

mcrossley wrote:As this has nothing to do with the Top10s script can you start a new topic please.
Ok open a new post :clap:
Last edited by MeteoBisignano on Tue 10 Mar 2015 11:53 am, edited 1 time in total.
ant30
Posts: 18
Joined: Thu 16 Apr 2015 4:19 pm
Weather Station: WS2307
Operating System: Win7 32bit
Location: Slovenia
Contact:

Re: Top 10 Records Page

Post by ant30 »

Hey,
im working on top10.php script.
It works and my data are from Mysql and here are is one results:

10.9 2015-05-10
11.3 2015-05-14

Id like format day like in a sample below.

10.9 10.05.2015
11.3 14.05.2015

Thaks for help
Image
User avatar
mcrossley
Posts: 12694
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 »

You will need to change all the instances of "SELECT LogDate" to "SELECT Date_Format(LogDate, format_string)"

See...
https://dev.mysql.com/doc/refman/5.5/en ... ate-format
ant30
Posts: 18
Joined: Thu 16 Apr 2015 4:19 pm
Weather Station: WS2307
Operating System: Win7 32bit
Location: Slovenia
Contact:

Re: Top 10 Records Page

Post by ant30 »

Hey,
finaly it works :clap:

One more think. Where can i change language of month name? In cPanel settings??
I have now in english language.
For example:
Id like change May to Maj, ....

Thanks
Image
User avatar
mcrossley
Posts: 12694
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 »

ant30
Posts: 18
Joined: Thu 16 Apr 2015 4:19 pm
Weather Station: WS2307
Operating System: Win7 32bit
Location: Slovenia
Contact:

Re: Top 10 Records Page

Post by ant30 »

Yes it is :oops:
Thanks :D
Image
richard_newberry
Posts: 481
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: Top 10 Records Page

Post by richard_newberry »

Is there a latest version to this?

At the top of mine I have ?>

How do you reduce the table in size so it looks better like the front page of cumulus?

I'm getting errors for not found content_header.php and content_banner.php don't know what to put in there?

Also in Dayfile in MySQL I have Name - LogDate Type - Date is that correct?

Any help be appreciated
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
User avatar
mcrossley
Posts: 12694
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 »

richard_newberry wrote:Is there a latest version to this?
Yes, link the first post of this thread.
richard_newberry wrote: At the top of mine I have ?>
?? I don't see that
richard_newberry wrote: How do you reduce the table in size so it looks better like the front page of cumulus?
Depends how you want to reduce it, fewer columns, or smaller text? Fewer columns will be the most complex as the columns/rows are embedded in the code.
richard_newberry wrote: I'm getting errors for not found content_header.php and content_banner.php don't know what to put in there?
Nothing, delete those lines, they are specific to the construction of my web page.
richard_newberry wrote: Also in Dayfile in MySQL I have Name - LogDate Type - Date is that correct?
Sounds correct to me.
richard_newberry
Posts: 481
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: Top 10 Records Page

Post by richard_newberry »

Ok Thanks.

How do I add the title of this page - http://kirbymuxloe-weather.dyndns.org/top10_records.php the same as the first page of Cumulusmx with the "Kirby Muxloe Weather and the latitude and longitude and also make the links at the bottom of the page same as cumulusmx ones and also move the "powered to cumulus" right aligned.

Thanks. Sorry to be a pain I haven't done any coding for bloody ages.
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
User avatar
mcrossley
Posts: 12694
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 »

You need to apply the same CSS as on your other pages (weatherstyle.css).
Change the top_10 container DIV class from "site_content" to "content".
Then cut and paste the bits of page header/footer from your index page into the appropriate points in the top 10 PHP script (outside the relevant <?php ?> tags of course)
Post Reply