Page 3 of 32
Re: Cumulus PHP-GD Banner
Posted: Sun 19 Oct 2008 4:04 am
by Bob
Thanks
Bob
Re: Cumulus PHP-GD Banner
Posted: Mon 20 Oct 2008 1:04 am
by TNETWeather
.
Version 3.0 released
This version uses a new internal method to obtain the realtime.txt files and uses the new extended format.
You need to be using Cumulus 1.8.2 Beta or higher to use this version.
You can download the script from my project page (in my signature below).
Re: Cumulus PHP-GD Banner
Posted: Wed 29 Oct 2008 7:50 pm
by Paul C
Ive put all the known cumulus banners on one topic, if I have missed anybody please let me know.
https://cumulus.hosiene.co.uk/viewtopic.php?f=10&t=206
Re: Cumulus PHP-GD Banner
Posted: Thu 30 Oct 2008 4:07 pm
by andro700
For some reason I can not get my True Type Fonts to work. This is the directory where they are at. I have it set to no because when I set it to yes it is telling me it contains errors. Any help would be greatly appreciated.
Code: Select all
/virtual/users/e14497-14796/web/graphs/jp/ttf/
Here is my settings as of now;
Code: Select all
$SITE['fontdir'] = "web/graphs/jp/ttf/"; # must contain ttf font files!
$SITE['usettf'] = "no"; # Set to No to use default fonts
Chuck
Re: Cumulus PHP-GD Banner
Posted: Thu 30 Oct 2008 4:22 pm
by TNETWeather
If you know the hard path (non-relative) it is most likely easier to use it, instead of a relative path.
Code: Select all
$SITE['fontdir'] = "/virtual/users/e14497-14796/web/graphs/jp/ttf/";
If you want to use a relative path, then it has to be relative of where the banner.php script resides.
Just guessing...
If your banner is addressable via the web as:
http://www.chucksweather.com/cumulus/banner.php
Then the relative path to the banner.php script to the fonts would be:
Code: Select all
$SITE['fontdir'] = "../graphs/jp/ttf/";
Re: Cumulus PHP-GD Banner
Posted: Thu 30 Oct 2008 4:39 pm
by andro700
Kevin,
I will give it a shot and see what happens. Thanks for the quick response.
Chuck
Re: Cumulus PHP-GD Banner
Posted: Thu 30 Oct 2008 4:51 pm
by andro700
Thanks Kevin got that to work.
Chuck
Re: Cumulus PHP-GD Banner
Posted: Sat 08 Nov 2008 3:06 pm
by Lars-K
Hi, I have tested the banner and it works like it should do.
But, in Norwegian we have the letters ÆØÅ-æøå and they will not show correct in the banner.
I know this can be fixed by using
Can you implement this in the php code?
Here is how the banner looks like using this text:
Code: Select all
$SITE['sitename'] = "Æ Ø Å æ ø å";

Re: Cumulus PHP-GD Banner
Posted: Sat 08 Nov 2008 9:43 pm
by TNETWeather
Saw this on a Jpgraph forum...
In a similair way this can be used to show Greek letters, for example "β" (beta) is displayed by
$beta = sprintf('&#%04d;',hexdec('03B2'));
This means you could add each greek letter one at a time like:
Code: Select all
$SITE['sitename'] = "Mesa AZ USA - TNET Weather";
// Add first greek letter
$SITE['sitename'] .= sprintf('&#%04d;',hexdec('03B2'));
// Add second greek letter
$SITE['sitename'] .= sprintf('&#%04d;',hexdec('03B3'));
// Add third greek letter
$SITE['sitename'] .= sprintf('&#%04d;',hexdec('03B4'));
Re: Cumulus PHP-GD Banner
Posted: Sun 09 Nov 2008 12:03 pm
by Lars-K
Sorry, didn't work. The banner just shows the decimal code for the letter wanted.
Code: Select all
$SITE['sitename'] = sprintf('&#%04d;',hexdec('00D8'));
Shows this in banner: "Ø"
Reference:
Code: Select all
Ø 216 Ø 00D8 Ø Ø LATIN CAPITAL LETTER O WITH STROKE
Re: Cumulus PHP-GD Banner
Posted: Sun 09 Nov 2008 5:08 pm
by TNETWeather
Might be your web host's version of GD or something else in its PHP version??
I used your exact syntax code:
Code: Select all
$SITE['sitename'] = sprintf('&#%04d;',hexdec('00D8'));
And got:

Re: Cumulus PHP-GD Banner
Posted: Sun 09 Nov 2008 5:08 pm
by TNETWeather
Might help if I could see the real code you are using... but you don't have your website listed in your profile info.
Re: Cumulus PHP-GD Banner
Posted: Sun 09 Nov 2008 7:38 pm
by Lars-K

My banner with the code:
Code: Select all
#---------------------------------------------------------------------------
$SITE['format'] = "png"; # Options: jpeg gif png
$SITE['dateiso'] = "no";
$SITE['sitename'] = sprintf('&#%04d;',hexdec('00D8'));
#---------------------------------------------------------------------------
Link to the Banner:
http://www.mphgk.com/met/testbanner.php
Re: Cumulus PHP-GD Banner
Posted: Sun 09 Nov 2008 7:46 pm
by TNETWeather
Using encodings like that apparently requires the use of FreeType Support and the use of TTF fonts.
You are not using TTF fonts:
Code: Select all
#---------------------------------------------------------------------------
$SITE['fontdir'] = "fonts/"; # must contain ttf font files!
$SITE['usettf'] = "no"; # Set to No to use default fonts
#---------------------------------------------------------------------------
When I turned off TTF support, I got the same output as you are showing. So apparently the standard GD fonts and its library does not support what you are trying to do.
Looks like the only solution would be to make sure your webhosts supports FreeType support and load some of the TTF fonts so you can use them. Then it appears to work okay.
Re: Cumulus PHP-GD Banner
Posted: Sun 09 Nov 2008 8:28 pm
by Lars-K
Thanks, I will check it out!