drupal

By Phil Frilling, 15 December, 2017
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.". A simple analogy is that of a contractor building a house. They must raises walls, set windows, and lay floors.
By Phil Frilling, 17 February, 2017

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:

 curl -X POST -F 'form_id=MY_DRUPAL_FORM_ID' -F 'files[xml]=@/path/to/my/file.txt' https://www.example.com/path/to/form

Tags

By Phil Frilling, 3 September, 2013
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.
By Phil Frilling, 11 May, 2012
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. First, I went to the 'admin/user/permissions' page and disallowed the 'create new books' and 'add content to books' permissions for my newly created 'Employee' role. Upon testing an employee user, they were still able to add book content.
By Phil Frilling, 26 January, 2012
Today I was working on a mobile theme for a client of ours and I needed to remove the printer friendly link from every page. The first thing I did was create a hook_link_alter() function in my custom module and quickly realized this would alter every theme. I came across this article (http://drupal.org/node/46961) that lead me to the $theme_key variable. Using this I quickly limited my hook_link_alter function to the proper theme.