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 4019) - 03 April 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 V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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: 246
- Joined: Thu 03 Jan 2013 1:59 pm
- Weather Station: Davis VP2
- Operating System: Windows 10
- Location: Vihtavuori, Laukaa, Finland
Re: Cumulus PHP-GD Banner
Is this enough? Or do You need something more? I`ll give links to anywhere, if it helps to get answer to this dilemma.... My little brains are smoking, cause I dont have my banner work...
- 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
Looks OK to me: http://www.kapo511.net/banner.php
You do not have the required permissions to view the files attached to this post.
Steve
-
- Posts: 246
- Joined: Thu 03 Jan 2013 1:59 pm
- Weather Station: Davis VP2
- Operating System: Windows 10
- Location: Vihtavuori, Laukaa, Finland
Re: Cumulus PHP-GD Banner
I can`t say anything but: "How is this possible?" I have several days.. and now everything is working!! After one question! This is unbelievebaly service from You. Thank You more than enough!!! I`m ashamed about my unknowing these probs... Tomorrow I`ll donate You, if my wife promises to me... This is GREAT forum. Thanks for it.
- 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
I don't know if that means the same thing in Finland as it does here, but good luck anywaykapo wrote:Tomorrow I`ll donate You, if my wife promises to me...
Steve
-
- Posts: 246
- Joined: Thu 03 Jan 2013 1:59 pm
- Weather Station: Davis VP2
- Operating System: Windows 10
- Location: Vihtavuori, Laukaa, Finland
Re: Cumulus PHP-GD Banner
Yes it does!!! And I got two times yesterday evening: To ask (read =to pray) and to be without...steve wrote:I don't know if that means the same thing in Finland as it does here, but good luck anywaykapo wrote:Tomorrow I`ll donate You, if my wife promises to me...
So Your donation will be really hard to be earned....
-
- Posts: 246
- Joined: Thu 03 Jan 2013 1:59 pm
- Weather Station: Davis VP2
- Operating System: Windows 10
- Location: Vihtavuori, Laukaa, Finland
Re: Cumulus PHP-GD Banner
And next noobie question: How can I get bagground image to work in my banner? I have red this topic thrue, and tried to make background with those advice, but it made only a link of that banner (shown in my signature) and the links name is "image"... so... help needed here in finland again...This question went first in wrong topic, but I deleted it from there and moved it here.
- 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
The answer is in here - honest !
You need to go back a few pages and read this: https://cumulus.hosiene.co.uk/viewtopic.p ... 0&start=15
You need to go back a few pages and read this: https://cumulus.hosiene.co.uk/viewtopic.p ... 0&start=15
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 246
- Joined: Thu 03 Jan 2013 1:59 pm
- Weather Station: Davis VP2
- Operating System: Windows 10
- Location: Vihtavuori, Laukaa, Finland
Re: Cumulus PHP-GD Banner
O.k. now background is black... and some text seems to gone... What next?
This is the situation now:
header("Content-type: image/" . $SITE['format'] );
$im = @imagecreatetruecolor($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, 0xC1, 0xFF, 0xC1);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
$green = imagecolorallocate($im, 0x00, 0x80, 0x00);
$blue = imagecolorallocate($im, 0x00, 0x00, 0x99);
$red = imagecolorallocate($im, 0xff, 0x00, 0x00);
$indianred = imagecolorallocate($im, 0x8b, 0x3a, 0x3a);
$baseimg = imagecreatefromjpeg(public_html/style/panner.jpg);
imagecopy($im,$baseimg,0,0,0,0,$SITE['image_width'], $SITE['image_height']);
imagedestroy($baseimg);
This is the situation now:
header("Content-type: image/" . $SITE['format'] );
$im = @imagecreatetruecolor($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, 0xC1, 0xFF, 0xC1);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
$green = imagecolorallocate($im, 0x00, 0x80, 0x00);
$blue = imagecolorallocate($im, 0x00, 0x00, 0x99);
$red = imagecolorallocate($im, 0xff, 0x00, 0x00);
$indianred = imagecolorallocate($im, 0x8b, 0x3a, 0x3a);
$baseimg = imagecreatefromjpeg(public_html/style/panner.jpg);
imagecopy($im,$baseimg,0,0,0,0,$SITE['image_width'], $SITE['image_height']);
imagedestroy($baseimg);
Last edited by kapo on Thu 24 Jan 2013 6:41 pm, edited 1 time in total.
- 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
My guess is that the above needs to bekapo wrote:$baseimg = imagecreatefromjpeg(public_html/style/panner.jpg);
$baseimg = imagecreatefromjpeg('style/panner.jpg');
Steve
-
- Posts: 42
- Joined: Fri 23 Mar 2012 3:17 pm
- Weather Station: Davis VP2
- Operating System: Windows 7 x64 Pro
- Location: Vilppula, Finland
Re: Cumulus PHP-GD Banner
Changekapo wrote:
$baseimg = imagecreatefromjpeg(public_html/style/panner.jpg);
$baseimg = imagecreatefromjpeg(public_html/style/panner.jpg);
to
$baseimg = imagecreatefromjpeg("style/panner.jpg");
-
- Posts: 246
- Joined: Thu 03 Jan 2013 1:59 pm
- Weather Station: Davis VP2
- Operating System: Windows 10
- Location: Vihtavuori, Laukaa, Finland
Re: Cumulus PHP-GD Banner
Katohan onhan täällä joku paikallisväestöönkin kuuluva... Tervehdys vaan.... vielä lähes naapurikunnastakin.mikkimii wrote:Changekapo wrote:
$baseimg = imagecreatefromjpeg(public_html/style/panner.jpg);
$baseimg = imagecreatefromjpeg(public_html/style/panner.jpg);
to
$baseimg = imagecreatefromjpeg("style/panner.jpg");
Kiitos neuvosta... Nyt täytyy sitten alkaa hakkaamaan päätä seinään, miten saan fonttien värit muutettua, ja sitten kun saan ne muutettua, niin väri pitää vielä saada luettavaksi. (olis varmaan pitäny kirjottaa lontooksi, mutta kokeillaan näin välillä)
-
- Posts: 246
- Joined: Thu 03 Jan 2013 1:59 pm
- Weather Station: Davis VP2
- Operating System: Windows 10
- Location: Vihtavuori, Laukaa, Finland
Re: Cumulus PHP-GD Banner
Thanks
Now the image suddenly came out from nowhere!!! . And next problem is: how to change banners font colours... and after that have the font colours so that they are visible and readable with my brand new banner background image... A little bit help might be welcome.. again
Now the image suddenly came out from nowhere!!! . And next problem is: how to change banners font colours... and after that have the font colours so that they are visible and readable with my brand new banner background image... A little bit help might be welcome.. again
-
- Posts: 3246
- 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
You can use the standard colours in the banner.php file here
The white line is one I added and you can add others using the same format and working out the hex RGB definition of the colour which is what the 3 items are after $im i.e. 0xFF, 0xFF, 0xFF.
To use the colour say in Temperature
If you are using TTF fonts and want white change
to
or if you are using the default font change
to
Code: Select all
$background_color = imagecolorallocate($im, 0xC1, 0xFF, 0xC1);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
$green = imagecolorallocate($im, 0x00, 0x80, 0x00);
$blue = imagecolorallocate($im, 0x00, 0x00, 0x99);
$red = imagecolorallocate($im, 0xff, 0x00, 0x00);
$indianred = imagecolorallocate($im, 0x8b, 0x3a, 0x3a);
$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
To use the colour say in Temperature
Code: Select all
// Print Temp
$text = ret_value("temp") . '°' . ret_value("tempunit");
if ($SITE['usettf'] == "yes" ) {
$size = 18;
imagettftextbox($im, $size, 0, 0, 20, $red, $font1, $text, $SITE['image_width'], "center");
} else {
$size = 5;
imageWriteString($im, $size, $text, $red, "center", 23);
Code: Select all
imagettftextbox($im, $size, 0, 0, 20, $red, $font1, $text, $SITE['image_width'], "center");
Code: Select all
imagettftextbox($im, $size, 0, 0, 20, $white, $font1, $text, $SITE['image_width'], "center");
Code: Select all
imageWriteString($im, $size, $text, $red, "center", 23);
Code: Select all
imageWriteString($im, $size, $text, $white, "center", 23);
-
- Posts: 246
- Joined: Thu 03 Jan 2013 1:59 pm
- Weather Station: Davis VP2
- Operating System: Windows 10
- Location: Vihtavuori, Laukaa, Finland
Re: Cumulus PHP-GD Banner
Thanks!water01 wrote:You can use the standard colours in the banner.php file hereThe white line is one I added and you can add others using the same format and working out the hex RGB definition of the colour which is what the 3 items are after $im i.e. 0xFF, 0xFF, 0xFF.Code: Select all
$background_color = imagecolorallocate($im, 0xC1, 0xFF, 0xC1); $black = imagecolorallocate($im, 0x00, 0x00, 0x00); $green = imagecolorallocate($im, 0x00, 0x80, 0x00); $blue = imagecolorallocate($im, 0x00, 0x00, 0x99); $red = imagecolorallocate($im, 0xff, 0x00, 0x00); $indianred = imagecolorallocate($im, 0x8b, 0x3a, 0x3a); $white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
To use the colour say in TemperatureIf you are using TTF fonts and want white changeCode: Select all
// Print Temp $text = ret_value("temp") . '°' . ret_value("tempunit"); if ($SITE['usettf'] == "yes" ) { $size = 18; imagettftextbox($im, $size, 0, 0, 20, $red, $font1, $text, $SITE['image_width'], "center"); } else { $size = 5; imageWriteString($im, $size, $text, $red, "center", 23);
toCode: Select all
imagettftextbox($im, $size, 0, 0, 20, $red, $font1, $text, $SITE['image_width'], "center");
or if you are using the default font changeCode: Select all
imagettftextbox($im, $size, 0, 0, 20, $white, $font1, $text, $SITE['image_width'], "center");
toCode: Select all
imageWriteString($im, $size, $text, $red, "center", 23);
Code: Select all
imageWriteString($im, $size, $text, $white, "center", 23);
These are very usefull... But how can I have temperature font to : red, bold and a little bigger font, so that it`s easier to read from banner?