How to do the YouTube Video Cycle!

As you might know by now, I'll be presenting a session at Do It With Drupal on December 10. If you didn't know, get a ticket, and then come back here! I'm currently building a YouTube clone with Drupal in my spare time. When I'm done with it all, I get to come talk with you folks about how I did it.

Obviously, I'm not going to replicate the entire YouTube site. There comes a point of diminishing returns, especially for something I'm doing for fun. So I have to pick and choose what pieces to build. (For the record, there will also be parts that I believe will be improvements on YouTube; not difficult, since I'm building it with Drupal.)

YouDrup Video Cycle

The video slide show on YouTube's front page would have been a case-in-point. It's built in Flash, and I figured I would skip it, since it's just eye candy. Normally for that, I would use jCarousel or Views Slideshow, but neither replicates YouTube's functionality, and they seemed out of place for this slider that slides 5 videos at a time. But then I remembered someone telling me about the jQuery Cycle plug-in, by the same author of the jQuery Media plug-in.

Read More to See How I Did It (in 20 minutes, nonetheless)...

Media Transcriptions Roadmap

I've started work on the Media Transcriptions module today. This module will allow the attachment of Transcriptions (or Closed Captioning) to video and audio files. The initial version in CVS is from some work by Jonathan DeLaigle (grndlvl), who is a co-maintainer & developer of the module.

For full functionality, you'll need to wait for Drupal 7, because of the long-awaited hook_file and Fields in core issues.

However, there will be releases with limited functionality for Drupal 6, and even a teaser for Drupal 5, with a promise of smooth upgrading as things progress.

Read more to Find out What this Means for your Multimedia!

Do YouTube With Drupal

A YouTube clone? In Drupal? Of course!

I was asked by the organizers of the Do It With Drupal seminar if I would like the opportunity to create a YouTube clone in Drupal and talk about that process with the community. Of course!

Do It With Drupal will take place in New Orleans, from December 10-12, 2008. Besides my YouTube clone, other showcase fantasy sites will also be presented, including Flickr, Twitter, and FreshBooks.com clones. All built with Drupal! And that's just the first day. There are some really big name folks presenting at the seminar, like Earl Miles, Robert Douglass, Gábor Hojtsy, John Resig (who wrote jQuery), Matt Westgate, Moshe Weitzman, Angela Byron, James Walker, and more! Seriously, check out the speaker list if you haven't yet.

Now that I've agreed to that, it means up all this personal time I just freed up from finishing up Drupal Multimedia (which goes to the printers on Monday!) will now go to building this fun site...

Read more about How I Plan to Do YouTube With Drupal...

Views Slideshow for Views 2

I upgraded Views Slideshow to Drupal 6 this week. That means you can now continue to create a slideshow from any view, now easier than ever, thanks to Views 2!

In the Drupal 5 version, you had to set global settings for all slideshows, and it was a bit of a pain to configure them for individual shows. Now, as shown in this screen shot, you are able to configure each view individually.

Configure Views Slideshow

Read about How to Use Views Slideshow...

Anonymous Characters for 5 Second Game

Assuming the administrator gives access, anonymous users may now create and compete with characters at 5 Second Game (which is powered by the module of the same name). Additionally, if an anonymous user registers or logs in, they'll be able to claim that character as their own, allowing for saving any statistics, etc.

How to Use jQuery Media for Audio & Video

I sometimes hear a complaint that jQuery Media can't be used for both audio and video on the same site, because it makes the player too large.

This is not true at all. Although it does currently require some finagling.

I plan to reconfigure the module soon to make it easier to pull in the proper configurations for audio and video. Meanwhile, here's a quick hack.

jQuery Media for both Audio and Video

1. Enable the FileField module and create types for your audio and video clips.

2. Enable the jQuery Media module, and configure it for your custom video node type. We won't turn it on for the custom audio type, because we'll be calling it manually, coming right up.

3. Make sure you have a media player installed in the file directory and configured properly at /admin/settings/jquery_media (or /admin/settings/jq if you're using the jQ module). I suggest JW FLV Media Player for now, as Drupal's Media Player doesn't yet support audio. Just stick it in the site's root directory to work automatically, or put it wherever you want and configure jQuery Media with the proper folder.

4. In your theme's template.php, create the following function, replacing 'custom_audio_type' with your site's custom audio content type.

<?php
function phptemplate_preprocess_filefield_file(&$variables) {
 
$node = node_load($variables['file']['nid']);
  if (
$node->type == 'custom_audio_type') {
   
$variables['classes'] = 'filefield-file-audio';
    if (
module_exists('jquery_media')) {
     
jquery_media_add(array('media class' => '.filefield-file-audio a', 'media height' => 20, 'media width' => 200));
    }
  }
  else {
   
$variables['classes'] = 'filefield-file';
  }
 
$variables['original_file'] = $variables['file'];
}
?>

(Note: we need to copy the $variables['file'] to a new variable because of a known bug in Drupal 6 at http://drupal.org/node/297952.)

5. Create a filefield_file.tpl.php file in your theme directory, with the following code:

<?php
  $path
= $original_file['filepath'];
 
$url = file_create_url($path);
 
$icon = theme('filefield_icon', $original_file);
  print
'<div class="'. $classes .' clear-block">'. $icon . l($original_file['filename'], $url) .'</div>';
?>

That's it. It should work automatically after that. Note that this tutorial assumes you're using Drupal 6.4, CCK 6.x-2.0-rc6, FileField 6.x-3.0-alpha4, and jQuery Media 6.x-1.4-beta1.

Note that I write about this in more detail in Drupal Multimedia (pre-order now)!

Inline Video with jQuery Media!

Here's a two-step formula for simple inline video, assuming you have jQuery Media installed on your site, doing both of these configuration steps from Administration > Site configuration > jQuery Media (at /admin/settings/jquery_media):

  1. Open the Node types field set and check the node type for which you wish inline video.Check off Node Type
  2. Open the Classes field set, and enter .node .content a in the Media class text field. (You can separate classes by comma if you want to keep existing class invocations.)Set Media Class

Then just add a link to a video inline to your content. Doesn't matter if it was uploaded with the node or through FTP. (The second step assumes you're using the Garland theme, or another theme that uses that CSS class designation. You might need to check the node in FireBug if you're not sure.)

Notes: This method is easy, though admittedly a bit heavy-handed. The down-side is it will be invoked regardless of whether the node actually contains a video link (fortunately it's a lightweight jQuery plugin). If you want more fine-tuned control, you can skip the first step, use a PHP filter, and just invoke it manually from in your node, using jq_add('jquery_media') (assuming you have the jQ module enabled; jquery_media_add(); otherwise). (I don't actually recommend that, because of all the security issues involved. Just stick with the first method.)

The cool thing is this will work with pretty much any media player, including the upcoming Media Player for Drupal!

Minimalist Drupal Themes

Don't get me wrong; I like Garland. It's sleek, it has an easy-to-configure color scheme, it works well out of the box. And it's identifiably Drupal, which, though sometimes thought to be a criticism, is not a bad label for the blog of a Drupal developer, such as the blog you're reading.

At the same time, I'm interested in spending some time creating a unique theme for my blog. I develop eight-plus hours a day, and it's time I eat my own dog-food. Granted, I haven't actually done any design work in over three years, but I do have some background with that.

So I've been looking at some of my favorite blogs to get some ideas. And discovering an interesting trend.

drupal4u screenshot

Chx's Drupal4hu is simple, with little clutter on the screen, but very identifiably Drupal oriented.

walkah.net screenshot

Jame's Walker's walkah.net features his most recent blog post, with a listing of the next few post titles beneath, and again, little clutter.

Delocalized Ham screenshot

Then there's Neil Drumm's Delocalized Ham, which evokes a manuscript on paper. His design is a testament to his recent study of Typography, which will also figure into my future directions.

So I'm not entirely sure what I'll do for a design quite yet. But I believe that these simple blog designs highlight the most important element of a blog, the written word.

Splash Screen for Media Player!

Drupal Media Player. Splash screen.

A picture is worth a thousand words.

(Image credit reway2007)

Drupal, WordPress, or Joomla? (A Trick Question)

Drupal, WordPress, or Joomla?

I was recently asked my opinion of whether to use Drupal or one of those other ones. I was going to just write a flippant reply, when I realized I'm not actually qualified to answer the question.

I have never personally used WordPress. I read a comparison of it and Drupal some years ago, and knew even then that WordPress would just never cut it. And I've never looked back.

Now if Joomla had been part of the original question, I would have had slightly more qualifications to answer. I used that once (back when it was Mambo, and for all of three weeks), and was sorely impressed at first. But the glow faded quickly when I realized that though it was slick out of the box, it required more work tearing it down to make it do what I wanted than Drupal's simple building blocks offer. And again, I've never looked back.

However, that's coming from a decade of experience on the web beforehand. I really have no idea if Drupal is suitable for someone just starting out. (That is more generic: the author of the original question is a seasoned developer, and specifically to them I say use Drupal, what are you waiting for?)

WordPress

I dug up a few comparisons from Google, and they seem reasonable (for someone who doesn't know spit about WordPress). 10 Reasons to Use Drupal has an obvious Drupal bias. WordPress Vs Drupal Vs Expression Engine has a WordPress bias. And WordPress vs Drupal can't make up its mind (its author continues to use both).

Joomla

I found a few comparisons of Joomla and Drupal, but they're largely out-dated, the first on the list dating from Drupal 4.7. Most of the negative points on Drupal on their list have turned into strong positives since then. That was a thorough comparison, but needs to be revised to warrant its current Google ranking.

Drupal

From a blog, to a news mogul, to a store-front, to a social network, to a university's portal site, Drupal can handle any of it. Just take a look at this slideshow:

With a strong community of developers, there are easy-to-use tools that can handle pretty much anything you can think of. Its underlying architecture is scalable, its API is robust, and Google loves Drupal; its SEO friendliness is well-known. (Although to be fair, as pointed out on Joomla's forums, they're all SEO friendly, and Wordpress does that out of the box, as opposed to needing to install Pathauto for search-engine-friendly URLs in Drupal.)

My Opinion

The rest of this is largely opinion. Please do the research yourself before coming back and telling me this other can do this or that. Without doing a thorough examination of the CMS options, it doesn't do any of them justice to oversimplify their offerings.

Basically, from my perspective, I'd say, if you are an experienced developer, particularly if you have any programming background at all, you need Drupal. If you are looking to hire a developer for your site, whatever site that might be, you need Drupal. If you are a newbie and want nothing more than a blog, then WordPress might be for you.

However, if you're willing to jump through the hurdle of learning the administrative back-end, then Drupal would likely serve you better in the long run. Particularly if you think you might want things like easy video embedding or customizable content entry. And if you want a blog with multiple authors, or forums, or e-commerce (before you ask, I suggest Ubercart, and that comes from having used both that and e-Commerce, but read Diving into Drupal E-Commerce: An Ubercart vs. E-commerce Comparison first), or any kind of social network, then Drupal hands down is the one for you.

If you want some of that, and want it now, and don't want the hassle of learning, and don't care if it's impossible to change it later, then maybe you should stick with Joomla.

Take your pick.

Syndicate content

The Society for Venturism has chosen me as the recipient of its charity for this year, to hopefully offer me cryonic preservation when the time comes. And this month, Longecity, an excellent forum for the discussion of issues related to extending the lifespan of humans, has offered up a matching grant of up to a thousand dollars to help out! So help out! Please.