Posted on December 3, 2010 // Short URL

How We Built



Content Permissions

Great podcast,

What did you use for managing the content permissions, for subscribed content, in making the teaser replace the actual content when the user is not logged in?




I'm assuming your referring

I'm assuming your referring to the videos and how we're handling displaying a preview video for non-subscribed users and a full video for logged in users.

It's actually quite simple. We've got two distinct CCK fields on the video content type, one for the teaser video and one for the full length video and then handle choosing which one gets displayed at the theme level. (Three actually, if you count the video sill frame that gets displayed if there isn't a preview video.) Of course, if you're doing this you'll want to make sure that you setup CCK to 'exclude' the fields from output to ensure that you have full control over where/when they are displayed.

Honestly, we went back and forth on this for a while, wrote a couple modules to handle it a couple of different ways and then had an "ah ha" moment and resolved the issue with something like 10 lines of code.



Yes Exactly

I am working on a simular senario, is it possible to share the 10 lines of magic? Thanks.



It's really just a handful of

It's really just a handful of if/else statements inside of a template_preprocess_node() function and a hook_perm() implementation inside a module that already contains a bunch of glue code for the site.

Inside your template.php file something like the following should do the trick. Note: Code was typed directly into the comment box. :)

function mytheme_preprocess_node(&$vars) {
  if (
user_access('my custom permission')) {
$vars['video'] = $vars['field_video_full_rendered'];
  else {
$vars['video'] = $vars['field_video_preview_rendered'];

Then in your node.tpl.php file you can print out the $video variable and depending on wether or not the user has the 'my custom permission' permission they'll either see the full length video or not.

Hope that helps get you pointed in the right direction.



1 cck, sometimes free, sometimes hidden

Thanks for the great episode. I was stoked when I heard the part about "some videos are free" and wanted to hear more how to do it-- now with this explanation, it looks like you're discussing only the subscription vs anonymous push.

What method did you devise for exposing some videos as completely free? "Content Permission", afaik, is a binary "you get this field or you don't". I am looking to identify some content as "Premium" content, but the same cck/node type is being used for free and Premium alike.

If you've already solved that puzzle, I wanted to tap your ideas first-- otherwise, I'll round back when I've built my hack..



Drupal Dude

Subscription Manager?

Can you guys put a link up to the module you call Subscription Manager please? I can't seem to find it on Also, have you guys looked at and is this paid solution even worth it?

I'm looking for a similar solution to do site access based on paid subscriptions. Thanks!


Evan Donovan

SBT2++; Ooyala Costs; Videola

I am so glad that you created a new version of Similar By Terms as a views plugin. That is exactly what I tried (and failed) to create as a view the other night, using the Taxonomy: Related Terms relationship.

The Ooyala API sounds brilliant, in re: Ooyala Markers. Around how much does it cost to host videos on Ooyala?

Videola sounds like a brilliant idea; I might have to migrate the content from the video sharing site I'm currently working on to the new distribution once it's out.



Thanks for a great

Thanks for a great episode!

Just wanted to let you know, that as of version 3 Sass has a new main syntax that is similar to normal CSS. So no more indented syntax :-)



Bold & italic @font-face fonts

You mentioned on the podcast that you use @font-face fonts, but that you have to specify different fonts for bold, italic, etc.

I've just recently discovered @font-face too, but when I was researching it I found a way to use normal bold & italic syntax that still renders in the correct font. This way you don't have to change the way you write your CSS, and you only have to have the one font-family.

If you're interested, you can read my little tutorial of how I use @font-face:




Thanks for the heads up BWPanda. I'll give that a try and test it out. Did you find documentation of that method or just happen to try it and see that it works? That's pretty cool. Thanks again.


Michael Hart

What Ooyala plan did you go with?

Did you get the Standard, Pro Lite, Pro or Enterprise?

Why did you go with the plan you chose?

Price? Features? APIs?

I'm trying to decide which to start with to get the same feature set you have.



Joe Miller

Add to Cart -> SignUp?

First, awesome and informative podcast, muchas gracias. Second did you change 'Add to Cart' form to 'Sign Up' with a theme function in template.php or did you use a module, or something other way? Thanks again!



Joe, you can actually change

Joe, you can actually change the text of the "Add to cart" button in Ubercart. The setting to do so is under Administer > Store Administration > Product Settings.

Note that this sets the text of the button site wide. If you want to change the button for just a single product overriding the add to cart form in your theme layer is probably the easiest solution.


Elijah Lynn

Ooyala vs Brightcove

Really enjoyed the podcast and I like where this is headed!

I am currently researching a video solution for our company and am wondering if Ooyala had any distiguishing features over Brightcove, I am assuming you investigated Brightcove as well as Kaltura for this and would love to know what the pros/cons you found for each platform.



Elijah Lynn

Ooyala switch?

I just noticed that you switched from Ooyala to JWplayer and Amazon. Although the videos are not as responsive now I am assuming it is because it gave you more flexibility? Can you comment on your experience with Ooyala? We just signed up with them (12 month contract) because the ability to jump to chapters was already partially supported but now I am starting to wonder if there is something I am overlooking.