HaLe Blog twitter
HaLe Blog Rss

Audio and Video in Drupal 7

Posted by cvd | Posted in Content Management Systems, Drupal | Posted on 17-10-2011

9

Playing inline audio and video files in Drupal 7 can be quite some hassle… The SWF tools are not available for D7, so we have to solve this issue otherwise.
There are several modules out there that promise a lot of things, but not really live up to it…

Here’s a solution that worked great for me:
MediaElements module!  It brings the MediaElement.js html5 player plugin to Drupal.

Files to download:

1. MediaElements module: download, extract and upload into sites/all/modules/contrib & of course activate in admin/modules

2. Libraries API module: download, extract and upload into sites/all/modules/contrib & of course activate in admin/modules

3. MediaElement.js: download, extract, rename into ‘mediaelement’ and upload into sites/all/libraries

And you’re set to go!

Now you can add a filefield to your content type, and in the display settings change the default ‘generic file’ into MediaElement Audio or MediaElement Video.
You can also tweak your appearance and set the height and the width for your default display, full node, or teaser.

The great advantage of MediaElements is that it outputs HTML that can easily be styled with CSS!

 

Drupal cache headers are driving me nuts!

Posted by Kim | Posted in Coding, Content Management Systems, Drupal, PHP | Posted on 10-10-2011

0

A client of ours had this problem on their website, where users who had logged out, could still see their profile page as if they were connected!

After googling (what else!) I found the answer to be in a slight change of the headers being sent by Drupal:

File: /includes/bootstrap.inc, line 728 / 765

From:

Cache-Control:store, no-cache, must-revalidate, post-check=0, pre-check=0

To:

Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0

More info on this issue can be found here: http://drupal.org/node/197786#comment-1565612, the patch is right here: http://drupal.org/files/issues/login_linger.patch

Drupal 6 – creating your custom “maintenance” page easy and simple

Posted by lhe | Posted in Content Management Systems, Drupal | Posted on 24-08-2011

0

We are installing and completing a D6 site for one of our customers, but we had to keep a certain custom page online while we were doing so. The simplest way was to put the site in “maintenance” but then without the default Drupal page, which is not very pretty to be honest.

So, we stumlbed upon a post by Kutakizukari on the Drupal forum and it worked perfectly (http://groups.drupal.org/node/16237).

This is what he describes:

  1. Copy the default maintenance page from the Drupal directory: modules/system/maintenance-page.tpl.php to your theme’s directory.
  2. make a second copy of that file for the Site off-line page rename it to maintenance-page-offline.tpl.php
  3. Theme them the way you want them.
  4. Open the settings file: sites/default/settings.php
  5. Delete the # symbol from these lines.
    • # $conf = array(
    • # ‘theme_default’ => ‘ your_theme_name’
    • # ‘maintenance_theme’ => ‘your_theme_name’
    • # );