link-roundups icon indicating copy to clipboard operation
link-roundups copied to clipboard

Saved Links: alternatives to open graph for link description

Open aschweigert opened this issue 10 years ago • 7 comments

Apparently the bookmarklet used to let a user select a quote from a story and then use the selected text as the link description. This no longer works because (as far as I can tell) we're now only looking at the open graph description.

We should also probably consider falling back to the meta description tag if the open graph tag is not present.

So, in order or priority:

  1. Use selected text as the link description
  2. If no text is selected, try open graph, if we find it, use that
  3. if we don't find an open graph tag, look for a meta description tag
  4. if found, use that
  5. if none of those ¯(ツ)

aschweigert avatar Aug 13 '15 17:08 aschweigert

Is the $selection = ' '; supposed to lack a self:? All the other attributes have it: https://github.com/INN/link-roundups/blob/master/inc/lroundups/browser-bookmark.php#L165-L177

0aveRyan avatar Aug 19 '15 15:08 0aveRyan

hm...i'm guessing that might be the issue, did you try adding it to see if that makes it work?

aschweigert avatar Aug 19 '15 16:08 aschweigert

gonna give it a shot now. it might be different because that $selection isn't coming via the scraper? haven't looked close enough yet. and still haven't found where the selected value is being passed.

0aveRyan avatar Aug 19 '15 16:08 0aveRyan

:grimacing: causes a fatal error so that's not it...

0aveRyan avatar Aug 19 '15 16:08 0aveRyan

it was a good guess

aschweigert avatar Aug 19 '15 16:08 aschweigert

@dryanmedia if you used self: instead of self:: that would cause a fatal error.

You'll also need to update any lines referencing $selection to use self::$selection instead.

rnagle avatar Aug 19 '15 16:08 rnagle

Yep still causes fatal error.

Here's the old argo-links code where the selection was passed. there was some kind of vimeo embed thing too. https://github.com/argoproject/argo-links/blob/master/argo-this.php#L378

Then this is where that was set as selection or something else. We're missing something that does this. https://github.com/argoproject/argo-links/blob/master/argo-this.php#L579-L590

0aveRyan avatar Aug 19 '15 16:08 0aveRyan