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
- 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
The script doesn't use web tags, it uses realtime.txt. It has no idea what 'wlatest' is unless you tell it. The labels you've changed are just identifiers for the fields in realtime.txt. In fact, what the script calls 'wgust' is actually the 'latest' wind speed.
Steve
- William Grimsley
- Posts: 833
- Joined: Thu 22 Sep 2011 5:22 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 7 Home Premium 64-bit
- Location: Latitude: 50.70189285 Longitude: -3.30849957
- Contact:
Re: Cumulus PHP-GD Banner
Oh, right! Thanks, changing both tags from "wlatest" to "wgust", worked!
- avoorpool
- Posts: 168
- Joined: Tue 08 May 2012 4:24 pm
- Weather Station: WMR200A
- Operating System: Windows 10 64-bit
- Location: Pickering, Ontario Canada
- Contact:
Re: Cumulus PHP-GD Banner
HI,
I'd like to add a setting to the banner (change Windchill to Apparent Temp).
The code shows realtime.txt fields & pos 0 to 39 however apptemp is not shown in the 'banner.php' script.
How and where do I add the apptemp (realtime.txt pos # 55) to the code so it will be displayed on the banner??
Thanks,
Arthur
I'd like to add a setting to the banner (change Windchill to Apparent Temp).
The code shows realtime.txt fields & pos 0 to 39 however apptemp is not shown in the 'banner.php' script.
How and where do I add the apptemp (realtime.txt pos # 55) to the code so it will be displayed on the banner??
Thanks,
Arthur
- 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 so that it goes as far as the field you want. Then use whatever identifier you give to the field you want later on in the lines of code which write the data to the image.
Steve
- avoorpool
- Posts: 168
- Joined: Tue 08 May 2012 4:24 pm
- Weather Station: WMR200A
- Operating System: Windows 10 64-bit
- Location: Pickering, Ontario Canada
- Contact:
Re: Cumulus PHP-GD Banner
Hi Steve,
Thanks for the reply.
This means I have to add the 'cvalues' positions 40 - 55 (as the realtime.txt currently shows)..??
According realtime.txt it's: '10 minute high gust' (#40) to 'Apparent Temp' (#55)
Thanks,
Arthur
Thanks for the reply.
This means I have to add the 'cvalues' positions 40 - 55 (as the realtime.txt currently shows)..??
According realtime.txt it's: '10 minute high gust' (#40) to 'Apparent Temp' (#55)
Thanks,
Arthur
- avoorpool
- Posts: 168
- Joined: Tue 08 May 2012 4:24 pm
- Weather Station: WMR200A
- Operating System: Windows 10 64-bit
- Location: Pickering, Ontario Canada
- Contact:
Re: Cumulus PHP-GD Banner
Hi Steve,
Figured it out. Correct display now!! Thanks!!!
BTW: Thanks for the final version 1.9.3 as well.
Great!!
Cheers,
Arthur
Figured it out. Correct display now!! Thanks!!!
BTW: Thanks for the final version 1.9.3 as well.
Great!!
Cheers,
Arthur
- kingqueen
- Posts: 60
- Joined: Tue 26 Feb 2013 6:52 pm
- Weather Station: Maplin N96GY / Fine Offset 1081
- Operating System: Windows 7 HP 64 bit
- Location: Wetherby, UK
- Contact:
Re: Cumulus PHP-GD Banner
I have been attempting to add a background image to my banner but have been struggling. I think it might be an issue with the palette used.
If I use this:
Then, using these instructions I get this:
But if I fade it and use this:
I get a mess like this:
The same if I use .png or .jpg - I still get a mess.
Any suggestions as to how to make this better would be very gratefully received! Thank you!
If I use this:
Then, using these instructions I get this:
But if I fade it and use this:
I get a mess like this:
The same if I use .png or .jpg - I still get a mess.
Any suggestions as to how to make this better would be very gratefully received! Thank you!
- Werk_AG
- Posts: 198
- Joined: Sun 13 Jan 2013 8:04 pm
- Weather Station: WeatherDuino 4Pro
- Operating System: Windows 7
- Location: Cercal CDV - Portugal
- Contact:
Re: Cumulus PHP-GD Banner
Hi
Try to change this line of code in your banner.php:
with this one:
Hope it helps
Try to change this line of code in your banner.php:
Code: Select all
$im = @imagecreate($SITE['image_width'], $SITE['image_height'])
Code: Select all
$im = @imagecreatetruecolor($SITE['image_width'], $SITE['image_height'])
-
- Posts: 26
- Joined: Fri 25 Jan 2013 10:38 am
- Weather Station: vantage pro 2
- Operating System: windows 7
- Location: United Kingdom
hloc where's the data
Hi, hope someone can help ....get banner but no data which suggests path not right to realtime.txt
checkserver all ok
/home/linweb17/s/stpetersstonyhurst.org.uk-1063720548/user/htdocs/hgweather
what should the path for hloc be "./"; not working..
Thks Peter
checkserver all ok
/home/linweb17/s/stpetersstonyhurst.org.uk-1063720548/user/htdocs/hgweather
what should the path for hloc be "./"; not working..
Thks Peter
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: hloc where's the data
Rats. I merged the topic and ended up with the title of the new one instead of the original. I should just leave things alone.
I'll see if I can fix.
Edit: sorted, I think.
I'll see if I can fix.
Edit: sorted, I think.
Steve
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: hloc where's the data
The path is correct; the problem is that you have no realtime.txt file on your web site. The most likely cause is either that you haven't selected the realtime settings on the internet settings screen, or you haven't supplied the correct directory in the web site setup.nicp01 wrote:what should the path for hloc be "./"; not working..
Steve
-
- Posts: 26
- Joined: Fri 25 Jan 2013 10:38 am
- Weather Station: vantage pro 2
- Operating System: windows 7
- Location: United Kingdom
Re: hloc where's the data
I presumed because the site updates realtime.txt was there...steve wrote:The path is correct; the problem is that you have no realtime.txt file on your web site. The most likely cause is either that you haven't selected the realtime settings on the internet settings screen, or you haven't supplied the correct directory in the web site setup.nicp01 wrote:what should the path for hloc be "./"; not working..
yes youre right I havent any of the realtime boxes checked, which ones do I need? Ive ticked all 3! ok realtime.txt is there but it still isnt working!! now it is!! thkyou
How do I attach my banner to say a yahoo email??
I can now get to work on the background img.
(1840 .. have copied/edited beteljuice code and put new bground img file into 3 different folders and still I get very small icon!)
(http://stpetersstonyhurst.org.uk/hgweather/banner.php)
Do you know if anybody's done a graphic of the weather station circle I used to plot many years ago?
thks
peter
-
- Posts: 1
- Joined: Sat 27 Apr 2013 4:08 pm
- Weather Station: wh1080
- Operating System: server 2008 r2
- Location: norfolk, uk
Cumulus PHP-GD Banner - What am I doing wrong...
Hello,
I am new to posting on this forum, been reading stuff for around a year.
I am stumped, i am trying to get the background image on my php banner, I currently have this in the code:
// Output the header to let the browser know we are
// sending a graphic file format
header("Content-type: image/" . $SITE['format'] );
$im = @imagecreate($SITE['image_width'], $SITE['image_height'])
or die("Cannot Initialize new GD image stream");
// Set colors we want to use...
// first background is a white background
$background_color = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
$green = imagecolorallocate($im, 0x00, 0x80, 0x00);
$blue = imagecolorallocate($im, 0x00, 0x00, 0xff);
$red = imagecolorallocate($im, 0xff, 0x00, 0x00);
$baseimg = imagecreatefromjpeg("background1.jpg");
imagecopy($im,$baseimg,0,0,0,0,$SITE['image_width'], $SITE['image_height']);
imagedestroy($baseimg);
// Make a Border Around the box
I have a 17KB file called background1.jpg in the /images folder, but all I get is the default white background, what daft thing am I missing?
Thanks in advance
I am new to posting on this forum, been reading stuff for around a year.
I am stumped, i am trying to get the background image on my php banner, I currently have this in the code:
// Output the header to let the browser know we are
// sending a graphic file format
header("Content-type: image/" . $SITE['format'] );
$im = @imagecreate($SITE['image_width'], $SITE['image_height'])
or die("Cannot Initialize new GD image stream");
// Set colors we want to use...
// first background is a white background
$background_color = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
$green = imagecolorallocate($im, 0x00, 0x80, 0x00);
$blue = imagecolorallocate($im, 0x00, 0x00, 0xff);
$red = imagecolorallocate($im, 0xff, 0x00, 0x00);
$baseimg = imagecreatefromjpeg("background1.jpg");
imagecopy($im,$baseimg,0,0,0,0,$SITE['image_width'], $SITE['image_height']);
imagedestroy($baseimg);
// Make a Border Around the box
I have a 17KB file called background1.jpg in the /images folder, but all I get is the default white background, what daft thing am I missing?
Thanks in advance
- 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
But where is the php file ?background1.jpg in the /images folder
Also to avoid any unexpected colour interactions it would be better to:$baseimg = imagecreatefromjpeg("background1.jpg");
Code: Select all
$im = @imagecreatetruecolor($SITE['image_width'], $SITE['image_height'])
or die("Cannot Initialize new GD image stream");
......................Imagine, what you will KNOW tomorrow !