If you use Cumulus, please donate Image

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Top 10 Records Page

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

Moderators: daj, TNETWeather

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

Re: Top 10 Records Page

Postby mcrossley » Mon Mar 09, 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 Mar 09, 2015 10:45 am
Weather Station: wh3080
Operating System: windows
Location: Cosenza

Re: Top 10 Records Page

Postby MeteoBisignano » Tue Mar 10, 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 Mar 09, 2015 10:45 am
Weather Station: wh3080
Operating System: windows
Location: Cosenza

Re: Top 10 Records Page

Postby MeteoBisignano » Tue Mar 10, 2015 10:30 am

:groan: :groan: :groan:
Last edited by MeteoBisignano on Tue Mar 10, 2015 10:56 am, edited 1 time in total.

MeteoBisignano
Posts: 79
Joined: Mon Mar 09, 2015 10:45 am
Weather Station: wh3080
Operating System: windows
Location: Cosenza

Re: Top 10 Records Page

Postby MeteoBisignano » Tue Mar 10, 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/ImportCumulusFil ... ayfile.txt
// htp://www.myserver.com/ImportCumulusFil ... t12log.txt
// htp://www.myserver.com/ImportCumulusFil ... 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: 4967
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Postby mcrossley » Tue Mar 10, 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 Mar 09, 2015 10:45 am
Weather Station: wh3080
Operating System: windows
Location: Cosenza

Re: Top 10 Records Page

Postby MeteoBisignano » Tue Mar 10, 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 Mar 10, 2015 11:53 am, edited 1 time in total.

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

Re: Top 10 Records Page

Postby ant30 » Fri May 22, 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: 4967
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Postby mcrossley » Fri May 22, 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 Apr 16, 2015 4:19 pm
Weather Station: WS2307
Operating System: Win7 32bit
Location: Slovenia
Contact:

Re: Top 10 Records Page

Postby ant30 » Tue May 26, 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: 4967
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Top 10 Records Page

Postby mcrossley » Tue May 26, 2015 8:42 pm


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

Re: Top 10 Records Page

Postby ant30 » Wed May 27, 2015 9:46 am

Yes it is :oops:
Thanks :D
Image

richard_newberry
Posts: 245
Joined: Tue Apr 12, 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Debian Jessie (VMWARE Esxi 6.0)
Location: Leicester
Contact:

Re: Top 10 Records Page

Postby richard_newberry » Mon Jan 11, 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
Kirby Muxloe Weather
http://kirbymuxloe-weather.dyndns.org web forward to http://kirbymuxloe-weather.co.uk
Also on Kirby Muxloe weather underground.
Looking forward to cumulus on Linux platform it'll rock!!

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

Re: Top 10 Records Page

Postby mcrossley » Mon Jan 11, 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: 245
Joined: Tue Apr 12, 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Debian Jessie (VMWARE Esxi 6.0)
Location: Leicester
Contact:

Re: Top 10 Records Page

Postby richard_newberry » Mon Jan 11, 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.
Kirby Muxloe Weather
http://kirbymuxloe-weather.dyndns.org web forward to http://kirbymuxloe-weather.co.uk
Also on Kirby Muxloe weather underground.
Looking forward to cumulus on Linux platform it'll rock!!

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

Re: Top 10 Records Page

Postby mcrossley » Tue Jan 12, 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)


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 4 guests