Use Wikipedia Onebox for other MediaWiki sites

Currently wikipedia.(com|org) is hardcoded in wikipedia_onebox.rb, but there are plenty of other MediaWiki driven sites for which this onebox would (or should!) work just the same.

It would be neat if it could be made possible to list other sites/URLs to get parsed by this onebox.

1 Like

admin/settings search for “onebox”. There is a domain whitelist. You can add “com” (or maybe it’s .com I’ve not bothered to figure out which and just put both) if you want to whitelist everything. I’m not quite sure why this level of paranoia is necessary, so I eventually added com, edu, and so on.

1 Like

That doesn’t trigger the wikipedia_onebox.rb onebox script though, which has neat stuff like showing the specific referenced section (also, apparently not all MediaWiki sites return proper “onebox” data, e.g., http://iframely.com/debug?uri=https%3A%2F%2Fwiki.musicbrainz.org%2FDevelopment%2FSummer_of_Code )

Oh. (I should have been clued in to that by your referencing the source.)

And wow. I hadn’t realized how many of those oneboxes were hand-coded for each site. I’d been crediting those sites with making that happen.

It becomes very easy to DDoS your site by writing a post with a hundred oneboxes, etc. And most sites on the web don’t support opengraph or oembed, so it’d be a wasted HTTP request for every URL.

4 Likes

Aha. Well, now I see. That’s helpful.

I suppose if I had thousands (or even hundreds) of messages per day rather than dozens, and I wasn’t having people post oneboxes of their Wordpress sites I might go ahead and be properly paranoid sooner rather than later.

Thanks

On the same subject…

… we have a mediawiki install (we own the website) and would like to have onebox just for that specific wiki on our discourse forum. Would it be possible to take the existing wikipedia onebox script and adapt it to our wiki?