• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Extending media presentation
 

Extending media presentation

on

  • 547 views

 

Statistics

Views

Total Views
547
Views on SlideShare
436
Embed Views
111

Actions

Likes
0
Downloads
1
Comments
0

6 Embeds 111

http://blog.wearepropeople.com 56
http://wearepropeople.com 50
http://propeopledev.devcloud.acquia-sites.com 2
http://wap.propeople.com.ua 1
http://propeopletest.devcloud.acquia-sites.com 1
http://wearepropeople.se 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Extending media presentation Extending media presentation Presentation Transcript

    • Extending Media Module Improve your web authors experience by Alexei Gorobets www.wearepropeople.com
    • Long time ago in a galaxy far far away… www.wearepropeople.com
    • How do you manage media in Drupal? www.wearepropeople.com
    • Administrator •  Many modules to use, every module with it s own features •  Complex for new users, no simple solutions •  No way to integrate all solutions with WYSIWYG •  Training required in most cases •  No way to reuse uploaded content www.wearepropeople.com
    • Developer •  Every module provides it s own solution for the problem •  Many new field typex and many new widgets for the same idea •  Tons of modules that implement the same in different aspects •  No way to manage your files in cloud (S3, CDN) •  No consistent API to extend existing solutions www.wearepropeople.com
    • Where is the user is this maze? www.wearepropeople.com
    • Let’s be honest… It’s Wordpress 2.7 released in 2008 www.wearepropeople.com
    • Let’s be honest… It’s Drupal 7 in January 2011 www.wearepropeople.com
    • Here comes Media Module www.wearepropeople.com
    • First… Get use of D7 new Entity API to create File entity www.wearepropeople.com
    • Second… Make file types (Image, File,Video, Text) as entity bundles and they are fieldable www.wearepropeople.com
    • More… •  Integrate files in WYSIWYG •  Reuse your files by browsing your Library •  Use different formatters to display your files •  Consistent API to extend for developers •  Use StreamWrappers from D7 www.wearepropeople.com
    • StreamWrappers? •  Use url like s3:// and youtube:// to access remote files •  Remote and local files are treated the same way •  Easy way to add new wrappers www.wearepropeople.com
    • Looks better? www.wearepropeople.com
    • Insert into WYSIWYG www.wearepropeople.com
    • Upload new or select from library www.wearepropeople.com
    • Select a formatter www.wearepropeople.com
    • Image inserted www.wearepropeople.com
    • How it’s handled behind the scenes www.wearepropeople.com
    • Every tab is a plugin. Create your own! www.wearepropeople.com
    • Different file types! www.wearepropeople.com
    • Fieldable file types! www.wearepropeople.com
    • But! Most valuable is the API!www.wearepropeople.com
    • Create your Media Browser from Viewswww.wearepropeople.com
    • Create your Media Browser from Viewswww.wearepropeople.com
    • or create a class…www.wearepropeople.com
    • For example:www.wearepropeople.com
    • Meet hook_media_browser_plugins_alter(). www.wearepropeople.com
    • Add upload forms for each media browserwww.wearepropeople.com
    • Add upload forms for each media browserwww.wearepropeople.com
    • What else? Back to Wordpress! www.wearepropeople.com
    • We want to edit file attributes on file upload •  Set a proper file name •  Assign OG audience to the file •  Set other usefull attributes www.wearepropeople.com
    • Let’s alter the forms Set our submit callback instead of default www.wearepropeople.com
    • Let’s alter the forms Set redirects using media-popup setting in query www.wearepropeople.com
    • Let’s alter the forms Alter file attributes form, remove fields, make Cancel button work! www.wearepropeople.com
    • Let’s go for a demo! www.wearepropeople.com
    • Questions? www.wearepropeople.com
    • Thanks! www.wearepropeople.com