Skip to main content

Responsive Youtube Embed in Drupal without installing Modules

I was using Omega and needed to make Youtube embeds be responsive to match my responsive design (without installing any module) and have them resize correctly along with the rest of my content. After some Googling and research, I came up with this solution.

The trick from WebDesignerWall is very simple. You need to wrap the embed code with a

Upgrading imagecache presets to Drupal 7 image styles

While doing a Drupal 6 to 7 upgrade for a web project, I was wondering if there was a way to upgrade my imagecache presets to Drupal 7 image styles. Image styles in Drupal 7 are the equivalent of Imagecache presets in Drupal 6. I found out that you can do it via Features or finding another solution (the one posted by Drupal user Vladimir). Here's how I migrated my Drupal 6 imagecache presets to D7 image styles. Create file in "Drupal_ROOT" and paste the following code: 

Disable comments by default for specific content type

You can disable comments from your content types admin by editing the content type on which you want to disable comments.
Go to admin/content/types, In the Comment settings section, set Default comments setting to Disabled. Save the content type. You are done! But, this will only change new posts, what for the existing posts? You have to change them manually by editing each node. It can be a bind.
We are going to do it via SQL snippets which I've tested on Drupal 7 and should work for Drupal 6 as well (in my case I have a content type 'quotation'):