cloudy

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

0 Members and 1 Guest are viewing this topic.

Offline Budgie

  • Martin
  • Global Moderator
  • Posts: 5,588
  • WML Station: WD00934 CWOP: CW7959
  • Isle of Lewis, Scotland
    • Hebrides-Weather
Re: Wxsim 3in1 script
« Reply #90 on: September 07, 2010, 05:21:10 PM »
Hi Martin,
here i am...: <img src="wxsim/img/dotvoid_frc/" alt="Light Fog"  title="Light Fog"/><br />
This icon doesn't show in the forecast detail.
But there is another one that i'm forgotten.  :(
Regards,

Alessandro


Hi Alessandro,

With the code installed then it should read something like "fewlfg" or "nfewlfg" on the web page. This will show instead of the icon on the table.  :wink:

Offline Bashy

  • Posts: 1,086
  • Northants, UK
    • Northants Weather
Re: Wxsim 3in1 script
« Reply #91 on: September 07, 2010, 05:58:33 PM »


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

Henkka

Hi Henkka, would be great if you could keep it in mind for future fiddling :)

Even if the next 24 hours was only every hour and the rest every 3 hour, that would be great, only
asking because i have asked folks to comment on the new script and im getting good feedback (didnt
think it would be anything other than :)) but some have asked about the hourly forecast...

Failing that, how hard would be it to integrate an existing script in to a new "tab"?
e.g. http://www.northantsweather.com/wxhourly.php  but just the hourly part.....?
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 #92 on: September 07, 2010, 06:35:02 PM »
Hi Alessandro,

With the code installed then it should read something like "fewlfg" or "nfewlfg" on the web page. This will show instead of the icon on the table.  :wink:

Martin,
 :? i don't manage to see anything. The only thing is "Light fog".
However....please, look the attachment or visit this link: http://www.meteocarmignano.it/wxsimallinone.php?lang=en
Regards,

Alessandro

Offline krekel

  • Posts: 488
  • Assen, Netherlands
    • Weerstation Assen
Re: Wxsim 3in1 script
« Reply #93 on: September 07, 2010, 07:57:48 PM »
Open your WRET program and on the left hand side of the window you should see a box marked "Number of Days", just change this to the number of days you want to display.  :wink:


Hi Martin,

Thanks. So simple, but you must now it.

I would like the possibility to choose how many icons are in the meteogram. For me there are to many. I can`t get the icons fit on the page when I choose the 7 day forecast.
I think 2 or 3 icons per day is enough.

May be an idea Henkka?

Offline Budgie

  • Martin
  • Global Moderator
  • Posts: 5,588
  • WML Station: WD00934 CWOP: CW7959
  • Isle of Lewis, Scotland
    • Hebrides-Weather
Re: Wxsim 3in1 script
« Reply #94 on: September 07, 2010, 11:27:11 PM »
Martin,
 :? i don't manage to see anything. The only thing is "Light fog".
However....please, look the attachment or visit this link: http://www.meteocarmignano.it/wxsimallinone.php?lang=en
Regards,

Alessandro


Alessandro,
Just confirm that line 570 in your wxsim-allinone-plaintextparser.php file looks like this:
Code: [Select]
$WXSIMbic[$i] = "<img src=\"$iconDir$newicon\" alt=\"$ic||$WXSIMpop[$i]\" />";
It's the "alt=\"$ic||$WXSIMpop[$i]" part at the end that's the important part as it's this that will display the code Henkka needs to add any missing icons.  :wink:

Martin

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,500
  • 160 mls Carmignano (Po), Tuscany, Italy
    • Meteocarmignano.it
Re: Wxsim 3in1 script
« Reply #95 on: September 08, 2010, 07:29:38 AM »
Hi Martin!
Here it is my line 570:  $WXSIMbic[$i] = "<img src=\"$iconDir$newicon\" alt=\"\" />";

Offline Budgie

  • Martin
  • Global Moderator
  • Posts: 5,588
  • WML Station: WD00934 CWOP: CW7959
  • Isle of Lewis, Scotland
    • Hebrides-Weather
Re: Wxsim 3in1 script
« Reply #96 on: September 08, 2010, 08:30:02 AM »
If you change your line 570 for the one I posted above then, when a missing icon is found, it will give Henkka the code he needs to add. It will show this code on your web page in place of the missing icon. Just note the code and post it on here.  :wink:

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,500
  • 160 mls Carmignano (Po), Tuscany, Italy
    • Meteocarmignano.it
Re: Wxsim 3in1 script
« Reply #97 on: September 08, 2010, 09:33:11 AM »
Hi Martin,
finally i've understood  :lol:
Ok, i've changed the code.

Two questions remains.
1) In this new script doesn't show anymore when wxsim updated (Please look the first attachment). Is it possible to re-insert that text?
2) Is it possible imported only the summary icons in Home page like the single script? (Look the second attachment)
Once again thanks,

Alessandro
« Last Edit: September 08, 2010, 01:07:40 PM by i_fiorentino »

Offline Torjan

  • Posts: 118
  • vantage pro2 plus
  • Randaberg. Norway
    • Regnskvett verstasjon
Re: Wxsim 3in1 script
« Reply #98 on: September 08, 2010, 03:12:21 PM »
Are there no others who have experienced this, mouse over meteogram provides only an empty box. This applies only when I put it into the webpage. Is fine when it is as a standalone page. Know that this was a problem on the old meteogram, can not remember if it was fixed.

Offline Bashy

  • Posts: 1,086
  • Northants, UK
    • Northants Weather
Re: Wxsim 3in1 script
« Reply #99 on: September 08, 2010, 05:56:58 PM »
It has been fixed, its because your css (site template) is using the same colour (White) therefore the text
in the tooltip is showing up as white, Update this file jquery.wxsim.allinone.js :D
Kind regards

Martin

Bashys Hosting


Offline weatherc

  • Posts: 1,789
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #100 on: September 08, 2010, 06:11:19 PM »
Hi guys!

Having an update almost ready, with fixes for some of the issues seen, ex. the IE7-issue are fixed 8)

Alessandro,
Quote
In this new script doesn't show anymore when wxsim updated (Please look the first attachment). Is it possible to re-insert that text?
For this part:
Code: [Select]
Fresh forecast 4 times a day, at 04, 10, 16 and 22.I have added that line manually before the wxsim-code ;)
The rest are from orginal wxsim-plaintextparser
Code: [Select]
<span style="float: right;"><b><?php echo get_lang("Updated:");?></b> <?php echo $fcstage?><br/></span>
<b><?php echo get_lang("WXSIM Forecast for:");?> </b><?php echo $WXSIMcity?><br />
<b><?php echo get_lang("Made by");?>:</b> <?php echo get_lang("Weatherstation");?> Halikko<br/><br/>
Where $fcstage is a simple php-query with filemtime('pathtoplaintext.txt') and then that trought date-function like this:
Code: [Select]
$fcstage = filemtime('plaintext.txt');
$fcstage = date('d.m.Y H:i T', $fcstage);

Code: [Select]
Is it possible imported only the summary icons in Home page like the single script? (Look the second attachment)
I have it on my frontpage, just use the top-part of the <body>-code in sivu2.php and left out the tabs and all what they include. The main functions for plaintextparser are all still there, i haven't changed them in any way, only added a few new arrays to choose from and the table-output ;)
Here is what i use on my frontpage:
Code: [Select]
<table style="width:980px;">
<tr>
<?php 
echo "
<td style=\"width:16%;text-align:center;\">
$WXSIMicons[0]</td>
<td style=\"width:16%;text-align:center;\">
$WXSIMicons[1]</td>
<td style=\"width:16%;text-align:center;\">
$WXSIMicons[2]</td>
<td style=\"width:16%;text-align:center;\">
$WXSIMicons[3]</td>
<td style=\"width:16%;text-align:center;\">
$WXSIMicons[4]</td>
<td style=\"width:16%;text-align:center;\">
$WXSIMicons[5]</td>
\n"
?>


</tr>
<tr>
<?php 
echo "
<td class=\"topforecasttemp\" style=\";text-align:center;\"><b>
$WXSIMtempbig[0]</b></td>
<td class=\"topforecasttemp\" style=\";text-align:center;\"><b>
$WXSIMtempbig[1]</b></td>
<td class=\"topforecasttemp\" style=\";text-align:center;\"><b>
$WXSIMtempbig[2]</b></td>
<td class=\"topforecasttemp\" style=\";text-align:center;\"><b>
$WXSIMtempbig[3]</b></td>
<td class=\"topforecasttemp\" style=\";text-align:center;\"><b>
$WXSIMtempbig[4]</b></td>
<td class=\"topforecasttemp\" style=\";text-align:center;\"><b>
$WXSIMtempbig[5]</b></td>
\n"

?>


</tr>
</table>

<br/>

<div class="topforecasttext">
<b><? echo $WXSIMday[0] ?></b><br /><? echo $WXSIMtext[0] ?><br/><br/>

 

Henkka
« Last Edit: September 08, 2010, 06:28:19 PM by weatherc »

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,500
  • 160 mls Carmignano (Po), Tuscany, Italy
    • Meteocarmignano.it
Re: Wxsim 3in1 script
« Reply #101 on: September 08, 2010, 06:52:23 PM »
Hi Henkka!
Thanks for your answer.
I've put this code:
Code: [Select]
<table width="98%"><tr><td>
 <table width="<?php echo $mainwidth ?>px">
<tr align="center" valign="top">
<?php 
echo "
<td style=\"width:10%\">
$WXSIMicons[0]</td>
<td style=\"width:10%\">
$WXSIMicons[1]</td>
<td style=\"width:10%\">
$WXSIMicons[2]</td>
<td style=\"width:10%\">
$WXSIMicons[3]</td>
<td style=\"width:10%\">
$WXSIMicons[4]</td>
<td style=\"width:10%\">
$WXSIMicons[5]</td>
<td style=\"width:10%\">
$WXSIMicons[6]</td>
<td style=\"width:10%\">
$WXSIMicons[7]</td>
<td style=\"width:10%\">
$WXSIMicons[8]</td>
\n"
?>

</tr>
<tr align="center" valign="top">
<?php 
echo "
<td><b>
$WXSIMtempbig[0]</b></td>
<td><b>
$WXSIMtempbig[1]</b></td>
<td><b>
$WXSIMtempbig[2]</b></td>
<td><b>
$WXSIMtempbig[3]</b></td>
<td><b>
$WXSIMtempbig[4]</b></td>
<td><b>
$WXSIMtempbig[5]</b></td>
<td><b>
$WXSIMtempbig[6]</b></td>
<td><b>
$WXSIMtempbig[7]</b></td>
<td><b>
$WXSIMtempbig[8]</b></td>
\n"
?>

</tr>
</table>
into my index.php page but in Home doesn't show anything! (I used the part of code from sivu2.php without head section)
Should i insert also something in HEAD section? F.e. javascript or something else.
Thanks,

Alessandro
« Last Edit: September 08, 2010, 06:57:47 PM by i_fiorentino »

Offline Torjan

  • Posts: 118
  • vantage pro2 plus
  • Randaberg. Norway
    • Regnskvett verstasjon
Re: Wxsim 3in1 script
« Reply #102 on: September 08, 2010, 07:03:13 PM »
It has been fixed, its because your css (site template) is using the same colour (White) therefore the text
in the tooltip is showing up as white, Update this file jquery.wxsim.allinone.js :D

Nice! Thanks Bashy.

Offline weatherc

  • Posts: 1,789
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #103 on: September 08, 2010, 07:10:21 PM »
Alessandro,

Did you also included the script itself? Like this (before the code):
Code: [Select]
include_once 'wxsim/wxsim.allinone.plaintextparser.php';
Have now implented so windbarbs in windgraph change color depend in windspeed (thanks jwwd for suggestion)  8)
Its theree colors in use, green, orangish and red (orig. windcolor, uvcolor and heatindexcolor)
Of course, userdefinable limits for the colors so it can be set for different units ;)
Also the barbs itself are 2px smaller now :)

henkka

Offline weatherc

  • Posts: 1,789
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Wxsim 3in1 script
« Reply #104 on: September 08, 2010, 07:16:19 PM »
Quote
I would like the possibility to choose how many icons are in the meteogram. For me there are to many. I can`t get the icons fit on the page when I choose the 7 day forecast.
I think 2 or 3 icons per day is enough.

Actually, you can do it :)
lastretparser.php, at line 12 are an array named $cchunks, it includes what times are icons defined for the graph. As default are 4 times a day.

Henkka

 

cumulus