Author Topic: Cloudbase.php background issue  (Read 445 times)

0 Members and 1 Guest are viewing this topic.

Offline cheffy

  • Member
  • *
  • Posts: 18
    • Mickleham Weather
Cloudbase.php background issue
« on: January 28, 2022, 06:00:09 AM »
Hi,

I have been using the cloudbase.php script for many years without any problems.  However, in the last year or so I noticed the background seasons were not correct, whereas previously they worked fine.  As an example, mine is currently showing the winter background when it should be the summer background (here in Australia).  I recently updated to the most recent version, as per Ken's update, however that has still not fixed the problem.  I have attached the current version I am using with my settings.

https://www.micklehamweather.com/cloud-base.php

Does anybody know how to fix this?

Thanks,
Neil

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8621
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Cloudbase.php background issue
« Reply #1 on: January 29, 2022, 07:58:03 PM »
I just checked through Bashewa's code, and there's nothing built-in to support southern-hemisphere seasons.

You can 'trick' the script by rearranging the season background images in the script
Code: [Select]
   // Backgrounds for seasons switch (if "$switchSeasons=true;" above)
   $bgSpringDay    = 'cb-bg-00sprd.png'; // Background image - Spring - Day
   $bgSpringNight  = 'cb-bg-00sprn.png'; // Background image - Spring - Night
   $bgSummerDay    = 'cb-bg-00sumd.png'; // Background image - Summer - Day
   $bgSummerNight  = 'cb-bg-00sumn.png'; // Background image - Summer - Night
   $bgAutumnDay    = 'cb-bg-00autd.png'; // Background image - Autumn - Day
   $bgAutumnNight  = 'cb-bg-00autn.png'; // Background image - Autumn - Night
   $bgWinterDay    = 'cb-bg-00wind.png'; // Background image - Winter - Day
   $bgWinterNight  = 'cb-bg-00winn.png'; // Background image - Winter - Night
to
Code: [Select]
   // Backgrounds for seasons switch (if "$switchSeasons=true;" above)
   $bgSpringDay    = 'cb-bg-00autd.png'; // Background image - Spring - Day (SH - Autumn)
   $bgSpringNight  = 'cb-bg-00autn.png'; // Background image - Spring - Night
   $bgSummerDay    = 'cb-bg-00wind.png'; // Background image - Summer - Day  (SH- Winter)
   $bgSummerNight  = 'cb-bg-00winn.png'; // Background image - Summer - Night
   $bgAutumnDay    = 'cb-bg-00sprd.png'; // Background image - Autumn - Day  (SH- Spring)
   $bgAutumnNight  = 'cb-bg-00sprn.png'; // Background image - Autumn - Night
   $bgWinterDay    = 'cb-bg-00sumd.png'; // Background image - Winter - Day  (SH- Summer)
   $bgWinterNight  = 'cb-bg-00sumn.png'; // Background image - Winter - Night
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline cheffy

  • Member
  • *
  • Posts: 18
    • Mickleham Weather
Re: Cloudbase.php background issue
« Reply #2 on: January 30, 2022, 07:09:33 PM »
Thanks Ken - I have it working again based on your suggestion.

It's strange, because I have had this script working for many years without any issues.  I can only assume I must have did this switch originally and forgot all about it.

As always, thanks for your help.
Neil

Offline W Thomas

  • Welcome To Life In The High Country!
  • Forecaster
  • *****
  • Posts: 1597
  • In Loving Memory Of Hooker The Weather Dog !
    • Smyth Weather
Re: Cloudbase.php background issue
« Reply #3 on: February 04, 2022, 04:51:35 AM »
Have there been any major changes that would cause this script not to function?  It ran for many years without a hitch for me now I get no data on my site  https://www.smythweather.net
If I copy and paste the URL for the image on my site I get this   Date must be before Sun, 02 Jan 2022 13:35:42 -0500

Any ideas of what the heck happened on January 02, 2022?   I haven't made any changes, but I need to. So this problem is a hair puller for me!

Thanks for any suggestions!


     Best Regards
     Wayne

CWOP CW8217
KVAWHITE22 Wunderground   Davis VUE &  Davis Vantage Pro 2  /   Dedicated Server
GR Level 3 ,Level 2 AE Radars  Weather Display 10.37P  Mid Atlantic Weather Network Member
SkyWarn & Spotter Network 6092

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8621
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Cloudbase.php background issue
« Reply #4 on: February 04, 2022, 12:08:12 PM »
Looking at https://www.smythweather.net/check-fetch-times.php?show=versions shows you have a lot of updates to scripts to apply to your site.  Also, your site is running the (unsupported) PHP 5.5 version .. in order to run PHP 7.x or 8.x you will need to update all of the scripts, and some of your pages as the various PHP version updates have removed some older built-in functions that older scripts used.

Regarding the cloud-base.php script, you're running Version 1.9 from 07 May 2009.  That version only had astronomy tables that extended through 2021, and that's the reason you see the "Date must be before Sun, 02 Jan 2022 13:35:42 -0500" message instead of an image.

The current cloud-base.php version from my Legacy Scripts area is Version 2.4 .. you can download it from here.   To prep for the unavoidable PHP upgraded in the future, you should get your site ready now by updating the scripts.  Also, in header.php, you have to replace the split( function call with explode( otherwise, PHP7.0+ will have a fatal error and not display your site (as the split() function was removed).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline W Thomas

  • Welcome To Life In The High Country!
  • Forecaster
  • *****
  • Posts: 1597
  • In Loving Memory Of Hooker The Weather Dog !
    • Smyth Weather
Re: Cloudbase.php background issue
« Reply #5 on: February 04, 2022, 11:33:44 PM »
Thanks for your assistance, Ken! Especially concerning the custom parts. I will start gathering updated scripts as I can locate them and get ready for some serious updates. If you see anything else that would be especially problematic please let me know. I haven't got comfortable with script work yet and just plain don't do it enough to get so I suppose :)

Most definitely gonna be a work in progress for a bit LOL

Thanks again for your help and knowledge!


     Best Regards
     Wayne

CWOP CW8217
KVAWHITE22 Wunderground   Davis VUE &  Davis Vantage Pro 2  /   Dedicated Server
GR Level 3 ,Level 2 AE Radars  Weather Display 10.37P  Mid Atlantic Weather Network Member
SkyWarn & Spotter Network 6092

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2336
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: Cloudbase.php background issue
« Reply #6 on: February 08, 2022, 04:09:41 AM »
 Somewhat related, what is the address file for the page you check, if you have any files needing updated for Saratoga?
« Last Edit: February 08, 2022, 04:11:27 AM by Bunty »

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8621
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Cloudbase.php background issue
« Reply #7 on: February 08, 2022, 01:35:36 PM »
it's check-fetch-times.php?show=versions run on your website.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything