SlideShare a Scribd company logo
YouTube in Drupal

                                  Presented by
                                 Aaron Winborn
                           http://aaronwinborn.com/




http://docs.google.com/Present?docid=dgdc84wd_71n583fn82&invite=fc2p23q
Step 1: Celebrate!
YouDrup_in_Drupal
Step 3
Talk it up!
Register the name.
Configure nameservers.
Blog about it.
Research YouTube fonts for awhile.
Install file system and configure the database.
Talk it up some more!


                          Time on this step:
                            3.5 hours

                          Real work time:
                            1 hour
Initial Contributed Modules
  CCK -- to create content types
  Views -- to create custom listings
  Flag -- for "QuickLinks" and Promoted/Featured
  Panels -- to create pages
  FileField -- for video uploads
  Embedded Media Field -- for 'YouTube' videos
  jQuery Media -- to make FileField work w/ videos
  Pathauto -- friendly URL's
  Token -- required by Pathauto
  Zen -- the Theme

                                             Time: 0.75
                                             Total: 4.25
Create Content Type




                      Time:
                         0.5
                      Total:
                        4.75
Create node/%nid Panel
Node Panel Context
Initial Panel Content




                 Time to create initial panel: 0.25
                               Troubleshoot: 0.75

                            Total time so far: 5.75
YouDrup_in_Drupal
Front Page Panels

Different pages for Anonymous & Authenticated Users




   global $user;
   if ($user->uid) {
     drupal_goto('panel');
   }

                                                Time: 0.75
                                                 Total: 6.5
YouDrup_in_Drupal
YouDrup_in_Drupal
YouDrup_in_Drupal
Configure 
 jQuery 
  Media
YouDrup_in_Drupal
YouDrup_in_Drupal
YouDrup_in_Drupal
Time: 0.25
Total: 6.75
Create Filler Content
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean
pellentesque. Nulla sed nulla sit amet dolor ultrices dapibus. Fusce
semper. Donec vulputate. Quisque porttitor elit eget nisl. Donec eu
pede et arcu hendrerit egestas. Mauris lacus neque, porttitor at,
vestibulum id, aliquam adipiscing, leo. Curabitur risus pede, euismod
sit amet, vehicula ac, blandit nec, lacus. Etiam bibendum dolor et
magna. Curabitur est risus, cursus sit amet, cursus nec, vestibulum
eget, eros. Vestibulum ante ipsum primis in faucibus orci luctus et
ultrices posuere cubilia Curae; Sed tortor. Vivamus a ipsum eu tortor
commodo elementum. Phasellus blandit, massa in egestas ornare, mi
tortor feugiat arcu, mollis semper tortor nunc in augue. Nulla nec
neque. Aenean porttitor mi nec nunc.



                                                           Time: 1
                                                        Total: 7.75
Create Flags




                Time: 0.5
               Total: 8.25
YouDrup_in_Drupal
Create Video Views
Promoted Block & Page; Featured Block & Page
(Pause for Live Demo)

Views 2 Needs to be Seen!




                             Time: 0.5
                            Total: 8.75
Create Node Panel (Take 2)




                              Time: 0.5
                             Total: 9.25
Debug PHP Errors w/ Node Panel




Time: 2
Total: 10.75
Create New Logo!
(and fav.ico too!)




                         Time: 2
                     Total: 12.75
Initial CSS for Home Panel Pages
body, div#page {
color:#000000;
font-family:Arial,sans-serif;
font-size:12px;
}
a:link, a:visited, a:active {
color:#0033CC;
}

.page-front .view-display-id-block_1 .views-row-odd,
.page-front .view-display-id-block_1 .views-row-even {
float:left;
padding:0 3px;
text-align:center;
width:23%;
margin-bottom:0;
}

.page-front .view-display-id-block_2 .views-row-odd,
.page-front .view-display-id-block_2 .views-row-even {
border-bottom:1px dotted #BBBBBB;
padding-bottom:10px;
margin-top:0 !important;
}




                                                             Time: 3
                                                         Total: 15.75
Initial CSS for Video Node page
#video-panel h2.title {
display:none;
}
#video-panel .node-type-video {
background:#EEEEEE none repeat scroll 0 0;
border:1px solid #CCCCCC;
}
#video-panel .node-type-video .node-inner {
padding: 5px;
}
#video-panel .submitted {
height: 64px;
}
#video-panel .submitted .info a {
font-weight: bold;
text-decoration: none;
}
#video-panel .submitted .info a {
text-decoration: underline;
}
#video-panel .picture {
float:left;
margin-top:6px;
background-color:#FFFFFF;
border:3px double #999999;
display:block;
overflow:hidden;
width: 46px;
height: 46px;
}
                                                  Time: 1
                                              Total: 16.75
Install Media Mover & 
FFMPEG Wrapper




                         Time: 0.25
                           Total: 17
OK, I lied...

Install Media Mover & 
FFMPEG Wrapper




                         Time: 6.25
                           Total: 23
Watch FiveStar Video Tutorial




http://www.lullabot.
com/videocast/building-views-fivestar-
and-votingapi                             Time: 0.25
                                         Total: 23.25
Add FiveStar to Views




                          Time: 0.5
                        Total: 23.75
Roll back Five Star from v.Dev




     (Bleeding edge and all that...)




                                       Time: 0.25
                                         Total: 24
Create Taxonomy View




                        Time: 0.25
                       Total: 24.25
Override Taxonomy View Theme
<?php
// $Id: views-view-fields.tpl.php,v 1.6 2008/09/24 22:48:21 merlinofchaos Exp $
/**
 * @file views-view-fields--video-taxonomy.tpl.php
 * Default simple view template to all the fields as a row.
 *
 * - $view: The view in use.
 * - $fields: an array of $field objects. Each one contains:
 *    - $field->content: The output of the field.
 *    - $field->raw: The raw data for the field, if it exists. This is NOT output safe.
 *    - $field->class: The safe class id to use.
 *    - $field->handler: The Views field handler object controlling this field. Do not use
 *      var_export to dump this object, as it can't handle the recursion.
 *    - $field->inline: Whether or not the field should be inline.
 *    - $field->inline_html: either div or span based on the above flag.
 *    - $field->separator: an optional separator that may appear before a field.
 * - $row: The raw result object from the query, with all data it fetched.
 *
 * @ingroup views_templates
 */
 $extra = (arg(1) && !is_numeric(arg(1))) ? (arg(1) .'/') : '';
?>
<?php print l($fields['name']->content, arg(0) .'/'. $extra . $fields['tid']->content, array
('html' => TRUE)); ?>




                                                                               Time: 0.5
                                                                             Total: 24.75
Add Primary Menu & Play with CSS




                                 Time: 2
                             Total: 26.75
Make Primary Menu Active 
for Video Nodes

function phptemplate_links($links, $attributes = array('class' => 'links')) {
  // ...
  if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' &&
drupal_is_front_page()) || (($link['href'] == '<front>') && ($_GET['q'] == 'panel')))) {
         $class .= ' active';
      }
      else if ($link['href'] == 'browse' && arg(0) == 'node' && arg(1) && is_numeric(arg(1)))
{
         $node = node_load(arg(1));
         if ($node->type == 'video') {
           $class .= ' active';
         }
      }
      else if ($link['href'] == 'browse' && arg(0) == 'taxonomy') {
         $class .= ' active';
      }
   }
  // ...
}



                                                                              Time: 0.5
                                                                            Total: 27.25
Make 'Playing Now' Cycler




                                Work time: 0.5
(And Blog about it!)               Blog time: 1
                            Total so far: 28.75
QuickList Flag & Views




                             Time: 2
                         Total: 30.75
CSS for QuickList +/- on Thumbs

/* QuickList flag link */
.views-field-ops {
float: left;
height:0;
}

.flag-quicklist a {
text-indent: -5000px;
height: 25px;
width: 25px;
margin-top:-24px;
display: block;
float: left;
}

.flag-quicklist a.flag-action {
background:transparent url(master-vfl65847.gif) no-repeat scroll -537px 4px;
}

.flag-quicklist a.unflag-action {
background:transparent url(master-vfl65847.gif) no-repeat scroll -587px 4px;
}



                                                                               Time: 2
                                                                           Total: 32.75
User videos at my/videos




                               Time: 1
                           Total: 33.75
Make /user & /my 
Active on Home Menu Tab
      else if ($link['href'] == '<front>' && (in_array(arg(0), array('user', 'my')))) {
        $class .= ' active';
      }
      else if ($link['href'] == 'community' && arg(0) == 'forum') {
        $class .= ' active';
      }
      else if ($link['href'] == 'community' && arg(0) == 'node' && arg(1) && is_numeric(arg
(1))) {
        $node = node_load(arg(1));
        if ($node->type == 'forum') {
          $class .= ' active';
        }




                                                                             Time: 0.25
                                                                               Total: 34
Create Top & Footer Menus




                             Time: 0.25
                            Total: 34.25
CSS for Menus & Nav Bars
/* primary menu */
#primary {
float:right;
height:28px;
list-style-type:none;
margin:0;
padding:5px 0 0;
width:693px;
}
#primary li {
background:transparent url(master-vfl65847.gif) no-repeat scroll 0 -137px;
display:block;
float:left;
margin-right:5px;
padding: 0;
}

#primary li span.leftcap {
background:transparent url(master-vfl65847.gif) no-repeat scroll -152px 0;
display:block;
float:left;
height:28px;
width:5px;
}



                                                                               Time: 0.5
                                                                             Total: 34.75
Advanced Forum Configuration




                                   Time: 1
                               Total: 35.75
Add View Block w/ Forum Listings




                               Time: 0.5
                             Total: 36.25
YouTube Redesign! Yay!




                           Time: 0.5
                         Total: 36.75
Troubleshoot Media Mover




                               Time: 4
                           Total: 40.25
Subscription Button Theming




function youdrup_form_alter(&$form, $form_state, $form_id) {
  // Add spans around subscriptions button for styling.
  if ($form_id == 'subscriptions_ui_node_form') {
    $form['wrapper']['#title'] = '<span class="button-left"></span><span
class="button-text">'. $form['wrapper']['#title'] .'</span><span class="
button-right"></span>';
  }




                                                                             Time: 2.5
                                                                           Total: 42.75
Node Block CSS (and More Link)
// $Id$

function toggle_slider($link) {
//    $link = $('.more-slider').children('.
slider-link').children('a');
   var more = $link.text() == 'more info';    if (Drupal.jsEnabled) {
   if (more) {                                  $(document).ready(function () {
     $link.text('less info');                     $('#content-teaser').show();
     $('#content-full').slideDown();              $('#content-full').hide();
     $('#content-teaser').slideUp();              $section = $('#slider-link');
   }                                              $section.html('(<a href="#" id="slider-link-a"
   else {                                     >more info</a>)');
     $link.text('more info');                     $('#slider-link-a').click(function () {
     $('#content-teaser').slideDown();              toggle_slider($(this));
     $('#content-full').slideUp();                  return false;
   }                                              });
}                                               });
                                                console.log('embed start');
                                                $('.views-field-field-video-youtube-embed a').
                                              each(function (i) {
                                                  console.log('starting...');
                                                  if ($(this).children('img').size() == 0) {
                                                    console.log('embed pass');
                                                    $(this).parent().hide();
                                                  }
                                                });
                                              }
                                                                               Time: 0.5
                                                                             Total: 43.25
jQuery Media
Debug Session
Random bug-hunting...




                          Time: 0.5
                        Total: 43.75
Media Mover Woes

Finally, a live demo!




                        Time: 3.25
                          Total: 47
jQuery UI for Tabs (Fun!)




                             Time: 1.5
                            Total: 48.5
Grab Correct Thumbnails
Problem:
  Blank thumbnail if no Emfield

Solution:
<?php
   if ($row->node_data_field_video_youtube_field_thumbnail_fid) {
     $results = db_query_range("SELECT * FROM {files} WHERE fid = %d", $row-
>node_data_field_video_youtube_field_thumbnail_fid, 0, 1);
     $file = db_fetch_object($results);
     print l(theme('imagecache', 'thumbnail', $file->filepath), 'node/'. $row->nid, array
('html' => TRUE));
   }
   else if ($row->{$field->field_alias}) {
     print $output;
   }
   else {
     print l(theme('image', path_to_theme() .'/video-not-available.png'), 'node/'. $row->nid,
array('html' => TRUE));
   }
?>



                                                                                 Time: 1
                                                                              Total: 49.5
Create Slide Show Presentation

Click to add content... ;)




                                    Time: 4
                                 Total: 53.5
YouDrup_in_Drupal
Celebrate!




     Total Time: 53.5 hours (plus this presentation)
Modules used for YouDrup
Administration Menu      Devel & Devel Generate
Content (CCK):           ImageAPI
  Content Permissions      ImageAPI GD2
  Embedded Media Field   ImageCache
  Embedded Video Field   Media Mover API
  Field Group              FFMPEG Media Mover
  FileField                Media Mover Auto Run
  ImageField               Media Mover CCK
Core modules:              Media Mover Directory
  Menu                   Media Player
  Path                   Advanced Forum
  Search                 FFMPEG Wrapper
  Statistics             Flag
  Update Status          Google Analytics
                          
Modules used (Continued)
jQuery UI               jQuery Update
MimeDetect              jQ
Mollom                  jQuery Media
Pathauto                Views
Service Links             Views UI
Similar by Terms        Voting API
Token                   FiveStar
YouTube API             YouDrup (Custom Module)
Panels
  Panel Pages
  Panels Simple Cache
  Views Panes
Subscriptions
  Subscriptions Mail
  Subscriptions UI
YouTube in Drupal

             Presented by
            Aaron Winborn
      http://aaronwinborn.com/

More Related Content

PDF
Alfredo-PUMEX
PDF
RicoLiveGrid
PDF
td_mxc_rubyrails_shin
KEY
Deploying
KEY
Google
PDF
TurboGears2 Pluggable Applications
KEY
Authentication
PPT
jQuery and_drupal
Alfredo-PUMEX
RicoLiveGrid
td_mxc_rubyrails_shin
Deploying
Google
TurboGears2 Pluggable Applications
Authentication
jQuery and_drupal

What's hot (20)

PDF
Joe Walker Interactivewebsites Cometand Dwr
PPTX
jQuery from the very beginning
PDF
Write Less Do More
PDF
WCLV13 JavaScript
PDF
Remy Sharp The DOM scripting toolkit jQuery
PDF
Learning jQuery in 30 minutes
PPTX
Html5 Overview
PDF
Javascript in Plone
PDF
Hooks WCSD12
PDF
Introducing Assetic: Asset Management for PHP 5.3
PDF
Ajax Performance Tuning and Best Practices
PPT
Render API - Pavel Makhrinsky
KEY
Api Design
PDF
jQuery Essentials
DOCX
SCasia 2018 MSFT hands on session for Azure Batch AI
PDF
jQuery Loves Developers - Oredev 2009
PDF
Symfony & Javascript. Combining the best of two worlds
PDF
12 core technologies you should learn, love, and hate to be a 'real' technocrat
PPT
Corephpcomponentpresentation 1211425966721657-8
PDF
Perl object ?
Joe Walker Interactivewebsites Cometand Dwr
jQuery from the very beginning
Write Less Do More
WCLV13 JavaScript
Remy Sharp The DOM scripting toolkit jQuery
Learning jQuery in 30 minutes
Html5 Overview
Javascript in Plone
Hooks WCSD12
Introducing Assetic: Asset Management for PHP 5.3
Ajax Performance Tuning and Best Practices
Render API - Pavel Makhrinsky
Api Design
jQuery Essentials
SCasia 2018 MSFT hands on session for Azure Batch AI
jQuery Loves Developers - Oredev 2009
Symfony & Javascript. Combining the best of two worlds
12 core technologies you should learn, love, and hate to be a 'real' technocrat
Corephpcomponentpresentation 1211425966721657-8
Perl object ?
Ad

Viewers also liked (8)

PDF
Jeni Intro1 Bab02 Pengenalan Bahasa Java
PDF
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
PDF
Presentatie Albert Roos Twinfield Masterclass #TWFMC
PDF
24602905 Karsten Nohl
PPT
P R O S P E K T U S P E R U S A H A A N I K K I G R O U P D E N G A N C ...
PDF
Sistem Penyadapan Intruder In The Darkness
PDF
RicoLiveGrid
PDF
O T O M A S I P E N G A W A S R U M A H D E N G A N M E N G G U N A K A N...
Jeni Intro1 Bab02 Pengenalan Bahasa Java
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Presentatie Albert Roos Twinfield Masterclass #TWFMC
24602905 Karsten Nohl
P R O S P E K T U S P E R U S A H A A N I K K I G R O U P D E N G A N C ...
Sistem Penyadapan Intruder In The Darkness
RicoLiveGrid
O T O M A S I P E N G A W A S R U M A H D E N G A N M E N G G U N A K A N...
Ad

Similar to YouDrup_in_Drupal (20)

KEY
Drupaling a Devleopment Plan
PDF
Mobile and web optimization + Drupal
PDF
My Site is slow - Drupal Camp London 2013
ODP
Content Management for Web Designers
PDF
Create your website in just 1 hour
KEY
WordPress Plugins for n00bs
PDF
A2WPress Roadfighter Theme Documentation
PDF
HyperLight Websites
PPTX
Drupal For Dummies
PDF
Building A Tasty Backend
PPTX
4.content mgmt
PPTX
Drupal 7 Building Blocks
DOC
AIESEC CMS - User guide
PDF
Drupal case study: Behind the scenes of website of University of Tartu
PDF
Drupalcamp performance
PDF
Design to Theme @ CMSExpo
PDF
My site is slow
PDF
Tutorial%20-%20Content%20Management%20System
PDF
Tutorial%20-%20Content%20Management%20System
PPTX
Tutorial1 - Part 2
Drupaling a Devleopment Plan
Mobile and web optimization + Drupal
My Site is slow - Drupal Camp London 2013
Content Management for Web Designers
Create your website in just 1 hour
WordPress Plugins for n00bs
A2WPress Roadfighter Theme Documentation
HyperLight Websites
Drupal For Dummies
Building A Tasty Backend
4.content mgmt
Drupal 7 Building Blocks
AIESEC CMS - User guide
Drupal case study: Behind the scenes of website of University of Tartu
Drupalcamp performance
Design to Theme @ CMSExpo
My site is slow
Tutorial%20-%20Content%20Management%20System
Tutorial%20-%20Content%20Management%20System
Tutorial1 - Part 2

More from tutorialsruby (20)

PDF
&lt;img src="../i/r_14.png" />
PDF
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
PDF
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
PDF
&lt;img src="../i/r_14.png" />
PDF
&lt;img src="../i/r_14.png" />
PDF
Standardization and Knowledge Transfer – INS0
PDF
xhtml_basics
PDF
xhtml_basics
PDF
xhtml-documentation
PDF
xhtml-documentation
PDF
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
PDF
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
PDF
HowTo_CSS
PDF
HowTo_CSS
PDF
BloggingWithStyle_2008
PDF
BloggingWithStyle_2008
PDF
cascadingstylesheets
PDF
cascadingstylesheets
&lt;img src="../i/r_14.png" />
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
Standardization and Knowledge Transfer – INS0
xhtml_basics
xhtml_basics
xhtml-documentation
xhtml-documentation
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
HowTo_CSS
HowTo_CSS
BloggingWithStyle_2008
BloggingWithStyle_2008
cascadingstylesheets
cascadingstylesheets

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
cuic standard and advanced reporting.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Electronic commerce courselecture one. Pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Empathic Computing: Creating Shared Understanding
cuic standard and advanced reporting.pdf
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
Digital-Transformation-Roadmap-for-Companies.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Electronic commerce courselecture one. Pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Chapter 3 Spatial Domain Image Processing.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Understanding_Digital_Forensics_Presentation.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
The Rise and Fall of 3GPP – Time for a Sabbatical?
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...

YouDrup_in_Drupal

  • 1. YouTube in Drupal Presented by Aaron Winborn http://aaronwinborn.com/ http://docs.google.com/Present?docid=dgdc84wd_71n583fn82&invite=fc2p23q
  • 4. Step 3 Talk it up! Register the name. Configure nameservers. Blog about it. Research YouTube fonts for awhile. Install file system and configure the database. Talk it up some more! Time on this step:   3.5 hours Real work time:   1 hour
  • 5. Initial Contributed Modules CCK -- to create content types Views -- to create custom listings Flag -- for "QuickLinks" and Promoted/Featured Panels -- to create pages FileField -- for video uploads Embedded Media Field -- for 'YouTube' videos jQuery Media -- to make FileField work w/ videos Pathauto -- friendly URL's Token -- required by Pathauto Zen -- the Theme Time: 0.75 Total: 4.25
  • 6. Create Content Type Time: 0.5 Total: 4.75
  • 9. Initial Panel Content Time to create initial panel: 0.25 Troubleshoot: 0.75 Total time so far: 5.75
  • 11. Front Page Panels Different pages for Anonymous & Authenticated Users global $user; if ($user->uid) { drupal_goto('panel'); } Time: 0.75 Total: 6.5
  • 20. Create Filler Content Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean pellentesque. Nulla sed nulla sit amet dolor ultrices dapibus. Fusce semper. Donec vulputate. Quisque porttitor elit eget nisl. Donec eu pede et arcu hendrerit egestas. Mauris lacus neque, porttitor at, vestibulum id, aliquam adipiscing, leo. Curabitur risus pede, euismod sit amet, vehicula ac, blandit nec, lacus. Etiam bibendum dolor et magna. Curabitur est risus, cursus sit amet, cursus nec, vestibulum eget, eros. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed tortor. Vivamus a ipsum eu tortor commodo elementum. Phasellus blandit, massa in egestas ornare, mi tortor feugiat arcu, mollis semper tortor nunc in augue. Nulla nec neque. Aenean porttitor mi nec nunc. Time: 1 Total: 7.75
  • 21. Create Flags Time: 0.5 Total: 8.25
  • 23. Create Video Views Promoted Block & Page; Featured Block & Page
  • 24. (Pause for Live Demo) Views 2 Needs to be Seen! Time: 0.5 Total: 8.75
  • 25. Create Node Panel (Take 2) Time: 0.5 Total: 9.25
  • 26. Debug PHP Errors w/ Node Panel Time: 2 Total: 10.75
  • 27. Create New Logo! (and fav.ico too!) Time: 2 Total: 12.75
  • 28. Initial CSS for Home Panel Pages body, div#page { color:#000000; font-family:Arial,sans-serif; font-size:12px; } a:link, a:visited, a:active { color:#0033CC; } .page-front .view-display-id-block_1 .views-row-odd, .page-front .view-display-id-block_1 .views-row-even { float:left; padding:0 3px; text-align:center; width:23%; margin-bottom:0; } .page-front .view-display-id-block_2 .views-row-odd, .page-front .view-display-id-block_2 .views-row-even { border-bottom:1px dotted #BBBBBB; padding-bottom:10px; margin-top:0 !important; } Time: 3 Total: 15.75
  • 29. Initial CSS for Video Node page #video-panel h2.title { display:none; } #video-panel .node-type-video { background:#EEEEEE none repeat scroll 0 0; border:1px solid #CCCCCC; } #video-panel .node-type-video .node-inner { padding: 5px; } #video-panel .submitted { height: 64px; } #video-panel .submitted .info a { font-weight: bold; text-decoration: none; } #video-panel .submitted .info a { text-decoration: underline; } #video-panel .picture { float:left; margin-top:6px; background-color:#FFFFFF; border:3px double #999999; display:block; overflow:hidden; width: 46px; height: 46px; } Time: 1 Total: 16.75
  • 30. Install Media Mover &  FFMPEG Wrapper Time: 0.25 Total: 17
  • 31. OK, I lied... Install Media Mover &  FFMPEG Wrapper Time: 6.25 Total: 23
  • 32. Watch FiveStar Video Tutorial http://www.lullabot. com/videocast/building-views-fivestar- and-votingapi Time: 0.25 Total: 23.25
  • 33. Add FiveStar to Views Time: 0.5 Total: 23.75
  • 34. Roll back Five Star from v.Dev (Bleeding edge and all that...) Time: 0.25 Total: 24
  • 35. Create Taxonomy View Time: 0.25 Total: 24.25
  • 36. Override Taxonomy View Theme <?php // $Id: views-view-fields.tpl.php,v 1.6 2008/09/24 22:48:21 merlinofchaos Exp $ /** * @file views-view-fields--video-taxonomy.tpl.php * Default simple view template to all the fields as a row. * * - $view: The view in use. * - $fields: an array of $field objects. Each one contains: * - $field->content: The output of the field. * - $field->raw: The raw data for the field, if it exists. This is NOT output safe. * - $field->class: The safe class id to use. * - $field->handler: The Views field handler object controlling this field. Do not use * var_export to dump this object, as it can't handle the recursion. * - $field->inline: Whether or not the field should be inline. * - $field->inline_html: either div or span based on the above flag. * - $field->separator: an optional separator that may appear before a field. * - $row: The raw result object from the query, with all data it fetched. * * @ingroup views_templates */ $extra = (arg(1) && !is_numeric(arg(1))) ? (arg(1) .'/') : ''; ?> <?php print l($fields['name']->content, arg(0) .'/'. $extra . $fields['tid']->content, array ('html' => TRUE)); ?> Time: 0.5 Total: 24.75
  • 37. Add Primary Menu & Play with CSS Time: 2 Total: 26.75
  • 38. Make Primary Menu Active  for Video Nodes function phptemplate_links($links, $attributes = array('class' => 'links')) { // ... if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()) || (($link['href'] == '<front>') && ($_GET['q'] == 'panel')))) { $class .= ' active'; } else if ($link['href'] == 'browse' && arg(0) == 'node' && arg(1) && is_numeric(arg(1))) { $node = node_load(arg(1)); if ($node->type == 'video') { $class .= ' active'; } } else if ($link['href'] == 'browse' && arg(0) == 'taxonomy') { $class .= ' active'; } } // ... } Time: 0.5 Total: 27.25
  • 39. Make 'Playing Now' Cycler Work time: 0.5 (And Blog about it!) Blog time: 1 Total so far: 28.75
  • 40. QuickList Flag & Views Time: 2 Total: 30.75
  • 41. CSS for QuickList +/- on Thumbs /* QuickList flag link */ .views-field-ops { float: left; height:0; } .flag-quicklist a { text-indent: -5000px; height: 25px; width: 25px; margin-top:-24px; display: block; float: left; } .flag-quicklist a.flag-action { background:transparent url(master-vfl65847.gif) no-repeat scroll -537px 4px; } .flag-quicklist a.unflag-action { background:transparent url(master-vfl65847.gif) no-repeat scroll -587px 4px; } Time: 2 Total: 32.75
  • 42. User videos at my/videos Time: 1 Total: 33.75
  • 43. Make /user & /my  Active on Home Menu Tab else if ($link['href'] == '<front>' && (in_array(arg(0), array('user', 'my')))) { $class .= ' active'; } else if ($link['href'] == 'community' && arg(0) == 'forum') { $class .= ' active'; } else if ($link['href'] == 'community' && arg(0) == 'node' && arg(1) && is_numeric(arg (1))) { $node = node_load(arg(1)); if ($node->type == 'forum') { $class .= ' active'; } Time: 0.25 Total: 34
  • 44. Create Top & Footer Menus Time: 0.25 Total: 34.25
  • 45. CSS for Menus & Nav Bars /* primary menu */ #primary { float:right; height:28px; list-style-type:none; margin:0; padding:5px 0 0; width:693px; } #primary li { background:transparent url(master-vfl65847.gif) no-repeat scroll 0 -137px; display:block; float:left; margin-right:5px; padding: 0; } #primary li span.leftcap { background:transparent url(master-vfl65847.gif) no-repeat scroll -152px 0; display:block; float:left; height:28px; width:5px; } Time: 0.5 Total: 34.75
  • 46. Advanced Forum Configuration Time: 1 Total: 35.75
  • 47. Add View Block w/ Forum Listings Time: 0.5 Total: 36.25
  • 48. YouTube Redesign! Yay! Time: 0.5 Total: 36.75
  • 49. Troubleshoot Media Mover Time: 4 Total: 40.25
  • 50. Subscription Button Theming function youdrup_form_alter(&$form, $form_state, $form_id) { // Add spans around subscriptions button for styling. if ($form_id == 'subscriptions_ui_node_form') { $form['wrapper']['#title'] = '<span class="button-left"></span><span class="button-text">'. $form['wrapper']['#title'] .'</span><span class=" button-right"></span>'; } Time: 2.5 Total: 42.75
  • 51. Node Block CSS (and More Link) // $Id$ function toggle_slider($link) { // $link = $('.more-slider').children('. slider-link').children('a'); var more = $link.text() == 'more info'; if (Drupal.jsEnabled) { if (more) { $(document).ready(function () { $link.text('less info'); $('#content-teaser').show(); $('#content-full').slideDown(); $('#content-full').hide(); $('#content-teaser').slideUp(); $section = $('#slider-link'); } $section.html('(<a href="#" id="slider-link-a" else { >more info</a>)'); $link.text('more info'); $('#slider-link-a').click(function () { $('#content-teaser').slideDown(); toggle_slider($(this)); $('#content-full').slideUp(); return false; } }); } }); console.log('embed start'); $('.views-field-field-video-youtube-embed a'). each(function (i) { console.log('starting...'); if ($(this).children('img').size() == 0) { console.log('embed pass'); $(this).parent().hide(); } }); } Time: 0.5 Total: 43.25
  • 52. jQuery Media Debug Session Random bug-hunting... Time: 0.5 Total: 43.75
  • 53. Media Mover Woes Finally, a live demo! Time: 3.25 Total: 47
  • 54. jQuery UI for Tabs (Fun!) Time: 1.5 Total: 48.5
  • 55. Grab Correct Thumbnails Problem:   Blank thumbnail if no Emfield Solution: <?php if ($row->node_data_field_video_youtube_field_thumbnail_fid) { $results = db_query_range("SELECT * FROM {files} WHERE fid = %d", $row- >node_data_field_video_youtube_field_thumbnail_fid, 0, 1); $file = db_fetch_object($results); print l(theme('imagecache', 'thumbnail', $file->filepath), 'node/'. $row->nid, array ('html' => TRUE)); } else if ($row->{$field->field_alias}) { print $output; } else { print l(theme('image', path_to_theme() .'/video-not-available.png'), 'node/'. $row->nid, array('html' => TRUE)); } ?> Time: 1 Total: 49.5
  • 56. Create Slide Show Presentation Click to add content... ;) Time: 4 Total: 53.5
  • 58. Celebrate! Total Time: 53.5 hours (plus this presentation)
  • 59. Modules used for YouDrup Administration Menu Devel & Devel Generate Content (CCK): ImageAPI   Content Permissions   ImageAPI GD2   Embedded Media Field ImageCache   Embedded Video Field Media Mover API   Field Group   FFMPEG Media Mover   FileField   Media Mover Auto Run   ImageField   Media Mover CCK Core modules:   Media Mover Directory   Menu Media Player   Path Advanced Forum   Search FFMPEG Wrapper   Statistics Flag   Update Status Google Analytics  
  • 60. Modules used (Continued) jQuery UI jQuery Update MimeDetect jQ Mollom jQuery Media Pathauto Views Service Links   Views UI Similar by Terms Voting API Token FiveStar YouTube API YouDrup (Custom Module) Panels   Panel Pages   Panels Simple Cache   Views Panes Subscriptions   Subscriptions Mail   Subscriptions UI
  • 61. YouTube in Drupal Presented by Aaron Winborn http://aaronwinborn.com/