Carterlake/AJAX/PHP templates available

Sweet, Tim! I see you’ve already done some nice customization …
Please let me know what you found out about the testtags.php/trends-inc.html upload issue… sounds like a FAQ in the making.

You’re very welcome! The Docs were the hardest (isn’t is always the case)… code is easy/docs are hard.

Best regards,
Ken

Looks like my thermometer.php is currently out to lunch. Seems to have happened after I added the webcam link.

Also, in the rain section I’m showing 9 rain days in Dec. Not sure what is happening there either.

Oops…See this thread about testtags and trends-inc: http://discourse.weather-watch.com/t/28854. I did not set up the upload in Custom File creation…

Just upload the thermometer-blank.png file again… that should fix the missing graphic.

The template set comes with a dummy testtags.php and trends-inc.html so that while you’re developing your site, you won’t get a php error for those files being not found.

When you start regular uploads of testtags.txt → testtags.php and trends-inc.txt → trends-inc.html, they should replace those dummy files with real data from your weather station.

Best regards,
Ken

BTW… I’ve started a template user website link section for the templates … please let me know your Location and URL of your Carterlake-PHP template website when you go ‘live’.

Looks like moon phases are not correct either.

testtags.php should be uploading now. Daily Stats page is correct.

Resent thermometer-blank.png. Graphic still messed up. I think it is there. It’s not displaying correctly.

Your testtags.php is still the dummy copy (see date in http://www.thanko.info/testtags.php?sce=view )

The thermometer-blank.png still shows
"The image

Wow the questions are flying lol…I have one too!

I seem to be having an issue with the “get_localdate” function. See…http://www.branfordfire.com/weather/wx7play.php

The UTC time seems correct but it is not converting the local time date. Is this some type of daily update?

Regards,

Jack

Ken,

I stole the therm…blank.png directly from your web site and uploaded it to mine. Still get the same error. This is very strange. It is looking for the file in the root, right?

Me again. :oops: Forgot to change the FTP transfer type back from ASCII to binary. Doh…

Looks like the moon phases are correct now also. I think I’ll quit for the night. Making more mistakes than a politician… :smiley:

Hi Jack! Yep… love the flying questions. My thanks to Tim for being an early adopter.

It looks like your wx7play.php page is showing EST conversions now… is it still a problem?

Best regards,
Ken

Yep looking for it in the document root. Definitely have to upload .png/.jpg/.gif files as BIN mode :slight_smile:

Looks like the testtags.php is being uploaded now too so it’s your conditions being shown now.
Best regards,
Ken

Ken,

Under each gif it shows this…Wed, 31-Dec-1969 7:00pm …that’s what I meant, sorry!

Jack

If you have an older version of testtags.txt in your c:\wdisplay\webfiles directory, replace it with the one in the distribution … it has the extra tags needed to show the seasons on the wxastronomy.php page.

Best regards,
Ken

If you have an older version of testtags.txt in your c:\wdisplay\webfiles directory, replace it with the one in the distribution .. it has the extra tags needed to show the seasons on the wxastronomy.php page.

Yes I uploaded the new version, which fixed the utc time right away, but the Wed, 31-Dec-1969 7:00pm still has not changed. #-o

Jack

I see the testtags.php is updated with the right fields.
What is your Settings.php setting for
$SITE[‘timeFormat’]

?

Best regards,
Ken

$SITE[‘timeFormat’] = ‘D, d-M-Y g:ia T’;

Jack

Jack,
Try changing the

  $utcstr = substr($indate,10) . " " . substr($indate,0,8); // move formats

to

  $utcstr = substr($indate,10) . " " . substr($indate,0,9); // move formats

in your page.

I think I left in a version that only gets the ‘UT’ in ‘UTC’ which works for PHP4 but fails for PHP5. #-o

Ken

Ken,

So far no luck, but you are right I am on php5. Is it possible I need to wait for the next WD upload?

Regards,

Jack

Edit…The upload did not change anything.

If you changed the line from 8 to 9 chars, it should work at once. I see it is not working on your page now … hmmm.
I’ve updated the distributions with the revised wxastronomy.php page.

I see it is working on your page now

Hate to do this to you but if you looked at my wx7 that is written in there by me, it is not based on code (only a view source copy). The test site wx7play is not working.

Regards,

Jack

Jack,
Yes… sorry I posted early looking at a different website… I see your’s is not working.

Here’s the function code for the get_localdate() function that should work on PHP5 too:

<?php
function get_localdate ( $indate) {
  global $SITE;

// Change '02:33 UTC 4 September 2007' to
//        '3-Sep-2007 nn:nnpm' 
  $timeFormat = 'D, d-M h:ia T';  // Fri, 31-Mar-2006 14:03 TZone
  $timeFormat = 'h:ia T D, d-M-Y ';  // Fri, 31-Mar-2006 14:03 TZone
  if(isset($SITE['timeFormat'])) { $timeFormat = $SITE['timeFormat']; }
  
  $utcstr = substr($indate,10) . " " . substr($indate,0,9); // move formats
  $utc = strtotime($utcstr);
  $lclstr = date($timeFormat,$utc);
  return ($lclstr);
}

?>

Best regards,
Ken

Oh man, I think I uploaded the wrong file a few minutes ago :oops: You are right, that fixed it!

Thanks Ken!