Author Topic: Weatherunderground 7 days forecast script follow-up  (Read 15722 times)

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Weatherunderground 7 days forecast script follow-up
« on: August 15, 2012, 07:15:47 PM »
Hi,

For any comments, suggestions on this module, use this thread,


Your friendly Weathermaster
Jacques
Please, consider supporting this site 

Offline uncle_bob

  • Full Member
  • ***
  • Posts: 61
    • Conder Weather, Canberra
Re: Weatherunderground 7 days forecast script follow-up
« Reply #1 on: August 16, 2012, 05:13:40 AM »
Looks good Mr Meteo ;)

Offline avoorpool

  • Sr. Member
  • ****
  • Posts: 372
    • http://pickeringweather.ca
Re: Weatherunderground 7 days forecast script follow-up
« Reply #2 on: August 16, 2012, 08:39:30 AM »
Hi Jacques,

Checked your WU forecast page and was just wondering why you choose to use Ken's (Saratoga's) forecast icons instead of keeping the WU standard icons (I've used those in my previous installation) since those are more in line with the EC forecast icons....(See attachments)
Just a thought.

Cheers,

Arthur

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: Weatherunderground 7 days forecast script follow-up
« Reply #3 on: August 16, 2012, 09:00:43 AM »
Hi Arthur,

I've just thinked of being "different", from source to source.
I was mixed a bit for that one as on one part I don't want users
to be under impression that we serve "the same soup" again and again!

But, other part, it deserve forecast as visitors have to rely on text
instead of fast to recognize icons (latest ones have interest to be bigger
to be more "viewable")

Then, I'm mixed on these icons... users have last word... comments welcome!!!

Regards,
Jacques
Please, consider supporting this site 

Offline uncle_bob

  • Full Member
  • ***
  • Posts: 61
    • Conder Weather, Canberra
Re: Weatherunderground 7 days forecast script follow-up
« Reply #4 on: August 18, 2012, 08:45:01 PM »
Got this running on my site and it's fantastic.
Shout out to Ken and Jacques!

Offline avoorpool

  • Sr. Member
  • ****
  • Posts: 372
    • http://pickeringweather.ca
Re: Weatherunderground 7 days forecast script follow-up
« Reply #5 on: August 19, 2012, 03:01:50 AM »
Hi Jacques,

I installed the last of my Forecasts (WU). (Both EC Forecasts look great!!!)
However, I installed WU on my XAMPP local server and it looks perfect.
However, when I upload the files to my webserver, the bottom of the page is "off" (the link to Weather for You) and it also does not show the WU logo (everything is uploaded correctly!!!

Any ideas??
Thanks,

Arthur

Offline uncle_bob

  • Full Member
  • ***
  • Posts: 61
    • Conder Weather, Canberra
Re: Weatherunderground 7 days forecast script follow-up
« Reply #6 on: August 19, 2012, 07:16:12 AM »
Jacques is taking a vacation (probably well deserved too ;) ).
I've no idea when he will return.

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: Weatherunderground 7 days forecast script follow-up
« Reply #7 on: August 19, 2012, 07:42:07 AM »
Hi gang,

I'm on my way... luggage time! I'll be back by september 7.  ;D
(I'll probably conect from time to time)

Averpool, you've experienced on other pages, right colum give entire height...
you missed WU logo, then around 100px missing for height!

Bob, I don't see your big images, but when we pick a small image,
we see big ones but "modal" (blanked background). Are you trying
to do modal display? If no, reinstall original page, in zip file.

Regards,
Jacques

Please, consider supporting this site 

Offline avoorpool

  • Sr. Member
  • ****
  • Posts: 372
    • http://pickeringweather.ca
Re: Weatherunderground 7 days forecast script follow-up
« Reply #8 on: August 19, 2012, 11:40:35 AM »
Hi Jacques,

Just a quick note before you lay down, sipping tequila's... :)
This was a "tricky" one.
I altered every possilbe "px" setting, and finally found the one that shows "forecast by...." and includes the WU logo.
All good for now!!

Happy Holidays  ;)

Arthur

Offline uncle_bob

  • Full Member
  • ***
  • Posts: 61
    • Conder Weather, Canberra
Re: Weatherunderground 7 days forecast script follow-up
« Reply #9 on: July 20, 2014, 01:45:06 AM »
Dear Jacques,
Sorry to be a PITA.
But I haven't managed to get either of the late two versions to work.
Currently on 1.2 I'm getting this error:
Fatal error: Call to undefined function json_decode() in /webspace/users.on.net/data/L3/96/L3966259/weather/include/WU-forecast.php on line 550

Also the comment in the file say:
Configuuration: Line #135, choose your city
                Line #83, choose language for forecast display
                "fr" for French, "en" for English.

But I can't see where to edit these lines.

Here is my sorted edited file..
<?php
$tpl_version = "1.4";
if (isset($_GET['ver'])) {
  echo $tpl_version;
  exit;
   // Date: 2014-06-27
}
/*
Program : forecast_ecs
Author  : jacques.desroches@weatherbyyou.com
Date    : 2014-06-27
Description   : Weather forecast from WeatherUnderground
Configuuration: Line #135, choose your city
                Line #83, choose language for forecast display
                "fr" for French, "en" for English.
Note: wu-forecast.php script from SaratogaWX - http://saratoga-weather.org
*/

session_start(); // start PHP session
// Check if a language has been selected
if (isset($_POST['langue'])) {
  $lang = $_POST['langue'];
  $_SESSION['langue'] = $lang; // store session data
}
elseif(isset($_SESSION['langue'])){
  $lang = $_SESSION['langue']; // Default language
}
else {
  $lang = 'en'; // Default language
  $_SESSION['langue'] = $lang;
}

// Default Fall-back language (set to English)
require('lang/text_standard_en.php');
// Include text and data file
require('lang/text_standard_'.$lang.'.php');
include('wt_data_inc.php');

// Include language files available in lang folder
include('include/local_lang.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <title><?php echo $location; ?> | WeatherUnderground Forecast</title>
   <meta name="keywords" content="Weatherunderground Canberra, forecast, 7 days" />
   <meta name="description" content="Forecast for Canberra region" />
   <meta name="robots" content="noarchive" />
   <meta http-equiv="Pragma" content="no-cache" />
   <link href="styles.css" rel="stylesheet" type="text/css" />
   <link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
  <script type="text/javascript" src="lib/dropmenu/dropdowntabs.js"></script>
<style type="text/css">
<!--
.codebox {
   color: #000000;
   padding: 5px;
   margin: 5%;
   width: 85%;
}
.ECtable {
  margin-left: 5px;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #0000FF;
/*  border: 1px solid #5594DE;  */
}
.ECtable td {
  border: 1px solid #5594DE;
}
.ECtable b {
  color: #000;
}
.ECforecast {
  width: 600px;
  font-family: Tahoma, Arial, Helvetica, sans-serif;
  font-size: 12px;
/*    color: #996633;  */
}
.lines {
  border: 1px solid #5594DE;
}
-->
</style>
</head>
<body>
<div id="bg_clouds">
   <div id="main">
      <!-- header and main menu begins -->
    <?php
      require_once('header_menu.php');
    ?>
    <script type="text/javascript">
    // Select menu current item highlight
    //SYNTAX: tabdropdown.init("menu_id", [item menu, start from 0])
    tabdropdown.init("mainmenu", 1)
    </script>
      <div style="height:13px"></div>
      <!-- header ends -->
      <div class="header_top"></div>
      <div class="header">
         <div id="wrapper">
            <div id="slider-wrapper">       
               <div id="slider" class="nivoSlider">
                  <img src="style/header1.jpg" alt="" />
                  <img src="style/header2.jpg" alt=""/>
                  <img src="style/header3.jpg" alt="" />
               </div>
            </div>
         </div>
      </div>
      <div class="header_bot"></div>
      <div style="height:15px"></div>
      <!-- content begins -->
      <div class="cont_top"></div>
      <div id="content">
         <div class="sep_vert">
            <!--  28 gras et Papyrus 84 italiq gras couleur 5594DE, transparent 160   -->
            <img src="style/forecast.gif" alt="" title="" style="padding:0px 0px 20px 30px" />
            <div id="right_h" style="width:700px; margin-right: 50px;">
          <h1 style="text-align: center;">WeatherUnderground's Forecast</h1>
          <br />
               <div style="width: 640px;margin: 0 auto">
                  <?php
                     // That is what we call a php file inclusion
                     // WU forecast is takin place in that "hole" in your page
                     $doIncludeWU = true;
                     include('include/WU-forecast.php');
                  ?>
                  
          <br />
          </div>
            </div>
            <p style="margin:470px 0px 20px 10px"><strong>Forecast by</strong>:<br /><img src="style/WUlogo2.jpg" alt="" title="" /></p>
            <p>Script provided by <a href="http://saratoga-weather.org/scripts-WUforecast.php">SaratogaWX</a></p><br />
      <!-- content ends -->
         </div>
      </div>
      <div class="cont_bot"></div>
      <!-- footer begins -->
      <div id="footer">
         <a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional"><abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a> | <a href="http://jigsaw.w3.org/css-validator/check/referer" title="This page validates as CSS"><abbr title="Cascading Style Sheets">CSS</abbr></a> | Weather Blues Template by <a href="http://weatherbyyou.com">Weather by You!</a>
         <p style="width:100%; font-family:helvetica; font-size:10px; color:#fff">Copyright  2011. <!-- Do not remove -->Designed by <a href="http://www.metamorphozis.com/free_templates/free_templates.php" title="Free Web Templates">Free Web Templates</a>, coded by <a href="http://www.myfreecsstemplates.com/" title="Free CSS Templates">Free CSS Templates</a><!-- end --></p>
      </div>
      <!-- footer ends -->
  </div>
</div>
<script type="text/javascript" src="lib/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="lib/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
   $(window).load(function() {
   $('#slider').nivoSlider();
   });
  function SetHeight() {
    var rien = 0;
    document.getElementById("content").style.height = document.getElementById("right_h").clientHeight  + 'px';
  }
   SetHeight()
</script>
</body>
</html>

Cheers, once again, Bob
« Last Edit: July 20, 2014, 04:22:21 AM by uncle_bob »

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: Weatherunderground 7 days forecast script follow-up
« Reply #10 on: July 28, 2014, 07:07:20 AM »
Hi Bob,

You have to edit file include\WU-forecast.php
To find lines that have to be edited. Forgot to mention
this file in comments.

Best regards,
Jacques
Sorry for answer time... vacation time!  8)
Please, consider supporting this site 

Offline uncle_bob

  • Full Member
  • ***
  • Posts: 61
    • Conder Weather, Canberra
Re: Weatherunderground 7 days forecast script follow-up
« Reply #11 on: August 17, 2014, 07:54:22 AM »
Sorry for the delay, I've been working on other projects and just had a chance to look into this more.
But the bad news is I'm stumped :(

Jacques, I'm open to more suggestions if you would be so kind.

Cheers Uncle Bob.

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: Weatherunderground 7 days forecast script follow-up
« Reply #12 on: August 28, 2014, 06:11:27 PM »
Hi Bob,

Sorry for delay. I've looked to your site and found error message:

Fatal error: Call to undefined function json_decode() in /webspace/users.on.net/data/L3/96/L3966259/weather/include/WU-forecast.php on line 550

Seems a problem with json_decode. This function is available on php 5.2 and newer.
php manual state (PHP 5 >= 5.2.0, PECL json >= 1.2.0)

Check to see if you can choose your php version, or ask your provider!

Best regards,
Jacques
Please, consider supporting this site 

Offline uncle_bob

  • Full Member
  • ***
  • Posts: 61
    • Conder Weather, Canberra
Re: Weatherunderground 7 days forecast script follow-up
« Reply #13 on: August 29, 2014, 02:33:31 AM »
Thank you Jacques,
I'll check with my provider, but I doubt they will do anything in fear of breaking other stuff.

Cheers Bob

Offline uncle_bob

  • Full Member
  • ***
  • Posts: 61
    • Conder Weather, Canberra
Re: Weatherunderground 7 days forecast script follow-up
« Reply #14 on: August 30, 2014, 07:46:55 AM »
Hi Jacques, it's me again :)

The web server is running PHP 5.2, you can check that here: http://www.users.on.net/~cond/checkserver.php

I guess then the problem is this server config flag '--disable-json' ?

Cheers Bob