Alternative ajaxWDwx.js Script v 9.14

SUMMARY OF AJAX ID TAGS:
Example: [color=brown][color=green]77

Version 9.05 released.
It’s now possible to have an external settings file which
should make upgrading to new versions easier.

A packed version of ajaxWDwx.js i.e ajaxWDwx-packed.js is also included in the latest release.
If you use the packed version you’ll need to use ajaxWDwx-settings.js as well.

Also an ALERT has been added if the “clientraw.txt” file can not be found.

See the 1st post above for more modifications and additions.

I guess this would just require replacing the currently used True’s js with yours, and after making the required settings adjustmnts, I would just have to reallign my own customizations that I made to the old js.

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.