Onebox all the links!


#84


#85

Come on, that title is intentionally super long to bury the joke at the end. And what about the next time, when 250 chars isn’t enough? Then 300? Then 350? Where do we draw the line on title length other than “not here”?


#86

Looking good!

The steps to get a Mediawiki Oneboxing:

  • Start with an up-to-date Mediawiki. I jumped from an old 1.18 to relatively recent 1.27.3. (The jump from Jesse Raspbian to Stretch.) It was painful, but like taking a band-aid off quick, it was done.
  • Add two extensions: OpenGraphMeta and Description2
  • Wrap the image you want for each page. e.g. {{#setmainimage:TorontoOrg.jpeg}} I borrowed Infobox templates from Wikipedia, so I’ll tweak those to do that for me. Onebox seems to need an image, so I’ll think about what to do when there isn’t one.

I have the feeling that there’s been recent work on the BB side, because this wasn’t working last week. Thanks!

P.S. If you update your Mediawiki, also drop in extension MobileFrontend. Phone users and Google ranking will be happy about it.


#87

I went in and added the #setmainmage to the Infobox Organization, Person and Book. (What a mess. I should update to more recent templates now that I can.)



I’ll need to make sure that there’s at least some text in the body of articles so that there’s a description.


#88

This was unexpected:


#89

Well that is not good, @techAPJ can you check our length limits in the code there?


#90

The google docs description was not getting truncated. Fixed via:

Fix will be deployed here soon. Thanks for bringing this in our notice @Wanderfound. :+1:


#91

@techAPJ also added xxtra onebox fanciness along the top, from left to right: site favicon, proper titles (if the page has a title) and dates next to the title (when date is provided in the metadata, but it typically is on news-y sites).

Like so


#92

This one looks like it should work. Is it the É in the title?

ETA: And now it’s working. odd.


#93

Is it just me, or is the xkcd thing presenting its images with wrong aspect ratio?

xkcd


#94

Specific to that one perhaps?


#95

This one didn’t onebox:
https://scholarlykitchen.sspnet.org/2018/03/15/a-comment-on-klein-et-als-comparing-articles-to-preprints/
Which is a pity, as the thumbnail is good. (Also it is a bit ironic, as it is a website dedicated to publishing.)


#96

Per iframely.com/debug it might be because they offer no text description in oEmbed. There is one in the OpenGraph tags though.


#97

Articles from https://scholarlykitchen.sspnet.org doesn’t onebox because the site returns error code 403 (Forbidden) after looking at default Onebox user agent “Discourse Forum Onebox v2.0.0.beta4”. Nothing we can do about it except creating a custom onebox agent for them, which I am not so sure about.


#98

Well, I wouldn’t bother, I just thought that since we have this thread for onebox failures and I was sad about that one when I posted it elsewhere that I’d report it here.


#99

Tweets from this user:

https://mobile.twitter.com/Saeen

…don’t Onebox or autolink properly, because the underscores at the start and end of his username are interpreted as italics rather than text. It should be underscore-saeen-underscore rather than saeen.

Sample:

https://twitter.com/Saeen/status/979459068724117505?s=20

Is there a simple way around this problem that I’m missing?


#100

Not sure, but you can use parens to make a proper link. Of course that also negates oneboxing, or maybe oneboxing should treat this case as an acceptable way to onebox?

https://mobile.twitter.com/_Saeen_
<https://mobile.twitter.com/_Saeen_>

There’s probably an HTML character entity way as well:

https://mobile.twitter.com/_Saeen_
https://mobile.twitter.com/%5FSaeen%5F

let’s see

yes that works. Sorry this guy has an annoying username :wink:


#101

Is there some way the click counter that works on a plain link can be made to work on these onebox things?

It’s an annoying omission.


#102

It already works, here’s an example

image

Note the click counter says “one” there.


#103

Not on my machine… (Firefox on Win8.1)

Image1

ETA - that’s weird, I wasn’t zoomed in when I took the screencap…?

Image1