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

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!


These instructions are for upgrade only.

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 upgrade your carterlake template blog from wordpress 2.x to wordpress 2.9+

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 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 merge the contents of the “css-additions.txt” (found in the zip file you downloaded) into your CSS file.
    You might want to use a file compare program like “Beyond Compare” to make sure you do not double up any of the the changes.

If you use my whos online script, you need to update it to this version or higher:
(if you no not use it, skip 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:


$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)

Upgrade your wordpress to 2.9+
http://codex.wordpress.org/Upgrading_WordPress


Step 4)

update the custom wxblog theme in the wordpress themes folder with this new one:
Download it
http://www.642weather.com/weather/scripts/wxblog.zip
unzip this file on your local computer

upload the new wp-content/themes/wxblog files to your server to replace your old wxblog theme.
New in this version: there should be no need to edit any of the theme files

Step 5)

Replace 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 6)

see if it worked, go to http://www.yourwebsite.com/wxblog/

If there are any issues, report them and I will try to help.

Hi
first of all I apologize for my bad English :oops:, this is translated by google
I think we should add this:

Edit ajaxWDwx.js and check the setting:

Code:
var imagedir = ‘./clientraw.txt’;

  • make it a FULL URL, like this:

Code:
var imagedir = ‘http://www.yoursite.com/clientraw.txt’; // no slash on end

Thanks to everyone for the excellent work

Mike,

If I try and view your blog using the Live Blog link in post # 1 I get a 500 error. Fyi.

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

I guess it likes a slash on the end, thanks
Live Example - www.642weather.com/weather/wxblog/

Thank you to Mike for taking this over and for all the work you put in to it!

While I may have gotten the ball rolling on this - with Jack’s help - Mike has much more knowledge about PHP and WordPress than I and having him handle the development is much better for everyone. :slight_smile:

Tony

Today I fixed a css problem that was causing too much sidebar right margin on wordpress blogs

  • 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

Hi Mike,

I have installed Wordpress for the first time and it’s working!!! The issue I am having is the page that comes up when I type http://www.johnsnhweather.com is messed up. I have attached a screen shot below. Any help would be appreciated.

Thanks,

John


Hi John,

Do you mean your clientraw.txt? It looks like it stopped uploading at 9:41, unless you are uploading it to a different directory? Check to be sure WD’s live ftp is still running. In the blog page itself it would look for clientraw in something similar to …/clientraw.txt.

Jack

That is because your blog is in a different directory wxblog/ and 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.
I added this to the install instructions as step 7a :smiley:

[quote author=firewall link=topic=36381.msg308867#msg308867 date=1234105479]
Hi John,

Do you mean your clientraw.txt? It looks like it stopped uploading at 9:41, unless you are uploading it to a different directory? Check to be sure WD’s live ftp is still running. In the blog page itself it would look for clientraw in something similar to …/clientraw.txt.

Jack

Hi Jack,
No the rest of the website is working fine, it’s just the blog page that’s not working.
John

Got it working here now. Replaced my old smf forum with Wordpress. :roll:
Sent you an offline message today for a suggested update to the install process.

Hi
I’m reading through this thread for the first time. I wanted to add a guest book to my site but after reading comments elswhere on the forum it seems wordpress is the way to go, however I’m not familier with blogs etc ( probably should ask my kids!!). If I install wordpress wxblog besides me puting in news etc can visitors leave reply and comments without having to register with wordpress or with me. The answer is probably on the wordpress website but there’s a lot to take in and as this is basically what I need.

I am using theme changer (but need to update to the latest verion) and have recently installed the whos online script.

heers
Phil

If I install wordpress wxblog besides me puting in news etc can visitors leave reply and comments without having to register with wordpress or with me

You can set it up that way but I would strongly recommend that you do not! The spam/porn sites leave comments on a regular basis, but you can approve people to comment after they sign up, in other words they would only have to register once!

Regards,

Jack

You can minimize that risk with my SI Captcha for Wordpress plugin:

It is rated 5 stars. I use it without registration required and do not get spam.

I also use akismet plugin: http://akismet.com/

Thanks for the prompt replies.
Being a real novice I will study the intallation guide above carefully and give it go next week when I have a few days off.

Phil

I,ve made a start with making the changes to the settings.php, flyout menu.xml etc etc verything is working ok except nothing is showing on the home page, all the other pages work fine. Help please

There is a php error somewhere in the code for that page or in one of the included scripts.
You have show php errors turned off, try adding this code to Settings.php just after the opening <?php

Then I might be able to tell you what is causing the error.


error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', 1);

Ok I’ve added that code.

I think I may have got confused with steps 6 and 7

Edit ajax-gizmo.php and check the setting:

Code:
$imagesDir = ‘./ajax-images/’;

  • make it a FULL URL, like this:

Code:
$imagesDir = ‘http://www.yoursite.com/ajax-images/’; // end with slash
Edit ajaxWDwx.js and check the setting:

Code:
var imagedir = ‘./ajax-images’;

  • make it a FULL URL, like this:

Code:
var imagedir = ‘http://www.yoursite.com/ajax-images’; // no slash on end

Step 7)

Edit ajaxWDwx.js and check the setting:

Code:
var imagedir = ‘./clientraw.txt’; * make it a FULL URL, like this:

Code:
var imagedir = ‘http://www.yoursite.com/clientraw.txt’; // no slash on end

They seem to be telling me to amend the same line to two different things

Phil

Oh No
I just made a change to the time zone settings to try and get the right timezone for whos online, now I can get nothing at all on my website, maybe trying to do too much at once.

Heres a copy of my settings php

<?php error_reporting(E_ALL ^ E_NOTICE); ini_set('display_errors', 1);

############################################################################

A Project of TNET Services, Inc. and Saratoga-Weather.org (WD-World-ML template set)

############################################################################

Project: Sample Included Website Design

Module: Settings.php

Purpose: Provides the Site Settings Used Throughout the Site

Authors: Kevin W. Reed [email protected]

TNET Services, Inc.

Copyright: (c) 1992-2007 Copyright TNET Services, Inc.

############################################################################

This program is free software; you can redistribute it and/or

modify it under the terms of the GNU General Public License

as published by the Free Software Foundation; either version 2

of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software

Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA

############################################################################

This document uses Tab 4 Settings

############################################################################
$SITE = array();

Automatic Info we might need

############################################################################
$SITE[‘REMOTE_ADDR’] = $_SERVER[‘REMOTE_ADDR’];
$SITE[‘REMOTE_HOST’] = $_SERVER[‘REMOTE_HOST’];
$SITE[‘WEBROOT’] = $_SERVER[‘DOCUMENT_ROOT’];
$SITE[‘REQURI’] = $_SERVER[‘REQUEST_URI’];
$SITE[‘SERVERNAME’] = $_SERVER[‘SERVER_NAME’];

Sitewide configuration

############################################################################
$SITE[‘charset’] = ‘ISO-8859-1’; // character set for webpages (iso-8859-1=latin)
$SITE[‘WDlanguage’] = ‘en’; // Language used by WD

=‘en’ - English, ‘de’ = German, ‘dk’ = Danish, ‘it’=Italian, ‘fr’=French,

=‘es’ - Spanish, ‘no’ = Norwegian

Multilanguage support

$SITE[‘allowLanguageSelect’] = true; // set to false to disable the the use of language selector
$SITE[‘useLanguageFlags’] = true; // true=show flags, false=show language 2-char abbreviations
$SITE[‘lang’] = ‘en’; // default language
$SITE[‘langavail’] = array(‘en’, // select languages to offer here. Use comments to remove languages
// array(‘en’, should be first entry on line above
// ‘ct’, // ‘catalan’,
‘dk’, // ‘danish’,
‘nl’, // ‘dutch’,
‘fi’, // ‘finnish’,
// ‘fr’, // ‘french’,
// ‘de’, // ‘german’,
‘el’, // ‘greek’,
‘it’, // ‘italian’,
‘no’, // ‘norwegian’,
// ‘pt’, // ‘portuguese’,
‘es’, // ‘spanish’,
‘se’, // ‘swedish’,
);
$SITE[‘cookie_path’] = ‘/’; // must end in slash, do not use domain
// The path on the server in which the cookie will be available on. If set to ‘/’, the cookie will be available within the entire domain.
//If set to ‘/foo/’, the cookie will only be available within the /foo/ directory and all sub-directories such as /foo/bar/ of domain.

$SITE[‘CSSscreen’] = ‘weather-screen-php.css’; // 800px design
$SITE[‘CSSprint’] = ‘weather-print-php.css’;

#$SITE[‘CSSscreen’] = ‘weather-screen.css’; // Classic design
#$SITE[‘CSSprint’] = ‘weather-print.css’;

#############################################

Mike Challis’ Theme Switch configuration

$SITE[‘allowThemeSwitch’] = true; // set to false to disable the the use of Theme Switcher
$SITE[‘CSSscreenDefault’] = ‘weather-screen-mocha.css’;
$SITE[‘CSSwideOrNarrowDefault’] = ‘narrow’; // ‘narrow’ or ‘wide’

CSSsettings_mode

sets allowable user style select options:

1 user can select style and screen width (show style select and screen width select)

2 user can select styles only (hide screen width select)

3 user can select screen width only (hide style select)

$SITE[‘CSSsettings_mode’] = 1; // set to 1, 2 or 3
#############################################
$SITE[‘flyoutmenu’] = true; // set to false to use classic menubar.php instead

$SITE[‘clientrawfile’] = ‘./clientraw.txt’; // relative FILE location of clientraw.txt

if your WD uploads almanac dates using a language OTHER THAN English, please put the month

names in your language to replace the English ones below. This is used primarily by the

wxastronomy.php page for the local dates of moon phases, solistices, and equinoxes

$SITE[‘monthNames’] = array( // for wxastronomy page … replace with month names in your language
‘January’,‘February’,‘March’,‘April’,‘May’,‘June’,
‘July’,‘August’,‘September’,‘October’,‘November’,‘December’
);

Configurable Carterlake/WD/PHP template Site Settings

############################################################################
$SITE[‘WXtags’] = ‘testtags.php’; // for testtags.php weather variables
$SITE[‘organ’] = 'Weybourne Weather Website ‘;
$SITE[‘site_url’] = ‘http://www.weybourneweather.co.uk’; // set to your site url without slash on end
$SITE[‘copyr’] = ‘© ’ . date(“Y”,time()) . ‘, weybourne Weather’;
$SITE[‘remote’] = "onclick="window.open(this.href,’_blank’);return false;"";
$SITE[‘tz’] = ‘PST8PDT’; //NOTE: this MUST be set correctly to
$SITE[‘tz’] = ‘Europe/London’; //NOTE: this MUST be set correctly to
// translate UTC times to your LOCAL time for the displays.
// http://saratoga-weather.org/timezone.txt has the list of timezone names
// pick the one that is closest to your location and put in $ourTZ like:
// $ourTZ = ‘America/Los_Angeles’; // or
$ourTZ = ‘Europe/London’;

$SITE[‘location’] = ‘Farnham, Surrey, UK’;
$SITE[‘email’] = ‘mailto:[email protected]’;

Weather Station sensors

$SITE[‘DavisVP’] = false; // set to false if not a Davis VP weather station
$SITE[‘UV’] = false; // set to false if no UV sensor
$SITE[‘SOLAR’] = false; // set to false if no Solar sensor
$SITE[‘showSnow’] = false; // set to false if snow not recorded on WD
$SITE[‘showSnowTemp’] = 4; // show snow instead of rain if temp (C) is <= this amount

Station location: latitude, longitude, cityname

$SITE[‘latitude’] = ‘51.2339’; //North=positive, South=negative decimal degrees
$SITE[‘longitude’] = ‘–0.7800’; //East=positive, West=negative decimal degrees
$SITE[‘cityname’] = ‘Farnham’;

forecast script settings area

$SITE[‘UVscript’] = ‘get-UV-forecast-inc.php’; // worldwide forecast script for UV Index
// comment out above line to exclude UV forecast
//

if you have WXSIM and plaintext-parser.php, set $SITE[‘WXSIM’] = true;

to have the WXSIM forecast text appear in the dashboard along with your primary forecast org’s

forecast.

$SITE[‘WXSIM’] = false; // Set to false if no WXSIM/plaintext-parser.php
$SITE[‘WXSIMscript’] = ‘plaintext-parser.php’; // script for decoding plaintext.txt into icons
$SITE[‘defaultlang’] = ‘en’; // ‘en’ for English (WXSIM plaintext-parser.php)

fcsturlWU the Wunderground URL for the non-US/non-Canadian forecasts (WU-forecast.php)

$SITE[‘fcsturlWU’] = ‘Local Weather Forecast, News and Conditions | Weather Underground’; // Awhitu, Waiuku New Zealand
$SITE[‘fcsturlWU’] = ‘Local Weather Forecast, News and Conditions | Weather Underground’; // Farnborough, England
$SITE[‘fcsticonsdir’] = ‘./forecast/images/’;
// NOAA-style icons for NWS, WU, WXSIM forecast scripts

#---- in the following section, enable settings for ONE primary forecast organization

pick which script AND org are to be used for your forecast here: (last uncommented pair will

be the ones used on the wxforecast.php page and in your dashboard and sidebar

$SITE[‘fcstscript’] = ‘WU-forecast.php’; // Non-USA, Non-Canada Wunderground Forecast Script
$SITE[‘fcstorg’] = ‘WU’; // set to ‘WU’ for WeatherUnderground

###########################################################################

ajax-dashboard, ajax-sidebar settings (will override defaults in

the scripts themselves when included in this site

###########################################################################
$SITE[‘WDdateMDY’] = false; // for WD date format of month/day/year. =false for day/month/year
$SITE[‘uomTemp’] = ‘°C’;
$SITE[‘uomBaro’] = ’ inHg’;
$SITE[‘uomWind’] = ’ mph’;
$SITE[‘uomRain’] = ’ mm’;
$SITE[‘uomDistance’] = ’ miles’; // or ’ miles’ – used for Wind Run display
$SITE[‘uomPerHour’] = ‘/hr’;
$SITE[‘imagesDir’] = ‘http://www.weybourneweather.co.uk/ajax-images/’; // directory for ajax-images with trailing slash

note: date format used for PHP parts only. Weather-Display dates are not processed

except on the astronomy page

#$SITE[‘timeFormat’] = ‘D, d-M-Y g:ia T’; // Day, 31-Mar-2006 6:35pm Tz (USA Style)

$SITE[‘timeOnlyFormat’] = ‘H:i’; // Euro format hh:mm (hh=00…23);
$SITE[‘dateOnlyFormat’] = ‘d/m/Y’; // for 31-Mar-2008 or ‘j/n/Y’ for Euro format

##########################################################################

end of configurable settings

Multilanguage support constants - please do NOT change the settings below

#DO NOT CHANGE THESE SETTINGS
$SITE[‘installedLanguages’] = array (
‘ct’ => ‘Català’,
‘dk’ => ‘Dansk’,
‘nl’ => ‘Nederlands’,
‘en’ => ‘English’,
‘fi’ => ‘Suomi’,
‘fr’ => ‘Français’,
‘de’ => ‘Deutsch’,
‘el’ => ‘Ελληνικα’,
‘it’ => ‘Italiano’,
‘no’ => ‘Norsk’,
‘pt’ => ‘Português’,
‘es’ => ‘Español’,
‘se’ => ‘Svenska’,
);

DO NOT CHANGE THESE SETTINGS

$SITE[‘ISOLang’] = array ( // ISO 639-1 2-character language abbreviations from country domain
‘ct’ => ‘ca’,
‘dk’ => ‘da’,
‘nl’ => ‘nl’,
‘en’ => ‘en’,
‘fi’ => ‘fi’,
‘fr’ => ‘fr’,
‘de’ => ‘de’,
‘el’ => ‘el’,
‘it’ => ‘it’,
‘no’ => ‘no’,
‘pt’ => ‘pt’,
‘es’ => ‘es’,
‘se’ => ‘sv’,
);

DO NOT CHANGE THESE SETTINGS

$SITE[‘langCharset’] = array( // for languages that DON’T use ISO-8859-1 (latin) set
‘el’ => ‘ISO-8859-7’,
‘ru’ => ‘UTF-8’,
‘gr’ => ‘UTF-8’
);

DO NOT CHANGE THESE SETTINGS

$SITE[‘WULanguages’] = array ( // for WeatherUnderground forecast supported languages
‘ct’ => ‘catalan’,
‘dk’ => ‘danish’,
‘nl’ => ‘dutch’,
‘en’ => ‘english’,
‘fi’ => ‘finnish’,
‘fr’ => ‘french’,
‘de’ => ‘deutsch’,
‘el’ => ‘greek’,
‘it’ => ‘italian’,
‘no’ => ‘norwegian’,
‘pt’ => ‘portuguese’,
‘es’ => ‘espanol’,
‘se’ => ‘swedish’,
);

End - multilanguage support constants

Now prune the installedLanguages based on langavail selection

$tarray = array();
foreach ($SITE[‘langavail’] as $n => $k) {
if(isset($SITE[‘installedLanguages’][$k])) {
$tarray[$k] = $SITE[‘installedLanguages’][$k];
}
}
$SITE[‘installedLanguages’] = $tarray;

end prune the installedLanguages based on langavail selection

set the Timezone abbreviation automatically based on $SITE[‘tzname’];

putenv(“TZ=”.$SITE[‘tz’]);
$SITE[‘tzname’] = date(“T”,time());

begin Color Theme Switcher Plugin by Mike Challis

Weather PHP Scripts - Long Beach Weather

if($SITE[‘allowThemeSwitch’]) {
include_once(‘include-style-switcher.php’);
$SITE[‘CSSscreen’] = validate_style_choice();
}

end Color Theme Switcher Plugin

// include the who’s online functions
require (‘include-whos-online-header.php’);
$whos_online_records = update_whos_online();

/

} else {
session_start(); // for preservation of language settings.
if ($SITE[‘CSSwideOrNarrowDefault’] == ‘wide’) {
$_SESSION[‘CSSwidescreen’] = 1;
$CSSstyle = str_replace (‘.css’,‘-wide.css’,$SITE[‘CSSscreenDefault’]);
} else {
$_SESSION[‘CSSwidescreen’] = 0;
$CSSstyle = str_replace (‘.css’,‘-narrow.css’,$SITE[‘CSSscreenDefault’]);
}
$SITE[‘CSSscreen’] = $CSSstyle;
}
?>

Hope this helps