Skip to main content


Content vs. Configuration

In Drupal, content is defined as "Information meant to be displayed on your site, and edited by users: article, basic page, images, files, etc.". Configuration, on the other hand, is defined as "Information about your site that is not content and changes infrequently, such as the name of your site, the content types and views you have defined, etc.".

CURL Upload a file to a Drupal Form

In order to upload a file to a Drupal form, you need to be sure to include the hidden form_id input. After that, it is just a matter of using the name of the html element. The code looks like this: [geshifilter-bash] curl -X POST -F 'form_id=MY_DRUPAL_FORM_ID' -F 'files[xml]=@/path/to/my/file.txt'[/geshifilter-bash]

Linux copying many files from many paths into one directory

Today I had the task of gathering files from a Drupal website into an archive to send to a client. The files were stored in the database and were spread out across the public files and the private files directories. In order to create an archive and prevent the client from manually clicking on 1000 file download links, I did the following.

Multiple Drupal virtual hosts with their own syslog files

We have a shared hosting server that handles many Drupal sites within their own Apache virtual hosts. We had a need to track all available log messages for long periods of time, which the core watchdog module wouldn't allow us to do. So, we enabled the syslog module to write the messages to log files on the server.

To get all of the sites into their own log files we had to add the following code to /etc/rsyslog.d/drupal.conf

Get the Aegir Platform path when editing a vhost

I was setting up a static mobile website for a Drupal site that was installed within the Aegir hosting environment today. We had been given a static mobile version of the website to load. So, we added the mobile site to a directory within our theme and we needed to setup an alias for this site. To accomplish this we created a new file within the .drush folder and added the following code:

Change Permissions for Roles in Open Atrium

Today I was working on an intranet site using Open Atrium. Our client wanted to post their employee handbook on the intranet using the atrium notebook module. The problem is that, by default, all authenticated users are able to post a handbook item. Obviously, this wouldn't work with an employee being able to modify the employee handbook online.

Drupal Multisite: Preventing a sub-site from getting indexed by search engines

Today I needed to prevent a Drupal 6 website from getting indexed by the search engines. This would normally be a relatively easy task by having the robots.txt file disallow everything. The problem I ran into was that I was using Drupal's multisite feature and I needed to prevent a sub-domain from getting indexed while the main site continued getting indexed.

Secondary links displaying on the home page

In a recent project I needed to have my secondary links display on the home page, but for some reason they weren't displaying. I had the source for the secondary menu set in the menu settings to be the 'main menu' and my 'main menu' was setup like this:

  • Home
    • Sub 1
    • Sub 2
  • Nav 1
  • etc.

My 'Home' link's href was set to <front> and the secondary links worked perfectly, except on the home page.