Now available: Easy conversion from V2 WD/AJAX/PHP to V3 templates...

I know that there are over 500 websites that are using the V2 WD/AJAX/PHP template sets, and I hope they will consider updating to the V3 template sets, especially since I’ve stopped enhancements/bug-fixes on the V2 templates and supports scripts.

Don’t Panic! I’ve created a step-by-step instruction and a new ‘get-me-the-updates-I-need’ page to make the upgrade (hopefully) painless and error-free. You will be required to do some editing to move modifications in core pages to the corresponding new pages. By following the instructions, the cutover to the V3 template should be website-outage-free.

So… let the upgrades begin: http://saratoga-weather.org/wxtemplates/upgrade-from-V2-template.php

p.s After you upgrade, then you can use the update utility to keep your website up-to-date with the latest core and support scripts as they are released.

p.p.s. Comments/suggestions/bugs-found concerning the upgrade process are welcome, either in this thread or by direct contact. Thanks in advance!

Best regards,
Ken

thanks Ken for all you do !
:slight_smile:

I have no idea what version I am running…how can I tell? I could be on version 1 for all I know…would the upgrade instructions still apply if I am?

Probably the easiest way to tell which version you are using is by looking at the source of your top.php file.

If it says something like


you are likely running the V2 PHP template (or the V1 PHP template), so yes, you can use the upgrade procedure.

There was only 1 version of the USA template, so just select that on the upgrade tool.

For Canada and World V2 template users, you’ll need to remember if you had installed the English only or -ML (multilingual) version. Easy way to tell is to look at your home page … if it offers language selection in the left header area, then you have the -ML version, otherwise it’s the English only version.

Hope this helps…

Best regards,
Ken

I selected the V2 upgrade. On the off chance I’m really running V1 am I going to be in trouble by doing the V2 version?

I think you’ll be fine upgrading even if you’re using a V1 WD/AJAX/PHP template set … all the stuff needed to upgrade it to V3 should be contained in the upgrade .zip file.

V1 of the template set was released 29-Feb-2008.
V2 of the template set was released 06-Jul-2009 and provided updates for PHP5 support for timezone setting, (Canada, USA, World) added Snow display to ajax-dashboard, new testtags.txt to support wxtrends page, remove need for trends-inc.html file. Full details of that change are at http://saratoga-weather.org/template/Changes-2009-06-03.txt

So yes, you can use this to update a V1 template too :slight_smile:

Best regards,
Ken

Im running ver. 1, is there any downside not to upgrade other than its not supported anymore?

That’s the main downside… no support for V1 or V2 templates.

The upside is:

  • Support returns :slight_smile:
  • You can use the current and to-be-developed addon scripts and be reasonably assured they’ll both work and be supported if they don’t quite work.
  • You’re prepared for the inevitable updates to supporting scripts as the websites that provide the data change in format/content.
  • You can use the updates page to easily keep your website current.

If none of the above appeals to you, then it is quite ok for you to stick with what you have with the proviso that items fixed in V3 won’t be back-ported to V1 or V2, so you’ll be in a do-it-yourself mode when something breaks.

Best regards,
Ken

Thanks for the info Ken.

So since im so far behind I should probably update every file then huh?..lol

You’d just need to update/configure the files that came from the Upgrade page, not all the files in your current website.

The wx…php pages you’ve made using the wxnewpage.php will likely need no changes… only the ‘stock’ pages like
wxtrends.php, wxhistory.php, wxsitemap.php, wxstatus.php, wxgraphs.php are included in the distribution and if you’ve modified them, then port your mods from the old page to the new.

One big change between V1 and V2 was how wxtrends.php got it’s info. In V1, you had to have WD upload trends-inc.txt->trends-inc.html … in V2 and V3, the extra file upload is not needed (saving you bandwidth). The V3 wxtrends.php uses WD-trends-inc.php which gets all it’s data from testtags.php.

Use this guideline:

  1. if the file in the update .zip doesn’t already exist on your website, just upload the new file without config (except for Settings-weather.php which does need configuration).
  2. if a file of the same name exists, then follow the Recommend: action to handle it.

Hope this helps…

Best regards,
Ken

I’ve just finished the switch to V3. I gave up checking all my wx__.php files for changes. I didn’t do the upgrade per the instructions, but I think it turned out ok. I first backed up my current site, then deleted everything off the server. D/l and setup the zip files, at least the files listed specifically in the directions by name. I then uploaded the new files to the server. And finally uploaded the old site files set to skip any that were already on the server. The only thing that didn’t work for me that I needed to fix was the 2 cache files, UV and forecast, I had to move the old files into the cache directory. So far all seems good, but time will tell.

Glad it worked out for you, Dan… it’s not quite the way I’d recommend doing it for one reason only: the Update zip file really contains only the changes from the V2/V1 templates, not a complete template in itself. That is why the instructions said to do the changes on the unpacked copy of the Update .zip file, then copy that over the local website (to replace old files with modified new files) and upload to the webserver.

Yes, the V3 templates use a /cache directory to store all the temporary cache files from the scripts (unclutters the main directory), and uploading the cache/index.html file should create the directory on the website for you.

But… there’s always more than one way to accomplish the upgrade :slight_smile:

Best regards,
Ken

Hi Everyone,

I am almost complete with the conversion to Ver. 3. I have a problem with getting the Alternative Dashboard working. I have the latest version of the Dashboard. The website is located at www.johnsnhweather.com. The problem can be seen at www.johnsnhweather.com/althome.php

I am also having an alignment with the alert box in IE and FireFox.

Thanks,

John

Where do I find the flag-xx.gif files for the multilingual feature?

Hi John,

I don’t really recommend that USA template users engage the multilingual capability on their sites as languages other than English are not generally available from the NOAA source websites. Yes, the forecasts are offered in Spanish, but not the advisories/watches/warnings through the ATOM/CAP feeds, and there is no mechanism to mechanically translate output from weather.gov for the other languages.

For the Canada websites, the Environment Canada website provides both English and French versions for the forecasts/advisories and radar.

For the World websites, the translations for forecasts are provided by Weather-Underground and the advisory translations by MeteoALARM websites.

For all the sites (USA, Canada, World) the translation files (language-.txt, language-.js, plaintext-parser-lang-*.txt) provide English->language via direct substitution for the text displayed in the menus (flyout-menu only), headings/footer, titles, and data labels in ajax-dashboard and ajax-gizmo.

So, I’d suggest you return to English-only for your USA website :slight_smile:

If you still want to play with it, the complete flags and translation files for the menus/WXSIM/templates are in the Base-World distribution, and English/French only are in the Base-Canada distribution.

As for the overflow in the right side on your althome.php page, you’ll need to set the width of displayed items to a max of about 630px to prevent overflow in the narrow-aspect website.

Best regards,
Ken

Hi Ken,

I have returned to English-only for my website, I am so close to Canada I thought it would be nice to offer French. I want to stick to the USA site.

I am still having a problem with the Alternative Dashboard, I want to use it but can’t seem to get it to show. The problem can be seen at www.johnsnhweather.com/althome.php

Thanks,

John

Hi Ken, I looked at the page source and it ends after the radar imiage-- no code.

Can you post the contents of the althome.php page as a .txt file so we can take a look.

Usually, the failure of a page to fully load is caused by a Error: type PHP condition (missing the target of an include, or a fatal PHP syntax error in the included file). If you have access to your Apache error log (usually through a cPanel screen for your website), see what error is being logged, and that’s a good start for the debugging.

Best regards,
Ken

Hi Ken,

I have attached a txt file of althome.php, also a txt file of my dashboard.

Thanks,

John

I will check cpanel


althome.txt (10.4 KB)

dashboard.txt (124 KB)

It looks like the culprit is

	 { include_once("ajax-dashboard621.php");

since the last output of the page happens before that.

Is there an ‘ajax-dashboard621.php’ in the same directory?

If your attached ‘dashboard.txt’ is really named ‘ajax-dashboard621.php’ on your site, then I’d suggest changing the first code line

error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);

to

error_reporting(E_ALL);

so you’ll get any errors embedded in that page.

Hope this helps…
Best regards,
Ken

Hi Ken,

That is the name of my dashboard file. I changed the first line as you suggested and I still get the same results and no new errors.

Thanks,

John