Alternative ajaxWDwx.js Script v 9.14

All the original tags are still there so you should have no problems.

All you have to do is set your location for clientraw.txt,
your graphic paths and pick your UOM to get started.

Afterwards you can play around with it.

Congratulations Rainer!! This is a major leap forward in capability of the ajaxWDwx.js script – thank you!!

I like your suggestion on version-number ranges, so I’ll stick to the 2.xx range for mine. Would you allow me to bundle your latest version with the 5 template sets? I’d be pleased to do so :slight_smile:

Best regards,
Ken

Hi Ken,
You are more than welcome to do so.

I’ve tested this script on my end for the last 6-8 months and it works fine on my end.
However I don’t know if there’s going to be any hiccups with the script since I only
released it to the community this morning.

I guess I will have to wait until some more people take the plunge.

Forgot to say:
Please download the latest version … I’ve added some more documentation to the script.

Have it semi running, the webcam and forecast images are setup so far. All is well so far!

Hi guys,
i have ver. 3.00 of this file…could i install the new version without problem?
I’ve attached my ajaxWDwx.js file.
Many thanks,

Alessandro

P.S.
Welcome back Ken!


ajaxWDwx.js.txt (41.1 KB)

Should not be a problem … the Webster Weather modifications have been added to this script.

Hi Rainer,
could you explain me how to use new version of ajaxWDwx.js?
I’ve installed it but it seems to change nothing in my site.
I’ve seen that the new version has a lot of customization but i don’t know how to use some/all of these.
Should i upload the ajaxWDwx-settings.js too?
Many thanks,

Alessandro

Yes, I suggest you use “ajaxWDwx-settings.js” for your setup and then upload it to your server.
This will ensure that you won’t have to make changes to it again for the next upgrade.
However keep in mind that you also need to make the patch to “top.php” as suggested in the main post above.
I can’'t help you other than that as only you would know where your files/graphics are.

Opssssss
I believe that i should change the link about my graphics images in “ajax-images”.
The new version has a different folders about icons set used.
Is it ok?
Because, at this time, I don’t have any icons in my ajax-dashboard: www.meteocarmignano.it
Thanks,

Alessandro

Alessandro,
You need to upload the “ajaxWDwx-settings.js” file to your server as you’ve included it in your “top.php”.
It’s not there at the moment. You need to make all the changes in this file.

HERE’S YOUR ICON SETUP: (I think it’s this)// 1: NWS icons (55x58) wxIconSet1 = {src : imgDir+"#PIC#.jpg" // where #PIC# = picname from table in useName ,width : 55 ,height: 58 ,hspace: 0 ,vspace: 0 ,border: 0 ,style : "" // eg. "border: 2px solid silver" ,align : "" // [ left | right | top | bottom | middle | texttop | absbottom | absmiddle ] ,useName: 1 // must be 1 for this icon set ... NWS icon nameing convention ... see ajax_getIconName1()) };
Do not delete the #PIC" part as that later gets replaced by a icon name depending on the current condition icon required.

and set this to:wxIconSet = wxIconSet1; // choose from an icon set above that you want to use.

You need to upload the "ajaxWDwx-settings.js" file to your server as you've included it in your "top.php". It's not there at the moment. You need to make all the changes in this file.

I’ve just done.
I’ve set like this “var wxIconSet = wxIconSet1” but i’ve all images in “ajax-images/”.
Unfortunately, there isn’t any choise for that.
Do you believe that i come back to the previously version?
Best regards,

Alessandro

Have you done the changes as I’ve posted above?

yes, i have.

Nope, I cant see them in either of the 2 files.
Maybe your server is caching somewhere.

Remember to make the changes to “ajaxWDws-settings.js” only as you have included it in your “top.php” file.

Allesandro and propably everybody else, here is your setup for ajaxWDwx-settings.js:

// 1: NWS icons (55x58)wxIconSet1 = {src : imgDir+"#PIC#.jpg" // where #PIC# will be replaced by picname from table in ajax_getIconName1() function ,width : 55 ,height: 58 ,hspace: 0 ,vspace: 0 ,border: 0 ,style : "" // eg. "border: 2px solid silver" ,align : "" // [ left | right | top | bottom | middle | texttop | absbottom | absmiddle ] ,useName: 1 // must be 1 for this icon set ... NWS icon nameing convention ... see ajax_getIconName1()) };

and set this to:wxIconSet = wxIconSet1; // choose from an icon set above that you want to use.

// WIND ROSE: optional settings for the Wind Rose graphicwrImg = {src : imgDir+"wr-#LANG##DIR#.gif" // where #DIR# will = wind dir (e.g. NNW), #LANG# = wrImg.lang ,lang : "" // with trailing dash (e.g. "nl-" will result in graphic name: "./ajax-images/wind/wr-nl-SSE.gif") ,calm : "calm" // substitution for #DIR# (e.g "wr-calm.gif") ... specify "" if not to be shown or not available ,width : 58,height: 58,hspace: 0 ,vspace: 0 ,border: 0 ,style : "" ,align : "" // [ left | right | top | bottom | middle | texttop | absbottom | absmiddle ] };
Don’t despair … once you’ve sorted this out you’ll never have to do it again.

Just downloaded this today, will try to implement this sometime this coming weekend.

Could you add the below:


//--- begin VPLEAF -------------------------------------------------------------
		VPleaf = clientraw[156];
		set_ajax_obs("ajaxVPleaf",VPleaf);
//--- end VPLEAF ------- -------------------------------------------------------

If its possible, could the Wind Speed and Wind Direction be separate? During the Winter months Ice buildup freezes either or both gauges here. I’ve attached what I’m currently using here, I just comment/uncomment a few lines for when gauges are frozen. And then upload it until the gauges thaw out.

Lines I modified for Ice, Wind Speed, and Wind Direction:
97-98, 110-111, 791-813


ajaxWDwx_js.txt (42.8 KB)

Hi Zalmor,
No problem, I’ll make the changes and add those tags for you.

Everybody just hang ten … I’m busy simplifying the external setup at the moment.

Great, thanks.
The VPleaf only shows up on my weather page when its not zero here.

Hi Rainer,
thanks for your support, now it works fine!
I’ve some questions for you :smiley:
Are you ready?? :lol:

How is it and when should you implement it in the future?

// D: Dynamic generated icon set (170x127) ... NOT IMPLEMENTED
//    ... you'll need: http://www.bashewa.com/download-dynamic-icon.php
wxIconSetD =
   {src    : "./dynamic-icon.php" // path and script for dynamic conditions image (optional)
   ,width  : 170 ,height: 127 ,hspace: 0 ,vspace: 0 ,border: 0
   ,style  : "border: 2px solid silver;"
   ,align  : ""
   ,useName: 9 // must be 9 for generating dynamic icons
   };

wxIconSet = wxIconSet1; // choose from an icon set above that you want to use.
                        // If we had a uniform icon nameing convention the above would not be necessary.

Other question: why the images about “moon” and “Fire Risk” shows ok in my ajax-dashboard although the settings in ajaxWDwx-settings.js are wrong?

How to use this setting below? Because, actually, my webcam image works in the nightime too.

// WEBCAM IMAGE: optional setting for the webcam graphic
// tag: "ajaxwebcamimg"
// e.g. picture name: "./ajax-images/webcam/snap00.jpg"
webcamUpdate =  5; // Webcam update interval in minutes (set to 0 for no updates i.e. visitor must reload page for updates)
swapIconWithWebcam = false; // swap current conditions icon (tag "ajaxconditionicon2") with webcam image during day and night unless useCamAtNight=false;
useCamAtNight = true; // use current conditions icon at night time instead of webcam image
delayDayNight = 15;    // day starts given minutes before sunrise and night starts given min after sunset - for night icon switch
webcamImg =
   {src   : imgDir+"webcam/snap00.jpg" // full path and image name of your current webcam picture
   ,srcNgt: imgDir+"webcam/snap00.jpg" // full path and image name of your current nightcam picture (after/before "delayDayNight")
   ,width : 170 ,height: 127 ,hspace: 0 ,vspace: 0 ,border: 0
   ,style : "border: 2px solid silver;"
   ,align : ""
   };

Last question: In your version of ajaxWDwx.js severals value aren’t translation. How to fix it? (Look the attachment)

Last observation :lol:: The last version of ajaxWDwx.js is a bit more slow respecting the previously version 3.00.
Best regards,

Alessandro


NEW RELEASE v9.06

Version 9.06 - 12-Jan-2010Fixed...... problem with incorrect language translations. Added...... modified "language-??.js" files to installation zip. Added...... tag "ajaxVPleaf" ... VP leaf wetness Added...... alert to your visitors if you have Weather Station problems. Simpilfied. the setup in the external settings file "ajaxWDwx-settings.js".

Zalmor - Michael:
I have added the Leaf Wetness tag.
I see what your problem is with the instuments freezing up …
I have added a section to the Setup to address this issue …
See “WxStation” variable in the Setup where you can report Weather Station problems to your visitors.

i_fiorentino - Alessandro
The “Dynamic Icon” is a future development which I’m making provision for so long.
If you only have one Webcam you can specify the same image for both sources in the setup.
The translation problem has been fixed … I also suggest you load the modified “language-??.js” file which I have included in the latest release.
The new script is enormous and takes time to download …
I suggest you implement the External Setup script with the packed version of ajaxWDwx.js script … see note on [color=blue]page 1[/color].
Also the script no longer supports ajaxLoaderInBody i.e. …
you need to remove all of those in your scripts.
Also the script can only start updating once your entire page has been loaded.

PS: Once you have uploaded the script make sure to hit CTRL-F5 otherwise your browser will use your old cached version.