Author Topic: Getting a Banner to display with Meteobridge ** Solved **  (Read 1777 times)

0 Members and 1 Guest are viewing this topic.

Offline Ian.

  • Forecaster
  • *****
  • Posts: 459
    • Chatteris Weather
Getting a Banner to display with Meteobridge ** Solved **
« on: December 20, 2016, 11:18:59 AM »
Hi All,

After 7 hours of playing about I'm still no better off so here goes.

The banner shows fine here http://www.chatteris.biz/banner.en.php, the things I'm struggling with are:

1) The year on the banner shows 2020, (it doesn't help that today is the 20th!), I see in the script that 20 was added to make up the first two numbers of the year, but my MBrealtime.txt is showing the correct date in the format dd/mm/yyyy, showing 20/12/2016 as I type this, I'm no coder and cant see what has made the year incorrect.

2) I don't know how to display this on my web page or in forum signature blocks as I can't find the image file it creates, any tips on where to look?

3) This is a Meteobridge setting methinks, I would like the wind speed to be displayed in MPH rather than m/s, any changes I made to the conditions by adding mph, knocked everything out, again, any pointers gratefully received.

Cheers
« Last Edit: December 28, 2016, 02:23:32 AM by Ian. »
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: Getting a Banner to display with Meteobridge
« Reply #1 on: December 20, 2016, 11:55:45 AM »
Sorry I can't help with questions 1 and 3.  For showing on my website pages this is what I have
Code: [Select]
<!-- Cumulus banner -->
<div align="center">
<img style="width: 560px; height: 70px;" src="http://www.komokaweather.com/weather/komoka-now.php" alt="Image"/>
</div>
with komoka-now.php being the banner script.  I don't use Meteobridge and don't know what the differences might be.

Enjoy,
Paul

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Getting a Banner to display with Meteobridge
« Reply #2 on: December 20, 2016, 12:07:21 PM »
Hi All,

After 7 hours of playing about I'm still no better off so here goes.

The banner shows fine here http://www.chatteris.biz/banner.en.php, the things I'm struggling with are:

1) The year on the banner shows 2020, (it doesn't help that today is the 20th!), I see in the script that 20 was added to make up the first two numbers of the year, but my MBrealtime.txt is showing the correct date in the format dd/mm/yyyy, showing 20/12/2016 as I type this, I'm no coder and cant see what has made the year incorrect.

2) I don't know how to display this on my web page or in forum signature blocks as I can't find the image file it creates, any tips on where to look?

3) This is a Meteobridge setting methinks, I would like the wind speed to be displayed in MPH rather than m/s, any changes I made to the conditions by adding mph, knocked everything out, again, any pointers gratefully received.

Cheers

Hi,
in PHP
"y" = the last two digits, "Y" = full year (2016 etc.)

some programs will use "yy" to denote the two letter representation of the year, which is probably the problem here, because in php yy will produce 2020. I am not quite sure how that entire script works.

Offline Ian.

  • Forecaster
  • *****
  • Posts: 459
    • Chatteris Weather
Re: Getting a Banner to display with Meteobridge
« Reply #3 on: December 20, 2016, 12:38:57 PM »
Hi Paul,

That works great for my web page so many thanks for that, can I ask what code you have used to display in your signature block please.

Cheers

Ian
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz

Offline Ian.

  • Forecaster
  • *****
  • Posts: 459
    • Chatteris Weather
Re: Getting a Banner to display with Meteobridge
« Reply #4 on: December 20, 2016, 12:44:38 PM »
Hi Jachym,

Thank for the reply and the info, I will have another look to see if I can find where this is used, it's odd as the MBrealtime shows a numerical date rather than DD/MM/YYYY, but I'll keepa lookin :-)

As an aside you will be pleased to know that I'm coming back into the Meteotemplate fold over this xmas break, not sure why it broke last time, but the timing wasn't right to try and get it going. This time I'm cleaning out and starting again.

All the very best

Ian
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: Getting a Banner to display with Meteobridge
« Reply #5 on: December 20, 2016, 12:47:04 PM »
Hi Ian,
I have this in my forum profile:
Code: [Select]
[url=http://www.komokaweather.com][img]http://www.komokaweather.com/weather/komoka-now.php[/img]
Enjoy,
Paul

Offline Ian.

  • Forecaster
  • *****
  • Posts: 459
    • Chatteris Weather
Re: Getting a Banner to display with Meteobridge
« Reply #6 on: December 20, 2016, 12:59:33 PM »
Paul,

I tried every combination but not in the right order  #-o

Banner on web page and in signature block, many thanks for your help. =D&gt;

All the very best

Ian
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: Getting a Banner to display with Meteobridge
« Reply #7 on: December 20, 2016, 01:11:34 PM »
You're very welcome Ian, and we all hope we can be here and enjoy 2020 [-o&lt;

Paul

Offline Ian.

  • Forecaster
  • *****
  • Posts: 459
    • Chatteris Weather
Re: Getting a Banner to display with Meteobridge
« Reply #8 on: December 20, 2016, 01:15:19 PM »
You're very welcome Ian, and we all hope we can be here and enjoy 2020 [-o&lt;

Paul

I'm working on it lol
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz

Offline Ian.

  • Forecaster
  • *****
  • Posts: 459
    • Chatteris Weather
Re: Getting a Banner to display with Meteobridge
« Reply #9 on: December 21, 2016, 02:52:20 AM »

Hi,
in PHP
"y" = the last two digits, "Y" = full year (2016 etc.)

some programs will use "yy" to denote the two letter representation of the year, which is probably the problem here, because in php yy will produce 2020. I am not quite sure how that entire script works.

It is odd, the script references the file MBrealtime.txt which has the date as 20/12/2016, the script only has 'date' not dd/mm/yy, so I'm stuck.

Can the meteotemplate banner be reduced in size to the one in my signature block?
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz

Offline hymrog

  • Senior Member
  • **
  • Posts: 52
    • Gahanna Weather
Re: Getting a Banner to display with Meteobridge
« Reply #10 on: December 22, 2016, 07:55:05 AM »
Hello  Ian -

Assuming you are using the script created by Anole Computer Services, I had to make some changes to the wxgraphics.php page to allow for the different data points in the MBrealtime.txt.  I believe I made those changes back in 2014

I have attached the script here for your review. Please let me know if you have any questions.  Please also note that the script includes code for adding advisories to your banners.  The advisory code starts at line 49 and ends at line 194 if wish to delete and just work on getting the basics set up.

Hope this helps

Greg

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Getting a Banner to display with Meteobridge
« Reply #11 on: December 22, 2016, 09:34:04 AM »

Hi,
in PHP
"y" = the last two digits, "Y" = full year (2016 etc.)

some programs will use "yy" to denote the two letter representation of the year, which is probably the problem here, because in php yy will produce 2020. I am not quite sure how that entire script works.

It is odd, the script references the file MBrealtime.txt which has the date as 20/12/2016, the script only has 'date' not dd/mm/yy, so I'm stuck.

Can the meteotemplate banner be reduced in size to the one in my signature block?

Hi Ian,
yes, look at my signature, it is also smaller than the default, you just use the BB syntax for image width here on the forum.

For the image tag, specify width like this:

Code: [Select]
[img width=800]......

Offline Ian.

  • Forecaster
  • *****
  • Posts: 459
    • Chatteris Weather
Re: Getting a Banner to display with Meteobridge
« Reply #12 on: December 22, 2016, 02:54:02 PM »
Hello  Ian -

Assuming you are using the script created by Anole Computer Services, I had to make some changes to the wxgraphics.php page to allow for the different data points in the MBrealtime.txt.  I believe I made those changes back in 2014

I have attached the script here for your review. Please let me know if you have any questions.  Please also note that the script includes code for adding advisories to your banners.  The advisory code starts at line 49 and ends at line 194 if wish to delete and just work on getting the basics set up.

Hope this helps

Greg

Hi Greg,

Thanks for taking the time end effort to send the script, it works great  :grin:

All the very best

Ian
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz

Offline hymrog

  • Senior Member
  • **
  • Posts: 52
    • Gahanna Weather
Re: Getting a Banner to display with Meteobridge
« Reply #13 on: December 22, 2016, 06:18:05 PM »
Awesome. Glad I could help.

 

anything