Technical Writings

How to secure a Drupal site

|

Awhile back, I was working on a private Drupal website for members only. Now, Drupal has a module called Secure Site which can be used for this. However, Secure Site throws up an HTTP 401 error to request authentication from the user. If you've ever seen a "enter username and password" box pop up in your browser, that's an HTTP 401 error. That's okay, but I don't think it's the best UI out there. I wanted something a little user-friendlier.

Drupal shows "create content" menu item to anonymous users

|

So, I'm working on a Drupal site that, for reasons unknown, shows the "create content" menu item even when the user is logged out. Since I don't allow anonymous users to post on this site, clicking on that menu item gives a "permission denied" error. Not exactly the sort of user experience I want to provide.

Well, I just came up with this bit of code to fix the problem. It goes in index.php after the call to drupal_bootstrap():

if (strstr($_SERVER["REQUEST_URI"], "/node/add")) {
   if (empty($user->uid)) {
      drupal_set_message("You must be logged in to do that");

Essential Drupal Tips for Drupal 4.6.5

|

I've been running Drupal for a few months and I've learned a few tips for interacting with Drupal, as well as a few "gotchas" present in Drupal. I'd like to share them with you in this article. Unless mentioned otherwise, everything in this article applies to Drupal 4.6.5.

Essential Modules for Drupal 4.6.5

|

I'm a big fan of Drupal, and one of the things I think that makes it great are the add-on modules that you can download and add to your Drupal installation.

That being the case, there are some modules that I consider to be absolutely essential to getting the most out of Drupal. I install these modules on just about any Drupal instance I build so that I can save time when putting the actual content on the site. Here is the list of modules in no particular order:

Backups Made Easy

Backups are defined as making copies of your data onto media not normally connected to your computer in case something goes wrong with your computer. The definition is simple enough, but time and money make the actual process of doing regular backups much more complicated. (Note: this article is intended for home/hobbyist users)

Why make backups?

Backups should be made regularly because computers are not 100% reliable. Hard disks malfunction, viruses and worms corrupt data, and people sometimes accidentally delete a document that they spent hours working on. Having a backup means you can recover from such things, with little data lost.

Technical Writings

Just a little section of my website where I will be placing technical writings on random topics. I will be adding new articles occasionally.

Articles:

Backups Made Easy

A primer I wrote that explains how and why to get started making backups for the home/small business user.

Drupal shows "create content" menu item to anonymous users

Syndicate content