cloudy

Author Topic: Carterlake Plugin Page - Printable Weather Flyer  (Read 32313 times)

0 Members and 2 Guests are viewing this topic.

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #60 on: July 04, 2009, 12:22:17 AM »
Tim you need PHP 5 , that is why it is not working this time.
If anybody still has PHP4 they could have a compromised server because it is no longer supported. They need to ask web host to upgrade their account to a server with PHP5. Many times the update to PHP5 is a simple update without any incompatibility with our scripts. The only issue I had with my upgrade from PHP4 to PHP5 was that I needed to update jgraph php library to the newest version.
« Last Edit: July 04, 2009, 12:33:29 AM by MCHALLIS »

Offline Objector

  • Posts: 357
  • Dalton, Georgia, USA
    • Dalton Georgia Weather
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #61 on: July 04, 2009, 11:38:52 AM »
Mike,

I just added in your printable flyer script, and while I'm not getting any errors, nothing is being included from the nws-forecast-discussion.txt file even though that file has info in it. I tried to figure out the problem by comparing the forecast from my area with the one from your area but I can't see what the problem is.

The flyer is at: http://www.daltongeorgiaweather.com/wxflyer.php

If sometime you have a chance to take a look, I'd appreciate any help

Thanks

Derek

Offline Budgie

  • Martin
  • Global Moderator
  • Posts: 4,956
  • WML Station: WD00934 CWOP: CW7959
  • Isle of Lewis, Scotland
    • Hebrides-Weather
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #62 on: July 04, 2009, 12:36:05 PM »
I can see the forecast details on the page from here, both in the browser & on Print Preview.
Try Ctrl + F5 to reload the page (windows) in case it's a local cache issue.

Offline Tim Hanko

  • Posts: 1,108
  • Grand Rapids, Michigan, USA
    • Walker, MI Weather
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #63 on: July 04, 2009, 02:01:18 PM »
I did discover that I needed php5. Try this link: www.thanko.info/wxflyer.php5

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #64 on: July 04, 2009, 03:00:55 PM »
Tim, PHP5 is working good, the script is working now.

I see what still might be the problem when printing ....
You have some html commented out in your page. It comments out a div that should not be commented out.:

Code: [Select]
<!-- external links -->
<div id="nohover">
<!--<p class="sideBarTitle">Advisories</p>
<br/>
<center>
</center>
<br/>
</div>-->

Try changing it to this:
Code: [Select]
<!-- external links -->
<div id="nohover">
<!--
<p class="sideBarTitle">Advisories</p>
<br/>
<center>
</center>
<br/>
-->
</div>

Offline Tim Hanko

  • Posts: 1,108
  • Grand Rapids, Michigan, USA
    • Walker, MI Weather
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #65 on: July 04, 2009, 03:22:08 PM »
Wow! Good catch.

Seems to be working now.

Is it normal for the orange box to be empty? I assume that is where warnings would go.

Offline wxflint

  • Posts: 140
  • When The Weather Gets Tough! Get With The Weather
  • Flint, Michigan
    • Flint, Michigan Live and Local weather
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #66 on: July 04, 2009, 03:44:54 PM »
Any idea why mine does not show when checking the Print Prev.
PHP Version 5.2.9
Link: http://www.wxflint.com/wxflyer.php

Live Local Weather http://wxflint.com

Offline Tim Hanko

  • Posts: 1,108
  • Grand Rapids, Michigan, USA
    • Walker, MI Weather
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #67 on: July 04, 2009, 04:15:49 PM »
Back up one page of posts in this thread. Same thing happened to me when I updated the RSS-Advisory script.

Offline wxflint

  • Posts: 140
  • When The Weather Gets Tough! Get With The Weather
  • Flint, Michigan
    • Flint, Michigan Live and Local weather
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #68 on: July 04, 2009, 04:19:40 PM »
Thanks Tim I will take a look

Live Local Weather http://wxflint.com

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #69 on: July 04, 2009, 04:26:14 PM »
Derek, I am working on a fix for your forecast discussion, the preg_match needs changes for you.

wxflint, you have mismatched divs (html validation problems) Use the HTML validator and fix the HTML problems
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.wxflint.com%2Fwxflyer.php

Offline Objector

  • Posts: 357
  • Dalton, Georgia, USA
    • Dalton Georgia Weather
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #70 on: July 04, 2009, 04:35:37 PM »
Thanks Mike. I wondered if it had something to do with the format of my forecast discussion because it said it was "updated for aviation", etc.

Derek

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #71 on: July 04, 2009, 05:12:57 PM »
Derek, Here is the fix:

Change:
Code: [Select]
  // attempt 3
  if ($text == '') {
    preg_match("|SHORT TERM\.\.\.([^&{2}]+)&{2}|is", $html, $betweenspan);
    $text = trim($betweenspan[1]);
    $text = ucfirst(htmlspecialchars(strip_tags(strtolower($text))));
    $text = truncate_flyer($text,750,'');
  }
  // attempt 4
  if ($text == '') {
    preg_match("|SHORT TERM\.\.\.([^&&]+)&{2}|is", $html, $betweenspan);
    $text = trim($betweenspan[1]);
    $text = ucfirst(htmlspecialchars(strip_tags(strtolower($text))));
    $text = truncate_flyer($text,750,'');
  }

To:
Code: [Select]
  // attempt 3
  if ($text == '') {
    preg_match("|SHORT TERM[ a-zA-Z/]*\.\.\.([^&{2}]+)&{2}|is", $html, $betweenspan);
    $text = trim($betweenspan[1]);
    $text = ucfirst(htmlspecialchars(strip_tags(strtolower($text))));
    $text = truncate_flyer($text,750,'');
  }
  // attempt 4
  if ($text == '') {
    preg_match("|SHORT TERM[ a-zA-Z/]*\.\.\.([^&&]+)&{2}|is", $html, $betweenspan);
    $text = trim($betweenspan[1]);
    $text = ucfirst(htmlspecialchars(strip_tags(strtolower($text))));
    $text = truncate_flyer($text,750,'');
  }

I will make a new release.

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #72 on: July 04, 2009, 06:56:40 PM »
Version: 1.06 - 04-Jul-2009
- fix for forecast discussion in Peachtree City GA
- added - wxflyer-uk.php contributed by Martin (Budgie) from http://www.hebwx.co.uk/wxflyer.php
rss-advisory.php must be at version V2.00 06-Jun-2009 BETA .022 or higher

Offline Objector

  • Posts: 357
  • Dalton, Georgia, USA
    • Dalton Georgia Weather
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #73 on: July 04, 2009, 07:09:38 PM »
Mike,

I replaced the code and everything is PERFECT!!

I can't say enough about all the great code you write and how helpful you are!!!!

Thanks

Derek

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Carterlake Plugin Page - Printable Weather Flyer
« Reply #74 on: July 04, 2009, 07:12:27 PM »
You are welcome. Glad to be of help.  :lol: