WordPress Version 2.9+ is out. (this addon is no longer backwards compatible with pre 2.9 WP versions)
It has significant enough changes to require a new wxblog theme update for WP 2.9
I have done this upgrade on my server.
Wordpress weather template theme by Mike Challis, Tony Hake, and Jack Ahern
Free PHP Scripts - www.642weather.com/weather/scripts.php
Download - www.642weather.com/weather/scripts/wxblog.zip
Live Example - www.642weather.com/weather/wxblog/
Contact Mike - www.642weather.com/weather/contact_us.php
The WordPress Weather blog is a collaborative project by users of Weather Display to develop an integrated blog capability for Ken True’s PHP / AJAX website templates. This does require a working knowledge of websites, FTP, editing of files, etc. It is assumed that you already have a working version of Ken’s templates up and running on your website.
How to install a wordpress 2.9+ blog into your carterlake template
This is what you need to do:
Step 1)
It is assumed that you already have a working version of Ken’s templates up and running on your website.
http://saratoga-weather.org/template/index.php
-
If you use the theme switcher on your site:
Install this new style switcher css set version 1.18 18-Jan-2009 or higher:
http://www.642weather.com/weather/scripts/css-theme-switcher.zip
replace all the css files and the include-style-switcher.php from this zip file to your server where your weather site template is
If you use the world-ml template you have to use the latest include-style-switcher.php (from the world-ml template download) -
If you DO NOT use the theme switcher on your site:
and… If you are using an unmodified css file from the template distribution:
download: http://www.642weather.com/weather/scripts/css-theme-switcher.zip
replace the one css file from this zip file to your server where your weather site template is -
If you DO NOT use the theme switcher on your site:
and… If you are using a custom or css file:
Edit the CSS file your site uses and place the contents of the “css-additions.txt” (found in the zip file you downloaded) at the end of your CSS file.
If you use my whos online script, you need to update it to this version or higher:
(if you no not use it, skip the rest of this step)
Version: 1.06 18-Dec-2008
- added mysql link identifier to each mysql call (for better compatibility if you have another mysql app in your site template, ie: wordpress)
Download
http://www.642weather.com/weather/scripts/whos-online.zip
also put a copy of the spiders.txt from the whos-online zip file in your wordpress main folder
yoursite.com/wxblog (substitute wxblog with whatever you named your wordpress installation folder)
Step 2)
Edit your weather template Settings.php
make sure you have this setting in your weather template Settings.php: (if not, then add it)
Add this just after the $SITE[‘organ’] line:
Code:
$SITE['site_url'] = 'http://www.yourwebsite.com'; // set to your site url without slash on end
// can also be http://www.yourwebsite.com/weather if you have the site in a folder named 'weather'
// do not use a file on end: http://www.yourwebsite.com/index.php
Step 3)
Edit your weather template Settings.php
Change the line:
$SITE['imagesDir'] = './ajax-images/'; // directory for ajax-images with trailing slash
to
$SITE['imagesDir'] = 'http://www.yourwebsite.com/ajax-images/ '; // directory for ajax-images with trailing slash
Step 4)
If using the standard menu:
* You must open the "menubar.php" file and change all of the site links to your full site address, i.e. href="wxindex.php" to href="http://www.yourwebsite.com/wxindex.php".
If using the flyout menu:
* You must open the flyout-menu.xml file and change all of the site links to your full site address, i.e. link="wxindex.php" to link="http://www.yourwebsite.com/wxindex.php".
* Change these three settings in flyout-menu.php:
// ---------- settings ------------------------------
$MENUdef = './flyout-menu.xml'; // (relative) file location of XML menu definition file
$MENUdefTest = './flyout-menu-test.xml'; // (relative) file location of test XML menu definition file
$imagesDir = './ajax-images/'; // (relative) URL location of images dir (with trailing '/')
and add FULL URLs (i.e. http://www.yoursite.com/ajax-images/)
// ---------- settings ------------------------------
$MENUdef = 'http://www.yoursite.com/flyout-menu.xml'; // (relative) file location of XML menu definition file
$MENUdefTest = 'http://www.yoursite.com/flyout-menu-test.xml'; // (relative) file location of test XML menu definition file
$imagesDir = 'http://www.yoursite.com/ajax-images/'; // (relative) URL location of images dir (with trailing '/')
Step 5)
Modify your weather templates ajax-gizmo.php and ajaxWDwx.js as described below:
Edit ajax-gizmo.php and check the setting:
$imagesDir = './ajax-images/';
- make it a FULL URL, like this:
$imagesDir = 'http://www.yoursite.com/ajax-images/'; // end with slash
Edit ajaxWDwx.js and check the setting:
var imagedir = './ajax-images';
- make it a FULL URL, like this:
var imagedir = 'http://www.yoursite.com/ajax-images'; // no slash on end
Edit ajaxWDwx.js and check the setting:
var clientrawFile = './clientraw.txt';
- make it a FULL URL, like this:
var clientrawFile = 'http://www.yoursite.com/clientraw.txt'; // no slash on end
Step 6 )
If you are using crtest.php (the Live Update Error script for WD):
Because your blog is in a different directory such as wxblog/, that makes the relative path for clientraw.txt incorrect.
To fix it, edit crtest.php
change:
$lu_crfile = ‘./clientraw.txt’; to full server path like this:
$lu_crfile = ‘/full/path/to/clientraw.txt’;
change “/full/path/to/” as needed
then comment out this line like this:
//if (isset($site[‘clientrawfile’])) {$lu_crfile = $SITE[‘clientrawfile’]; }
Then it should work on your main site and the blog
Step 7 )
Install Wordpress to 2.9 or higher version (this addon is not backwards compatible with older WP versions!)
http://wordpress.org/download/
Go to the WordPress Website. From there, follow the directions to download and install the WordPress software to a subdirectory of your website. For purposes of these instructions, we assume you install it to a subdirectory called “wxblog” but it doesn’t really matter.
http://codex.wordpress.org/Installing_WordPress
* Note that your web server / webhosting company must allow this type of software and it must meet the minimum requirements for WordPress including PHP and MySQL. Please see the WordPress site for details.
http://wordpress.org/about/requirements/
Once you have verified your WordPress installation is working, move on to the next step.
Step 8)
Install the custom wxblog theme in the wordpress themes folder:
Download it
http://www.642weather.com/weather/scripts/wxblog.zip
unzip this file on your local computer
Using FTP, create a subdirectory under the WordPress themes directory - the name doesn’t really matter but choose a name you will remember. I used “wxblog”.
If your blog is installed to “wxblog”, navigate to wxblog\wp-content\themes and create the new directory.
Upload all files from the wxblog\wp-content\themes\wxblog zip file directory into this new directory on your server.
Step 9)
Upload the top-level2.php file from the zip file to the root directory of your weather template website
(the same place you have all of the other Weather Display / AJAX / PHP template files).
Step 10)
Open the WordPress administrator page through your web browser and log in (usually this will be found at http://www.yoursite.com/wxblog/wp-admin).
Click on “Appearance” and choose the theme “Weather Display Blog by Tony Hake & Jack Ahern.”
NOTE: When you click on the theme the preview opens, click the link in the top right that says, “Activate Weather Display Blog by Tony Hake & Jack Ahern” to proceed.
Step 11)
see if it worked, go to http://www.yourwebsite.com/wxblog/
If there are any issues, report them and I will try to help.
Credits:
This plugin was a collaborative effort by:
* Tony Hake of Thorntonweather.com
* Jack Ahern of Stillweather.com
* Mike Challis of 642weather.com (current maintainer)
Credit also should be given to Ken True of SaratogaWeather.com and Tom Chaplin of CarterLake.org. Tom created the original templates that so many Weather Display users now enjoy. Ken took them further by enhancing them with PHP and AJAX. Their contributions to the PWS and WD community are greatly appreciated!
Last but not least, thank you to Brian Hamilton for creating the Weather Display personal weather station software. Without his software none of this would be possible!