Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Now available: AJAX/PHP multilingual website templates

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Now available: AJAX/PHP multilingual website templates

Postby saratogaWX » Sat Feb 05, 2011 6:54 am

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

User avatar
steve
Cumulus Author
Posts: 26250
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby steve » Sat Feb 05, 2011 9:17 am

I've 'stickied' this thread. Sorry I haven't had time to look at these yet, Ken.
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby saratogaWX » Sat Feb 05, 2011 3:33 pm

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

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby saratogaWX » Sat Feb 05, 2011 6:57 pm

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

gemini06720
Posts: 1700
Joined: Mon Aug 10, 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Postby gemini06720 » Sun Feb 06, 2011 4:51 pm

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

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby saratogaWX » Sun Feb 06, 2011 9:12 pm

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

n9mfk
Posts: 845
Joined: Sun May 10, 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Now available: AJAX/PHP multilingual website templates

Postby n9mfk » Mon Feb 07, 2011 12:12 am

Hi Ken,
If realtime.txt is upload every 10 sec
should var reloadTime = 10000;?
thanks Beau

gemini06720
Posts: 1700
Joined: Mon Aug 10, 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Postby gemini06720 » Mon Feb 07, 2011 1:36 am

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.

n9mfk
Posts: 845
Joined: Sun May 10, 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Now available: AJAX/PHP multilingual website templates

Postby n9mfk » Mon Feb 07, 2011 2:27 am

Ray,
what editor do you use for php
beau

gemini06720
Posts: 1700
Joined: Mon Aug 10, 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Postby gemini06720 » Mon Feb 07, 2011 4:03 am

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... ;)

gemini06720
Posts: 1700
Joined: Mon Aug 10, 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Postby gemini06720 » Mon Feb 07, 2011 11:00 am

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.

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby saratogaWX » Mon Feb 07, 2011 3:05 pm

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

n9mfk
Posts: 845
Joined: Sun May 10, 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Now available: AJAX/PHP multilingual website templates

Postby n9mfk » Mon Feb 07, 2011 7:05 pm

Ken,
do any of the scripts use data from
nextwindindex|<#nextwindindex>:|:
thanks

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby saratogaWX » Mon Feb 07, 2011 7:55 pm

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

n9mfk
Posts: 845
Joined: Sun May 10, 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Now available: AJAX/PHP multilingual website templates

Postby n9mfk » Mon Feb 07, 2011 8:09 pm

Hi Ken
I read the note for
wdirdata|<#wdirdata>:|:
wspddata|<#wspddata>:|:

but did not see one for

nextwindindex|<#nextwindindex>:|:


Return to “Saratoga Templates”

Who is online

Users browsing this forum: No registered users and 4 guests