HaLe Blog twitter
HaLe Blog Rss

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

Relative links in Powerpoint

Posted by cvd | Posted in General | Posted on 15-09-2011

1

Seems like relative paths are supported, they are just not straightforward to implement. For example if your Powerpoint presentation is in the MyFiles folder, and the MyMovie.avi is in the Media folder inside MyFiles. The trick is to edit the xml files inside the Powerpoint file:

Make a copy of your presentation as Presentation.pptx (just to keep the original safe).
Rename your Presentation.pptx file into Presentation.pptx.zip Open the resulting zip file by clicking on it.
It will open as a folder. Inside it, go to ppt, then slides, then _rels You will see files called slide1.xml.rels etc.
Copy (drag and drop) all those to another place, outside the archive.
Now open the file corresponding to the number of your slide with video with some editor (for example, Notepad).
Look for the line that says something like: Target=”file:///C:\MyFiles\Media\MyMovie.avi”
If your Powerpoint presentation is in the MyFiles folder, and the MyMovie.avi is in the Media folder inside MyFiles, then change the above line to: Target=”Media\MyMovie.avi”
Save the slide1.xml.rels file (or whatever number it was), then drag it back to that archive (that is actually a Powerpoint file), and then rename the archive back to Presentation.pptx This is it. Now you should be able to carry around the folder MyFiles with the presentation and with the Media folder inside it that contains your video.
Works for me on Windows 7

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’
    • # );