cloudy cloudy

Author Topic: Wxsim 3in1 script  (Read 185239 times)

0 Members and 1 Guest are viewing this topic.

Offline weatherc

  • Posts: 1,977
  • Salo, Finland
    • Weatherstation Salo,FI
Wxsim 3in1 script
« on: September 01, 2010, 03:44:01 PM »
Hi all!

After much playing around it (almost) ready. A script what put together Ken's plaintext-parser (and it is heavenly based on that), hour-by-hour-script and meteogram-graphs  :D

As background, the old meteograms did not worked ok, and on another hand, we had 3 different scripts (plaintext,hour-by-hour,graphs) what all used their own translations and used the biggy .csv-file.
In this script all translations are done with lang-xx.txt-files from plaintextparser (with few additions) and as secondly datafile are the much smaller lastret.txt used.

Demo and live can be seen here: http://www.nordicweather.net/index.php?sivu=40&lang=en

- As new are colored temperature-numbers what follow the colorshceme seen on ex. Nordic networks GoogleMap. But, sorry, there are by now only numbers for Celsius degrees created. The php/gd-script i did the numbers with have only 80 different colors defined so i got -40 to + 40. If someone want to play with it, i will provide the script by request.
- Tables shows up colorized texts for sig weather like thunder. Also in hourtable are frosts mentonied from may to september (oct-apr are winter here and frost are not anything strange) LOL
- Dumps the NOAA iconset and use a free set from a small Swedish IT company instead.

Zip can be downloaded here

To work you need to setup wxsim/wret to create/upload lastret.txt-file, more info in the README in the zip how to do it.

EDIT 26.11.2010
Added colorized/bolded snow-senytences to both tables.

cheers
henkka
« Last Edit: January 12, 2012, 08:50:00 PM by administrator »

Bashy

  • Guest
Re: Wxsim 3in1 script
« Reply #1 on: September 01, 2010, 05:27:38 PM »
Oh man, that looks really cool, I got dibs on the 1st one to break something though ;)

Seriously, thank you very much, Im gonna install it now :D

Offline weatherc

  • Posts: 1,977
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #2 on: September 01, 2010, 05:51:53 PM »
If you wonder, the wind-icons in the windgraph are done with pure javascript/canvas, no images involved there.
Its ported from the windgauge i have on my frontpage.  :lol:

Also forgot to add, the tempgraph change color when below zero C to light blue  :wink:

henkka


Bashy

  • Guest
Re: Wxsim 3in1 script
« Reply #3 on: September 01, 2010, 06:00:12 PM »
Hi Henkka, no worries, sounds good with the colour change... :)

I have hit a wee snag though, I am getting a


Warning: file(wxsim/plaintext-parser.php) [function.file]: failed to open stream: No such file or directory in /home/nortrcom/domains/northantsweather.com/public_html/wxsim/wxsim.allinone.plaintextparser.php on line 77

Now, interestingly on line 77 its looking for

$config = file('wxsim/plaintext-parser-data.php');  //

the interesting part is i cannot find that file its looking for, am i missing it, or have you rename it?

Offline jwwd

  • WML testers
  • Posts: 3,692
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Wxsim 3in1 script
« Reply #4 on: September 01, 2010, 06:06:13 PM »
Hi Henkka, no worries, sounds good with the colour change... :)

I have hit a wee snag though, I am getting a


Warning: file(wxsim/plaintext-parser.php) [function.file]: failed to open stream: No such file or directory in /home/nortrcom/domains/northantsweather.com/public_html/wxsim/wxsim.allinone.plaintextparser.php on line 77

Now, interestingly on line 77 its looking for

$config = file('wxsim/plaintext-parser-data.php');  //

the interesting part is i cannot find that file its looking for, am i missing it, or have you rename it?

Hi Simon

I think you should change plaintext-parser-data.php

to

plaintext-parser-data.txt (located where you have Kenīs plaintext-parser script)

Best regards,

Henrik

Offline weatherc

  • Posts: 1,977
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #5 on: September 01, 2010, 06:16:31 PM »
Hi Bashy,

Quote
Warning: file(wxsim/plaintext-parser.php) [function.file]: failed to open stream: No such file or directory in /home/nortrcom/domains/northantsweather.com/public_html/wxsim/wxsim.allinone.plaintextparser.php on line 77

Yeah, those 3 paths in xx.plaintextparser.php needs to be changed too (as per 2. in README ;)).
Tryed to get them as $variable to the setting-file but for some strange reason it didn't work, no idea why so far..

henkka


Bashy

  • Guest
Re: Wxsim 3in1 script
« Reply #6 on: September 01, 2010, 06:26:14 PM »
Doh, didnt even think it was a file not directly within the package  #-o

Thanks Henrik, got a step further now, still something amiss and struggling to find it

http://www.northantsweather.com/wxwxsimmulti.php

Sorry Hennka, i thought i'd done all that  :oops: Including the lang part but when i saw it running
it was still showing a none english language, i have it set to en in the settings file

Offline weatherc

  • Posts: 1,977
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #7 on: September 01, 2010, 06:32:28 PM »
When look at your page now (and with same list of notices at jwwd's page) seem i will add a setting what force php-errornotices to off in the script, that way we get ride off the them at least.

Bashy, add
Code: [Select]
<?php
error_reporting
(0);
?>

to top of that page and it will fix those.

Then, check the paths to the js-files, seems it did not find them (therefore no tabs), in the code you copied from sivu2.php but also in the settings-file.

Bashy, did it showed up finnish translation for you as default?  8O

henkka

Bashy

  • Guest
Re: Wxsim 3in1 script
« Reply #8 on: September 01, 2010, 06:59:58 PM »
Hi Henkka, I will add that now, Yeah i chose en in the settings and thats whats showing now...

Just added that bit of error code and it through up a 2 more with regards to the style switcher
that i dont use...?

Offline weatherc

  • Posts: 1,977
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #9 on: September 01, 2010, 07:05:00 PM »
language..

ahh, now i see the problem...
in almost beginning of xx.plaintextparser.php are theese 2 lines:
Code: [Select]
$lang = $_GET['lang'];
if ($_GET[lang] == "") { $lang ="fi"; }
delete them, have forgot them from my own setup/code, will update zip now.

henkka

EDIT: zip updated, also added the errorreporting to off-thing.
« Last Edit: September 01, 2010, 07:06:37 PM by weatherc »

Bashy

  • Guest
Re: Wxsim 3in1 script
« Reply #10 on: September 01, 2010, 07:26:49 PM »
Hi Henkka

Thats cured the language side of it thank you... still gettting langaue errors though and i think theres
been a needle found in the haystack, whatever that means pmsl.....

Offline weatherc

  • Posts: 1,977
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #11 on: September 01, 2010, 07:28:40 PM »
Got fixed the issue with the paths on line 75-80 in xx.plaintextparser.php, are now in the settingsfile for easier setup (you still need to check the 2 paths ate top of that file tought).

henkka

Offline weatherc

  • Posts: 1,977
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #12 on: September 01, 2010, 07:34:38 PM »
Bashy,

Add that errorreporting(0); to the top of page too ;)
Check the path to js-files, add a slash to $jsfile-settings (is "jquery" not "jquery/"?) as i saw it pushed out paths w/o that, also upload the jquery-files to that folder, seemed missing ;)

henkka

Bashy

  • Guest
Re: Wxsim 3in1 script
« Reply #13 on: September 01, 2010, 07:47:40 PM »
OK, Error reporting added back in, i took it back out cause of the theme switcher error (i dont use it)

The files are in the jquery folder, e.g. public_html/wxsim/jquery

I have the jquery setting as

// jQuerydir-path
$jsdir = "jquery";                           // js-folder

Offline weatherc

  • Posts: 1,977
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #14 on: September 01, 2010, 07:50:27 PM »
Quote
OK, Error reporting added back in, i took it back out cause of the theme switcher error (i dont use it)
Aah, ok.

jQuery's..
Try to set to
Code: [Select]
$jsdir = "wxsim/jquery/";                           // js-folderalso the slash at the end

henkka

 

cumulus