mglaman,
@mglaman@phpc.social avatar

For my blog, I wrote a media type source plugin that allows adding rich embeds of links (like on social platforms.)

Should I turn it into a contrib module? I call them "Embed links", I'm not sure what the project would be named.

mandclu,
@mandclu@drupal.community avatar

@mglaman At a minimum this would be great as a sandbox project

mglaman,
@mglaman@phpc.social avatar

@mandclu but, even sandbox need a name 🤔

DaleTrexel,
@DaleTrexel@drupal.community avatar

@mglaman @mandclu Are you thinking that "Embed Links" might be too generic?

"Social Embed Links" is a bit more descriptive, but is that too specific for your application?

"Rich Embed Links" actually has a good ring to it: you're adding a link that's enhanced with additional display elements.

mglaman,
@mglaman@phpc.social avatar

@DaleTrexel @mandclu I was thinking "Rich" should be in the name, and "Rich Links" is probably too generic. Unless media_rich_links

DaleTrexel,
@DaleTrexel@drupal.community avatar

@mglaman We already use "media" to refer to files (images, video, sound), whether local or remote, so that might be confusing.

If you're linking to general "content" that could be social media posts or web pages, maybe you'd want something like:

  • Content Preview Links
  • Content Embed Links
  • Content Rich Links

"Rich Content Links" reads better to me, but I could see you wanting the name to start with the object, followed by modifiers in this case.

mglaman,
@mglaman@phpc.social avatar

@DaleTrexel I was thinking the media prefix in machine name since it's for the media module.

The display name could be "Media: Content Embed Links"

or just call it "Media: Embed Links", media_embed_links and call it a day

DaleTrexel,
@DaleTrexel@drupal.community avatar

@mglaman Ah right, that makes sense!

DaleTrexel,
@DaleTrexel@drupal.community avatar

@mglaman I like it! It would be good to have something like that which is agnostic of specific platforms.

What are you looking at for metadata to identify things like title, feature image, etc.?

mglaman,
@mglaman@phpc.social avatar

@DaleTrexel I use the embed/embed library, which normalizes open graph and other metadata. It's really simplistic

$embed_link = (new Embed)->get($media_url);

return match ($name) {
'default_name', 'title' => $embed_link->title,
'url' => $media_url,
'description' => $embed_link->description,
'image' => $embed_link->image,
default => null,
};

DaleTrexel,
@DaleTrexel@drupal.community avatar

@mglaman Nice! I was trying to imagine doing a DIY of all the platform-specific formats out there on top of opengraph and thinking that could be a deep rabbit hole to chase down.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • tacticalgear
  • DreamBathrooms
  • cisconetworking
  • magazineikmin
  • InstantRegret
  • Durango
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • mdbf
  • khanakhh
  • kavyap
  • everett
  • provamag3
  • modclub
  • Leos
  • cubers
  • ngwrru68w68
  • ethstaker
  • osvaldo12
  • GTA5RPClips
  • anitta
  • megavids
  • normalnudes
  • tester
  • JUstTest
  • lostlight
  • All magazines