Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Widgets /

Discuss SilverStripe Widgets.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

SS 3.x weather widget


Go to End


2 Posts   3283 Views

Avatar
Pike

Community Member, 42 Posts

19 May 2013 at 1:15am

Edited: 19/05/2013 1:16am

I cannot add widget from url http://www.silverstripe.org/widgets/manage/add
for error: Security token doesn't match, possible CSRF attack.

So I'm put it here.

Weather Widget 0.0.1 for SilverStripe 3.x

Google silently kills popular API, breaks weather apps everywhere, so you need to sign up here http://www.wunderground.com/weather/api/?ref=twc
to obtain License Key and Partner ID.
To find location ID go to http://www.weather.com/forecast, e.g.: Kosice, Slovakia.
You'll see inn address bar
http://www.weather.com/weather/today/Kosice+LOXX0003:1:LO, so location ID is LOXX0003.
Then you can lookup anywhere in the world and provide wether for it.

Installation:
Read carefully https://github.com/silverstripe/silverstripe-widgets.
Make sure you have enabled widgets first to use (http://doc.silverstripe.org/widgets?s[]=widget#adding_widgets_to_other_pages)

1. extract this to your SilverStripe root directory widget_weather
2. run "dev/build?flush=all"
3. visit your page and drag and drop the widget to the right

I'm using https://github.com/twitter/bootstrap/, so template assumes bootstrap is loaded (jquery, js, css), becouse it uses bootstrap accordion.
You can rewrite template to your needs.

Source: https://github.com/JStika/weather

Attached Files
Avatar
quamsta

Community Member, 29 Posts

19 May 2013 at 6:12pm

I just tried submitting a widget to the widget submit page and the form worked for me. I know I've seen this error occur on some of my sites when I've accidentally used static publisher to cache a form page that I shouldn't have.