Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.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
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.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
Moderator: daj
-
- Posts: 70
- Joined: Tue 06 Mar 2012 7:50 pm
- Weather Station: WH 1080
- Operating System: Windows XP SP 3
- Location: Bremerhaven, NW Germany
- Contact:
Re: Cumulus PHP-GD Banner
Hi all,
I wanted to replace the current wind speed with the "10 min average wind speed" in my weather banner.
According to realtime.txt that would be the numbers "46" for "degrees" and "51" which shows the bearing in words. However the positions only go from 0 to 39.
Anyone having an idea, how do this?
Best regards
Georg
I wanted to replace the current wind speed with the "10 min average wind speed" in my weather banner.
According to realtime.txt that would be the numbers "46" for "degrees" and "51" which shows the bearing in words. However the positions only go from 0 to 39.
Anyone having an idea, how do this?
Best regards
Georg
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Cumulus PHP-GD Banner
You need to extend the 'cvalues' array near the top of the file so that it goes as far as the entry that you need. It doesn't matter what names you use as long as you use the same name later on when you add the item to the banner.weatherfrog80 wrote:According to realtime.txt that would be the numbers "46" for "degrees" and "51" which shows the bearing in words. However the positions only go from 0 to 39. Anyone having an idea, how do this?
Steve
-
- Posts: 70
- Joined: Tue 06 Mar 2012 7:50 pm
- Weather Station: WH 1080
- Operating System: Windows XP SP 3
- Location: Bremerhaven, NW Germany
- Contact:
Re: Cumulus PHP-GD Banner
Thanks for your help Steve, that works.
-
- Posts: 16
- Joined: Sat 13 Oct 2012 9:37 pm
- Weather Station: Vue + B-L Sunrecorder
- Operating System: Win7
- Location: Dublin, Ireland
Re: Cumulus PHP-GD Banner
Hi is it possible to add custom tags to display in the banner from another file?. For example the Blake-Larsen Sunrecorder application makes a file to be used by Cumulus (which can easily be uploaded using Cumulus alongside the other webfiles of course also).
I've attached an example file with values explained, i'd like to include sun hours today and maybe sunny or not now also if possible in my banner.
Thanks.
I've attached an example file with values explained, i'd like to include sun hours today and maybe sunny or not now also if possible in my banner.
Thanks.
You do not have the required permissions to view the files attached to this post.
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Cumulus PHP-GD Banner
"Sun hours today" and "is it sunny?" are both in realtime.txt, so by extending the cvalues array as previously mentioned, you can include those in the banner.
Steve
-
- Posts: 16
- Joined: Sat 13 Oct 2012 9:37 pm
- Weather Station: Vue + B-L Sunrecorder
- Operating System: Win7
- Location: Dublin, Ireland
Re: Cumulus PHP-GD Banner
Great, thanks very much Steve, I must have overlooked that, i'll get reading.steve wrote:"Sun hours today" and "is it sunny?" are both in realtime.txt, so by extending the cvalues array as previously mentioned, you can include those in the banner.
-
- Posts: 16
- Joined: Sat 13 Oct 2012 9:37 pm
- Weather Station: Vue + B-L Sunrecorder
- Operating System: Win7
- Location: Dublin, Ireland
Re: Cumulus PHP-GD Banner
I cant seem to figure out how to tell the cvalues array where to find the value position i want ?
For example I know that I want to add a custom "sunHR" - hours of sun today which is position 56 in the realtime file, but how to tell that position?
I added it to the reference list, but its obviously not reading that. The value in my signature isn't correct below.
feel like a bit of a thicko
For example I know that I want to add a custom "sunHR" - hours of sun today which is position 56 in the realtime file, but how to tell that position?
I added it to the reference list, but its obviously not reading that. The value in my signature isn't correct below.
feel like a bit of a thicko
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Cumulus PHP-GD Banner
You have to fill in all of entries up to the ones you need; that's how it knows which position in realtime.txt corresponds to each item in cvalues. So you need to extend cvalues, like this:Supercell wrote:I cant seem to figure out how to tell the cvalues array where to find the value position i want ?
Code: Select all
$SITE['cvalues'] = array(
"date","time","temp","hum","dew","wspeed","wgust","avgbearing","rrate",
"rfall","press","wdir","beaufort","windunit","tempunit","pressunit","rainunit",
"windrun","presstrend","rmonth","ryear","rfallY","intemp","inhum","wchill",
"temptrendval","tempTH","TtempTH","tempTL","TtempTL",
"windTM","TwindTM","wgustTM","TwgustTM",
"pressTH","TpressTH","pressTL","TpressTL",
"cversion","cbuild","wgust","heatindex","humidex", ... and so on up to... "sunshinehours","currentsolarmax","issunny");
Steve
-
- Posts: 16
- Joined: Sat 13 Oct 2012 9:37 pm
- Weather Station: Vue + B-L Sunrecorder
- Operating System: Win7
- Location: Dublin, Ireland
Re: Cumulus PHP-GD Banner
Ahhhhhhhhhhhhhhhhhh! I see, I was wondering why it is currently showing the 10-minute high gust value
I'll get right on it Thanks again
I'll get right on it Thanks again
-
- Posts: 16
- Joined: Sat 13 Oct 2012 9:37 pm
- Weather Station: Vue + B-L Sunrecorder
- Operating System: Win7
- Location: Dublin, Ireland
Re: Cumulus PHP-GD Banner
It works!
Now to add cloudy, sunny and night graphics to the banner based on the realtime .txt ..much more reading needed I feel...
Thanks for your patience and help.
Now to add cloudy, sunny and night graphics to the banner based on the realtime .txt ..much more reading needed I feel...
Thanks for your patience and help.
- PaulMy
- Posts: 3885
- 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
Well done Supercell. I need to look and see if I can do something similar,
Paul
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
-
- Posts: 16
- Joined: Sat 13 Oct 2012 9:37 pm
- Weather Station: Vue + B-L Sunrecorder
- Operating System: Win7
- Location: Dublin, Ireland
Re: Cumulus PHP-GD Banner
Thanks Paul.
I've added sunny, cloudy and night images using the code from earlier in this thread.
Currently looks like :-
I'd like to put the current conditions picture off the end of the banner without text overlaying so making the banner 60px wider I guess , not sure how to do that.
Alternatively make the images transparent, so there isn't a white background as in the image above - do I need new pictures?
I've added sunny, cloudy and night images using the code from earlier in this thread.
Currently looks like :-
I'd like to put the current conditions picture off the end of the banner without text overlaying so making the banner 60px wider I guess , not sure how to do that.
Alternatively make the images transparent, so there isn't a white background as in the image above - do I need new pictures?
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Cumulus PHP-GD Banner
In another post (re. avatar), the beteljuice posted a load of rubbish !
These are the lines you need to modify:These are the (ttf font) options for right justified text.
$SITE['image_width'] is the furthermost right 'edge' that the text justifies to (less a 5px margin).
So if you replace $SITE['image_width'] with your pretend right-hand (text) extreme, everything should be hunky dory - I think
These are the lines you need to modify:
Code: Select all
imagettftextbox($im, $size, 0, 0, 1, $green, $font3, $text, $SITE['image_width'], "right");
$SITE['image_width'] is the furthermost right 'edge' that the text justifies to (less a 5px margin).
So if you replace $SITE['image_width'] with your pretend right-hand (text) extreme, everything should be hunky dory - I think
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 19
- Joined: Thu 04 Jul 2013 4:13 pm
- Weather Station: Davis Vantage Pro 2
- Operating System: Windows 7
- Location: Ciudad Guayana, Venezuela
Re: Cumulus PHP-GD Banner
I downloaded the files from TNET, i modified teh banners.php, but doesnt shows, only show this
http://climaguayana.comuv.com/banners.php
can someone give a hand with this?
Grettings
http://climaguayana.comuv.com/banners.php
can someone give a hand with this?
Grettings
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Cumulus PHP-GD Banner
What's happened to your realtime.txt ?
This is where banner.php is looking, but it's empty http://climaguayana.comuv.com/realtime.txt
This is where banner.php is looking, but it's empty http://climaguayana.comuv.com/realtime.txt
......................Imagine, what you will KNOW tomorrow !