Weather sticker for PWS Dashboard

Hi!
the clientraw file is on here: https://www.meteobellvei.cat/clientraw.txt

Thanks antonio!!! 134 / 5.000

Thanks Antonioā€¦weā€™ll wait for newsā€¦on my server they already announce availability for version 8.4ā€¦which I havenā€™t installed yet.

Hi,

Luckily itā€™s not a PHP 8.x error
Seems a setup problem in your setup.php for $configs["bgURL"]
That line 21 should read
'bgURL' => "blue-sky.jpg",
it reads now something like
'bgURL' => "../stickersPWS/backgrounds/blue-sky.jpg",

Can you check?

Wim


For those who love to debug:

That ā€œinvalid image iconā€ looks like nothing, but one can read the hidden text in it using the inspect function of your browser, in my case Chrome

These are the first two messages which tell us:

  1. image not found on line 106 ā†’ false
  2. line 107 runs into a fatal error as the image is not found
Warning: imagecreatefromjpeg(backgrounds/../stickersPWS/backgrounds/blue-sky.jpg): 
Failed to open stream: 
No such file or directory in /hosting/www/meteobellvei.cat/public/stickersPWS/sticker.php on line 106

Fatal error: uncaught TypeError: imagecopy(): 
Argument # 2 ($src_image) must be of type GdImage,  
false given in
/hosting/www/meteobellvei.cat/public/stickersPWS/sticker.php:107

This is how a ā€œnot-an-image:ā€ looks with inspect

Yes Wim, in fact the warning issues that Iā€™m going to fix are all referred to color profile of the .png image.
They canā€™t create a fatal error.
By the way, in the next release the color profile image warning will be fixed.
Regards
Antonio

I put it like this and it doesnā€™t work eitherā€¦ I thought that putting the same route as the fonts would work, which is how it was until now, but it doesnā€™t work in either route.
thanks for the help you are giving meā€¦I donā€™t know much about programming

Now there is an error with flag cat.png

And as you can see yourself, that flag is not in the flags folder.

Wim

The script thinks that .cat is a country as pwsWD allows you to have a Catalan flag in its data.

For the sticker.php we need to create a cat.png to add to the stickersPWS/flags/ folder.

Sadly that needs to be a .png and the Catalan flag in pwsWD is a .svg.

Will take some time.

Wim

To make sure we face no other problems:
First make a copy of any flag in the flags folder and rename that copy to cat.png

Then https://www.meteobellvei.cat/stickersPWS/_test.php should work
or we face a new problem


After it works with a dummy cat.png use the attached cat.png to check if that works.

cat

succes,
Wim

Hi guys!
Thanks for the help. Iā€™ve already put a flag cat.png in the Flags folder as seen in the image, but it keeps generating the error and the sticker doesnā€™t show upā€¦ Iā€™m pretty lost and canā€™t quite figure out what the problem is.

Sorry, new error on line 186 missing station-icon /station.png.png
Have to check that.

The error is caused by a change line 23 in your setup.php

Wim

Can you ,please post that file, maybe there are other errors also.

Wim

1 Like

yes, yes, there it isā€¦Iā€™ll send you screenshotsā€¦of the setup and the server tree
!

That line should read

	'station' => "station", // jpg icon of your station. You can chouse or upload one in station-icon folder (if you upload a new one you have upload 2 icons one black and one white)

You added .png
That is the problem.

Wim

1 Like

yes, thatā€™s exactly it! bufffff Iā€™m really sorry, but there are things that are messed up in the setup configurationā€¦like why the fonts have to be given all the folder indications and here they donā€™tā€¦or why the background has the .jpg extension and the station logo doesnā€™tā€¦ ā€¦ Thank you for your patience, Wim.

1 Like

All scripts on-line are free-ware or donation-ware.

They are often developped first for ones own use.
But when other station-owners see them they are also distributed to others.

They are often upgraded based on new user request and new ideas.

Succes with your website and scripts,
Wim

1 Like

Hi, did you see the readme.txt file inside the stickerPWS folder?
Regards

PS: Sorry, I saw just now that it is not clear for a newby. Iā€™m going to rewrite it better in the next release.

2 Likes

I understand it perfectly WIM!!! once implemented I will proceed to make a donation to the author. he deserves it for the work he does

1 Like

thanks Antonio, and a last thing. Everything works correctly, but when you try to put in wordpress or blogger the image of dynamic_sticker.php is not displayed. In chrome it can be seen, just like all the stickers, but the dynaic cannot be set as an embedā€¦any idea what it could be?

Hi, new version is now available. On top of this topic there is the changement list.
Enjoy it, regards
Antonio

1 Like

Here you can see the dynamic_sticker working into wordpress 6.5.5

1 Like