Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Cumulus PHP-GD Banner

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Cumulus PHP-GD Banner

Post by freddie »

Paul C wrote: Fri 28 Jan 2022 3:38 pm Ray

Sorry I can't see it 😩
Did you follow the advice in this post?
viewtopic.php?p=160883#p160883
Freddie
Image
RayProudfoot
Posts: 3372
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Cumulus PHP-GD Banner

Post by RayProudfoot »

Paul, try clearing your cache. Logically it should be visible. It's now named chlive.php.

See if you can get to this page. www.cheadlehulmeweather.co.uk/chlive.php
Cheers,
Ray, Cheshire.

Image
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Cumulus PHP-GD Banner

Post by PaulMy »

Thanks freddie and Mark, finally found the Insecure settings in Edge and Chrome and now Ray's and others (and mine with the renamed file) show the banner image http://komokaweather.com/weather/current.php

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
RayProudfoot
Posts: 3372
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Cumulus PHP-GD Banner

Post by RayProudfoot »

Paul, excellent! Looking at your temps I don’t know how you cope with those. My coldest was -11°C back in 2010. 🥶
Cheers,
Ray, Cheshire.

Image
Nottub
Posts: 174
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Buster)
Contact:

Re: Cumulus PHP-GD Banner

Post by Nottub »

As a relative newby with limited skills, is there a template download (with some instruction to tailor for an individuals site) to create a Banner?

It seems the originator in the early posts has withdrawn parts of their webpage where the code was made available.

Eventually I would like to add current conditions to my webcam image.


Thanks

Martyn

Image
Image
broadstairs
Posts: 745
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW1003/GW1103/GW2000
Operating System: Windows 7 and Linux
Location: Broadstairs, Kent, UK
Contact:

Re: Cumulus PHP-GD Banner

Post by broadstairs »

Nottub wrote: Sun 10 Jul 2022 8:05 am It seems the originator in the early posts has withdrawn parts of their webpage where the code was made available.
See this thread viewtopic.php?p=128518#p128518

Stuart
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Cumulus PHP-GD Banner

Post by water01 »

I am afraid the code doesn't seem to be in that topic, but I found it in my backups plus the pdf with the instructions.
You do not have the required permissions to view the files attached to this post.
David
Image
broadstairs
Posts: 745
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW1003/GW1103/GW2000
Operating System: Windows 7 and Linux
Location: Broadstairs, Kent, UK
Contact:

Re: Cumulus PHP-GD Banner

Post by broadstairs »

water01 wrote: Sun 10 Jul 2022 12:18 pm I am afraid the code doesn't seem to be in that topic, but I found it in my backups plus the pdf with the instructions.
That thread explains why the site no longer exists, not that the code was available!

Stuart
Nottub
Posts: 174
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Buster)
Contact:

Re: Cumulus PHP-GD Banner

Post by Nottub »

I hadn't picked up on the sad news, and for that I'm very sorry. It would appear that the information/ coding provided was the backbone of many banners, for that I think is much appreciated.

David, thanks for the files, I'll see if I can do something / anything with them.

Best wishes

Martyn
Image
Nottub
Posts: 174
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Buster)
Contact:

Re: Cumulus PHP-GD Banner

Post by Nottub »

Much to my amazement, it worked. Just need to understand the script a little better to see what's going on.

What does the $SITE['format'] image option actually do? I've read it, but don't really understand where the .png, jpeg or .gif formats come into this .php page.

Thanks for supplying the scripts David.
Image
freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Cumulus PHP-GD Banner

Post by freddie »

It is important to realise that this script returns a stream of binary data which your browser will render as an image. The $SITE['format'] variable holds the image type you wish to return - mine is set to 'png' - other potential values are shown in a comment line close to where you set the variable. This value is used to set the content type header in the response returned to the web browser so that the browser knows how to handle the binary data returned.
Freddie
Image
Nottub
Posts: 174
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Buster)
Contact:

Re: Cumulus PHP-GD Banner

Post by Nottub »

Thanks Freddie, not sure I've completely got that.

I understand what youre saying but does that mean I can include the .php page as a .png or .gif, for, say embedding as an image in another web page?

I think I need to have a play when I have more time to see what the options do.


Thanks for the feedback

Martyn
Image
freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Cumulus PHP-GD Banner

Post by freddie »

Yes, you can include it as an image on a web page - that is exactly what happens on this forum thread in my replies. You just add a standard img HTML tag with the src attribute pointing to your php script. Something like this:

Code: Select all

<img src="https://www.hosiene.co.uk/weather/banner.php">
So you don't need to specify the type (png, jpg, etc ) in the img tag, as the browser will know this from the content type that your php script returns (this is the bit I was talking about in my previous reply).
Freddie
Image
RayProudfoot
Posts: 3372
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Cumulus PHP-GD Banner

Post by RayProudfoot »

@Mapantz kindly provided the code to add to my .htaccess file to ensure the info in my banner was always current. I plucked up the courage to add it yesterday and it seems to be working fine with one exception.

Cunulussites run by @JennyLeez is still showing yesterday’s data and despite refreshing the page and even clearing the cache for that site the problem remains.

Is it something at my end I need to change and if so, what?
Cheers,
Ray, Cheshire.

Image
Mapantz
Posts: 1777
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Cumulus PHP-GD Banner

Post by Mapantz »

Glad you've got it working Ray.

The banner is updating here and on the Cumulus sites page for me. Both showed 18:00 today when I refreshed the page.
Image
Post Reply