Page 1 of 1

Automatic Location Detection

Posted: Wed May 08, 2013 10:35 pm
by dmetsker
Hello - Just want to start off saying this is a great widget! Lots of features and very nice looking!

I am creating an internal website for my company using Wordpress and I would like to add a weather section. This will reside in the Secondary Widget section, just above the footer.

I generated the correct code for our Home Office here in San Francisco and it looks great, but I would like the local weather to show up for other field-based employees around the country. Is there a way I can do this automatically with some alterations to the code?

Thanks in advance!

Re: Automatic Location Detection

Posted: Thu May 09, 2013 3:04 am
by countryroads
Hi Darren,

Welcome to YoWindow.

There is an IP Locator. Use 'location_auto_ip=1' instead of 'location_id=gn:123456' where 123456 is your geoid.

Let us know how this works for you.

Marty

Re: Automatic Location Detection

Posted: Thu May 09, 2013 4:52 am
by dmetsker
What do I put for the name and other parameters?

Re: Automatic Location Detection

Posted: Thu May 09, 2013 5:10 am
by countryroads
Hi Darren,

Remove the name area - 'location_name=San Francisco&'.
The purpose of the name area is for users that wanted to change the name of a location to their own name.

The other parameters should remain the same.

If you run into some trouble, let us see your website.
We will look at the code and help you out.

Marty

Re: Automatic Location Detection

Posted: Thu May 09, 2013 5:29 pm
by dmetsker
I removed the location name and replaced the location id with the code you provided, but now it is just showing weather for Newton.

Here is the website: http://www.cmgmidev.com/wpintranet

Keep in mind that this is a development site, and I am hoping to port over this build today and tomorrow to our internal servers.

Here is the code that I am using in my widget:

Code: Select all

<div style="width:220px; height:150px;">
    <object type="application/x-shockwave-flash" data="http://swf.yowindow.com/yowidget3.swf" width="220" height="150">
    	<param name="movie" value="http://swf.yowindow.com/yowidget3.swf"/>
    	<param name="allowfullscreen" value="true"/>
    	<param name="wmode" value="opaque"/>
    	<param name="bgcolor" value="#FFFFFF"/>
    	<param name="flashvars" 
    	value="location_auto_ip=1&landscape=airport&time_format=12&unit_system=us&background=#FFFFFF&copyright_bar=false"
    />
        <a href="http://WeatherScreenSaver.com?client=widget&link=copyright"
        style="width:220px;height:150px;display: block;text-indent: -50000px;font-size: 0px;background:#DDF url(http://yowindow.com/img/logo.png) no-repeat scroll 50% 50%;"
        >Screen Saver</a>
    </object>
</div>
<div style="width: 220px; height: 15px; font-size: 14px; font-family: Arial,Helvetica,sans-serif;">
	<span style="float:left;"><a target="_top" href="http://WeatherScreenSaver.com?client=widget&link=copyright" style="color: #2fa900; font-weight:bold; text-decoration:none;" title="Screen Saver">ScreenSaver</a></span>
	<span style="float:right; color:#888888;"><a href="http://www.weather.gov" style="color: #2fa900; text-decoration:none;">NWS</a></span>
</div>

Re: Automatic Location Detection

Posted: Thu May 09, 2013 5:35 pm
by countryroads
Hi Darren,

I just tried out your website.

The Widget is showing me Marysville, Ohio which is south of Mansfield, Ohio.
So the IP Locator is working.

Marty

Re: Automatic Location Detection

Posted: Thu May 09, 2013 5:44 pm
by dmetsker
Thanks Marty, that's great to hear!

But why is it showing me Newton? The majority of our users will be here in San Francisco. I also checked with a coworker, and she is also seeing Newton.

Thanks again for your help!