SlideShare una empresa de Scribd logo
1 de 53
Descargar para leer sin conexión
Building Custom
CMS Applications
on WordPress
mitcho (Michael   貴 Erlewine)
THIS GUY    mitcho.com
DOWN HERE


            @themitcho
            slideshare.net/mitcho
CMS
There’s no such
thing as a CMS
success story.
The	
  Trouble	
  With	
  Back-­‐Ends
Erin	
  Griffith,	
  Adweek,	
  August	
  9,	
  2011
adweek.com/print/133917
CMS
it’s all about the C and M
FALSE
CC-BY-NC-SA flickr.com/photos/13382424@N00/5216424459/
Today:
1. Content
   C
2. Management
   M
1. Content
The essence of man is
discontent, divine discontent...

     the essence of web is
   content, divine content.




      José Ortega y Gasset
1. Content

    what     is the content?
             is the metadata?
   where     is the data?
Text?
That’s so 2000s.
Global Shakespeares
MIT Shakespeare Project
 globalshakespeares.org
Hundreds of productions with video
Document Revisions by Ben Balter
wordpress.org/extend/plugins/wp-document-revisions
pressfs by Joseph Scott
josephscott.org/pressfs-a-wordpress-filesystem
Build features
not post types
In development: Shakespeare scripts
Scripts are XML files, not content text in WordPress
                 No editor needed
Registering scripts

register_post_type('script', array(
	 'label' => 'Scripts',               instead of ‘editor’
	 'public' => true,
	 'hierarchical' => false,
	 'supports' => array('title', 'xmldoc', 'comments'),
	 'taxonomies' => array('post_tag')
));



    XML Documents with XSLT stylesheets
  wordpress.org/extend/plugins/xml-documents
Post Type Features
 post type                        features
              title, editor, author, thumbnail, excerpt, trackbacks,
    post        custom-fields, comments, revisions, post-formats

              title, editor, author, thumbnail, page-attributes,
   page               custom-fields, comments, revisions


 attachment                      comments

  default                      title, editor
Check for features


if if ( 'script' == $post_type
// ( 'script' == $post_type ) )
if ( post_type_supports( $post_type, 'xmldoc' ) )
Get meta.
Define your metadata.
metadata in WordPress


    {
  taxonomy
organizational
search, sorting
can be hierarchical
                         post meta
                        non-organizational
                        specific to the
                        content item
like tags, categories   like custom fields
CC BY-NC-SA flickr.com/photos/w3p706/2432014896/




http://ottopress.com/2011/when-
 to-not-use-a-custom-taxonomy/
Taxonomy Queries
query_posts( array(
   'post_type' => 'production',
   'tax_query' => array(
     array(
        'taxonomy' => 'play',
	      'terms' => array( 'hamlet' ),
	      'field' => 'slug'
     ),
     array(
        'taxonomy' => 'language',
	      'terms' => array( 'japanese', 'mandarin' ),
	      'field' => 'slug'
     )
   )
);
WordPress
is not an island
Edgerton Digital Collections
MIT Museum and MIT Edgerton Center
http://edgerton-digital-collections.org
12000 photos, 8000 notebook pages
All assets from the MIT Museum database
in MIMSY, a commercial collection management app
Edgerton

• Custom post type for museum assets
 • Specify ID, get image and metadata
     from museum DB
 •   Site-specific metadata (comments,
     tags) in WordPress
Remote data


• Hit external APIs with wp_remote_request()
    and friends
•   Cache results in Post Meta, Object Cache,
    Transients, as appropriate
Search integration


• Simple trick: put searchable text
    versions of custom content in
    post_content
•   Roll out a separate search
1. Content

    what     is the content?
             is the metadata?
   where     is the data?
2. Management
2. Management

   who   contributes/edits/
         curates/maintains it?
   how   will it be managed?
Who’s who?
Work for the weekend
add_filter( 'user_has_cap', 'workweek', 10, 3 );

function workweek( $allcaps, $caps, $args ) {
  $user = get_userdata( $args[1] );
  $weekend = ( date( 'N' ) > 5 );
  if ( $args[0] == 'publish_posts' &&
       $user->user_email = 'jane@automattic.com' &&
       $weekend )
    $allcaps['publish_posts'] = false;
  return $allcaps;
}
Keep It Simple,
Smartypants.
Shakespeare: rich metadata on each production
Production metadata consolidated into one meta box
Use add_meta_box(), intercept data with ‘save_post’ filter.
KISS

add_filter( 'default_hidden_meta_boxes',
   function( $hidden ) {
     $hidden[] = 'myboxid';
     $hidden[] = 'anotherboxid';
     //...
     return $hidden;
   }
);
The right tool (?)
for the job
Shakespeare: some video data
submitted by researchers in Excel format
Solution: a simple (custom) CSV file importer
Insert the post
$id = wp_insert_post( array(
  'post_title' => 'WP Hamlet',
  'post_status' => 'publish',
  'post_type' => 'production',
  'tax_input' => array(
     'play' => 'hamlet',
     'director' => 'matt-mullenweg',
     'language' => 'php' )
) );


Add post meta separately.
NING:
WA   R

• This is a balancing act
 • Moving to WordPress can be a great
     way to build new sustainable habits
 •   Not all traditions are constructive
what    is the content?
        is the metadata?
where   is the data?
who     contributes/edits/
        curates/maintains it?
how     will it be managed?
kick-ass CMS applications
Discontent is the first step in the progress of a man or nation...
   content is the first concern in the progress of a website.




Oscar Wilde
thank you.
                     Q?
mitcho (Michael       貴 Erlewine)
mitcho.com; @themitcho; slideshare.net/mitcho

Más contenido relacionado

La actualidad más candente

An introduction to jQuery
An introduction to jQueryAn introduction to jQuery
An introduction to jQueryJames Wragg
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery FundamentalsGil Fink
 
An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 StoragePaul Irish
 
Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9Jack Franklin
 
A Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETA Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETJames Johnson
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterpriseDave Artz
 
State of jQuery and Drupal
State of jQuery and DrupalState of jQuery and Drupal
State of jQuery and Drupaljeresig
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutesSimon Willison
 
Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)jeresig
 
Bcblackpool jquery tips
Bcblackpool jquery tipsBcblackpool jquery tips
Bcblackpool jquery tipsJack Franklin
 
jQuery and_drupal
jQuery and_drupaljQuery and_drupal
jQuery and_drupalBlackCatWeb
 
Geodaten & Drupal 7
Geodaten & Drupal 7Geodaten & Drupal 7
Geodaten & Drupal 7Michael Milz
 
So long, jQuery, and thanks for all the fish!
So long, jQuery, and thanks for all the fish!So long, jQuery, and thanks for all the fish!
So long, jQuery, and thanks for all the fish!Matt Turnure
 
Contextual jQuery
Contextual jQueryContextual jQuery
Contextual jQueryDoug Neiner
 
A Rich Web Experience with jQuery, Ajax and .NET
A Rich Web Experience with jQuery, Ajax and .NETA Rich Web Experience with jQuery, Ajax and .NET
A Rich Web Experience with jQuery, Ajax and .NETJames Johnson
 
Auto tools
Auto toolsAuto tools
Auto tools祺 周
 

La actualidad más candente (20)

An introduction to jQuery
An introduction to jQueryAn introduction to jQuery
An introduction to jQuery
 
Jquery
JqueryJquery
Jquery
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery Fundamentals
 
Drupal, meet Assetic
Drupal, meet AsseticDrupal, meet Assetic
Drupal, meet Assetic
 
An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 Storage
 
The jQuery Library
The  jQuery LibraryThe  jQuery Library
The jQuery Library
 
Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9
 
A Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETA Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NET
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
State of jQuery and Drupal
State of jQuery and DrupalState of jQuery and Drupal
State of jQuery and Drupal
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutes
 
Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)
 
Bcblackpool jquery tips
Bcblackpool jquery tipsBcblackpool jquery tips
Bcblackpool jquery tips
 
jQuery and_drupal
jQuery and_drupaljQuery and_drupal
jQuery and_drupal
 
jQuery Best Practice
jQuery Best Practice jQuery Best Practice
jQuery Best Practice
 
Geodaten & Drupal 7
Geodaten & Drupal 7Geodaten & Drupal 7
Geodaten & Drupal 7
 
So long, jQuery, and thanks for all the fish!
So long, jQuery, and thanks for all the fish!So long, jQuery, and thanks for all the fish!
So long, jQuery, and thanks for all the fish!
 
Contextual jQuery
Contextual jQueryContextual jQuery
Contextual jQuery
 
A Rich Web Experience with jQuery, Ajax and .NET
A Rich Web Experience with jQuery, Ajax and .NETA Rich Web Experience with jQuery, Ajax and .NET
A Rich Web Experience with jQuery, Ajax and .NET
 
Auto tools
Auto toolsAuto tools
Auto tools
 

Destacado

Wykorzystanie możliwości ekranu personalizacji motywu - WordUp Łódź
Wykorzystanie możliwości ekranu personalizacji motywu - WordUp ŁódźWykorzystanie możliwości ekranu personalizacji motywu - WordUp Łódź
Wykorzystanie możliwości ekranu personalizacji motywu - WordUp ŁódźTomasz Dziuda
 
check pdf preview
check pdf previewcheck pdf preview
check pdf previewVictor Paul
 
Ruby on Rails Tutorial
Ruby on Rails TutorialRuby on Rails Tutorial
Ruby on Rails TutorialKen Iiboshi
 
WordPress 4.0 - co nowego dla programistów?
WordPress 4.0 - co nowego dla programistów?WordPress 4.0 - co nowego dla programistów?
WordPress 4.0 - co nowego dla programistów?Tomasz Dziuda
 
Code Igniter + Ext JS
Code Igniter + Ext JSCode Igniter + Ext JS
Code Igniter + Ext JSCrysfel Villa
 
Advanced Wordpress Queries
Advanced Wordpress QueriesAdvanced Wordpress Queries
Advanced Wordpress QueriesiMasters
 
WordPress at Web Content Mavens (Jan. 2011)
WordPress at Web Content Mavens (Jan. 2011)WordPress at Web Content Mavens (Jan. 2011)
WordPress at Web Content Mavens (Jan. 2011)andrewnacin
 
Brad Williams - Building Maritime Capabilities 2010
Brad Williams - Building Maritime Capabilities 2010Brad Williams - Building Maritime Capabilities 2010
Brad Williams - Building Maritime Capabilities 2010NASBLA
 

Destacado (10)

Wykorzystanie możliwości ekranu personalizacji motywu - WordUp Łódź
Wykorzystanie możliwości ekranu personalizacji motywu - WordUp ŁódźWykorzystanie możliwości ekranu personalizacji motywu - WordUp Łódź
Wykorzystanie możliwości ekranu personalizacji motywu - WordUp Łódź
 
check pdf preview
check pdf previewcheck pdf preview
check pdf preview
 
Ruby on Rails Tutorial
Ruby on Rails TutorialRuby on Rails Tutorial
Ruby on Rails Tutorial
 
WordPress 4.0 - co nowego dla programistów?
WordPress 4.0 - co nowego dla programistów?WordPress 4.0 - co nowego dla programistów?
WordPress 4.0 - co nowego dla programistów?
 
Code Igniter + Ext JS
Code Igniter + Ext JSCode Igniter + Ext JS
Code Igniter + Ext JS
 
Advanced Wordpress Queries
Advanced Wordpress QueriesAdvanced Wordpress Queries
Advanced Wordpress Queries
 
WordPress at Web Content Mavens (Jan. 2011)
WordPress at Web Content Mavens (Jan. 2011)WordPress at Web Content Mavens (Jan. 2011)
WordPress at Web Content Mavens (Jan. 2011)
 
Daj się wyręczyć
Daj się wyręczyćDaj się wyręczyć
Daj się wyręczyć
 
Brad Williams - Building Maritime Capabilities 2010
Brad Williams - Building Maritime Capabilities 2010Brad Williams - Building Maritime Capabilities 2010
Brad Williams - Building Maritime Capabilities 2010
 
Offical
OfficalOffical
Offical
 

Similar a CMS content

WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkExove
 
WordPress for developers - phpday 2011
WordPress for developers -  phpday 2011WordPress for developers -  phpday 2011
WordPress for developers - phpday 2011Maurizio Pelizzone
 
WordPress Plugins: ur doin it wrong
WordPress Plugins: ur doin it wrongWordPress Plugins: ur doin it wrong
WordPress Plugins: ur doin it wrongWill Norris
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress WebsitesKyle Cearley
 
Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)Tarunsingh198
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your CodeDrupalDay
 
Pyconie 2012
Pyconie 2012Pyconie 2012
Pyconie 2012Yaqi Zhao
 
WordPress Internationalization and Localization - WordPress Translation Day 3...
WordPress Internationalization and Localization - WordPress Translation Day 3...WordPress Internationalization and Localization - WordPress Translation Day 3...
WordPress Internationalization and Localization - WordPress Translation Day 3...WordPress Trivandrum
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1Yoav Farhi
 
Custom content types & custom taxonomies in wordpress
Custom content types & custom taxonomies in wordpressCustom content types & custom taxonomies in wordpress
Custom content types & custom taxonomies in wordpressstimasoft
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup PerformanceJustin Cataldo
 
WordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsWordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsTomAuger
 
WordPress Building Better Relationships
WordPress Building Better RelationshipsWordPress Building Better Relationships
WordPress Building Better RelationshipsGregory Cornelius
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017Amanda Giles
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)Doris Chen
 
Scaling Complexity in WordPress Enterprise Apps
Scaling Complexity in WordPress Enterprise AppsScaling Complexity in WordPress Enterprise Apps
Scaling Complexity in WordPress Enterprise AppsMike Schinkel
 

Similar a CMS content (20)

WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a Framework
 
WordPress for developers - phpday 2011
WordPress for developers -  phpday 2011WordPress for developers -  phpday 2011
WordPress for developers - phpday 2011
 
WordPress Plugins: ur doin it wrong
WordPress Plugins: ur doin it wrongWordPress Plugins: ur doin it wrong
WordPress Plugins: ur doin it wrong
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Pyconie 2012
Pyconie 2012Pyconie 2012
Pyconie 2012
 
WordPress Internationalization and Localization - WordPress Translation Day 3...
WordPress Internationalization and Localization - WordPress Translation Day 3...WordPress Internationalization and Localization - WordPress Translation Day 3...
WordPress Internationalization and Localization - WordPress Translation Day 3...
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
 
Custom content types & custom taxonomies in wordpress
Custom content types & custom taxonomies in wordpressCustom content types & custom taxonomies in wordpress
Custom content types & custom taxonomies in wordpress
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
 
Real World MVC
Real World MVCReal World MVC
Real World MVC
 
WordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsWordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big words
 
WordPress Building Better Relationships
WordPress Building Better RelationshipsWordPress Building Better Relationships
WordPress Building Better Relationships
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
Separation of concerns - DPC12
Separation of concerns - DPC12Separation of concerns - DPC12
Separation of concerns - DPC12
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
Scaling Complexity in WordPress Enterprise Apps
Scaling Complexity in WordPress Enterprise AppsScaling Complexity in WordPress Enterprise Apps
Scaling Complexity in WordPress Enterprise Apps
 

Más de iemail808

Más de iemail808 (11)

zprod2
zprod2zprod2
zprod2
 
z2
z2z2
z2
 
o4
o4o4
o4
 
o3
o3o3
o3
 
o1
o1o1
o1
 
a1
a1a1
a1
 
iii
iiiiii
iii
 
img
imgimg
img
 
pps images
pps imagespps images
pps images
 
my forrester
my forrestermy forrester
my forrester
 
System recoverymanual multilanguage_v1.1
System recoverymanual multilanguage_v1.1System recoverymanual multilanguage_v1.1
System recoverymanual multilanguage_v1.1
 

CMS content