Page 1 of 54

Now available: AJAX/PHP multilingual website templates

Posted: Sat 05 Feb 2011 6:54 am
by saratogaWX
Since the original release of the Weather-Display/AJAX/PHP template sets in February, 2008, there have been many requests to use the templates with other weather software such as Cumulus, VWS and WeatherLink.

V3.00 - 3-Feb-2011 - Initial release is now available http://saratoga-weather.org/wxtemplates/index.php

The V3.00 templates use three Base templates (by geographical region) and four weather software plugins supporting Cumulus, VWS, Weather-Display and WeatherLink). All the Base templates are derived from the WD/AJAX/PHP World-ML distribution and so include built-in multilanguage support.

With this release, I will no longer be updating the original WD/AJAX/PHP distributions and updating the V3.00 distributions instead.

For issues with the new templates, please check the support page for posting questions ..
I'd prefer using WXforum.net for Base-Canada, Base-USA, Base-World, VWS-plugin, and WeatherLink-plugin questions.
I'd prefer using Weather-Watch.com for Weather-Display-plugin questions and the sandaysoft.com forum for Cumulus-plugin questions.


Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Sat 05 Feb 2011 9:17 am
by steve
I've 'stickied' this thread. Sorry I haven't had time to look at these yet, Ken.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Sat 05 Feb 2011 3:33 pm
by saratogaWX
Thanks, Steve!

The several beta testers who'd worked with the Cumulus plugin and reported back have been happy with the results (and I had a correction in the CU-defs.php adapter file to make).

Hopefully, folks will find the new template set useful for their Cumulus websites :)

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Sat 05 Feb 2011 6:57 pm
by saratogaWX
Thanks to Ray Beriau for the head-up in finding Notice: and Deprecated: errata , I've gone through the templates with error_reporting(E_ALL | E_DEPRECATED) enabled and found/fixed all the Notice: and Deprecated: type errors in the template sets.

Version 3.01 - 05-Feb-2011 Changes:

ajax-dashboard.php, ajax-gizmo.php - (Base-Canada, Base-USA, Base-World) - updated with additional isset() tests for missing variables, snow display handling and replace split() with explode()

Base-World - updated WU-forecast.php to remove extra HTML comments left from testing

VWS-plugin - updated gen-VWStags.php to add almnormhi# values that are missing from VWS saved tags.txt file
updated VWS-defs.php to add beaufort calculations and correct $mindew assignment

Cumulus-plugin - updated CU-defs.php to add $trends assignment for barotrend info

WL-plugin - updated WL-defs.php to correct beaufort calc with misspecified wind unit.

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Sun 06 Feb 2011 4:51 pm
by gemini06720
Ken, more modifications/suggestions will be coming shortly ... like it or not... :D

I have only done the work on the canadian templates. I have spent almost 2 days cleaning up, 'beautifying' and repairing the code for 'ajaxCUwx.js', 'ajax-dashboard.php' and 'ajax-gizmo.php'. I have also modified both 'ec-radar.php' and 'GR3-radar-inc.php' so that neither rely on having their cache directory at root level - their cache directory is now relative to their location (I really dislike/hate the use of '$WEBROOT = $_SERVER['DOCUMENT_ROOT'];' as it does not return the right directory on a Windows based server such as XAMPP or WAMP or EasyPHP). :evil:

I still have to cleanup the individual templates, test everything so all templates a fully compatible with PHP and W3C, and then I should be done for the canadian templates - the US templates will be next. 8-)

Re: Now available: AJAX/PHP multilingual website templates

Posted: Sun 06 Feb 2011 9:12 pm
by saratogaWX
Thanks Ray, I look forward to seeing what you've found and fixed.

I've done 3 minor updates so far to fix some issues. One big issue that Beau discovered was the wxgraphs.php page had a few <? instead of <?php markups, and his home server really barfed on that with a 500 error. That's been fixed with an updated wxgraphs.php page in all distributions.

Updates are posted on my saratogaWXPHP Twitter feed also, so feel free to subscribe there if you like.. only tweets there are regarding changes in the scripts/templates.

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Mon 07 Feb 2011 12:12 am
by n9mfk
Hi Ken,
If realtime.txt is upload every 10 sec
should var reloadTime = 10000;?
thanks Beau

Re: Now available: AJAX/PHP multilingual website templates

Posted: Mon 07 Feb 2011 1:36 am
by gemini06720
saratogaWX wrote:One big issue that Beau discovered was the wxgraphs.php page had a few <? instead of <?php markups, and his home server really barfed on that with a 500 error.
Indeed Ken, using the short form is wrong as it is not compatible with many servers, including those running on Windows - I usually correct (replace) them automatically immediately (as soon as a script is loaded into my editor) as my editor reports the short opening form of PHP as an error and refuses to run the script... :roll:

Beau, you can use any values for the 'reloadTime' variable of 'ajaxCUwx.js' - understand that if you are using a value such as 5000 (that would be 5 seconds or 5000 milliseconds) and that your 'realtime.txt' is updated only every 10 seconds, although the 'ajaxCUwx.js' script will update the display every 5 seconds it will only post new data every 10 seconds as it is how often the data of the 'realtime.txt' changes.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Mon 07 Feb 2011 2:27 am
by n9mfk
Ray,
what editor do you use for php
beau

Re: Now available: AJAX/PHP multilingual website templates

Posted: Mon 07 Feb 2011 4:03 am
by gemini06720
n9mfk wrote:what editor do you use for php
Beau, for the past 5-6 years I have been using Blumentals Software WeBuilder - it is shareware ($49.85 for the personal license - which allows the use of WeBuilder at home and on a laptop) - again, you get what you pay for... :roll:

I have been trying (and I still have installed on my computer) both freeware and expensive shareware editors and none so far has come close to the flexibilities offered by WeBuilder, such as editing HTML, CSS, JavaScript, PHP, ASP, Ruby within single program, a fully customizable and familiar text editor, syntax highlighting for HTML, CSS, JavaScript, VBScript, PHP, ASP, WML, XML, ASP.Net, C#.Net, Ruby, eRuby, Perl, SQL, realtime HTML PHP syntax check, and the possibility to immediately view (parallel screen) changes made to HTML and PHP files ... and more. Here is a complete list of features... ;)

Re: Now available: AJAX/PHP multilingual website templates

Posted: Mon 07 Feb 2011 11:00 am
by gemini06720
Ken, I have a suggestion for you: What would you think of moving all the functions contained in all the scripts into one file that will contain all the functions - I have been using such a function file with my Cumulus pages and it has been going great (no slow down when loading) and it makes it easier to add/edit/modify a (or more) function.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Mon 07 Feb 2011 3:05 pm
by saratogaWX
Hi Ray,

I do have many of the common functions moved to common.php for the template set already. The remaining scripts serve dual purposes as they are intended to work both within and outside of the the template set (scripts like ec-forecast, ec-radar, get-uv-forecast-inc, get-usno-moondata, etc). Even the ajax-dashboard and ajax-gizmo were released for outside-template usage long ago. For the dual-purpose scripts, they need to operate 'standalone', so they need to retain their functions in order to do that. They are made 'template aware' by including the Settings-override-internal-settings code.

I understand that some code reduction can be obtained by combining the functions into common.php and that appeals to my aesthetic sense, but it would kill the ability to operate the scripts outside the template and force me into maintaining dual code bases in the future .. not a pleasant thought.

So.. no, I'd like to leave the separate functions in multiple scripts as separate so the scripts can remain operable outside the template set.

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Mon 07 Feb 2011 7:05 pm
by n9mfk
Ken,
do any of the scripts use data from
nextwindindex|<#nextwindindex>:|:
thanks

Re: Now available: AJAX/PHP multilingual website templates

Posted: Mon 07 Feb 2011 7:55 pm
by saratogaWX
Hi Beau,
At present, none of the PHP or AJAX scripts use that data .. it's why I recommend removing it from the tags file (to save upload FTP bandwidth).

Re: Now available: AJAX/PHP multilingual website templates

Posted: Mon 07 Feb 2011 8:09 pm
by n9mfk
Hi Ken
I read the note for
wdirdata|<#wdirdata>:|:
wspddata|<#wspddata>:|:

but did not see one for

nextwindindex|<#nextwindindex>:|: