3in1 updated

Hi Labbs,

I had contact with Henkka about a problem with Last update and Next update part on top. (When WXSIM forecast is updated)
He said he got this part from you.

This part:
$updatehrs = array(4,7,10,13,16,19,22); # Hours when wxsim runs These are my upload times
$uploadupdate = 0; # minutes past full hour for upload time

Next update is every time correct.
Only last update isn`t correct. It says that last update is every hour.

At the moment of writing the last WXSIM update was 7 pm. On the webpage is Last update 9pm.
Also on 8 pm the webpage was showing Last updat 8 pm. So it looks like it`s updating every hour.

I hope you understand what I mean.
Is there something to do about it?

Thanks,

Oebel

Oebel,

I don’t know why you see that issue as on my page it works just fine ex. 20:55 updated are shown 20:55 until next update 23:55.
Any possibility the software you use to upload lastret.txt with uploads it every hour? As the script checks the timestamp of the file for the “updated”-time so that must be changed once a hour. Check that with your FTP-software.

The undefined-issue…
I have seen that and tryed to figure out why it happens, without luck. In source code it seems php (!) miss some of the $variables in the loops (its the text in title=“”-tag what missing). And from what i have seen its not constantly same “icons” where its undefined, it vary between pageloads too.

henkka

Oebel,

I was just writing about the same thing Henkka just did. I’m not sure about your setup but it definitely look like you are uploading your plaintext.txt file every hour and the 3in1 script looks for the file’s modification date. Otherwise I cannot understand why…

Hi Henkka and Labbs,

Thanks. Upload times (Ftp) was the problem.
For safety, (not to mis uploads) I had chosen much more times for upload. Is not necessary.
So, now it must be ok

Hi to all,

The script is getting better and better!

I’ve tried to implement the new version but there is something going wrong! All I get is that:

http://www.meteothes.gr/wxsim_wxall/sivu2.php

No icons, no java scripts! I didn’t want to touch the old working version, so I installed the new one in “wxsim_wxall” folder
to test it. I also modified the wxall.settings.php script where I defined absolute paths (otherwise it could not find the files).

Any ideas Henkka how to fix it? The new version is great!

Thanks!

Thanos

Hi Thanos,

All I had to do about this was to put the js folder and css folder in the root of your webserver.
May be also img folder. Try this.

Oebel

Thanos,

Try to change your $wxallmainfolder in wxall.settings.php to the reative path. I guess it shoud read:
$wxallmainfolder = ‘wxsim_wxall/’;
in your case.

Hi All,

Although my updated meteogram is working fine, I noticed some errors being generated :-

[05-Oct-2011 08:15:47] PHP Warning: reset() expects parameter 1 to be array, null given in /home/ruralter/public_html/dugglenet.org/wxsim/wxall.lastret.php on line 343
[05-Oct-2011 08:15:47] PHP Warning: Invalid argument supplied for foreach() in /home/ruralter/public_html/dugglenet.org/wxsim/wxall.lastret.php on line 344

Line 343 and 344 :-
reset ($Language);
foreach ($Language as $key => $replacement) {
$totcond3 = str_replace($key,$replacement,$totcond3);
}

I’ve not touched the language files or any translations so I wonder if anyone else has this problem ? It doesn’t seem to affect the output at all, but I would like to prevent the error from being generated.

Kind Regards, Simon

Hi guys,
does wxsim3in1 working with latest version of plaintex-parser (1.27)?
In my case, the main icons in Homepage doesn’t show anymore.
Thanks in advance,

Alessandro

Hi Guys!

Thanks for finding the possible small “issues” :slight_smile:

Paths…
Paths to images/js are relative from that page where they are shown ($mainfolder).
For “easier” to getting it correct have i used full paths ($mainfolderfull) for all php-scripts included.
In next update are coming also an own $variable for path to plaintext-lang-files so same file can be used with Ken’s parser in different folder.

The php-error…
Will check that.

does wxsim3in1 working with latest version of plaintex-parser (1.27)?
The tought are of cource that they should work togeteher, its possible there are mix regarding the icons. Anything else what breaks in Ken's parser with 3in1?

Henkka

Thanks Labbs for the tip but it didn’t work either! :frowning:
I’ve tried all the combinations concerning the path but nothing worked… I wonder if there is an incompatibility with
the php version I use… :roll:
I’ll set up all from scratch and check the Apache logfiles.

Henkka, is the lstest zip file (wxsim_wxall.zip) a full package or just an update, so I have to get something from the old (3 in 1) one?

Thanks!

EDIT: Here is a part of the web server error_log. This is the output when I run the latest 3in1 update:

[color=blue[05-Oct-2011 18:24:56] PHP Warning: Invalid argument supplied for foreach() in /home/thanos/public_html/wxsim_wxall/wxall.lastret.php on line 344
[05-Oct-2011 18:24:56] PHP Warning: reset() [function.reset]: Passed variable is not an array or object in /home/thanos/public_html/wxsim_wxall/wxall.lastret.php on line 343
[05-Oct-2011 18:24:56] PHP Warning: Invalid argument supplied for foreach() in /home/thanos/public_html/wxsim_wxall/wxall.lastret.php on line 344
[05-Oct-2011 18:24:56] PHP Warning: reset() [function.reset]: Passed variable is not an array or object in /home/thanos/public_html/wxsim_wxall/wxall.lastret.php on line 343
[05-Oct-2011 18:24:56] PHP Warning: Invalid argument supplied for foreach() in /home/thanos/public_html/wxsim_wxall/wxall.lastret.php on line 344
[05-Oct-2011 18:24:56] PHP Warning: Wrong parameter count for max() in /home/thanos/public_html/wxsim_wxall/wxall.lastret.php on line 497
[05-Oct-2011 18:24:56] PHP Warning: Wrong parameter count for max() in /home/thanos/public_html/wxsim_wxall/wxall.lastret.php on line 536
[05-Oct-2011 18:24:56] PHP Warning: Wrong parameter count for max() in /home/thanos/public_html/wxsim_wxall/wxall.lastret.php on line 546
[05-Oct-2011 18:24:56] PHP Warning: Wrong parameter count for max() in /home/thanos/public_html/wxsim_wxall/wxall.lastret.php on line 536
[05-Oct-2011 18:24:56] PHP Warning: Wrong parameter count for max() in /home/thanos/public_html/wxsim_wxall/wxall.lastret.php on line 546[/color]

Thanos.

atsio,

wxsim_wxall.zip is a “full install”, should have all needed files (execpt your local lang-file).

Henkka

Hi to all,
anyone has icons problem with new plaintext-parser ver. 1.27?
I’ve attached two screenshots about it.
Regards,

Alessandro


The only new variable added to plaintext-parser.php V1.27 was $iconType (with a default of ‘.jpg’)

Both plaintext-parser.php and wxall.plaintext.php use $iconDir as the directory for the icons. I do note that it is only used in wxall.plaintext.php line 230, but there seems to be no setup for the default value of $iconDir in wxall.settings.php, so on a page that loads both scripts, the setting inside plaintext-parser.php of $iconDir = ‘./forecast/images/’ may be what causes the issue.

Given the new 3in1 script has it’s own version of plaintext-parser.php (as wxall.plaintext.php ), do you really need to include() the plaintext-parser.php on your page anymore as Henkka’s wxall.plaintext.php does create the forecast icons+temps for you?

Best regards,
Ken

Hi Ken,
thanks for your reply.
I don’t still using the latest version of wxsin3in1.
I’m using the previous version.
The older version doesn’t have wxall.plaintext.php but it still uses your parser.
I don’t know why the newest parser causes this issue but i’ve linked others two images.
The first image shows my home with previous parser, the second image shows my home with latest parser.
That’s it.
Thanks in advance for any help,

Alessandro

Image nr. 1: http://Fiorentino.altervista.org/Cattura.PNG
Image nr. 2: http://Fiorentino.altervista.org/Cattura1.PNG

Hi Henkka

Fantastic script Thanks

Just have 1 small issue the updated time stamp on my output screen is 1970 see attach screen shot

http://www.geelongweather.com/sivu20.php

Thanks
Trev


Hi Alessandro,

Unfortunately, the images can show the results of the problem, but are not helpful trying to diagnose what is causing the problem itself. As I said before, only the $iconType variable was added to plaintext-parser.php V1.27 – if the prior script by Henkka used a variable of that name ($iconType), then that is likely where the interference is coming from. You’ll need to scan the Henkka PHP code on your system looking for that … I can’t diagnose it from just a picture … sorry.

I did download your current (working) plaintext-parser.php V1.23 (a bit older) and compared it to the current V1.27 and found two items added just for your version of Henkka’s 3in1 script. I suggest you put

      ### ADD FOR 3in1
    $WXSIMwallText[$i] = $WXSIMtext[$i];
    ### END FOR 3in1

after lines 703-704 in the V1.27 script

	// put back translated text, fixing capitalization for sentence starts (except the first one).
    $WXSIMtext[$i] = preg_replace('!\.\s+([a-z])!es',"'.  ' . strtoupper('\\1')",$text);

and see if that fixes the issue.

Best regards,
Ken

Hi Ken,
i’ve added your code and i’ve seen that the animated icons showing correctly but not in order :?
So, thunderstorm not corrisponding at the thunderstorm icons, clear not corrisponding at clear icon ecc.ecc.
Any ideas?
Once again thanks,

Alessandro

[b]Edit: @Ken: Have you got the parser ver. 1.26?
Because i would see if the problem is only for $iconType function.

@TO ALL:
Are any of you installing Wxsim animated icons by Meteotreviglio with latest version of plaintext-parser.php?
Because if i’m alone to have this binomial the possible issue doesn’t fix anymore. :wink:[/b]

Hi Alessandro,

Yes, I have latest version of plaintext-parser (1.27) running with the animated icons:
http://www.weerstation-marsdijk.nl/
http://www.weerstation-marsdijk.nl/WXSIM.php

I had a little problem (Ken knows :wink:) but that was my own stupidity. :oops:
Now all working fine.

Oebel

Hi Oebel,
I was not referring to those but these here: Tutte le curiosità su Carmignano e dintorni
It seems that new version of plaintext doesn’t load correctly the dotvoid icons in sprite format.