*Note: this content is here to supplement the post on Drupal.org (at http://drupal.org/node/790858) until the images can be posted to that site.
Overview
YouTourney is an interactive, Drupal-based web application that makes running video competitions easy. YouTourney helps answer the question “Which video is the best?” through popular vote in head-to-head video matchups. Tournaments, Entry nominations, and Votes are all user-submitted. Much of the main functionality of YouTourney is based on such modules as Embedded Media Field (Video embedding and display), Voting API (Vote tallying), and CCK (Content type customization).
The Project
This project was predicated on a simple idea: make video contests easy, automated, and fun. To accomplish this, the “Tournament” has been broken down into 3 main user interactions for which the site is responsible.
1. Create Tournaments
Running a Tournament in the real world is generally a very involved activity. A real world Tournament Coordinator’s responsibilities can include anything from manually receiving entries, to seeding and organizing matchups, to collecting and tallying votes. These tasks are tedious and repetitive; the goal for YouTourney was to automate as much of this as possible. Moreover, the system is meant to be as extensible as possible to allow all sorts of different Tournament styles and functionality.
With YouTourney, all a Tournamant Coordinator needs to do is set some initial parameters (Entry Deadline, Round Length, Tournament Style, and Tournament Rules, etc), and accept or reject Entries. From there, YouTourney automates everything from seeding the Entries, to tallying votes, to determining the winner, and even handling ties and other corner cases gracefully.
2. Receive Entry Nominations
The Video Sharing market is already pretty well saturated. Creating another venue for uploading and streaming video content is certainly not the goal with YouTourney. Keeping this in mind, the site was designed such that no video content is actually uploaded to YouTourney – instead, embeddable content can be imported from sites all over the web (currently YouTube is supported, but future expansion to include Vimeo and a variety of other sites is in the works).
Entering a video into a Tournament is as easy as copying and pasting the video’s URL. This way, users with existing content don’t need to upload their video all over again – and users that want to nominate a video that is not their own don’t need to “steal” the content in order to submit it. Currently, YouTourney makes heavy use of the YouTube API.
3. Tally User Votes
The outcome of every matchup, and ultimately of the Tournament, is decided by user votes. This is similar to the American Idol popular voting model. Voting should be as easy as clicking the button next to the video of your choice, and anyone should be able to vote, while maintaining vote integrity.
Tournament Flow
Tournaments move through 3 stages: (1) Entry Period; (2) Voting Period, during which multiple rounds of matchups may occur; (3) Completion.
The following outlines the Tournament process from the perspectives of the Tournament Coordinator (creator), a normal user, and the YouTourney System.
As you can see, the User’s and Coordinator’s responsibilities are minimized, and YouTourney does all the heavy lifting. This takes the burden off of the user, all but removing the barrier to entry for creating and hosting a video Tournament. Hopefully, this will inspire more users to create all different types of Tournaments, given the ease with which they can be created.
The events are triggered via cron hooks at timed intervals (see below).
For reference, the following shows how a general Knockout Tournament progresses:
Each round, the Entry pool is reduced by (about) half, until only two videos remain. They are then voted on in the Championship Matchup to determine the winner.
Drupal Implementation
Content Types
As with any Drupal site, the basic building block of YouTourney is the Node. To model Tournaments, YouTourney uses 3 special Content types, constructed via the Content Construction Kit (CCK). The main node types are:
Entry – The Entry Node type contains a video entry and a reference to the Tournament to which it belongs (via the Node Reference module). The Node maintains basic information about the Entry as well as the Entry’s state – for example, whether the Entry is currently Active, Eliminated, Awaiting Approval, on Bye, etc. Here the Embedded Media Field Module works its magic to easily convert a video’s URL into an embedded video on the Entry page. Users fill out the simple Entry Node creation form to submit a video to a Tournament.
Matchup – The Matchup Node contains references to two Entries (via the Node Reference module), and maintains state for the Matchup – for example, whether the Matchup is active or complete, when voting for the Matchup ends, what round the Matchup belongs to, etc. The Matchup also contains a reference to the Tournament to which it belongs. Matchups are generated programmatically each round by the system, via a custom module.
Tournament – The Tournament Node contains the Tournament settings (Name, Welcome Video, Tournament Description, Type, Entry Style, Deadline, etc), as well as some Tournament state (e.g. Accepting Entries, Voting Period, Completed). The Content Permissions module was used to display only relevant fields to normal users.
Theming
The custom theme developed for YouTourney is based on the Zen theme. Extensive theming was used to produce the desired look and feel of the site. Each of the Content Types above, for example, was given its own template (e.g. node-tournament.tpl.php). Most of the content display was entirely rewritten this way, and much of the structure was made the responsibility of the Tournament Logic Wrapper classes (see Tournament Logic below). Styling, of course, is entirely done through CSS.
Custom theme functions were written to wrap, for example, the Embeddable Media Field video widgets, in order to increase the flexibility of display options such as size throughout the content display areas.
User Interaction
Voting
The most basic action on YouTourney is voting. Every vote is recorded with reference to the Entry Node as well as the Matchup Node. This allows votes to be distinguished between Entries as well as between rounds. To do this, YouTourney makes use of the excellent Voting API. Every vote is cast against the Entry (node) for which it is intended, and tagged with the Matchup Node ID. The Voting API comes with some great out-of-the-box functionality such as anonymous voting capability as well.
A custom module named “Versus” was used to enable head-to-head voting, and restrict voting to only one Entry per matchup. Versus themes its own ajaxified widgets which are displayed on the Matchup page.
The voting statistics are displayed via the Google Charts Javascript API.
The Matchup page – the meat and potatoes of YouTourney:
Views
The Views module was used throughout the site, from the front page slider, to the Matchup and Entry listings on the Tournament page, to the search results page (using the Faceted Search Module).
Following
A “Follow” function, similar to Facebook’s “Like”, Twitter’s “Follow”, or other similar social links, allows users to keep track of Tournaments or Entries in which they are interested. Notifications pertaining to the activity of these Tournaments and Entries then show up in the user’s Activity Feed, and certain notifications are delivered via email. The “Follow” mechanism was implemented using the highly versatile Flag module.
Taxonomy
Taxonomic categorization on the site is accomplished via the Content Taxonomy module, providing Tournament moderators the ability to categorize their Tournaments into a predetermined vocabulary, and Entry submitters to tag their submissions freely.
Community Watch
Once in a while, an inappropriate video makes its way through the filters and into a Tournament. In this case, users can flag it as inappropriate. Naturally, the Flag module was used to implement this functionality (a simple custom function was used to send an alert rather than using preexisting solutions like the Abuse module in order to keep the enabled modules count as low as possible).
Help & Tips – The site makes use of the jQuery plugin qTip to offer helpful messages as users fill out forms and interact with the site.
Tournament Logic
Classes
The logic for the Tournaments is contained in three main classes and their subclasses – Entry, Matchup, and Tournament. For example, the Tournament class is responsible for counting up votes and declaring Matchup winners, seeding Entries into Matchups, generating brackets and final rankings, etc. These three classes wrap their respective $node objects and provide extra functionality and logic.
Events
Obviously, there needs to be some type of mechanism for performing actions at particular Tournament events (Tournament Start, Round End, Tournament End, etc). As these events are dictated by predetermined times (Entry Deadline, Round Length), the custom Tournament logic module uses the cron hook to search for Tournaments with expired states, and calls an update() function for those Tournaments. The Tournaments inspect their own state and perform the required updates.
Social Media Connections
YouTourney also allows users to make social media connections to other sites. One use of this feature is to allow social interactions and one-click sign-ins through sites like Facebook and Twitter.
More interestingly, YouTourney also allows users to link their YouTourney accounts to their YouTube accounts. By authenticating and then associating YouTube user names with YouTourney users, video nominations on YouTourney can be linked to their owners on YouTourney, as well as on YouTube.
That is, say Bob has an account on YouTourney, BobTourney, and an account on YouTube, BobTube. If Bob, or any other user, submits a video on YouTourney, there’s no way to determine BobTube’s identity on YouTourney, or even if BobTube uses YouTourney. If Bob links his two accounts, then when a video from BobTube is submitted to YouTourney, the system will find that BobTourney is the YouTourney account linked to the video. This allows Bob to receive “credit” for the video on YouTourney, as well as receive notifications when his videos are nominated by other users. This UserConnect functionality utilizes OAuth as much as possible.
Other Important Contributed Modules
Several other important modules went into making YouTourney run smoothly. Thanks so much to all the hard work these people put in to these great modules. Some of the highlights are:
CCK – The Content Construction Kit was used to craft all the content types on the site, most importantly those modeling Tournaments, Matchups, and Entries.
Embedded Media Field – EmField provided most of the functionality needed to embed videos straight from URLs, and saved a ton of time.
Flag – Flag is an excellent and extremely versatile module, especially if you’re creative. I’ve used this in a variety of ways in every Drupal project I’ve worked on. For YouTourney, Flag enabled user “Following” of Tournament and Entries, abuse reporting, and “agreeing” for the custom Get Satisfaction-like Feedback module. Flag also provides a solid API for interacting with the module.
CCK Node Reference – Creates a user-friendly interface for linking nodes (unidirectional). This made it easy to create a Matchup, which is essentially a wrapper for two Entry Nodes with a reference to a Tournament (3 references total).
Views – Views is another invaluable tool in every developer’s toolkit. Views was used for everything from the front page feature box, to the Entry and Matchup listings on the Tournament pages, to the search results (using Faceted Search).
Voting API – The Voting API module was used as the basis for the custom Versus module, which allowed head-to-head voting and tallying of votes within a given Matchup.
Content Profile – The Content Profile module made it easy to create User Profiles with a custom CCK Content Type.
Date – the Date module allowed both an out-of-the-box calendar widget as well as time zone handling for displaying accurate Tournament end dates around the world.
Devel – the Devel module is an indispensable tool for any developer.
LoginToboggan – LoginToboggan takes care of about 85% of the Login form customizations on YouTourney, and a custom module took care of the rest (Terms of Service, Captcha, etc). Most importantly, LoginToboggan allows the user to set a password at the time of registration, and sets up a mechanism for pre-authorizing users.
CAPTCHA/reCAPTCHA – Easy to set up and add to forms, the CAPTCHA and reCAPTCHA modules are an important part of any publicly accessible site to keep bots out.
Custom GetFeedback Module
YouTourney uses a custom Feedback module implemented in the vein of the popular GetSatisfaction system, but contained entirely within the site. Users submit feedback, and can vote on popular feedback items, allowing developers to focus on the most requested features, or the most common problems, etc.
The GetFeedback module uses the jQuery qTip plugin, CCK, Views, and Flag, to reproduce the essential elements of systems like GetSatisfaction. As these modules (and jQuery library) were all already in use on the site, there was no little overhead incurred to create this module.
qTip – A “Feedback” button is positioned on the left edge of the page. Upon clicking, a form pops up in a qTip dialog allowing users to submit feedback.
CCK – Using CCK, a “Feedback” content type was created, and this node creation form is shown in the popup. The type of feedback (question, idea, problem, other) is a radio button selection element.
Flag – The Flag module is used to allow users to “Agree” with a particular piece of Feedback, promoting it up the chain so it can get more attention. It also allows issues to be marked as “resolved”.
Views – The Views module is used to show “Popular” Feedback of the same type within the dialog.
I have not come across similar functionality in any other module that I’ve come across (apart from the GetSatisfaction module). Refactoring this code a bit may make for a solid module contribution if there is community interest.
Optimization & Scalability
Drupal requires some tweaks order to successfully scale for a large, high-traffic site (where many of us aspire to be one day). In an attempt to start down this road as early as possible and to set the site up for success should it ever achieve such traffic, YouTourney has been tweaked for performance wherever possible. While this is outside the scope of this case study, I would like to highly recommend the following resource: Squeezing the last drop from Drupal: Performance and Scalability. I found this to be an invaluable guide to optimizing the site!
Methods used include conversion of cache tables to InnoDB, installation of APC PHP accelerator, MySQL and Apache tuning.
YouTourney is running Drupal 6 and is currently hosted with Cloud Server hosting from Rackspace. It runs on an Ubuntu 9.10 (Karmic Koala) LAMP stack.
Conclusion
Having spent an inordinate of time researching and experimenting with content management systems, I can highly recommend Drupal for a site of this magnitude. Drupal provides an excellent platform for development, and with so much flexibility enables almost limitless customization. The wonderful array of community-contributed modules are both robust and well maintained. They save huge amounts of time even with highly-customized sites.
Thank you so much to the Drupal community for the excellent work done here! I hope this case study provides at least a small amount of give back.
You can check out the site at http://youtourney.com. There is more information available at http://blog.youtourney.com as well.
Thanks for reading – I hope people find this useful. Feedback is most welcome!







{ 473 comments }
← Previous Comments
cXvoKgvoHz kids ugg boots clearance yQutPgskSc http://www.lakearrowheadonline.com dUugBfkzAv
I was honored to obtain a call from a friend as soon as he uncovered the important tips shared in your site. Looking at your blog write-up is a real brilliant experience. Thank you for thinking of readers much like me, and I desire for you the best of achievements like a professional in this topic.
You are my inspiration, I have few web logs and occasionally run out from post :). “‘Tis the most tender part of love, each other to forgive.” by John Sheffield.
Thank you for every other informative blog. The place else could I am getting that type of info written in such a perfect means? I’ve a mission that I’m simply now working on, and I’ve been on the glance out for such information.
I’ve recently started a blog, the info you provide on this web site has helped me tremendously. Thank you for all of your time & work. “You do ill if you praise, but worse if you censure, what you do not understand.” by Leonardo DaVinci.
Hi there this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding experience so I wanted to get advice from someone with experience. Any help would be greatly appreciated!
A remarkable talk about, I just given this on a new coworker who was performing a tiny analysis about this. And also he actually bought me personally lunch since I found that regarding your pet.. laugh. Thus let me reword in which: Thnx for the take care of! Yet sure Thnkx for investing some time to talk about this particular, I’m highly regarding it and adore reading a lot more on this subject. Whenever possible, as you become experience, could you mind upgrading your website with more information? It can be highly ideal for us. Major flash upwards with this blog post!
Thank you so much with regard to giving me personally an update on this subject on your web site. Please realise that if a completely new post appears or if any improvements occur with the current submission, I would want to consider reading more and focusing on how to make good use of those tactics you write about. Thanks for your efforts and consideration of other people by making this blog available.
Opposite to some sentiments, good investigated articles still bring in audience like me. You presented total understanding of the topic and my ideas are actually complete after reading your blog. Please maintain up the quality of work and I will sign up to your rss feed to be suggested of any potential posts.
Another long hot day *sigh*
Great article, thank you. I signed to your blog rss feed.
I am going to go ahead and bookmark this content material for my sis for the investigation project for class. That is a rather net page by the way. In which do you receive a hold the style for this net page?
I really enjoy looking through on this web site, it has got wonderful articles. “And all the winds go sighing, For sweet things dying.” by Christina Georgina Rossetti.
Gee willkires, that’s such a great post!
x12anf armjkgijjzfz
Dead indited written subject material, many thanks for facts.
I would like to thank you for the efforts you’ve put in writing this blog. I am hoping the same high-grade blog post from you in the upcoming as well. Actually your creative writing abilities has inspired me to get my own website now. Actually the blogging is spreading its wings quickly. Your write up is a great example of it.
replica watches have become even more popular then their original prototypes because of low price in combination with perfect clones appearance of watches.
I went over this site and I conceive you have a lot of great info, saved to bookmarks (:.
Good day! I just want to give a huge thumbs up for the great information you’ve here on this post. I shall be coming again to your blog for extra soon.
I was recommended this blog by my cousin. I¡¯m no longer certain whether or not this submit is written by way of him as no one else realize such particular approximately my problem. You¡¯re amazing! Thanks!
Go into the planking competition for totally free along with get paid to plank. Just get as many friends as feasible to vote on your planking contest entry in order to win.
Very interesting points you have mentioned , thankyou for putting up. “Whatever one man is capable of conceiving, other men will be able to achieve.” by Jules Verne.
Another fantastic publish on blogging Many thanks therefore considerably for taking time to talk about you details and knowledge along with other writers
I’ve found myself here many times before while looking various things. I appreciate the detailed articles you write, and in some instances this is the ONLY place I can even find them. Cheers
I am unable to read articles online very often, but I¡¯m glad I did today. This is very well written and your points are well-expressed. Please, don¡¯t ever stop writing.
Just a smiling visitor here to share the love (:, btw great design.
Nice post. Intriguing subject and approach. Ill be coming back some time within the not too distant future.
Hello, you have a great blog. I’ll bookmark it and come back in the future. Thanks!!
I haven’t checked in here for some time as I thought it was getting boring, but the last handful of posts are really good quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend. :)
It’s appropriate time to make some plans for the future and it’s time to be happy. I have read this post and if I could I want to suggest you some interesting things or suggestions. Maybe you can write next articles referring to this article. I wish to read more things about it!
I don’t recall a certain president making calls to americans to evaluate and find out whether it was okay around to spend our cash war in a very foreign country searching for weapons of mass destruction that’s NOT there? I hear no complaints or discussions with that! Why is this country so hell bent on critizing this president for doing something for the citizens that’s obviously an enormous benifit to prospects looking for health care? Do you think you’re Everything that heartless? in planning to conserve the less for fortunate???
Glad to be one of several visitants on this awful site : D.
Very Curious site this is.. I really Relish a lot reading your Blog.. I will Bookmark your site for more remark.
Very interesting points you have mentioned , appreciate it for posting . “Whatever one man is capable of conceiving, other men will be able to achieve.” by Jules Verne.
This review will tell you what makes XSitePro 2 so much better than its competitors.
I will be the dog in the hat
Simply wanna input on few general things, The website design is perfect, the content is really superb : D.
Good sources! Thank you will for showing this with us. ray exclude wayfarer is among the most hot fashion within the modern pattern.
I’ll try to put this to good use iemmdiaetly.
What’s Going down i’m new to this, I stumbled upon this I’ve discovered It absolutely helpful and it has helped me out loads. I am hoping to give a contribution & help other customers like its aided me. Great job.
I’d need to examine with you here. Which isn’t something I often do! I get pleasure from reading a submit that can make individuals think. Also, thanks for allowing me to remark!
הובלות זה דבר שהינך צריך? האומנם הובלות יסייעו בשבילך לקחת אחר מה שרצית? עבודת הובלות שוות מספקים לנו, הצרכנים ביטחון.
XSitePro has a clean interface and is designed so that the average person can build a site. To test this I’ve had my wife and my teenage son build simple sites. In a matter of a couple hours each was able to build a visually compelling site.
Hi guys, we give Free on-Demand Music, Internet Radio, youtube music, internet radio, free songs, radio player, cloud based, cloud computing, cloud music, and more………
radio player
Great post always enjoy reading your content
hello!,I love your writing so a lot! percentage we keep up a correspondence more about your article on AOL? I require an expert on this area to resolve my problem. May be that is you! Having a look forward to look you.
It’s arduous to seek out educated folks on this topic, but you sound like you know what you’re talking about! Thanks
real glad to find this site on bing, just what I was searching for The McAllen scrap metal recycling company of Tesoro Scrap Metal is an eco-friendly facility that provides superior customer service for all your scrap metal needs.
Great post, I think people should larn a lot from this blog its real user pleasant. So much superb info on here :D.
In case you might be intrigued in environmental situations, to as wonder the criminals to be aware that to manufacture just 1 bag with this specific style hydration brings reasoning greater liters akin to oil and gas to come up with. day-to-day deal livingsocial discount baltimore washington
I really like your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz reply as I’m looking to create my own blog and would like to find out where u got this from. thank you
← Previous Comments
{ 3338 trackbacks }