Author Topic: Template Saratoga Weather  (Read 1072 times)

0 Members and 1 Guest are viewing this topic.

Offline METEOGM

  • Member
  • *
  • Posts: 5
Template Saratoga Weather
« on: January 15, 2025, 07:10:01 PM »
very kind, I ask you for help to solve my problem with the saratoga template on which I configured the WU weather forecast and I get the following error: Warning: Unfined array key "primary_ip" in /membri/meteogm/mb/WC-forecast.php on line 910. At line 910 of the WC-forecast.php file I have the following script: " dest=".$cinfo['primary_ip'] ;
Can you give me some instructions to not display this warning? My site under construction is https://meteogm.altervista.org/mb/wxindex.php I have to complete the configuration. Very thanks
 :lol:
I have another problem, I am new to the template: I can't insert the graphs at the bottom of the template that are generated by Meteobridge PRO, these are generated with URL and sent to my host at the following address: https://meteogm.altervista.org/mb/grafico1.html I also have a second graph, which file should I modify? Thanks :oops:

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9722
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Template Saratoga Weather
« Reply #1 on: January 15, 2025, 07:28:10 PM »
For the error on line 910, replace in WC-forecast.php
Quote
  $Status .= "<!-- HTTP stats: " .
    " RC=".$cinfo['http_code'] .
    " dest=".$cinfo['primary_ip'] ;
with
Quote
  $Status .= "<!-- HTTP stats: " ;
  if(isset($cinfo['http_code'])) {$Status .=  " RC=".$cinfo['http_code'];}
  if(isset($cinfo['primary_ip'])) {$Status .=  " dest=".$cinfo['primary_ip'];}

To include the graphs from https://meteogm.altervista.org/mb/grafico1.html you'll need to use an <iframe> since the HTML and JavaScript in that page fetch the data and display the graphs.

Something like
Quote
<iframe src="https://meteogm.altervista.org/mb/grafico1.html" width="620"></iframe>
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 METEOGM

  • Member
  • *
  • Posts: 5
Re: Template Saratoga Weather
« Reply #2 on: January 19, 2025, 06:35:24 PM »
 [tup]Very, very kind, thanks for the directions, I still have to complete the configuration of the template, but the error on line 910, replaced the code in WC-forecast.php, it no longer appeared, it works correctly. I added the graphs as indicated.  =D&gt;
If I may I would still ask how to make the site more responsive...

Here is my site (still to be completed):
https://meteogm.altervista.org/mb/wxindex.php

Marco

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9722
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Template Saratoga Weather
« Reply #3 on: January 19, 2025, 07:16:04 PM »
Alas, the overall CSS and structure of the HTML in the template is NOT a modern responsive design and can't be made so without an extensive rewrite.  Sorry...
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