Integrating 
Files 
Into D7 Authoring Workflow 
Matt Mendonca
Me 
IT Specialist (i.e. Web Developer) at the 
Institute of Standards and Technology 
Previously a Developer at 
(FleishmanHillard) and 
High Rock Studios 
National 
VOX Global 
2+ years professional experience with Drupal
You May Recall 
John Venable from NIST presented last month. 
(he is exceptionally tall)
True Story... 
I am taller than John. 
(in certain circumstances)
Moving Along...
Contents 
What are we trying to do 
How we are doing it 
Questions 
Demo
What Are We Trying 
To Do 
In the process of moving from CommonSpot to 
Drupal. We need to meet or exceed CommonSpot's 
features. 
Fieldable files 
Revisionable files 
Add files from and insert files into the WYSIWYG
How are we doing it 
Media module and... 
First implementation: John let's just use a file field 
Actual first implementation: custom module(s) 
https://github.com/matt-mendonca/ck-browser 
Don't actually use it; you've been warned 
Current implementation: Media 7.x-2.0, and others, 
complemented by custom modules
Living Dangerously 
You're about to hear stuff like "dev branch" and 
"patch" - Media handling in Drupal is in flux. 
Don't do this unless you are comfortable blowing 
things up and fixing it.
Contrib Modules 
Media 7.x-2.0-alpha3 
File Entiy 7.x-2.0-alpha3 
File entity Revisions 7.x-1.x-dev (and patches) 
Rabbit Hole (files) 7.x-2.23 (and patch) 
WYSIWYG 7.x-2.x-dev
Media 
https://www.drupal.org/project/media 
Provides a framework for handling files, images, 
videos, etc 
Using 2.0-alpha over 1.x stable because of the file 
entity module 
Dev branch tends to break frequently 
"...New is always better[, Ted]."
File Entity 
https://www.drupal.org/project/file_entity 
Adds an entity for files. Allows you to field files like 
you would nodes, users, etc 
Using 2.0-alpha; it is the most stable release
File Entity Revisions 
https://www.drupal.org/project/file_entity 
Kind of a mess right now, however, it allows file 
entities to have revisions 
Using latest dev ( makes the actual file revisonable 
) 
and these patches: 
Add a revisions tab to files: 
https://www.drupal.org/node/2097975 
Set the default revision status for file types: 
https://www.drupal.org/node/2259049
Rabbit Hole 
https://www.drupal.org/project/rabbit_hole 
Allows us to redirect anonymous users directly to 
the file from the file entity 
Doesn't tie us to a layout solution (panels could do this too) 
Using latest stable and the following patch: 
Undefined index on file entity form: 
https://www.drupal.org/node/2315761
WYSIWYG 
https://www.drupal.org/project/WYSIWYG 
Adds a WYSIWYG 
Not using CK Editor module because it breaks 
with Media 2 
We are using the CK Editor text editor 
Using latest dev of module since it supports recent 
versions of CK Editor
Custom Modules 
File Entity Link Display Mode 
Media Browser Override
File Entity Link Display 
Mode 
https://github.com/matt-mendonca/ 
file_entity_link_display_mode 
Adds a display mode for file entities that links to the 
file entity, not the file itself.
Media Browser 
Override 
https://github.com/matt-mendonca/ 
media_browser_override 
Overrides (as cleanly as possible) some of Media 2's 
media browser WYSIWYG plugin functionality. 
Default to WYSIWYG display format 
Skip view mode form in the media browser 
Alter media browser plugin js
How everything fits 
together 
Media provides the ground work 
Media browser WYSIWYG plugin (part of Media 2) allows us to 
add and insert media from a wyswiwyg 
File Entity and File Entity Revisions lets us interact 
with files like nodes 
Rabbit Hole allows us to have a link to the file that 
will always (within reason) be correct 
Custom modules fill in the gaps
Questions?
<shameless-plug> 
podium js 
</shameless-plug>
Demo

Integrating Files Into Drupal 7 Authoring Workflow

  • 1.
    Integrating Files IntoD7 Authoring Workflow Matt Mendonca
  • 2.
    Me IT Specialist(i.e. Web Developer) at the Institute of Standards and Technology Previously a Developer at (FleishmanHillard) and High Rock Studios National VOX Global 2+ years professional experience with Drupal
  • 3.
    You May Recall John Venable from NIST presented last month. (he is exceptionally tall)
  • 4.
    True Story... Iam taller than John. (in certain circumstances)
  • 5.
  • 6.
    Contents What arewe trying to do How we are doing it Questions Demo
  • 7.
    What Are WeTrying To Do In the process of moving from CommonSpot to Drupal. We need to meet or exceed CommonSpot's features. Fieldable files Revisionable files Add files from and insert files into the WYSIWYG
  • 8.
    How are wedoing it Media module and... First implementation: John let's just use a file field Actual first implementation: custom module(s) https://github.com/matt-mendonca/ck-browser Don't actually use it; you've been warned Current implementation: Media 7.x-2.0, and others, complemented by custom modules
  • 9.
    Living Dangerously You'reabout to hear stuff like "dev branch" and "patch" - Media handling in Drupal is in flux. Don't do this unless you are comfortable blowing things up and fixing it.
  • 10.
    Contrib Modules Media7.x-2.0-alpha3 File Entiy 7.x-2.0-alpha3 File entity Revisions 7.x-1.x-dev (and patches) Rabbit Hole (files) 7.x-2.23 (and patch) WYSIWYG 7.x-2.x-dev
  • 11.
    Media https://www.drupal.org/project/media Providesa framework for handling files, images, videos, etc Using 2.0-alpha over 1.x stable because of the file entity module Dev branch tends to break frequently "...New is always better[, Ted]."
  • 12.
    File Entity https://www.drupal.org/project/file_entity Adds an entity for files. Allows you to field files like you would nodes, users, etc Using 2.0-alpha; it is the most stable release
  • 13.
    File Entity Revisions https://www.drupal.org/project/file_entity Kind of a mess right now, however, it allows file entities to have revisions Using latest dev ( makes the actual file revisonable ) and these patches: Add a revisions tab to files: https://www.drupal.org/node/2097975 Set the default revision status for file types: https://www.drupal.org/node/2259049
  • 14.
    Rabbit Hole https://www.drupal.org/project/rabbit_hole Allows us to redirect anonymous users directly to the file from the file entity Doesn't tie us to a layout solution (panels could do this too) Using latest stable and the following patch: Undefined index on file entity form: https://www.drupal.org/node/2315761
  • 15.
    WYSIWYG https://www.drupal.org/project/WYSIWYG Addsa WYSIWYG Not using CK Editor module because it breaks with Media 2 We are using the CK Editor text editor Using latest dev of module since it supports recent versions of CK Editor
  • 16.
    Custom Modules FileEntity Link Display Mode Media Browser Override
  • 17.
    File Entity LinkDisplay Mode https://github.com/matt-mendonca/ file_entity_link_display_mode Adds a display mode for file entities that links to the file entity, not the file itself.
  • 18.
    Media Browser Override https://github.com/matt-mendonca/ media_browser_override Overrides (as cleanly as possible) some of Media 2's media browser WYSIWYG plugin functionality. Default to WYSIWYG display format Skip view mode form in the media browser Alter media browser plugin js
  • 19.
    How everything fits together Media provides the ground work Media browser WYSIWYG plugin (part of Media 2) allows us to add and insert media from a wyswiwyg File Entity and File Entity Revisions lets us interact with files like nodes Rabbit Hole allows us to have a link to the file that will always (within reason) be correct Custom modules fill in the gaps
  • 20.
  • 21.
    <shameless-plug> podium js </shameless-plug>
  • 22.