Author Topic: Wide/Narrow  (Read 370 times)

0 Members and 1 Guest are viewing this topic.

Offline vinesweather

  • Forecaster
  • *****
  • Posts: 324
    • The Vines Weather
Wide/Narrow
« on: May 03, 2024, 08:12:54 AM »
Hi All
Not sure what I have done, but when I change the wide to narrow setting in settings.php, it only changes the top part.

Code: [Select]
$SITE['allowThemeSwitch']   = true;  // set to false to disable the use of Theme Switcher
$SITE['CSSscreenDefault'] = 'weather-screen-green.css'; // leave -narrow or -wide off this .. just change color here
$SITE['CSSwideOrNarrowDefault'] = 'narrow'; // 'narrow' or 'wide'
# CSSsettings_mode
# sets allowable user style select options:
# 1 user can select style and screen width (show style select and screen width select)
# 2 user can select styles only (hide screen width select)
# 3 user can select screen width only (hide style select)
$SITE['CSSsettings_mode'] = 1;  // set to 1, 2 or 3

Any suggestions please?

https://www.vinesweather.com/

Thanks

Chris
« Last Edit: May 03, 2024, 08:15:45 AM by vinesweather »

Offline hcorrin

  • Contributor
  • ***
  • Posts: 144
    • Ballaugh Weather
Re: Wide/Narrow
« Reply #1 on: May 03, 2024, 03:22:35 PM »
I just looked at your site and it appears to be stuck in wide mode even when I switched it from narrow to wide and back so something is wrong but your settings look ok

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Wide/Narrow
« Reply #2 on: May 03, 2024, 08:06:59 PM »
The site aspect switching (and other things) depending on PHP having the setting of
Quote
request_order = GP
in php.ini.
Your PHP currently has no default setting for that.

Try adding in Settings.php, just after the starting <?php

ini_set('request_order','GP');

and see if that fixes the issue.  If not, in your php.ini (if you have access) add

request_order = GP

to it otherwise, ask your hoster to add the php.ini entry to the default PHP config for your site.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline vinesweather

  • Forecaster
  • *****
  • Posts: 324
    • The Vines Weather
Re: Wide/Narrow
« Reply #3 on: May 03, 2024, 09:24:26 PM »
Thanks Ken.

I'll log a support ticket with my host. Any ideas why it would stop working suddenly?

Thanks for the help.

Chris

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Wide/Narrow
« Reply #4 on: May 03, 2024, 11:24:55 PM »
If they changed PHP versions, they likely missed making that setting.  Having request_order = GP is normal for most hosters.

Use check-fetch-times.php?show=info to see the current setting on your site.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline vinesweather

  • Forecaster
  • *****
  • Posts: 324
    • The Vines Weather
Re: Wide/Narrow
« Reply #5 on: May 04, 2024, 03:49:07 AM »
Thanks Ken. My host has to wait for L2 permission which will be Monday, it's Saturday here at the moment.

I do have access to change my PHP version. Would that help?

Chris

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Wide/Narrow
« Reply #6 on: May 04, 2024, 08:46:18 AM »
If you have access to the php.ini for your site, try adding
Quote
request_order = GP
to it while you await your L2 hoster's action.  Changing version of PHP may or may not help (depends on whether the new selected version has the setting enabled or not).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Wide/Narrow
« Reply #7 on: May 04, 2024, 09:00:12 AM »
I can see that request_order = GP is active, and your site (after deleting cookies for it) does honor the Wide/Narrow selection (as indicated by the persistent check on the proper wide or narrow radio button).

The aspect ratio of the display doesn't change -- it's always 'wide'.

I think this is caused by the the contents of weather-screen-green-wide.css and weather-screen-green-narrow.css have the same contents (they shouldn't).  Restore weather-screen-green-narrow.css from the Base-world.zip and the screen switch from wide to narrow (and vice versa) should work for the display.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline vinesweather

  • Forecaster
  • *****
  • Posts: 324
    • The Vines Weather
Re: Wide/Narrow
« Reply #8 on: May 04, 2024, 09:16:55 AM »
I can see that request_order = GP is active, and your site (after deleting cookies for it) does honor the Wide/Narrow selection (as indicated by the persistent check on the proper wide or narrow radio button).

The aspect ratio of the display doesn't change -- it's always 'wide'.

I think this is caused by the the contents of weather-screen-green-wide.css and weather-screen-green-narrow.css have the same contents (they shouldn't).  Restore weather-screen-green-narrow.css from the Base-world.zip and the screen switch from wide to narrow (and vice versa) should work for the display.

Thanks Ken. Tried the restore. Didn't work, unfortunately.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Wide/Narrow
« Reply #9 on: May 04, 2024, 10:11:57 AM »
Try changing the weather-screen-green-narrow style for body to
Code: [Select]
body {
  color: black;
  background-color: #F3F2EB;
  font-family: verdana, helvetica, arial, sans-serif;
  font-size: 73%;  /* Enables font size scaling in MSIE */
  margin: auto;
  padding: 0;
  width: 800px;
}
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline vinesweather

  • Forecaster
  • *****
  • Posts: 324
    • The Vines Weather
Re: Wide/Narrow
« Reply #10 on: May 04, 2024, 11:20:07 AM »
Try changing the weather-screen-green-narrow style for body to
Code: [Select]
body {
  color: black;
  background-color: #F3F2EB;
  font-family: verdana, helvetica, arial, sans-serif;
  font-size: 73%;  /* Enables font size scaling in MSIE */
  margin: auto;
  padding: 0;
  width: 800px;
}

It kinda worked. Everything is out of alignment though

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Wide/Narrow
« Reply #11 on: May 04, 2024, 12:01:44 PM »
Yes, for the homepage with ajax-dashboard6.php.  This is due to some issues with the inclusion of images that are too wide for the actual area alotted so the browser tries to 'make it all fit' as best it can.  If you look at other pages in your site, they fit the 800px narrow setting just fine.

You'll need to tweak the image sizes for the included images (radar map under forecast should be 230px wide specified) and maybe reduce the width of the blitzortung map.
Your cloud-base.php has two errata :
Quote
Deprecated: Implicit conversion from float 46.5 to int loses precision in /home/mcdconcepts/public_html/cloud-base.php on line 987
Warning: Trying to access array offset on value of type null in /home/mcdconcepts/public_html/cloud-base.php on line 1005
and those are preventing display of the cloud-base image.

Also, there may be an unclosed table or div as the row with the blitzortung map shows an extra (blank) cell on the right, and that shouldn't be there.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline vinesweather

  • Forecaster
  • *****
  • Posts: 324
    • The Vines Weather
Re: Wide/Narrow
« Reply #12 on: May 04, 2024, 12:18:49 PM »
Yes, for the homepage with ajax-dashboard6.php.  This is due to some issues with the inclusion of images that are too wide for the actual area alotted so the browser tries to 'make it all fit' as best it can.  If you look at other pages in your site, they fit the 800px narrow setting just fine.

You'll need to tweak the image sizes for the included images (radar map under forecast should be 230px wide specified) and maybe reduce the width of the blitzortung map.
Your cloud-base.php has two errata :
Quote
Deprecated: Implicit conversion from float 46.5 to int loses precision in /home/mcdconcepts/public_html/cloud-base.php on line 987
Warning: Trying to access array offset on value of type null in /home/mcdconcepts/public_html/cloud-base.php on line 1005
and those are preventing display of the cloud-base image.

Also, there may be an unclosed table or div as the row with the blitzortung map shows an extra (blank) cell on the right, and that shouldn't be there.

Thanks Ken. I'll work on those tonight, actually it's now morning lol.

Many thanks for your help.
« Last Edit: May 04, 2024, 12:24:20 PM by vinesweather »