[Week 8] Adding three new bundles!

Hello everyone!

I have already mentioned in my introduction blog post about the media module for Drupal 8 on which I was working on with Janez Urevc (​slashrsm) and Tadej Baša (​paranojik) under Google Summer Of Code 2016.

In week 8, I finished working on three new bundles: Document, Twitter and Instagram. Yes that’s right, you can now easily embed twitter tweets and instagram posts in your Drupal site! Let’s get into more details!

1) Document Bundle: The document bundle will allow users to upload documents of various types such as PDF, PPTX, DOCX, XLSX etc on Drupal websites. The bundle also ships with 12 file icon types for most used document types. And moreover, its easy as ABC to add new icons in the bundle. All you need to do is rename your icon file with its mimetype and then copy to the right directory.

For example: A new icon for text file should be named text-plain.png because the mimetype for text files is text/plain. Then you need to move this file to the icon-base directory defined in media entity. By default this directory is /sites/default/files/media-icons/generic/

You can find the pull request for the bundle here.

2) Twitter Bundle: The twitter bundle allows users to embed tweets in the drupal site using the Tweet URL. You just need to copy the URL of the tweet and create a new Tweet type media item to embed the tweet. Here is the pull request for twitter bundle.

3) Instagram Bundle: Just like the Twitter bundle, the instagram bundle allows the users to embed instagram posts in the drupal website. One just needs to copy the url of the image and create a new Instagram Type media item to embed the post. Here is the pull request for the same.

Here is how the media library looks with the three new bundles:
download.png

And yes, one can easily add these bundle items to a gallery as well.

The GSoC project submission deadlines (15Aug - 23Aug) are approaching closer and three major tasks are still left:

1) Implement the embedding of media items in WYSIWYG editor.
2) Implement cropping functionality for uploaded images.
3) Create documentation and tutorial videos for the media module.

This week I’ll be working on the entity embed functionality and would post the updates next week! Stay tuned!

:)

 
1
Kudos
 
1
Kudos

Now read this

[Week 6] Fixing media library Entity Browser

Hello Drupalers! You must have already read my introduction blog post about the media module for Drupal 8 on which I was working on with Janez Urevc (slashrsm) and Tadej Baša (paranojik) under Google Summer Of Code 2016. Last week I... Continue →