Fixing Permissions on the Files Directory in Drupal

Unless you’re familiar with the Linux command-line, setting up file permissions can be tedious and difficult. Add a migration into the mix and it becomes very easy to have a Files directory that isn’t writable by the web-server. This tutorial is meant to make this process a bit easier and leave you with a files directory that is not only writable by the web-server but includes a “sticky” permission to ensure that all files created inside of it inherit the proper read/write access permissions.

Read more
1500 881 Singlemind

Replacing Usernames with Real Names in Drupal

Replacing usernames with real names sounds like it should be easy, and it is. It hasn’t always been this way, though. Once upon a time, you’d need to create a theme override in the theme’s template.php, which is understandably scary to non-developers. We’ve put together this quick tutorial to help guide you through the simple process of getting this working on your Drupal environment.

Read more
1500 881 Singlemind

Create a Page Template for Anything You Want in Drupal

Out of the box, Drupal provides the ability to create page templates for different pages/sections. However, its flexibility is relatively limited, in our opinion. This page on drupal.org shows the following page.tpl.php naming conventions and uses: 1. page.tpl.php (global) 2. page-front.tpl.php (front page) 3. page-node-edit.tpl.php (node edit) 4. page-node-[#].tpl.php (specific node) 5. page-node.tpl.php (nodes – global) 6. page-[internal/path].tpl.php (specific path)

Read more
1500 881 Singlemind

Adding a Region to the Node Template

Typically, regions are returned in a theme’s page.tpl.php file. This works for almost everything, but as we found recently, there are situations where a region might need to be made available to the node.tpl.phpfile for the purpose of more specifically control a block’s location within a node. A good example of this is a node that has comments enabled. The node content and its comments will appear one after the other, both being returned by the value $content in the page.tpl.php. How to add a block between them?

Read more
1200 630 Singlemind

Using your Gmail/Google Account as an OpenID sign-in

You know that all Google/Gmail accounts are also OpenID identities, right? Well, assuming so, have you ever wondered how you can use your Google/Gmail account as an OpenID sign-in to a website? Here is one way of doing such…

Read more
1500 881 Singlemind

Setting up Pressflow and Varnish to work with HTTP and HTTPS

Using Varnish and Pressflow together is an effective way to maximize the potential of your hosting environment, and can yield extraordinary results. The problem is, if you’re not intimately familiar with Varnish, or the Linux command-line, getting it into a functional state can be something of a challenge. Out of the box, it is adequate at caching content for anonymous users, but that’s where the fun ends. On a recently completed (large) Pressflow project, we had to make some decisions about server architecture. Varnish, under heavy load, can suck down memory pretty quickly, so we opted to use two servers. The first one housed Varnish and Memcache, while the second one acted as the application environment (LAMP with APC).

Read more
1500 881 Singlemind