Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

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: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Post by mcrossley » Mon 09 Mar 2015 1:39 pm

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 » Tue 10 Mar 2015 9:48 am

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 » Tue 10 Mar 2015 10:30 am

: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 » Tue 10 Mar 2015 10:55 am

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: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Post by mcrossley » Tue 10 Mar 2015 11:12 am

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 » Tue 10 Mar 2015 11:36 am

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 » Fri 22 May 2015 7:54 am

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: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Post by mcrossley » Fri 22 May 2015 9:49 am

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 » Tue 26 May 2015 6:33 am

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: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Post by mcrossley » Tue 26 May 2015 8:42 pm


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 » Wed 27 May 2015 9:46 am

Yes it is :oops:
Thanks :D
Image

richard_newberry
Posts: 291
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Debian Stretch (VMWARE Esxi 6.5)
Location: Leicester
Contact:

Re: Top 10 Records Page

Post by richard_newberry » Mon 11 Jan 2016 12:51 am

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
http://www.desford-weather.co.uk
http://desford-weather.co.uk
Also on Desford weather underground.
Looking forward to cumulus on Linux platform it'll rock!!

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Post by mcrossley » Mon 11 Jan 2016 9:28 am

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: 291
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Debian Stretch (VMWARE Esxi 6.5)
Location: Leicester
Contact:

Re: Top 10 Records Page

Post by richard_newberry » Mon 11 Jan 2016 10:52 pm

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
http://www.desford-weather.co.uk
http://desford-weather.co.uk
Also on Desford weather underground.
Looking forward to cumulus on Linux platform it'll rock!!

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Post by mcrossley » Tue 12 Jan 2016 10:36 am

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