Embedding polls in posts

(Jeff Atwood) #21

As mentioned a few posts above, the current workaround is to create a topic, then create 5 responses, then ask people to like one or more of those 5 “poll” responses. Count the visible like number next to each of those 5 posts to get your poll winner.

It will be a while.

(John Hibbs) #22

Any news on the poll feature?

Would love to get it up and running!


(Erlend Sogge Heggen) #23

Wouldn’t a lot of users’ needs be satisfied by simply enabling embeds for some of the more popular poll services, like PollDaddy and SurveyMonkey?

(Jeff Atwood) #24

Do those services support embeds? If so, great idea!

(Erlend Sogge Heggen) #25

Sure they do!



Honorable mention to Google Docs :wink:

Setting timeout times for oneboxes
(John Hibbs) #26

I really would like to be able to embed Survey Monkey polls into posts at http://thlt.org/Lupus-Community

(Jeff Atwood) #27

@Neil perhaps you can look and see which of these options is easier for oneboxing/integration and investigate it.

Ease of work for us is paramount at this point, since there is already a workaround, and we have a lot of other things on our plate.

(Alexander) #28

I had been thinking of implementing a feature similar to WordPress shortcodes that could be used to embed arbitrary code (such as a third party hosted survey widget), using what I can find of existing plugins.

(Neil Lalonde) #29

PollDaddy’s oEmbed returns html that doesn’t work with Discourse. It loads javascript without an iframe, and that javascript doesn’t work.

SurveyMonkey doesn’t support oEmbed. It provides embed code that you’re supposed to paste into the page, but we strip the iFrame.

The direct link uses a different ID for the survey, so I can’t just build a oneboxer to build the above embed code using the direct link.

Why can’t the link and the embed code use the same ID? Grrrr.

Ideally, the direct link can be pasted and a Oneboxer can build the embed code. I’ll contact Survey Monkey to see if they can help us.

Promoting new forum
Consider.it integration in discourse
Embedding surveys (HTML)
(Neil Lalonde) #30

After some back and forth with Survey Monkey support people, this sums it up:

It seems to me like using the API as it is today would be a little outside your paradigm. oembed functionality would certainly make it easier for you, but it’s not on the road map now so won’t be released any time soon. I will definitely bring it up with the product manager for our API with an eye towards making this sort of thing easier in the future.

They suggested scraping the html like we do for the apple app onebox, but that wouldn’t give us the embedded poll that we want, and it’s a fragile solution even if it did.

So, the best solution is probably to implement an official Discourse poll plugin.

(Jeff Atwood) #31

Great idea @erlend_sh but unfortunately, does not work when investigated.

We will bump up our timeline for an official poll plugin. Probably something as simple as we can get away with.

(Erlend Sogge Heggen) #32

Thanks a lot for elaborating Neil. Really too bad! Didn’t imagine Discourse and WordPress would handle such things so differently; didn’t see it coming.

An official plugin will be nice, but just to throw another option in there while we’re at it: There’s always the possibility of using their APIs. By the looks of it the poll input is somewhat restricted, but that’d probably too much work to get right anyhow. Just by grabbing the output you could pull the information you need to make a nice representation of the poll results, and that’s the kind of thing that would benefit from being copied over for good anyhow.

(Lars Doucet) #33

It’s been 5 months since the last post… any progress?

(Rikki Tooley) #34

It’s done:

(Kane York) #35

Markdown in the options is also correctly parsed :slight_smile:


i’m looking forward to this option as well, is it live?

(Jeff Atwood) #37

Yes! The poll plugin ships with every copy of Discourse and is live now. You can play with it, and there is a demo of it, on http://try.discourse.org.

(Jeff Atwood) #38