Change Log of Weather PHP Scripts by Mike Challis
This is a change log for some of the PHP Scripts I coded.
Contact Form PHP Script
- Version: 1.00 28-May-2008 - Initial release
- Version: 1.01 29-May-2008 - fixed session_start warning "headers already sent"
- Version: 1.02 30-May-2008 - fixed "TRIM here" comment syntax
- Version: 1.03 07-Jun-2008 - added config setting for printing $thank_you message after form is sent
- Version: 1.04 07-Jun-2008 - To: [contact] (webmaster, member service, etc) is now printed in the email, fix contacts dropdown, if there is only one contact, no need to "Select" it, added setting for captch library [path]/[folder]
- Version: 1.05 09-Aug-2008 - Spelling correction in $welcome_intro, also shortened it a bit. (no other code changes)
- Version: 1.06 10-Aug-2008 - Now automatically adds numbered keys to the $contacts array for simpler contacts config, changed page title to 'Contact Us', added version print tag into html source, added error message if "captcha_library not found", added features by Kevin Reed at www.tnetweather.com: (Thanks Kevin), Added HTML code to Pass Section 508 and WAI accessibility validation, Added meta tags (WAI Requirement), Added labels for form elements (WAI Requirement), Removed the table since is was not really needed., Added fieldset/legend, Added CSS basics for the form to allow easier enhancement., The entire form is now controlled by the div id of contactform., Some other small changes,. If upgrading to version 1.06 and are integrating into your website template... follow step 4 of the readme.txt and be sure to add the css and meta tags to your html head section
- Version: 1.07 - 11-Aug-2008 - added features: checks for required mail and image functions, fixed bug with truncated string when double quote in name or subject input, Better input string protection, new cleaner code input functions, Renamed all included subroutines with ctf_ prefix so they will not conflict with other scripts, Wordwrap email message text so lines are no longer than 70 characters, Added ini_set sendmail_from, needed for some windows servers, This update is recommended for the bug fix and better security
- Version: 1.08 - 13-Aug-2008 - Added a few settings for email message headers, A few other small fixes
- Version: 1.09 - 13-Aug-2008 - Problem: Warning: mail(): Bad parameters to mail() function, mail not sent., Solution: Removed '. PHP_EOL' from subject line.
- Version: 1.10 - 14-Aug-2008 small fix in function ctf_validate_email This update is not needed unless you were getting this error on send: Fatal error: Call to undefined function getmxrr()
- Version: 1.11 - 16-Aug-2008 added feature to have the same form used for a domain that also has aliases, without turning off domain checking This update is not needed unless you need this feature
- Version: 1.12 - 20-Aug-2008 - how to add another field? You would have to edit 5 places places in the script. This update just adds a comment for each place in the code. see the readme.txt for more details
- Version: 1.13 - 25-Aug-2008 Fix for handling a blank HTTP_REFERER (a rare condition) in host name check when $domain_protect is enabled
- Version: 1.14 - 04-Sep-2008 - added feature: Optionally you can change the default mail SMTP settings - changed the display of input errors, each input error now displays exactly above the corresponding input field, the way it was before, the messages were all displayed in one bunch above the form. - added a input error for captcha field not filled in rather than just saying the captcha did not match.
- Version: 1.15 - 29-Sep-2008 - fixed Undefined variable warnings (only happenned if you had error warnings enabled)
- Version: 1.16 - 28-Oct-2008 - feature change - when you only have one email to contact, there is no drop down to select who to contact This update is not needed unless you need this feature
- Version: 1.17 - 21-Nov-2008 - added a setting: $email_on_this_domain normally this setting will be left blank, like this: $email_on_this_domain = ''; some web hosts do not allow your PHP to send email unless the From: email address is from the same domain. If your form does not seem to be sending any email, then set this to your email address on the SAME domain as your web site as a possible workaround
- Version: 1.18 - 25-Nov-2008 - couple of html validation fixes - form name changed to form id and there was a missing closing slash on input CID
- Version: 1.19 - 01-Jan-2009 - added ban by ip address feature
- Version: 1.20 - 19-Mar-2009 - fixed unclosed div after message sent - a few spelling corrections on code comments and displayed error codes
- Version: 1.21 - 27-Mar-2009 - added a optional "redirect to home page" feature (upload the ctf-loading.gif and look for the new settings to enable)
- Version: 1.22 - 27-Mar-2009 - added an optional Double E-mail entry setting. enabling this requires the user to enter their email two times on the contact form.
- Version: 1.23 - 11-Aug-2009 - added BCC (Blind Carbon Copy) email feature in settings
- Version: 1.24 - 27-Aug-2009 - fixed deprecated ereg_replace and eregi functions for PHP 5.3+ compatibility when error warnings are on
- Version: 1.25 - 29-Aug-2009 - Improved ctf_validate_email function and fixed a bug that invalidated email address with upper case (introduced in last version)
- Version: 1.26 - 01-Sep-2009 - Fixed email validation issue on some Windows servers.
Contact Form PHP Script: more about it | download it
Who's Online PHP Script
- Version: 1.0 24-Nov-2008 - Initial release
- Version: 2.00 - 02-Jan-2009 - merged "country plugin" and "state plugin" into one easier to manage plugin called "location plugin" - the new location plugin shares the whos_online table and now uses GeoLite data created by MaxMind.com - ip-to-country database and country_info table are no longer needed and can be deleted - new visitor worldmap included (when you install the location plugin and add 1 line of code to any template page) - Nickname: You can edit an IP entry in the whos-online table and add a friends name to the "nickname" field. When your friend is on your site with the same IP address the name will show next to the IP address. - thanks to all the users who contributed ideas and code. to upgrade from 1.xx versions, see the file "upgrading to 2.0 or higher.txt"
- Version: 2.01 - 03-Jan-2009 - fixed bug in visitor timeouts where if you had deleted a nickname, the visitor would no longer timeout - fixed bug where random visitor country flags were missing (still might be happening) - fixed bug where a random worldmap pin was in center of map - moved all the functions in include-whos-online-settings.php to include-whos-online-header.php - added setting to allow or disallow image pins for bots on the worldmap
- Version: 2.02 - 03-Jan-2009 - renamed function get_whose_online_worldmap to get_whos_online_worldmap - added print array for individual records display
- Version: 2.03 - 05-Jan-2009 - fixed html worldmap pin positions in all IE browsers, they were 10px too low.
- Version: 2.04 - 05-Jan-2009 - added wo-worldmap.php, a PHP generated image method of displaying the location plugin worldmap
- Version: 2.05 - 05-Jan-2009 - added feature: tracking non-php pages like .htm, .html, etc
- Version: 2.06 - 06-Jan-2009 - New feature: wo-update.php automated GeoLiteCity.dat file updater/installer This file downloads and installs or updates the GeoLiteCity.dat file used for the whos online location plugin.
- Version: 2.07 - 07-Jan-2009 - location plugin files geoip.inc, geoipcity.inc, and geoipregionvars.php have been combined into one file called include-whos-online-geoip.php - things that do not need to be uploaded were moved to the readme-files folder - location-plugin folder is no longer used. To install the location plugin read the readme-location-plugin.txt in the readme-files fold
- Version: 2.08 - 08-Jan-2009 - added a feature to support a few users who install the files in a different folder than the site root
- Version: 2.09 - 08-Jan-2009 - added wo-worldmap-large.jpg, an optional larger geolocation world map. - added feature, the whos-online.php page prints the date the GeoLite database was last updated, ie: "The GeoLite data was last updated on 01-06-2009 (2 days ago)." - added feature, the whos-online.php page will remind you when your GeoLite data file is older than the 1st of the month. and if you are logged in as admin it will even give you a "click to update" link
- Version: 2.10 - 08-Jan-2009 - added faq.txt, added "known issues.txt", "known issues" was moved from readme-install.txt to "known issues.txt" - fixed a calendar date bug for GeoLite data displaying the "last updated x days ago", it was not correctly counting calendar days. - added setting for date format on whos-online.php page for "The GeoLite data was last updated on 01-06-2009" message
- Version: 2.11 - 09-Jan-2009 - bug fix, nickname user's "last click" and "online time" was not being re-set, when they made a subsequent visit - added feature: nickname user's will now have a visit count next to the IP address xxx.xxx.xxx.xxx (Mike - 2 visits) - added feature: HTML worldmap now has a tool tip feature suggested by Jim McMurry (jcweather.us)
- Version: 2.12 - 12-Jan-2009 - Thanks Jim McMurry for helping with the new map features - fixed bug where if tested on a home network could have error: "Invalid query: Incorrect decimal value: '' for column 'latitude' at row" - wo-update.php :Version: 1.06 - 09-Jan-2009 - cosmetic changes, mainly added (x days ago) display - added feature: whos-been-online maps support (see readme-location-plugin.txt) - added whos-online-maps.php (a drop in carterlake template page) like this: http://www.642weather.com/weather/whos-online-maps.
- Version: 2.13 - 13-Jan-2009 - added image type parameter to the map output. - added feature, it will automatically insert the stats SQL if you forget at installation. - fixed missing language definitions for the maps - added for Henrik: true type font support for maps text (if European characters do not show properly on the map, try adding a true type font in settings)
- Version: 2.14 - 15-Jan-2009 - added a "maps in tables" setting $C['maps_in_tables'] to make it easy to correct the IE problem with html maps - added map feature: each map is individually calibrated for pins location with offset_x, offset_y settings - now includes 34 geolocation maps (thanks Jim McMurry for the map images and help testing the code) - reconfigured readme-region-maps.txt help file with the new map display code. - lots of changes to the whos-online-maps.php (a carterlake drop in template page). This page has a new map selector to show only one map at a time.
- Version: 2.15 - 17-Jan-2009 - added hostname lookup feature (this will add an ISP hostname to the IP address link title and to the profile display) - added last url corrections array to settings
- Version: 2.15a - 17-Jan-2009 - added fix for hostnames on.net and com.au
- Version: 2.16 - 03-Feb-2009 - fixed bug in GeoLite data update reminder, the reminder does not work unless you update to this version
- Version: 2.17 - 03-Feb-2009 - fixed bug in GeoLite data update reminder, on some servers the update would not work properly
- Version: 2.18 - 11-Mar-2009 - added optional setting $C['geolite_path'] to set a directory where your GeoLiteCity.dat file is for some users who want the GeoLiteCity.dat file in a different folder - wo-update.php updated for better text display of actions it is performing.
- Version: 2.20 - 01-Jul-2009 - improved maxmind geo database update check. Maxmind usually updates their file on the 1st of the month, but sometimes it is the 2nd, or 3rd of the month. Now it only notifies you when there actually is a new file available.
- Version: 2.21 - 05-Jul-2009 - There is part of the PHP code where I use CURL to check the last modified date of the maxmind database. Sometimes CURL returns -1 instead of the timestamp on some peoples servers. I made a modification to use http to check the date when this error is detected.
- Version: 2.22 - 06-Jul-2009 - another bug fix for maxmind update code related to changes I made in version 2.21
- Version: 2.23 - 02-Aug-2009 - added table definition for table geo_update
- Version: 2.24 - 26-Aug-2009 - fixed a deprecated ereg_replace function for PHP 5.3+ compatibility when error warnings are on to upgrade from 2.23, replace include-whos-online-header.php and include-whos-online-page.php
- Version: 2.25 - 02-Sep-2009 - fixed blank map in PHP5.3 to upgrade from 2.24, replace wo-worldmap.php, include-whos-online-header.php and include-whos-online-page.php
Who's Online PHP Script: more about it | download it
IP To Country Lookup PHP Script
- Version: 1.00 13-Dec-2008 - Initial release
- Version: 1.50 06-Dec-2008 - added 'include mode' option for using in your own site template (see readme.txt) - added advanced options and api for using remote lookup of ip data If you want to use ip-to-country information inside an application like a shopping cart or guest book. You can query the ip-to-country.php for a lookup remotely and include the results in your application. This method is flexible because it does not require direct mysql access to the ip-lookup database. If I was going to use ip-lookups in several applications, I would use this method rather than having each application connect to mysql (see advanced-uses folder inside zip file)
- Version: 1.51 14-Apr-2009 - Updated ip-to-country csv file The IP database included was updated on Apr 03 2009
IP To Country Lookup PHP Script: more about it | download it
Multifunction Image Handler PHP Script
- Version: 1.00 03-Jan-2008 - Initial release
- Version: 1.10 04-Jan-2008 - Bug fix for force reload, bux fix for annotate text "error: Could not find/open font", added feature: option for use percent for resize, added feature: accepts image in same directory on server, won't try to download it, added feature: true type font files are now optionally supported
- Version: 1.20 06-Jan-2008 - Added feature: setting for no resize, added feature: multi line text support, added feature: text alignment options; upperright upperleft lowerleft lowerright center centertop centerbottom, added feature: text margin
- Version: 1.30 07-Jan-2008 - Bug fix for wordwrap true type font text
- Version: 1.40 07-Jan-2008 - Bug fix for text position, not working on vers. 1.30
- Version: 1.50 07-Jan-2008 - Better handling of downloaded file name for local file
- Version: 1.60 08-Jan-2008 - Bug fix for true type fonts, bug fix for local file usage
- Version: 1.70 08-Jan-2008 - Bug fix for chmod error: Operation not permitted on some servers. added feature: setting to chmod images, disabled by default as most servers do not need it. added feature: setting to suppress output for cron job or System Scheduler usage, more compatible for web cam text overlay. added feature: setting for cached image file name, was previously automatic
- Version: 1.81 09-Jan-2008 - Added features: add up to 3 optional text overlays, instead of just 1, added browser output only setting for live demo use (not used in normal operation)
- Version: 1.82 10-Jan-2008 - Improvement: added output image URL link when running in $no_output =1; mode instead of just white screen.
- Version: 1.83 10-Jan-2008 - Added feature, can now archive and auto rotate images with or without thumbs. Feature can be utilized for web cam image archiving. Thanks Jim McMurry at http://www.jcweather.us/ for the feature suggestion
- Version: 1.84 13-Jan-2008 - Fixed jpeg compression bug in archived thumbnail images feature
- Version: 1.85 14-Jan-2008 - Added feature: can now select font colors and font shadow colors
- Version: 1.86 19-Jan-2008 - Added feature: can now crop images, renamed rotate setting variables to archive variables, checks for PHP GD function - gives error if it is not supported
- Version: 1.88 20-Jan-2008 - Added one more error code
- Version: 1.89 23-Feb-2008 - Added better compatibility for cron use file path can now be set with $localDirectory, default setting change: not all php installs have memory_limit enabled so the setting is now commented out by default
- Version: 1.90 04-Jun-2008 - added setting $cache_only to preserve animated GIFs when you do not need to resize, crop, or text overlay
- Version: 1.91 13-Oct-2008 - added $no_output = 2; setting output nothing maybe you want to include this script in another file use $no_output = 2; save image file only, no image to browser, no output at all
- Version: 1.92 15-Oct-2008 - fixed a rare carriage return problem with overlay text identified by a 'r' character showing up on new lines
- Version: 1.93 02-Nov-2008 - removed feature added in Version: 1.91 because it did not work
- Version: 1.94 14-Dec-2008 - added 2 more error traps for fsockopen timeout
- Version: 1.96 16-Dec-2008 - $ImageURL must start with http - added 3 second sleep, then check again if a local source image image cannot be found or read (it could be being re-uploaded) - added a new curl function to check a remote file last modified time, the curl method is better
- Version: 1.97 24-Dec-2008 - fix archive not working when $cache_only = 1;
- Version: 1.98 01-Sep-2009 - fix PHP 5.3 compatibility
- Version: 1.99.1 23-Oct-2009 - fix: no longer requires allow_url_fopen to be enabled in PHP, uses CURL as first method, if CURL is not available it falls back to fopen
Multifunction Image Handler PHP Script: more about it | download it
Weather Underground Web Cam Image Upload PHP Script
- Version: 1.0 08-Jan-2008 - Initial release
- Version: 1.1 09-Jan-2008 - Added better error results
- Version: 1.2 16-Dec-2008 - Added option to use passive mode
Weather Underground Web Cam Image Upload PHP Script: more about it | download it
Weather Web Cam Images History PHP Script
- Version: 1.00 18-Sep-2008 - Initial release
- Version: 1.01 19-Sep-2008 -- Fixed default settings inside cam-history-inc.php, the default $script_name setting was wrong -- minor comment cleanup in all files -- no feature changes in this release.
Weather Web Cam Images History PHP Script: more about it | download it
Color Theme Switcher for WD/PHP/AJAX Website Template Set
- Version: 1.00 06-Mar-2008 - Initial release
- Version: 1.01 07-Mar-2008 added silver theme, fixed menu background color for all wide css themes. To upgrade from vers 1.00: just replace all the css files and the include-style-switcher.php from this zip file
- Version: 1.02 08-Mar-2008 updated all the css files to tighten the line spacing of the navigation links also changed the #main-copy h1 text to not be italic, h1 is used for the big words on that say "Records and Stats" in the wxgraphs.php page To upgrade from vers 1.02: just replace all the css files from the zip file to your server
- Version: 1.03 08-Mar-2008 updated readme.txt instructions for installing, instructions are now more compatible with the default Settings.php of todays release of the Weather Display/PHP/AJAX Website Template Set by Ken True also added 'How to Upgrade' instruction section. This package is now included in the Weather Display/PHP/AJAX Website Template Set as of March 08 2008. Ken True added a setting in Settings.php to disable the the use of Theme Switcher. Now you can enable/disable it without having to install/uninstall it. Ken True now includes my windrose images in his default website Template Set download, so I removed the backup copy of windrose images folder ajax-images-original/ I had added to vers. 1.02, it is no longer needed.
- Version: 1.04 10-Mar-2008 Added Black Theme (dark/light style compatibility fixes for new Black theme) see README.txt inside zip file
- Version: 1.05 10-Mar-2008 Added 7 more Themes. To upgrade from version 1.04 just replace all the css files and the include-style-switcher.php
- Version: 1.06 18-Mar-2008 updated include-style-switcher.php: fixed a small uninitialized variable $CSSwscreenOffChecked bug fixed Red was not in alphabetical order updated all css files: added some css style code for the soon to be released "Go to top of page" floating javascript button To upgrade from vers 1.06: just replace include-style-switcher.php and all the css files from the zip file to your server
- Version: 1.07 29-Mar-2008 slight change to Mocha theme, darkened 'color-dark' style a bit To upgrade from vers 1.06: just replace the mocha css files or all the files (your choice) from this zip file to your server
- Version: 1.08 16-Apr-2008 modified 'subHeader a' in all of the style files to better accommodate language selector flags and text links in subheader. This was done to be more compatible with a soon to be released new template multi-language feature. To upgrade from vers 1.07: just replace all the css files from this zip file to your server
- Version: 1.09 03-Aug-2008 added full css support for the Worpress Blog Addon "Weather Display Blog by Tony Hake & Jack Ahern" http://www.weather-watch.com/smf/index.php/topic,33471.0.html To upgrade from vers 1.08: just replace all the css files from this zip file to your server
- Version: 1.11 13-Aug-2008 Added HTML labels for style select form elements to Pass Section 508 and WAI accessibility validation include-style-switcher.php was the only file changed in this release
- Version: 1.12 24-Aug-2008 Fixed bug: default settings were not setting correctly in session, the only time settings were correct was if the set button was clicked. include-style-switcher.php was the only file changed in this release
- Version: 1.13 02-Sep-2008 Added feature: CSSsettings_mode: there are 3 settings for allowable user style select options: setting 1) user can select styles and screen width (show style select and screen width select) setting 2) user can select styles only (hide screen width select) setting 3) user can select screen width only (hide styles select) include-style-switcher.php was the only file changed in this release
- Version: 1.14 12-Oct-2008 fix for css validation. This was caused by the Worpress Blog Addon css I put into version 1.09 removed 4 lines from .wp-caption css: all the lines did was make rounded corners on the wordpress image captions. -moz-border-radius: 3px; -khtml-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px;
- Version: 1.15 16-Oct-2008 changed wordpress text alignment from text-align: justify; to text-align: left; this fixes a sometimes bad looking text alignment problem To upgrade from vers 1.14: just replace all the css files from this zip file to your server
- Version: 1.16 17-Dec-2008 - added support for alternating style colors on Wordpress 2.7 threaded comments page - fixed a cookie path problem (prevent multiple cookies if your site has subfolders) you also should add this new setting to Settings.php $SITE['cookie_path'] = '/'; 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. To upgrade from vers 1.15: replace all the css files and include-style-switcher.php from this zip file to your server
- Version: 1.17 19-Dec-2008 - correction to cookie path setting
- Version: 1.18 18-Jan-2009 - fix css problem with too much sidebar right margin on wordpress blogs
- Version: 1.19 01-Mar-2009 - added support for Ajax-Dashboard Alternative http://www.websterweatherlive.com/wxScripts.php
- Version: 1.20 20-Apr-2009 - fix css problem with too much right margin on mml page (when viewed in IE7). the cause was the big temp interfering. the fix was to add clear:right to main-copy and main-copy-dark
- Version: 1.21 08-Jun-2009 - added css for advisoryBoxnoactive and tornadowarningBox for compatibility with RSS Top Warning 2009
- Version: 1.22 14-Jun-2009 - another css fix for compatibility with RSS Top Warning 2009 it was a link color Specificity issue
- Version: 1.23 27-Jun-2009 - removed a css hack for IE7 compatibility because it basically caused another IE7 problem. removed clear:right from main-copy and main-copy-dark - It is suggested that if you want to use IE, upgrade to IE8, it has many improvements.
Color Theme Switcher for WD/PHP/AJAX Website Template Set PHP Script: more about it | download it
Style Editor for for WD/PHP/AJAX Website Template Set
- Version: 1.00 06-Mar-2008 - Initial release
Style Editor for for WD/PHP/AJAX Website Template Set: try it now
Drop Down List Generator Plugin PHP Script
- Version: 1.00 30-Dec-2007 - Initial release
- Version: 2.00 01-Jan-2008 - Bug fix: find default month, make sure it exist added feature: verify inputted date files exist, use default if it does not version 2 requires changes in the how to use section refer to "How to use it:" inside the code
- Version: 2.10 12-Feb-2008 - Bug fix: uninitialized value causing error when error warnings are enabled in PHP. Error: 'Undefined variable: datestring'
Drop Down List Generator Plugin PHP Script: more about it | download it
Gratuity
This php code provided "as is," and Long Beach Weather (Michael Challis) disclaims any and all warranties, whether express or implied, including (without limitation) any implied warranties of merchantability or fitness for a particular purpose. Use of this code signifies your acceptance.



