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
tutorialsruby
 
PDF
RicoLiveGrid
tutorialsruby
 
PDF
td_mxc_rubyrails_shin
tutorialsruby
 
KEY
Deploying
soon
 
KEY
Google
soon
 
PDF
TurboGears2 Pluggable Applications
Alessandro Molina
 
KEY
Authentication
soon
 
PPT
jQuery and_drupal
BlackCatWeb
 
Alfredo-PUMEX
tutorialsruby
 
RicoLiveGrid
tutorialsruby
 
td_mxc_rubyrails_shin
tutorialsruby
 
Deploying
soon
 
Google
soon
 
TurboGears2 Pluggable Applications
Alessandro Molina
 
Authentication
soon
 
jQuery and_drupal
BlackCatWeb
 

What's hot (20)

PDF
Joe Walker Interactivewebsites Cometand Dwr
deimos
 
PPTX
jQuery from the very beginning
Anis Ahmad
 
PDF
Write Less Do More
Remy Sharp
 
PDF
WCLV13 JavaScript
Jeffrey Zinn
 
PDF
Remy Sharp The DOM scripting toolkit jQuery
deimos
 
PDF
Learning jQuery in 30 minutes
Simon Willison
 
PPTX
Html5 Overview
Abdel Moneim Emad
 
PDF
Javascript in Plone
Steve McMahon
 
PDF
Hooks WCSD12
Jeffrey Zinn
 
PDF
Introducing Assetic: Asset Management for PHP 5.3
Kris Wallsmith
 
PDF
Ajax Performance Tuning and Best Practices
Doris Chen
 
PPT
Render API - Pavel Makhrinsky
DrupalCampDN
 
KEY
Api Design
sartak
 
PDF
jQuery Essentials
Marc Grabanski
 
DOCX
SCasia 2018 MSFT hands on session for Azure Batch AI
Hiroshi Tanaka
 
PDF
jQuery Loves Developers - Oredev 2009
Remy Sharp
 
PDF
Symfony & Javascript. Combining the best of two worlds
Ignacio Martín
 
PDF
12 core technologies you should learn, love, and hate to be a 'real' technocrat
Jonathan Linowes
 
PPT
Corephpcomponentpresentation 1211425966721657-8
PrinceGuru MS
 
PDF
Perl object ?
ℕicolas ℝ.
 
Joe Walker Interactivewebsites Cometand Dwr
deimos
 
jQuery from the very beginning
Anis Ahmad
 
Write Less Do More
Remy Sharp
 
WCLV13 JavaScript
Jeffrey Zinn
 
Remy Sharp The DOM scripting toolkit jQuery
deimos
 
Learning jQuery in 30 minutes
Simon Willison
 
Html5 Overview
Abdel Moneim Emad
 
Javascript in Plone
Steve McMahon
 
Hooks WCSD12
Jeffrey Zinn
 
Introducing Assetic: Asset Management for PHP 5.3
Kris Wallsmith
 
Ajax Performance Tuning and Best Practices
Doris Chen
 
Render API - Pavel Makhrinsky
DrupalCampDN
 
Api Design
sartak
 
jQuery Essentials
Marc Grabanski
 
SCasia 2018 MSFT hands on session for Azure Batch AI
Hiroshi Tanaka
 
jQuery Loves Developers - Oredev 2009
Remy Sharp
 
Symfony & Javascript. Combining the best of two worlds
Ignacio Martín
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
Jonathan Linowes
 
Corephpcomponentpresentation 1211425966721657-8
PrinceGuru MS
 
Perl object ?
ℕicolas ℝ.
 
Ad

Viewers also liked (8)

PDF
Jeni Intro1 Bab02 Pengenalan Bahasa Java
Individual Consultants
 
PDF
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
tutorialsruby
 
PDF
Presentatie Albert Roos Twinfield Masterclass #TWFMC
Twinfield International, a Wolters Kluwer business
 
PDF
24602905 Karsten Nohl
Individual Consultants
 
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 ...
Individual Consultants
 
PDF
Sistem Penyadapan Intruder In The Darkness
Individual Consultants
 
PDF
RicoLiveGrid
tutorialsruby
 
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...
Individual Consultants
 
Jeni Intro1 Bab02 Pengenalan Bahasa Java
Individual Consultants
 
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
tutorialsruby
 
Presentatie Albert Roos Twinfield Masterclass #TWFMC
Twinfield International, a Wolters Kluwer business
 
24602905 Karsten Nohl
Individual Consultants
 
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 ...
Individual Consultants
 
Sistem Penyadapan Intruder In The Darkness
Individual Consultants
 
RicoLiveGrid
tutorialsruby
 
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...
Individual Consultants
 
Ad

Similar to YouDrup_in_Drupal (20)

PDF
Html5 intro
Kevin DeRudder
 
KEY
Remixing Confluence With Speakeasy
nabeelahali
 
PPTX
Intro To Node.js
Chris Cowan
 
PDF
What you need to know bout html5
Kevin DeRudder
 
PDF
Twig, the flexible, fast, and secure template language for PHP
Fabien Potencier
 
PPTX
Php on the Web and Desktop
Elizabeth Smith
 
PDF
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
PDF
HTML5: where flash isn't needed anymore
Remy Sharp
 
KEY
Remixing Confluence with Speakeasy - AtlasCamp 2011
Atlassian
 
PDF
I put on my mink and wizard behat (tutorial)
xsist10
 
PDF
HTML 5 - Overview
Marcelio Leal
 
PDF
Getting startedwith noir-clojureexchange-2011
John Stevenson
 
PDF
Seven deadly theming sins
George Stephanis
 
PDF
Refresh Austin - Intro to Dexy
ananelson
 
PDF
Wordpress Beyond Websites
Scott Saunders
 
PPTX
End-to-end testing with geb
Jesús L. Domínguez Muriel
 
ODP
Puppetpreso
ke4qqq
 
PDF
Automatisation in development and testing - within budget
David Lukac
 
PDF
jQuery in the [Aol.] Enterprise
Dave Artz
 
ODP
Puppet and CloudStack
ke4qqq
 
Html5 intro
Kevin DeRudder
 
Remixing Confluence With Speakeasy
nabeelahali
 
Intro To Node.js
Chris Cowan
 
What you need to know bout html5
Kevin DeRudder
 
Twig, the flexible, fast, and secure template language for PHP
Fabien Potencier
 
Php on the Web and Desktop
Elizabeth Smith
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
HTML5: where flash isn't needed anymore
Remy Sharp
 
Remixing Confluence with Speakeasy - AtlasCamp 2011
Atlassian
 
I put on my mink and wizard behat (tutorial)
xsist10
 
HTML 5 - Overview
Marcelio Leal
 
Getting startedwith noir-clojureexchange-2011
John Stevenson
 
Seven deadly theming sins
George Stephanis
 
Refresh Austin - Intro to Dexy
ananelson
 
Wordpress Beyond Websites
Scott Saunders
 
End-to-end testing with geb
Jesús L. Domínguez Muriel
 
Puppetpreso
ke4qqq
 
Automatisation in development and testing - within budget
David Lukac
 
jQuery in the [Aol.] Enterprise
Dave Artz
 
Puppet and CloudStack
ke4qqq
 

More from tutorialsruby (20)

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

Recently uploaded (20)

PDF
DevOps & Developer Experience Summer BBQ
AUGNYC
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PDF
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
SMACT Works
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PPTX
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
PDF
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Software Development Company | KodekX
KodekX
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
DevOps & Developer Experience Summer BBQ
AUGNYC
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
Doc9.....................................
SofiaCollazos
 
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
SMACT Works
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Software Development Company | KodekX
KodekX
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 

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/