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

Cumulus PHP-GD Banner

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

TNETWeather

Re: Cumulus PHP-GD Banner

Post 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]
User avatar
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

Post by steve »

TNETWeather wrote:Another way is to use .htaccess and mod_rewrite...
Ah yes, very clever...
Steve
User avatar
dane
Posts: 417
Joined: Wed 10 Sep 2008 2:15 pm
Weather Station: Rosenborg 68700
Operating System: Win10 Ult., 64-bit, RaspberryPi
Location: Gilleleje, Denmark

Re: Cumulus PHP-GD Banner

Post by dane »

Thanks Kevin :) (for the banner.php I mean...)
Ib
Ib
User avatar
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Re: Cumulus PHP-GD Banner

Post 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
:shock:
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
TNETWeather

Re: Cumulus PHP-GD Banner

Post 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.
User avatar
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Re: Cumulus PHP-GD Banner

Post 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.
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
TNETWeather

Re: Cumulus PHP-GD Banner

Post by TNETWeather »

If you are still having issues, send me an email to weather@tnetweather.com
User avatar
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Re: Cumulus PHP-GD Banner

Post by Paul C »

OK will do - just get a page of gobbledegook at the moment.
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
TNETWeather

Re: Cumulus PHP-GD Banner

Post 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.
User avatar
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Re: Cumulus PHP-GD Banner

Post 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
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
User avatar
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Re: Cumulus PHP-GD Banner

Post 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 ?
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
TNETWeather

Re: Cumulus PHP-GD Banner

Post 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.
User avatar
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Re: Cumulus PHP-GD Banner

Post 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 :D

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 ! :P :P
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
Bob
Posts: 67
Joined: Thu 04 Sep 2008 12:03 pm
Weather Station: Watson W-8681
Location: Whixall, Shropshire.
Contact:

Re: Cumulus PHP-GD Banner

Post 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
Bob

Image
TNETWeather

Re: Cumulus PHP-GD Banner

Post 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:

Image

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:

Image
Post Reply