Integrating Files Into Drupal 7 Authoring Workflow

22
Integrating Files Into D7 Authoring Workflow Matt Mendonca

description

 

Transcript of Integrating Files Into Drupal 7 Authoring Workflow

Page 1: Integrating Files Into Drupal 7 Authoring Workflow

Integrating

FilesInto D7 Authoring Workflow

Matt Mendonca

Page 2: Integrating Files Into Drupal 7 Authoring Workflow

MeIT Specialist (i.e. Web Developer) at the

Previously a Developer at and

2+ years professional experience with Drupal

NationalInstitute of Standards and Technology

VOX Global(FleishmanHillard) High Rock Studios

Page 3: Integrating Files Into Drupal 7 Authoring Workflow

You May RecallJohn Venable from NIST presented last month.

(he is exceptionally tall)

Page 4: Integrating Files Into Drupal 7 Authoring Workflow

True Story...I am taller than John.

(in certain circumstances)

Page 5: Integrating Files Into Drupal 7 Authoring Workflow

Moving Along...

Page 6: Integrating Files Into Drupal 7 Authoring Workflow

ContentsWhat are we trying to do

How we are doing it

Questions

Demo

Page 7: Integrating Files Into Drupal 7 Authoring Workflow

What Are We TryingTo Do

In the process of moving from CommonSpot toDrupal. We need to meet or exceed CommonSpot's

features.Fieldable files

Revisionable files

Add files from and insert files into the WYSIWYG

Page 8: Integrating Files Into Drupal 7 Authoring Workflow

How are we doing itMedia module and...

First implementation: John let's just use a file field

Actual first implementation: custom module(s)

Don't actually use it; you've been warned

Current implementation: Media 7.x-2.0, and others,complemented by custom modules

https://github.com/matt-mendonca/ck-browser

Page 9: Integrating Files Into Drupal 7 Authoring Workflow

Living DangerouslyYou'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 blowingthings up and fixing it.

Page 10: Integrating Files Into Drupal 7 Authoring Workflow

Contrib ModulesMedia 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

Page 11: Integrating Files Into Drupal 7 Authoring Workflow

Mediahttps://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 fileentity module

Dev branch tends to break frequently

"...New is always better[, Ted]."

Page 12: Integrating Files Into Drupal 7 Authoring Workflow

File Entityhttps://www.drupal.org/project/file_entity

Adds an entity for files. Allows you to field files likeyou would nodes, users, etc

Using 2.0-alpha; it is the most stable release

Page 13: Integrating Files Into Drupal 7 Authoring Workflow

File Entity Revisionshttps://www.drupal.org/project/file_entity

Kind of a mess right now, however, it allows fileentities to have revisions

Using latest dev ( )and these patches:

Add a revisions tab to files:

Set the default revision status for file types:

makes the actual file revisonable

https://www.drupal.org/node/2097975

https://www.drupal.org/node/2259049

Page 14: Integrating Files Into Drupal 7 Authoring Workflow

Rabbit Holehttps://www.drupal.org/project/rabbit_hole

Allows us to redirect anonymous users directly tothe 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

Page 15: Integrating Files Into Drupal 7 Authoring Workflow

WYSIWYGhttps://www.drupal.org/project/WYSIWYG

Adds a WYSIWYG

We are using the CK Editor text editor

Using latest dev of module since it supports recentversions of CK Editor

Not using CK Editor module because it breakswith Media 2

Page 16: Integrating Files Into Drupal 7 Authoring Workflow

Custom ModulesFile Entity Link Display Mode

Media Browser Override

Page 17: Integrating Files Into Drupal 7 Authoring Workflow

File Entity Link DisplayMode

https://github.com/matt-mendonca/file_entity_link_display_mode

Adds a display mode for file entities that links to thefile entity, not the file itself.

Page 18: Integrating Files Into Drupal 7 Authoring Workflow

Media BrowserOverride

https://github.com/matt-mendonca/media_browser_override

Overrides (as cleanly as possible) some of Media 2'smedia browser WYSIWYG plugin functionality.

Default to WYSIWYG display format

Skip view mode form in the media browser

Alter media browser plugin js

Page 19: Integrating Files Into Drupal 7 Authoring Workflow

How everything fitstogether

Media provides the ground workMedia 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 interactwith files like nodes

Rabbit Hole allows us to have a link to the file thatwill always (within reason) be correct

Custom modules fill in the gaps

Page 20: Integrating Files Into Drupal 7 Authoring Workflow

Questions?

Page 21: Integrating Files Into Drupal 7 Authoring Workflow

<shameless-plug>

podium js</shameless-plug>

Page 22: Integrating Files Into Drupal 7 Authoring Workflow

Demo