November 2012

Installing VirtualBox Guest Addition & mount shared folder

Published by burgerboydaddy on Fri, 11/30/2012 - 11:01

Tags 

Step by step guide how to install VirtualBox guest addition and mount shared folder (Ubuntu 12.04)

1. Start the Ubuntu Server VM and insert the Guest Additions CD image (Devices menu, Install Guest Additions).
2. Install necessary build tools and build dependencies:

    $ sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)
3. Mount guest addition
    $ cd /opt
    $ mkdir cdrom
    $ mount /dev/cdrom /opt/cdrom
    $ cd cdrom
    $ ./VBoxLinuxAdditions.run

Drupal 7 Open File attachment Links in New Window

Published by burgerboydaddy on Wed, 11/07/2012 - 13:21

Tags 

For requests like: Open attachment in new window code bellow should be placed inside template.php file:
Also return statement is wrapped with span/class that allows extra theming options.


function THEMENAME_file_link($variables) {
  $file = $variables['file'];
  $icon_directory = $variables['icon_directory'];

  $url = file_create_url($file->uri);
  $icon = theme('file_icon', array('file' => $file, 'icon_directory' => $icon_directory));

  // Set options as per anchor format described at