Publishing 1

When we sell a book written on an Open Source project, we pay a royalty directly to that project. Therefore by purchasing Drapal Multimedia, Packt wiU have given some of the money received to the Drupa Project. In the long term, we see ourselves and you customers and readers of ouxbooks as part of the Open Source ecosystem, providing sustainable revenue for the projects we publish on. Our aim at Packt is to establish publish g royalties as an essential part ol the service and support a business...

Virtual Reality

Humans have literally dreamed about virtual reality for probably their entire existence. Every night, each of us enters a simulated reality that competes with the world we experience during our waking state. The Taoist philosopher Zhuangzi, in a well-known musing, dreamed once that he was a butterfly. Upon waking, he wondered if it were he that dreamed of being a butterfly or if he were the butterfly dreaming of being Zhuangzi. Though it seems a pipe dream to build a simulated reality that can...

Embedded Media Field

Finally, we come to the alternative of hosting video from our own servers. Although using a module such as Media Mover combined with services such as Amazon S3 nukes serving video a slightly easier task than it might have otherwise been, for most sites the bandwidth required for serving video is generally not a viable option. Additionally, sites may wish to take advantage of the viral opportunities of hosting video through a widely recognized provider such as YouTube or Blip.TV. There are...

Local Video Files

When serving local video files, we have to consider first how a video will be placed onto the server and if we require any manipulation of the video. We may wish to use an upload field from a web form, or we may wish to use FTP to upload large files, or we may wish to be able to email a video to the server as from a cell phone. All of these options are available, so we will examine each in turn. The first heavy hitter is the FileField module. This light-weight module goes a long way. At its...

Info Bee

Changes made in this table will not be saved until the form Is submitted. The Manage fields screen maybe used to navigate to and edit existing fields by clicking on the Configure link next to a field, or from the tabs above. You car also remove fields from this screen as well, with the Remove imk. If you have the Fieldgroup module active on your site, you may group fields together as well,, creating a new group with the Add group tab from this page. A group created in this way will become an...

V Cck

Enabled Name Version Description Allows administrators to define new content types. Required by Content Copy disabled , Content Permissions Content 6.X-2,0-rc2 disabled , Fieldgroup enabled , Node Reference enabled , Number enabled , Option Widgets enabled . Text enabled . User Reference disabled Content 6.X-2,0-rc2 disabled , Fieldgroup enabled , Node Reference enabled , Number enabled , Option Widgets enabled . Text enabled . User Reference disabled Enables ability to import export field...

F Tkr

Tha fiumbw of itami to ddp. For npla, if thn fiald ii 5. tha firit 3 terns will b skipped and not displayed. Offset tan not be used if Tems to display is 0 instead use a very large number there. Youmiay then Save the lt riew, so we can see the results. The Arguments fieldset is used to create some flexibility from the URL. Thus, by setting the arguments here, you might have a gallery of all recently posted videos with a URL of Jsrlde lt f gt and further display of only videos in a cer tain...

Creating Our XSPF File

Now we can build our initial file using Views. Add a View by browsing to Administer Site building Views Add at admiri build view add . You'll select Node for View Type, and fill in the other basic information to get things started. We'll call ours clips xspf for the View Name . In our Basic settings section, we'll select XSPF Playlist feed for the Style. Add a Filter of Node Type, checking the corresponding Clip type. Also add a Filter for Node Published checking the corresponding Published...

Resizing and Cropping

You've probably noticed by now a limitation of the Image Field that images can't be resized as easily as they can be with the Image module. You can set a maximum image resolution, but what about multiple image sizes Such a simple feature, you think Not to worry. The ImageCache module comes to our rescue. It allows not only resizing, but also scaling and cropping, or any combination of these actions. In addition, there is no limit to the number of image size rules that can be created. So images...

Mobile Web

A growing proportion of the Web access on the Internet is from mobile web browsers. This includes PPCs such as Blackberry and mobile phones such as the iPhone. It is becoming increasingly important that we support these formats, as more people begin using mobile technology to access the Internet. In many cases, we don't need to do too much more to support them. The manufacturers of most mobile computers and phones do their best to support standard markup and CSS, so that Drupal sites will work...

Info Pod

Hands down, the most comprehensive solution for Drupal ratings is the Five Star module. It allows users to rate content and comments using a graphical interface. The module is simple to setup and customize Curabitur odio leo, ver ac mi. Proin ac lorem Maecenas fermentum Watermarking is a technique of superimposing an image such as a logo over another image, usually with some transparency. The Image watermark module works in conjunction with the Image module to bring this to Drupal. Image...

Image Credits

A book like Drupal Multimedia requires more than simple screen shots for its demonstrations. The author created all of the screen shots throughout the book. However, many images were used from the Creative Commons and Public Domain to illustrate certain techniques. These are listed here, with their sources and licenses as available. Works released under the Creative Commons Attribution by license may be distributed, remixed, tweaked, and built upon, even commercially, as long as they credit the...

jQuery Media to the Rescue

The jQuery Media plug-in, written by Mike A Is up at http .mal sup . com, i query media , is a perfect solution. It will convert any link to media into the browser-specific code required for displaying the media. The iQuety Media module is a c onfigu rable wrapper for this plug-iri. We covered this briefly Ln the chapters about Video, but this module works well for audio as well. We'll also need a media player. For this exercise, we'll again use the JW FLY Media Player developed byjeroen...

Tactile Media

In Drupal Multimedia, we covered the senses of sight and sound fairly comprehensively. In a few short years, I expect that an update to this book would require a section on tactile media as well. The feedback of touch will be an important development for navigation through the Web, particularly as it becomes more three dimensional. In fact, by the time we are able to immerse ourselves in such an artificial environment, possibly more people who are connected to that Internet may choose to spend...

Styling a View

In the last chapter you probably noticed that although we controlled what content was the output, its display was often less than desirable. This did not escape the attention of our friends at the Dead Presidents Glee Society. They like their gallery, but would rather see the thumbnails of their Presidents ordered horizontally, rather than vertically, with nice boxes around each entry. If you have the Presidential Gallery view created from the last chapter, then we'll begin modifying it....

Embeddable Audio

For the icing on top, we'll add a text area below the player, allowing other users to embed a user's custom player within their blog. We already have everything we need. We just need to place the player code within a text area in our View header. When placing the player within our own page, we have access to all the JavaScript, which we won't be offering to widgets. Thus, we'll just use the straight embed code, even if we're actually using swfobj ect. j s on our own site. We'll do that in this...

IVledia Mover

The next possibility we'll cover is another suite of related modules called Media Mox'er. This is an API meant to handle various media types such as video and audio. The module doesn't do much on its own t's only in conjunction with its related modules that it can be useful. As does die Asset module this module conceptualizes file handling differently than it is currently implemented in the core of Drupal, In particular, it provides hooks for harvest, process, storage, and complete...

Drupal Video Thumbnail Mouseover -gallery

Finally, you may wish to use thumbnails, for instance when displaying a video as a teaser or when using views. N ote that thumbnails are not yet supported for all video providei's. Some providers do not offer an easy API to disc over a particular video's thumbnail file When displayed as a thumbnail, these settings control the image returned. Note that not all 3rd party video content providers offer thumbnails, and others may require an API key or other requirements. More information from the...

Local Video

The past year has seen a major growth in videos on the Internet, and developers for Drupal have only recently really begun harnessing it. Several excellent modules have risen to the task, and their developers are working together to create strong offerings, increasingly working together to build an extensive and robust media API. The Video module, holding a popular namespace, was an early contender for a one-stop solution. However, it has not been maintained well over the past year, leaving a...

Info Mkf

The name of the currently logged in user The user ID of the currently logged in user The email address of the currently logged in user. The url of the current Drupal website. The name of the current Drupal website. The slogan of the current Drupal website. The contact email address for the current Drupal website. The current date on the site's server u ALT text settings i Enable custom alternate text Enable user input alternate text for images.

Asset Module

Our newest client is a sports television network that offers private video content to its paying Internet users. There are editors for each covered sport, such as for synchronized swimming, full-contact badminton, and speed chess. They want to allow the editor of each sport to manage their own video Hies. Additionally, there will be a core set of generic videos that may be used globally. Editors should be able to easily access, upload, and embed any videos owned by them, and any videos that...

Cbr

Click Broweg to select an audio file to upload. Only files with the foliowing extensions are allowed mp3 Hiijv otjtj. NOTE the current FHP configuration limits uploads to 2 JWii. Click Broweg to select an audio file to upload. Only files with the foliowing extensions are allowed mp3 Hiijv otjtj. NOTE the current FHP configuration limits uploads to 2 JWii. If checked, a link will be displayed allowing visitors to download this audio file on to their own computer. WARNING even if you leave this...

Info Arb

The settings shown here are suggested, but you may wish to experiment and set them according to the needs of your site. TheDrupallmag-e icon at the bottom is different than the Image icon near the top, and it is what you will use forlmag-e Assist It is only available if you've followed the steps outlined for that plug-in. The earlier icon is for inserting remote image URLs. Your profile will work now when you click Create profile, although you may wish to peruse the other options first....

Embeddable Widgets

I am personally quite excited about the future of embeddable widgets, and have blogged about it on various occasions at http aaronwinborn. com . As stated in Chapter 11,1 believe that as the Embed Widgets module matures, it will transform how Drupal integrates with the rest of the Internet. We are already seeing a push towards distributed data, as seen with sites such as Flickr, YouTube, and Google Docs. I believe that is just the tip of the iceberg. At Advomatic over the past year, I have...

Semantic Multimedia

As widgets will create new external demands on sites, so too will data organization create new internal demands. The concept of a Semantic Web as envisioned by Tim Berners-Lee http www. w3 . org People Berner s-Lee , the inventor of the World Wide Web, is meant to be a way to organize and collect data by its underlying meaning. It may be fully possible in the not-so-distant future to verbally speak with the Internet and retrieve the desired information. As stepping stones towards this vision,...

ThirdParty Video Providers

Many sites desiring video will choose to use a third-party video provider such as YouTube or Blip.TV. This reduces the bandwidth requirement from their server, is easy to include in their posts, and allows videos to be easily shared virtually by users across the Internet. The easiest way, without further configuration of a basic DrupaL installation, for an administrator to include a third-party video is to simply paste the video's embedded code in a post. Most video provider's will offer a...

Teaser Thumbnails

Our next project requires us to use teaser thumbnails for articles. We have been hired by The Seedy Grapevine, a local social gossip column, to create an online version of its weekly rag. One of its requirements is to add an optional teaser image to its articles, which will display as a thumbnail on the front page and a larger image on the article page. As is usually the case, there are many possible solutions to this need. But because it's not paying us much, and we want to just get the job...

External Audio

As with images and videos, there are arrowing number of third-party providers of audio who offer their content to be embedded on external sites. To this end, the Embedded Audio Fie Id module, included m the Embedded Media Field package, supports several providers. In a similar method to the o triers m that, package, you may paste ttie URL or embed code from a supported provider and tlie desired audio content will be parsed and displayed appropriately. Download and install the Embedded Media...

User Playlist Views

Creating a view for our custom piayJists is apiece of cake, especially because we can simply build on what we've already created. We'll clone and modify the previous view v e created. To do this, go to Administer Site building Views and click on the clone link next to the clip_xspf view at admin build views clone c lip_xspf . Name this Playlist, and click the Next button to make the required modifications. Remove the Taxonomy Term Argument by clicking that and then press ing Remove, Add a...

File Handling

First, let's examine the nuts and bolts of an exciting change right around the corner. A long-time dream of developers and administrators of Drupal is the better support for multimedia in the core. As every excited newcomer to Drupal has quickly learned, there is currently no built-in way to handle even simply adding images to a site. Thus, the need for this book. This is soon to change. For over a year, there has been an exciting issue in the Drupal project queue titled Add hook_file and...

Theming Node Referenced Videos

As you see can see in the screenshot, we have a slight problem with the display. Our referenced video includes some extraneous information such as the submission date and author. This will be true when it's set to display as a teaser or full node, so we'll need to override the theme to get it displayed properly. Other than the submission information, we want the video display to be the same as it currently is for full node and teaser displays. However, when displayed within our articles, we...

Kaltura

Finally, there are also external solutions to file management that may be considered, depending on the needs for a site. Notably, Kaltura, which has partnered with the WikimediaFoundation to develop video wiki software for theMediawiki platform, offers an off-site video, image, arid audio mixer. It can be used to store, manage, and mix various media. It is currently developing a module to integrate its free and low-cost service into Drupal. Available at http kaItura.coia , this open source...

Drop Shadows

Drop shadows around images are an often -requested feature. There are many methods that have been developed over time fordoing this, from using CSS borders on the right and bottom to layered images to Flash to JavaScript. Rather than delving too far into the possible techniques, we will apply the method described by Sergio Villarreal in A ListAfart, shown at http www .a list apart . com articles cssdropshadows. This method involves wrapping an image with an extra div layer, applying CSS to give...

XSPF Playlist

The XSPF Playlist module allows you to create new playlist files by simply creating a View of audio content. Combined with the jQuery Media plug-in, things fall magically into place. A caveat is in order. At the time of this writing, the XSPF Playlist module was not available for Drupal 6. The module maintainor has promised that it will be available eventually, so the rest of this chapter is predicated on that happening. The examples are written as though it were already available, and it is...

FileField Remixed

We examined FileField in the chapters about Video. If you haven't already done so, you'll need to download the FileField module from http drupal. org pro j ect filefield and enable it on the Modules administration page by browsing to Administer Site building Modules, at admin build modules . Now create a new content type named Album by going to Administer Content management Content types Add content type at admin content types add . We'll next add a FileField to this by editing the new Album...