WordPress Blog Add On for Carterlake Templates updated for WP 2.9+

http://www.johnstownpaweather.com/weather/wxblog

Line 220 is your dewpoint display in the ajax gizmo.

I found this when viewing the source:

<span class="ajax" id="ajaxdew">41.6�F</span>

looks like your degree symbol got munched somewhere along the way. #-o

Just my $.02 :wink:

George

Yea i see what you are talking about, After looking at my other pages they are fine except the wordpress is the only place it is showing up. so has to be in one of the scripts that is calling it. looking for it now.
Well found where it is calling it from, it get it from ajax-gizmo.php and all the other pages use it and that don’t show up in there, here is the data from the php part of that:
<?php $t1 = strip_units($dewpt); echo $dewpt; ?><?php echo gen_difference( $dewpt, $t1-$dewchangelasthour, '', 'Increased %s'. $uomTemp .' since last hour.', 'Decreased %s'. $uomTemp .' since last hour.'); ?>

After playing and playing around, Think i found the problem, Seem there was a power outage around the timestamp and well now that computer won’t boot, Just my luck hahahaha. Now the work begins to fix a crash!

Somewhere in wordpress it is adding that and no idea where.
Also took notice that all the other pages load the ajax and updates, but the wordpress page is not.

Ok back in the game, got the system back up and running, And put all the files back the way they should be for wordpress with the template from mike, Still getting the same issue with the same error:
The error was: utf8 “\xB0” does not map to Unicode. when passed to the validation. Also as the other person posted about the weird char in the ajax part, that still does it and is not updateing, where the rest of the pages are. so now really lost.
even followed the instructions to a t!

thanks.

Albert,

This is caused by a bug in ajax-gizmo.php

Edit your ajax-gizmo.php
change:

<?php
			 $t1 = strip_units($dewpt);
			 echo $dewpt;  ?>

to:

<?php
			 $t1 = strip_units($dewpt);
			 echo $t1 . $uomTemp;  ?>

Let me know if that fixed it, because if it does fix it, then I will contact Ken True to have him fix it in the downloadable template set.

After making the above change, the ajax is working but then it says:
Fatal error: Call to undefined function do_action() in /home3/johnsto1/public_html/weather/wxblog.php on line 50

If i remove that back out of ajax back to where i was.
Not sure if this helps or not, the hosting server is php 5.

Ok now in IE and Firefox, that error is gone, and page is now xhtml valid. Strange but the ajax is it suppose to update like the rest of the pages are set 5 seconds or not. that is what i am seeing now, that it grabs the data when the page loads but does not update.

I am thinking something does not like the php 5 on the server, as what it is doing, is messing up once in a while between ie and firefox, newest ver is firefox and ie on this end, in firefox now it is not updating every 5 mins like it was at first and now cutting the flash header out. in ie everything is there working, except it is not updateing the ajax at all now, just stuck at one time slot.
Thanks.

Albert, It looks like it is working to me. I do not seethe error. It should work fine on PHP5

Thanks Mike!

Best regards,
Ken

On your side is the gizmo auto updating?
As with ie 8 here and firefox it does not.
Disregard, After watching your blog i see it does the same only updates about every 5 mins when you do a refresh.
Thanks.

Somebody correct me if I am wrong but I do not think the gizmo autoupdates like the ajax dashboard does.
The gizmo gets it’s data from testtags.php on page load.
Testtags.php only updates every 5 minutes. So if after 5 minutes, you refresh the page, you will get new data for the gizmo.

Thats how mine works. Every 5 mins on a page reload.

Well that is three of us then, So it is every 5 mins that it updates, Again thanks goes to Mike for the little bug that was causing it not to validate via xhtml.

The initial conditions for the ajax-gizmo are indeed from the testtags.php … once AJAX kicks in, the gizmo values are updated by ajaxWDwx.js at the interval you specify :slight_smile:

Best regards,
Ken

Evening there Ken,

As you have below that it is updated by the .js file. Seem odd that all my other pages will update every 5 seconds as that is what i have the ajaxWDwx.js var reloadTime = 5000; and looking at the ajaxgizmo.js this is in there var ajaxrotatedelay=4000; But then on the template that Mike has for the wordpress it is not autoupdating.
Here is a snip of the code unless something is wrong with it:

<!-- ##### start AJAX mods ##### -->
<script type="text/javascript" src="<?php echo $SITE['site_url'] ?>/ajaxWDwx.js"></script>
<!-- AJAX updates by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
<?php if (isset($showGizmo) and $showGizmo) { ?>
<script type="text/javascript" src="<?php echo $SITE['site_url'] ?>/ajaxgizmo.js"></script>
<?php if (!$SITE['UV']) { // turn gizmo uv display off ?>
<script type="text/javascript"> showUV = false; </script>
<?php } // end of turn gizmo uv display off ?>
<!-- AJAX gizmo by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
<!-- ##### end of AJAX gizmo mods part 1 of 3 ##### -->

The conditions aren’t updating by AJAX since the clientraw.txt file is not in the /weather/wxblog directory, but in the /weather directory.

Change ajaxWDwx.js from

var clientrawFile = 'clientraw.txt'; // location of clientraw.txt relative to this page on website

to

var clientrawFile = '/weather/clientraw.txt'; // location of clientraw.txt relative to this page on website

and the AJAX script can find the clientraw.txt when the script is loaded from any directory on your website :wink:

Best regards,
Ken

Thanks Ken,
That fixed that area with the change and working great.

Ok trying to get this snip added for the top arrow button, tried it in a few files. must be placing it in the wrong area of the php or the wrong one, Any help?

^^

Also the floatTop.js what dir would that go into?

thanks.

Tested with Wordpress 2.8
It works :smiley:

To upgrade to 2.8 is it the same process as updating to 2.7.1.

Chuck

If you have a wp version less than 2.7 you need to follow this step by step using 2.8
If you already have 2.7 or 2.7.1, then go to your wordpress admin page and at the top click the link that says something like “click here to automatically update to WP 2.8”, and poof! it just updates and that is it.