Page 2 of 32
Re: Cumulus PHP-GD Banner
Posted: Wed 08 Oct 2008 12:55 pm
by TNETWeather
Another way is to use .htaccess and mod_rewrite...
https://cumulus.hosiene.co.uk/viewtopic.p ... ccess#p514
Code: Select all
RewriteRule ^/?banner.png$ /banner.php [L]
Then the image tag points to what they like, a valid image url
Code: Select all
[img]http://cumulus.tnetweather.com/banner.png[/img]
Re: Cumulus PHP-GD Banner
Posted: Wed 08 Oct 2008 1:26 pm
by steve
TNETWeather wrote:Another way is to use .htaccess and mod_rewrite...
Ah yes, very clever...
Re: Cumulus PHP-GD Banner
Posted: Thu 09 Oct 2008 10:09 pm
by dane
Thanks Kevin

(for the banner.php I mean...)
Ib
Re: Cumulus PHP-GD Banner
Posted: Sun 12 Oct 2008 6:32 pm
by Paul C
Hope someone can help a "thicko" eg me.
I do really like fiddling around with these things but I am at a loss this evening and need some simple instructions. Windows for dummies was written just for me !
1. Gone to Kevins website and downloaded the file - its end in a .txt so I have a feeling I am already on the wrong track already, I thought it would end .php
2. Edited this code to show my weather station and degree,s C, MM etc
3. Uploaded this file to mywebsite in the same folder as Cumulus and realtime.txt eg
http://www.bramptonweather.co.uk/cumulus/realtime.txt
4. So I now assume I go to
http://www.bramptonweather.co.uk/cumulus/banner.php - my banner should be there. But is not
Can anyone point me in the right direction please
tks

Re: Cumulus PHP-GD Banner
Posted: Sun 12 Oct 2008 6:46 pm
by TNETWeather
When you download the file is it a text file since you can't display a php file (it would run instead of display).
This will be "changed" shortly. I will be placing these into zip files instead.
In anycase, you should take the source code you downloaded and save it as banner.php
That file would then be uploaded to your website into the proper area.
Right out of the box, for most people it should then run. Or at least give something.
Yours is pointed at a file that does not exist, thus the 404 Document not found error.
Re: Cumulus PHP-GD Banner
Posted: Sun 12 Oct 2008 7:03 pm
by Paul C
Ok, so the txt file I downloaded I need to alter then save as a php file ?
Will give that a go.
Re: Cumulus PHP-GD Banner
Posted: Sun 12 Oct 2008 7:05 pm
by TNETWeather
If you are still having issues, send me an email to
weather@tnetweather.com
Re: Cumulus PHP-GD Banner
Posted: Sun 12 Oct 2008 7:08 pm
by Paul C
OK will do - just get a page of gobbledegook at the moment.
Re: Cumulus PHP-GD Banner
Posted: Sun 12 Oct 2008 7:13 pm
by TNETWeather
Try changing the code in near the top of the file:
Code: Select all
$SITE['fontdir'] = "fonts/"; # must contain ttf font files!
$SITE['usettf'] = "yes"; # Set to No to use default fonts
To
usettyf = no
Code: Select all
$SITE['fontdir'] = "fonts/"; # must contain ttf font files!
$SITE['usettf'] = "no"; # Set to No to use default fonts
If that still doesn't work... then use the ServerCheck script (save it as PHP too) and let me know what its output is.
Re: Cumulus PHP-GD Banner
Posted: Sun 12 Oct 2008 7:40 pm
by Paul C
Kevin
Its now working, but my fonts arent as clear as everyone elses
I have your email re "scripts" but I dont understand where you want to place it. Do I upload it somewhere
Re: Cumulus PHP-GD Banner
Posted: Sun 12 Oct 2008 7:46 pm
by Paul C
Cancel last - understand now and results are here
http://www.bramptonweather.co.uk/checkserver.php
Cumulus banner is also working, attached to signature - just need to sort out fonts like yours ?
Re: Cumulus PHP-GD Banner
Posted: Sun 12 Oct 2008 7:49 pm
by TNETWeather
Paul C wrote:Kevin
Its now working, but my fonts arent as clear as everyone elses
To get the smoother font look, you have to have TrueType fonts. This requires FreeType support and a directory that contains the actual TTF fonts used.
The fonts used by the Banner script are:
Code: Select all
Arial
Arial Bold
Verdana
Verdana Bold
So you would need a directory somewhere on your server that contains those fonts in them.
They would be named like:
Code: Select all
arialbd.ttf
arial.ttf
verdanab.ttf
verdana.ttf
You normally can copy them from your windows font directory to your server. The default banner.php script is setup to look in the fonts directory off your main web root directory.
Re: Cumulus PHP-GD Banner
Posted: Sun 12 Oct 2008 7:55 pm
by Paul C
Sounds dodgy, will have a try tomorrow morning as I am off work for a couple of days now
Thanks for your help
EDIT - I have taken off that last script in case anyone else looks - I wasnt sure re security.
EDIT -fonts uploaded and changed the php file to yes, dont try with a capital Y for Yes as that didnt work. Now looking like everyone else !

Re: Cumulus PHP-GD Banner
Posted: Sat 18 Oct 2008 12:48 pm
by Bob
????
Hmmmm, how do I get the banner in my signature. I tried to put a signature with
http://g4ujs.shacknet.nu/webcam/banner.php
and it previewed as the text!
cheers
Re: Cumulus PHP-GD Banner
Posted: Sat 18 Oct 2008 12:56 pm
by TNETWeather
You have to put BBcode around it so the forum knows it is an image...
Code: Select all
[img]http://g4ujs.shacknet.nu/webcam/banner.php[/img]
It will then show up as:
If you put a URL BBCode around that, you will make it a clickable Image
Code: Select all
[url=http://g4ujs.shacknet.nu][img]http://g4ujs.shacknet.nu/webcam/banner.php[/img][/url]
Like:
