Skip to main content
Topic: Link Preview (Read 3927 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Link Preview

I like the way Facebook interprets when a link is posted on their editor. Instead of giving a plain line of text it give a preview of what the link contains. In case of ElkArte, may be we can offer it on hover. But it looks like an interesting idea to have on board



Re: Link Preview

Reply #2

LOL, funny thing is I made this for SMF and it isn't as popular as I thought it would be.

The code is a little sloppy because I was planning it for only Open Graph, but then I had to add oEmbed and Meta support.

SMF Mod Site
http://custom.simplemachines.org/mods/index.php?mod=4075

GitHub
https://github.com/sicommnend/SMF-Open-Embed

Some Demos
http://dev.sicomm.us/index.php?board=2.0;sort=subject

Considering the nature of the license, if any one wants to adapt or improve upon it, go ahead. Also if you don't mind push me some commits of any improvements.  ;)

Re: Link Preview

Reply #3

@nend , the intension is to give preview of plain links not media links. That's what the mod does ?

Re: Link Preview

Reply #4

What irks me about this "stuff" is that posting a link on FB/TW/G+/WhatEver it is likely to be the only thing you are ever going to post, so it kind of make sense to have a preview of the content, but if you put an url in a message on a forum, it's unlikely to be the only thing posted in the body of the text, let's take nend's post as an example, using this approach, the final result would be something like:
Quote from: nend – LOL, funny thing is I made this for SMF and it isn't as popular as I thought it would be.

The code is a little sloppy because I was planning it for only Open Graph, but then I had to add oEmbed and Meta support.

SMF Mod Site


GitHub


Some Demos


Considering the nature of the license, if any one wants to adapt or improve upon it, go ahead. Also if you don't mind push me some commits of any improvements.  ;)

that, it kind of... sucks, IMO.
Anyway, addons are possible, so go for it! :P
Bugs creator.
Features destroyer.
Template killer.

Re: Link Preview

Reply #5

I would suggest " Preview on Hover " in that case. Just like some forum software gives preview of content when you hover on topic in topic index.

Re: Link Preview

Reply #6

Oops, missed that part.
Then, another "problem"[1] is with mobile devices where hovering basically doesn't exist.
I'm not trying to sink the idea, I'm just pointing out edge cases that may (or may not, up to you proposing it and to those that will implement it) be relevant or source of discussion/improvements.
Bugs creator.
Features destroyer.
Template killer.

Re: Link Preview

Reply #7

Ok :)

Re: Link Preview

Reply #8

Now that I think of it, how about a custom BB code which will give link preview to a link ? In that case, we can posters can themselves decide whether or not to add a " Link Preview ".

Re: Link Preview

Reply #9

Quote from: meetdilip – @nend , the intension is to give preview of plain links not media links. That's what the mod does ?
It does both, Emanuele's posted example is what it does. If OG information doesn't exist it tries oEmbed and Meta. If the webmaster is lazy and doesn't supply any information in the head then it falls through to a normal link.

Main inspiration when creating this was the sloppy embed mods, you know the ones "Embed something BBC". Then they usually have a huge array just to parse the content. It's like why would I want to go that route to embed stuff when there are frameworks and standards available.

Re: Link Preview

Reply #10

Quote from: meetdilip – Now that I think of it, how about a custom BB code which will give link preview to a link ? In that case, we can posters can themselves decide whether or not to add a " Link Preview ".
Sort of posted at same time. That's what this modification does.

Quote from: emanuele – that, it kind of... sucks, IMO.
Anyway, addons are possible, so go for it! :P
Missed this. Due to my current situation at SM, I'll not be rewriting it for Elk. However if someone is wanting to use any bit of it or use it as a reference...

Re: Link Preview

Reply #11

Quote from: nend – Due to my current situation at SM
Noticed only now, should I say congratz? :P
Bugs creator.
Features destroyer.
Template killer.

Re: Link Preview

Reply #12

What's wrong ? Elk developers are not welcome at SM ?

Re: Link Preview

Reply #13

Well, I know how it feels, and not because it's SMF, but just because it is strange to contribute to two projects that shared what Elk and SMF share.
On the other hands, others like live627 have ported their mods even while being on the SMF team, so it's not that stranage, just a personal choice. Completely understandable. ;)
Bugs creator.
Features destroyer.
Template killer.

Re: Link Preview

Reply #14

Yeah it's more personal. I haven't looked at what changed in the two systems, so there's the learning curve. If I take on something else, then I have to take time away from other things.