|
saratogaWX
|
 |
« on: September 02, 2011, 05:22:14 PM » |
|
I know that there are over 500 websites that are using the V2 Weather-Display/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.phpp.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
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Dr Obbins
|
 |
« Reply #1 on: September 02, 2011, 07:36:56 PM » |
|
Does the upgrade change the way the website looks, or is it just mainly "behind the scenes" stuff? Is there a website currently using V3 that we can check out?
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #2 on: September 02, 2011, 07:51:46 PM » |
|
When you do the update procedure, the website should look exactly the same with your chosen style and menus. For the former Canada-ML and World-ML sites, the language selection will be a drop-down list instead of an array of flags. There is much 'behind-the-scenes' stuff included as all the V3 templates are inherently multilingual, and new support scripts (geography dependent) are updated and new scripts added to make it easy to switch to another weather station software if you wish. The V3 templates support Weather-Display, VWS, Weather-Link, Cumulus and Meteohub Feel free to poke the buttons on my test site (currently running Cumulus) http://saratoga-weather.org/wxtemplates/Test/wxindex.phpYou can add a ?wx=WD , ?wx=VWS, ?wx=WL, ?wx=MH to the above URL (or any page there) to see the effect when using Weather-Display, VWS, WeatherLink, or Meteohub The test site is a World site which is normally in metric units, but it's being fed by my station's data in imperial/English units, so some of the values may not look correct in the test, but work just fine when properly configured to the station's units-of-measure. Best regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Arthurhh
|
 |
« Reply #3 on: September 02, 2011, 09:24:18 PM » |
|
Okay I use the V2 templates, but substantially modified what would happen to my site if I attempt to upgrade. EG does it mean I have to re-customize my ajax dashboard.  Okay dont worry Ken, just found my answer looking at your site 
|
|
|
|
« Last Edit: September 03, 2011, 09:57:47 PM by Arthurhh »
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #4 on: September 02, 2011, 09:32:06 PM » |
|
If you follow the instructions, all the changes should be reversable (you DID make a backup of the current site  ) I do have specific instructions for folks who use the alternative dashboard/AJAX to remove the included ajax-dashboard.php and ajaxWDwx.js from the update set before copying the NEW changes for V3 into their website (thereby preserving their existing dashboard function). However... if you're planning on using the multilingual functions on the dashboard, make sure your current customized dashboard supports the multilingual functions. Best regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Arthurhh
|
 |
« Reply #5 on: September 03, 2011, 09:42:08 PM » |
|
Ken
I take it that the V3 upgrade will stand on its own and doesnt necesarily need to upgrade a V2 install?
Brick wall Okay dont worry Ken, just found my answer looking at your site d'oh!
|
|
|
|
« Last Edit: September 03, 2011, 09:58:22 PM by Arthurhh »
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #6 on: September 03, 2011, 09:52:26 PM » |
|
Ummm.. No, the upgrade implies a previous V1 or V2 of the template set. It doesn't include all the files needed for proper operation of a V3 template set, only the changed files from V1/V2. Use http://saratoga-weather.org/wxtemplates/install.php for a complete new V3 installation (one Base and one Plugin). Use http://saratoga-weather.org/wxtemplates/upgrade-from-V2-template.php to upgrade an existing V1/V2 template to V3. Best regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Arthurhh
|
 |
« Reply #7 on: September 04, 2011, 02:33:34 AM » |
|
 Great templates Ken, created a dev.subdomain and poked them in there, couple quick edits here and there, copied my ajaxdashboard and associated ajax file into the root logged into the site and it was all there. Pointed another copy of my live clientraw.txt at the root and away it went with my data. Havent created the dirs for my custom graphics etc yet. What I am looking foward to is getting some of the crap out of my web root directory into sub directories which looks to be significantly easier to do with this version.
|
|
|
|
|
Logged
|
|
|
|
|
Dr Obbins
|
 |
« Reply #8 on: September 04, 2011, 11:16:09 AM » |
|
I downloaded the zip upgrade pack. Does this upgrade need to happen all at once, or are there some "core" files that can be upgraded and then the other files as time permits? Example if the Settings, Top, Header & Footer are upgraded, will that work for now? The reason I ask is the instruction in the zip have me transferring the info for about 21 pages and in all I have ~70-80 pages on my site. I think that almost all of the pages have been modified in one way or another from the original template. If all the pages need changing at once, I will need to wait for a long, cold, rainy weekend with the wife and kids out working. 
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #9 on: September 04, 2011, 03:48:16 PM » |
|
You're correct that some of the update files are 'core' and prepare your USA site to use other weather software (if you so desire) and convert the older USA/Canada/World templates into full multilingual capability.
Key files to use new versions are: Settings.php and Settings-weather.php (customized from your original Settings.php) common.php can just replace your old one.. no customization is needed. top.php, heading.php, menubar.php, footer.php all have new code in them, so transferring your mods from old to new is key. Add any ajax-images/ alert-images/ cache/ to your (possibly existing) directories and upload Add any language-*.js, language-*.txt that you are missing on your site and upload (no changes needed). add the ajaxVWSwx.js, ajaxMHwx.js, ajaxWLwx.js, ajaxCUwx.js files so you're prepared if you switch weather software. Add the WD-trends-inc.php, get-USNO-sunmoon-inc.php, get-metar-conditions-inc.php scripts.. no changes needed replace check-fetch-times.php, ajax-gizmo.php, flyout-menu.php, include-style-switcher.php, include-wxhistory.php (no changes needed) replace plaintext-parser.php, advforecast2.php, atom-advisory.php, atom-top-warning.php, quake-USA.php (no changes needed)
if you're NOT using the alternative dashboard, replace ajax-dashboard.php and replace after customizing ajaxWDwx.js
Now we come to the changes in the 'stock' pages that need some mods from old-to-new and the reasons for them below:
wxastronomy.php Updated: 2011-02-15 07:42 Version '(not specified)' Size: 20903 bytes Recommend: Transfer current mods to new copy and install new copy.
wxforecast.php Updated: 2011-01-05 10:28 Version '(not specified)' Size: 3634 bytes Recommend: Transfer current mods to new copy and install new copy.
wxgraphs.php Updated: 2011-08-08 06:46 Version 'V1.01 - 9-Aug-2011 - added Meteohub support' Size: 10247 bytes Recommend: Transfer current mods to new copy and install new copy.
wxindex.php Updated: 2011-02-06 09:08 Version '(not specified)' Size: 4512 bytes Recommend: Transfer current mods to new copy and install new copy.
wxlinks.php Updated: 2011-01-27 13:03 Version '(not specified)' Size: 6477 bytes Recommend: Transfer current mods to new copy and install new copy.
wxnewpage.php Updated: 2011-01-05 18:26 Version '(not specified)' Size: 2713 bytes Recommend: Transfer current mods to new copy and install new copy.
wxnoaaiod.php Updated: 2011-01-26 13:41 Version '(not specified)' Size: 2650 bytes Recommend: Transfer current mods to new copy and install new copy.
wxsimforecast.php Updated: 2011-01-05 13:54 Version '(not specified)' Size: 2808 bytes Recommend: Transfer current mods to new copy and install new copy.
wxsitemap.php Updated: 2011-01-05 13:53 Version '(not specified)' Size: 4464 bytes Recommend: Transfer current mods to new copy and install new copy.
wxstatus.php Updated: 2011-08-07 13:05 Version '- 1.03 - 07-Aug-2011 - added support for Meteohub' Size: 13056 bytes Recommend: Transfer current mods to new copy and install new copy.
wxtrends.php Updated: 2011-01-05 16:26 Version '(not specified)' Size: 2905 bytes Recommend: Transfer current mods to new copy and install new copy.
wxuvforecast.php Updated: 2011-02-18 09:14 Version '(not specified)' Size: 7295 bytes Recommend: Transfer current mods to new copy and install new copy.
All other 70-80 pages on your site can remain the same, and the main changes in the stock wx....php pages above was to accommodate variants when using other weather software than WD. So changing the wx....php pages is optional if you are happy with the existing pages and never plan to change weather software.
Use the README file included with the Upgrade .zip as your guide on how to handle all the included files.
Hope this helps, and best regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Dr Obbins
|
 |
« Reply #10 on: September 04, 2011, 04:11:56 PM » |
|
Let me try rewording the question:  If I update the "key" files you outlined, will the current wxastronomy.php, wxforecast.php, etc. (stock) pages work as they are, until the new copy is uploaded? I compared the new and my existing ajax-dashboard.php and due to the many changes made I will probably have to go through line by line. Will the existing one work until I have time for that? Also, the advforecast2.php - I have advforecast1.php through advforecast7.php to cover 7 different forecast locations. Will this work again? Sorry for all the questions.  This looks pretty straight forward for a non modified site.
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #11 on: September 04, 2011, 04:24:52 PM » |
|
Regarding the current wx....php pages, yes, the old ones will likely work on your site since they are 'tuned' to WeatherDisplay .. the problem will occur if you decide to switch software and still have the old pages, then some things will likely break. The majority of the stock ajax-dashboard.php changes had to do with quiet handling when specific data is not provided by other software packages. Most anemic was WeatherLink (fewest tags of all the software). Again, if you're not planning on changing weather software, you can stick with what you have. The new advforecast2.php now supports multiple zones with one script (if you add in the proper Settings.php entry), so you don't really need multiple wx...php pages loading different advforecastN.php pages to make it work. See how it works on my site: http://saratoga-weather.org/forecast-new.phpor http://saratoga-weather.org/wxtemplates/USA/wxforecast.phpHopefully, the detailed instructions for each file show how to handle it (install new, move mods old->new) so let that be your guide  The upgrade itself simply compares the old distribution file (for the last V2 WD version) and gives you all the files from the new distribution that you need to address on your site to have it 'current' and then you can use the updates tool to keep the site 'fresh' from thence forward. Best regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Dr Obbins
|
 |
« Reply #12 on: September 04, 2011, 04:40:28 PM » |
|
Ok, Thanks for the replies. I have a warm fuzzy feeling about upgrading now. 
|
|
|
|
|
Logged
|
|
|
|
|
Dr Obbins
|
 |
« Reply #13 on: September 05, 2011, 09:52:13 AM » |
|
I set up a test directory to do the modifications and added "Disallow: /test/" to the robots.txt. Will that stop the folder from being indexed by bots? I also use a custom css file and had to added it to the "include-style-switcher.php". Anyway it is looking good so far, just some spacing issues need addressing. (obviously the data is not current in this folder) http://www.cavecountryweather.com/test/index.php
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #14 on: September 05, 2011, 10:46:37 AM » |
|
I set up a test directory to do the modifications and added "Disallow: /test/" to the robots.txt. Will that stop the folder from being indexed by bots? I also use a custom css file and had to added it to the "include-style-switcher.php". Anyway it is looking good so far, just some spacing issues need addressing. (obviously the data is not current in this folder) http://www.cavecountryweather.com/test/index.phpThe robots.txt entry should work for all spiders that honor the convention (all the reputable ones like Google, Yahoo, Bing etc., that is), I'd suggest that instead of modifying the include-style-switcher.php, you just replace one of the stock CSS files .. the CSS files have remained the same in the distributions from V1 through V3 (and likely onward) while the include-style-switcher.php has changed. So, to not have the bother of refitting mods to a script that may be changed in the future, I'd go with changing/replacing the files unlikely to be revised (the CSS files). Best regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Dr Obbins
|
 |
« Reply #15 on: September 05, 2011, 05:13:14 PM » |
|
In the ajax-dashboard I had changes the size of the forecast icon and windrose graphics from 54 to 72. When the page first loads, the icons are the 72 size, but after the first ajax update, they are reverting back to 54. I have forgotten where to change this. Where is the icon size called out for after the ajax update?
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #16 on: September 05, 2011, 05:16:46 PM » |
|
That's in ajaxWDwx.js script // optional settings for the Wind Rose graphic in ajaxwindiconwr as wrName + winddir + wrType var wrName = 'wr-'; // first part of the graphic filename (followed by winddir to complete it) var wrType = '.png'; // extension of the graphic filename var wrHeight = '58'; // windrose graphic height= var wrWidth = '58'; // windrose graphic width= var wrCalm = 'wr-calm.png'; // set to full name of graphic for calm display ('wr-calm.gif')
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Dr Obbins
|
 |
« Reply #17 on: September 05, 2011, 09:29:52 PM » |
|
Ok,  Got the "core" files uploaded and live.  Cave Country Weather is now using V3. Now to get to the other pages.
|
|
|
|
|
Logged
|
|
|
|
|
Strgazr27
|
 |
« Reply #18 on: September 06, 2011, 02:06:27 PM » |
|
Modified and transferred over the "Core" files myself also but I am now getting this error when trying to access my site: Parse error: syntax error, unexpected T_STRING in /homepages/18/d339288694/htdocs/Settings.php on line 103 Thought I did it all correct and took my time but I guess not  ANY ideas? Thanks
|
|
|
|
|
Logged
|
Bobby M. Davis VP2 6152 w Daylight FARS - Logitech C525 and C310 WD - WDLive - GRLevel3 - Image Salsa - VVP - Startwatch " http://www.kingsparkweather.com" KNYKINGS7 on WU 
|
|
|
|
Strgazr27
|
 |
« Reply #19 on: September 06, 2011, 02:34:47 PM » |
|
I corrected the Syntax error but now the dashboard does not load? I am using Scotts Ver 6 Dashboard which was working fine with my V2 templates. I copied over the Dashboard file as well as ajaxwdwx.js from my old V2 files as instructed but seem to have lost something. If I use the Ajax-Dash that comes with the upgrade it works. Just don't know what got screwed up  Any ideas? Thanks!
|
|
|
|
« Last Edit: September 06, 2011, 02:38:14 PM by Strgazr27 »
|
Logged
|
Bobby M. Davis VP2 6152 w Daylight FARS - Logitech C525 and C310 WD - WDLive - GRLevel3 - Image Salsa - VVP - Startwatch " http://www.kingsparkweather.com" KNYKINGS7 on WU 
|
|
|
|
Curly
|
 |
« Reply #20 on: September 06, 2011, 03:23:37 PM » |
|
Not sure if it makes any difference but have you changed the ajax-dasboard setting in Settings-weather.php? $SITE['ajaxDashboard'] = 'ajax-dashboard.php';
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #21 on: September 06, 2011, 03:55:42 PM » |
|
And... have you deleted (or commented out) the // Uncomment the next two functions if you get an error message that says // Fatal error: Call to undefined function langtransstr() // function langtransstr($str) { // added return($str); } // function langtrans($str) { // added echo $str; return; }
in the alternate dashboard? If not, the load will fail with an attempted duplicate definition for langtrans() and langtransstr() functions which are now built-in the V3 templates (in common.php). Best regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Strgazr27
|
 |
« Reply #22 on: September 06, 2011, 03:56:13 PM » |
|
Curly,
No I haven't. I simply replaced the template version with Scott's version. I just also noticed my banner is offset also so I have quite a few things to correct...
|
|
|
|
|
Logged
|
Bobby M. Davis VP2 6152 w Daylight FARS - Logitech C525 and C310 WD - WDLive - GRLevel3 - Image Salsa - VVP - Startwatch " http://www.kingsparkweather.com" KNYKINGS7 on WU 
|
|
|
|
Strgazr27
|
 |
« Reply #23 on: September 06, 2011, 03:57:09 PM » |
|
Ken,
Yes I did as that was causing errors when I first installed it using the V2 templates.
|
|
|
|
|
Logged
|
Bobby M. Davis VP2 6152 w Daylight FARS - Logitech C525 and C310 WD - WDLive - GRLevel3 - Image Salsa - VVP - Startwatch " http://www.kingsparkweather.com" KNYKINGS7 on WU 
|
|
|
|