cloudy

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

0 Members and 1 Guest are viewing this topic.

Offline weatherc

  • Posts: 1,789
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #60 on: September 05, 2010, 09:59:32 AM »
Hi Guys!

Tooltip...
Great! For future referense if someone want to customize the tooltip, its css-stuff are found in jquery.wxsim.allinone.js at line 61 are a "function showTooltip". :)

Missing icon...
Humm...We need to try to figure out what is the "raw" name (like nstsra) what it try to parse from, will add some debuginfo to alt-text so we see, ready in 1 hour.

Lastret...
The script is built so there are 5 choosen from the temperetures and 5 from the rest. Not fully sure in wich order the temps are if choose different but i have
AIR   DEW   WCF   HT.I  BLYR
Where BLYR is not used, its just as a fill there...
The script itself are then parsing the values backvards (most to right are no 0) because the wxtype-txt caused else some problems while parsing.

IE7..
Yeah, thats a odd issue, only shown in IE7 and IE8 compatible view...Not fully sure yet how to solve it, both issues are normal style-settings in the code what look like IE igonre...damn strange...

henkka

EDIT: Debugtext added to to the alt-text for "plaintext-forecast", changed file wxsim.allinone.plaintextparser.php or at line 570 change
Code: [Select]
$WXSIMbic[$i] = "<img src=\"$iconDir$newicon\" alt=\"\" />";to
Code: [Select]
$WXSIMbic[$i] = "<img src=\"$iconDir$newicon\" alt=\"$ic||$WXSIMpop[$i]\" />";That should tell us some more info about the icon hopefully...
« Last Edit: September 05, 2010, 10:07:37 AM by weatherc »

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,500
  • 160 mls Carmignano (Po), Tuscany, Italy
    • Meteocarmignano.it
Re: Wxsim 3in1 script
« Reply #61 on: September 05, 2010, 11:16:01 AM »
Hi Martin,
thanks for your answer  :D
I've set the lastret.txt like you and i've tried some path to jquery folder.....
The results is a bit better.
Now the problem are:

1) The icons still not showing in the main and detail forecast.
2) the forecast icons in hour by hour graph are not correctly alignment. (Please look the attachment)
3) I don't manage to translate the script despite i've uploaded the plaintext-parser-lang.it.txt in the root of my webserver.

Edit: My actual settings:
Code: [Select]
// Icondir-paths (Yeah, we have 5 sets of them :D)
$iconDir ='wxsim/img/dotvoid_frc/';           // Dotvoid icons
$iconDirb = 'wxsim/img/dotvoid_mini/';        // Dotvoid mini
$bignumbdir = "wxsim/img/bignumb/";           // colorized numbers
$windarrows = "wxsim/img/arrows/";            // windarrows
$uvimg = "wxsim/img/UV_icons/";               // UV-icons

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

// Other paths
$pathtolsparser = 'wxsim/wxsim.allinone.lastretparser.php';
$lastretfile = "./lastret.txt";
$plaintextFile = './plaintext.txt';       // location of the WXSIM plaintext.txt
$filea = 'wxsim/plaintext-parser-data.php';
$fileb = ./plaintext-parser-lang-'.$lang.'.txt';  // just change the path, language are detetcred auto

Many thanks in advance,

Alessandro
« Last Edit: September 05, 2010, 11:22:30 AM by i_fiorentino »

Offline Budgie

  • Martin
  • Global Moderator
  • Posts: 5,584
  • WML Station: WD00934 CWOP: CW7959
  • Isle of Lewis, Scotland
    • Hebrides-Weather
Re: Wxsim 3in1 script
« Reply #62 on: September 05, 2010, 12:03:41 PM »
EDIT: Debugtext added to to the alt-text for "plaintext-forecast", changed file wxsim.allinone.plaintextparser.php or at line 570 change
Code: [Select]
$WXSIMbic[$i] = "<img src=\"$iconDir$newicon\" alt=\"\" />";to
Code: [Select]
$WXSIMbic[$i] = "<img src=\"$iconDir$newicon\" alt=\"$ic||$WXSIMpop[$i]\" />";That should tell us some more info about the icon hopefully...

Hi Henkka,

I've added the debug and on the latest run it comes up with scttssctlra||30.
I've added the following into line 585 & 605 in the wxsim.allinone.functions.php file and that's sorted the problem:
Code: [Select]
case ($oldicon == "scttssctlra"): $newicon = "29.png"; break;So it's just a case of adding more to the lists as they come up.  :wink:

Offline krekel

  • Posts: 488
  • Assen, Netherlands
    • Weerstation Assen
Re: Wxsim 3in1 script
« Reply #63 on: September 05, 2010, 12:33:28 PM »
Hello,

I read some things about the tooltip but it`s not clear to me how it get to work.
I can`t see the tooltip or at least I don`t see text.

Can someone explain what where to change?

For me all the rest is working. Great!

Oebel

Offline Budgie

  • Martin
  • Global Moderator
  • Posts: 5,584
  • WML Station: WD00934 CWOP: CW7959
  • Isle of Lewis, Scotland
    • Hebrides-Weather
Re: Wxsim 3in1 script
« Reply #64 on: September 05, 2010, 12:43:59 PM »
Hi Martin,
thanks for your answer  :D
I've set the lastret.txt like you and i've tried some path to jquery folder.....
The results is a bit better.
Now the problem are:

1) The icons still not showing in the main and detail forecast.
2) the forecast icons in hour by hour graph are not correctly alignment. (Please look the attachment)
3) I don't manage to translate the script despite i've uploaded the plaintext-parser-lang.it.txt in the root of my webserver.

Edit: My actual settings:
Code: [Select]
// Icondir-paths (Yeah, we have 5 sets of them :D)
$iconDir ='wxsim/img/dotvoid_frc/';           // Dotvoid icons
$iconDirb = 'wxsim/img/dotvoid_mini/';        // Dotvoid mini
$bignumbdir = "wxsim/img/bignumb/";           // colorized numbers
$windarrows = "wxsim/img/arrows/";            // windarrows
$uvimg = "wxsim/img/UV_icons/";               // UV-icons

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

// Other paths
$pathtolsparser = 'wxsim/wxsim.allinone.lastretparser.php';
$lastretfile = "./lastret.txt";
$plaintextFile = './plaintext.txt';       // location of the WXSIM plaintext.txt
$filea = 'wxsim/plaintext-parser-data.php';
$fileb = ./plaintext-parser-lang-'.$lang.'.txt';  // just change the path, language are detetcred auto

Many thanks in advance,

Alessandro


Alessandro,

1. I know what it was, something that Simon posted earlier and had slipped my mind.  #-o

Open wxsim.allinone.settings.php and go to line 18, is will look something like this:
Code: [Select]
$filea = 'wxsim/plaintext-parser-data.php';Change is to this:
Code: [Select]
$filea = 'plaintext-parser-data.txt';
2. See what the hour by hour icons do when you've completed the above.

3. Not sure about the translate script but make sure that you have 'it' on line 60 of the wxsim.allinone.settings.php file.

Offline weatherc

  • Posts: 1,789
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #65 on: September 05, 2010, 01:04:44 PM »
Budgie,

Great work! Will add that to the zip too.
Yeah, it should be quite easy to add new icons to the list, tought there are 300+ defined allready ;)

Alessandro,
Iconline..
Play with theese settings:
$iconlinewidth = "780";   
$iconlinepadding = "55";
Linewidth is the width of the line of icons and padding moves the line to left/right.
If even that not help, in xxx.lastretparser.php at line 436 or so are found this
Code: [Select]
$wxsimbody .='<td style="width: '.$piece.'px;text-align:center"><img src="'.$iconDirb.$condics[$i].'" alt="" height="24"/>Try to decrease that 24 to 23 or 22 in case of the table of icons gets too wide and total width are more than the set, that will decrease the table's needed width.

Translation..
It use $lang-variable to detect language, as it is used in CL-template i think (and also on my page), that langauage-setting in settings.php are one what i'm not fully sure are needed there or not.
if you use one language only on your page you can add follow before you include the scripts:
$lang = 'it';

henkka

Online Bashy

  • Posts: 1,086
  • Northants, UK
    • Northants Weather
Re: Wxsim 3in1 script
« Reply #66 on: September 05, 2010, 02:11:00 PM »
Hi Henkka,

I've added the debug and on the latest run it comes up with scttssctlra||30.
I've added the following into line 585 & 605 in the wxsim.allinone.functions.php file and that's sorted the problem:
Code: [Select]
case ($oldicon == "scttssctlra"): $newicon = "29.png"; break;So it's just a case of adding more to the lists as they come up.  :wink:

Great result Martin, thank you, working ok now :)
Kind regards

Martin

Bashys Hosting


Offline FORSURH

  • Posts: 163
  • Grootegast,NL
    • Weerstation Grootegast
Re: Wxsim 3in1 script
« Reply #67 on: September 05, 2010, 04:11:49 PM »
Hi Guys,

Got it working....sort of...

When i use the latestret.txt of a collega with times 1.30 2.00 2.30 3.00 etc

It works fine

But mine with times

0.55 1.25 1.55 2.25 etc

Does not work. I mailed Tom how to set this times, but it has to work too, isnt?


Greetz,
Wisse

Errorcode:

Bericht: 'undefined' is empty or no object
Regel: 8
Teken: 17216
Code: 0
URI: http://www.weerstation-grootegast.nl/jquery/jquery.wxsim.flot.js

« Last Edit: September 05, 2010, 04:26:29 PM by FORSURH »

Offline Budgie

  • Martin
  • Global Moderator
  • Posts: 5,584
  • WML Station: WD00934 CWOP: CW7959
  • Isle of Lewis, Scotland
    • Hebrides-Weather
Re: Wxsim 3in1 script
« Reply #68 on: September 05, 2010, 05:03:56 PM »
Henkka,

I hope you don't mind but I had a little play around with the temp numbers and wind arrows as I wanted them to stand out a little better.
There's a sample attached or you can see them here: http://www.hebwx.co.uk/wxforecast3.php

I've put the "arrows" and "bignumb" folders into a zip file that you can download if anyone else wants to use them: http://www.hebwx.co.uk/arrows_bignumb.zip

Just rename the original "arrows" and "bignumb" files (in case you want to go back  :wink: ) and then extract the downloaded ones into the same directory as the originals.
« Last Edit: September 05, 2010, 10:34:44 PM by Budgie »

Offline FORSURH

  • Posts: 163
  • Grootegast,NL
    • Weerstation Grootegast
Re: Wxsim 3in1 script
« Reply #69 on: September 05, 2010, 05:15:52 PM »
The times on my lastret.txt is because i don't use my own data.

Its the Metar time, every 5 min before half hour or hour.

I contacted Tom and he told me that.


So, Henkka, is it a possibilty to read the lastret.txt file with the 5 min before time?

Greetz,
Wisse

Online Bashy

  • Posts: 1,086
  • Northants, UK
    • Northants Weather
Re: Wxsim 3in1 script
« Reply #70 on: September 05, 2010, 05:54:22 PM »
Henkka,

I hope you don't mind but I had a little play around with the temp numbers and wind arrows as I wanted them to stand out a little better.
There's a sample attached or you can see them here: http://www.hebwx.co.uk/wxforecast3.php

I've put the "arrows" and "bignumb" folders into a zip file than you can download if anyone else wants to use them: http://www.hebwx.co.uk/arrows_bignumb.zip

Just rename the original "arrows" and "bignumb" files (in case you want to go back  :wink: ) and then extract the downloaded ones into the same directory as the originals.

Very nice Martin, me gonna use them, thank you for the contribution....
Kind regards

Martin

Bashys Hosting


Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,500
  • 160 mls Carmignano (Po), Tuscany, Italy
    • Meteocarmignano.it
Re: Wxsim 3in1 script
« Reply #71 on: September 05, 2010, 06:48:27 PM »
Budgie,

Great work! Will add that to the zip too.
Yeah, it should be quite easy to add new icons to the list, tought there are 300+ defined allready ;)

Alessandro,
Iconline..
Play with theese settings:
$iconlinewidth = "780";  
$iconlinepadding = "55";
Linewidth is the width of the line of icons and padding moves the line to left/right.
If even that not help, in xxx.lastretparser.php at line 436 or so are found this
Code: [Select]
$wxsimbody .='<td style="width: '.$piece.'px;text-align:center"><img src="'.$iconDirb.$condics[$i].'" alt="" height="24"/>Try to decrease that 24 to 23 or 22 in case of the table of icons gets too wide and total width are more than the set, that will decrease the table's needed width.

Translation..
It use $lang-variable to detect language, as it is used in CL-template i think (and also on my page), that langauage-setting in settings.php are one what i'm not fully sure are needed there or not.
if you use one language only on your page you can add follow before you include the scripts:
$lang = 'it';

henkka

Hi Henkka and Martin!
I've tried with your settings but without success! :(
The same thing with italian tranlation language.
I've attached my wxsim.allinone.settings.php and wxsim.allinone.lastretparser.php.
I have plaintext.txt, plaintext-parser.data.txt and plaintext-parser-lang.-it.txt in the root and the rest of the script in wxsim folder.
Thanks in advance for your help,

Alessandro
« Last Edit: September 05, 2010, 06:58:27 PM by i_fiorentino »

Online Bashy

  • Posts: 1,086
  • Northants, UK
    • Northants Weather
Re: Wxsim 3in1 script
« Reply #72 on: September 05, 2010, 07:01:40 PM »
Hi Henkka

I just noticed that the windspeed on the graph is in m/s in the tooltip but mph down the side
Is there a setting i have missed as we use mph (well i do lol)

Also, The hour by hour, what do i need to change so that it actually shows every hour please as
its currently every 3 hours?
« Last Edit: September 05, 2010, 07:08:28 PM by Bashy »
Kind regards

Martin

Bashys Hosting


Offline weatherc

  • Posts: 1,789
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #73 on: September 05, 2010, 07:28:43 PM »
Wisse,

Lastret needs to be xx:00 and xx:30 (= with local data) for the script to work as it is now because it use the minutes to get only one of them for ex. calculating PoP as per Tom's instructions ;)
But, will take a look and see if we could change it so it use "first data of every hour" instead.

Martin,
Looking great! Will use them too :))

Bashy,
As now it works only per 3 hours-basis :(
But will keep on mind and see if we could get that customizable ;)

Alessandro,
The default settings in the script are actually my live settings, with triple languages enabled (ok, i know, only finnish are the most uptodate there), so they *should* work.

Henkka

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,500
  • 160 mls Carmignano (Po), Tuscany, Italy
    • Meteocarmignano.it
Re: Wxsim 3in1 script
« Reply #74 on: September 05, 2010, 07:41:25 PM »
Henkka,
Could you give me an eye about wret settings?
I've attached it below.
Quote
The default settings in the script are actually my live settings, with triple languages enabled (ok, i know, only finnish are the most uptodate there), so they *should* work.
And now, what should i do?
Thanks,

Alessandro
« Last Edit: September 05, 2010, 07:44:30 PM by i_fiorentino »