arrow-down coffee engineering consultancy development remote-management support linkedin twitter youtube email phone

How to Change Permissions and Install a Module in Drupal - Musings of a Drupal Girl

Submitted by Nicole Tang on April 19, 2013

In the past 2 posts, we delved into the very basics of how to install Drupal and how to add content to your site via Drupal's default content types - Article and Basic Page.

For this third installation, to enable us to go further with adding more content like a blog and users, we have to learn how to change permissions, install a module and enable Views (which is a module as well). So let's get on with it by starting up our Drupal again (remember how to do it?).

I am only just a beginner in Drupal so I might not be able to explain everything right now, but I will try to do so to the very best of my ability!

Part 1: How to Change Permissions for Drupal

To start off, let's change the permissions on your site. As an administrator who can set up accounts for users to use your website and to add blog posts, it is important to ensure you set up the proper permissions so that future users you decide to add cannot randomly add anyone else.

To do this, go to "Configurations" > Account Settings (under the category of 'People'):

You will then get to your Account Settings page that looks like this:

Scroll down till you find the "Who can register accounts?" option under "Registration and Cancellation", then change the option to "administrators only":

Scroll all the way down and save it. And voila, now only you, or others that you allow to have administrator status, can add new user accounts.

Hold up, I'm confused: what is a Module?

If that is what you were thinking when you first read this guide, welcome to my world! It took me awhile to figure my way out around the terms (and I'm still trying to right now). Lucky for us, there is the Drupal glossary; although I do have to admit that even some of their definitions are a little hard to understand (in Singlish, we call that 'cheem' - just a little funny sidenote), so I will try to break it down.

For this guide, you will need to know what the basic concept of a module is, as well as what a core module and contributed module means.

Module

A module is a module (usually PHP and CSS, two web development languages; just like how HTML is a web language as well).

There are 2 main categories for modules in Drupal.

  1. Core” modules
    • Core modules are already included when you install Drupal, be it the Acquia Dev Desktop way or the local host way.
       
  2. Contributed” modules
    • Contributed modules are created by Drupal enthusiasts, for use by the entire Drupal community (thank you!). These contributed modules are available for separate download from the modules section of Drupal.org downloads.
    • While these modules are separate from the Drupal 'core', they may become part of it overtime.
    • These are similar to additional items that other software have, with different names such as "plugins", "add-ons", "widgets" or "extensions".

To check out which core modules you have, simply go to "Modules" and you will find a list of it.

Now you will notice that some core modules are not 'enabled' as they don't have a check within the checkboxes next to it. You can enable these currently 'sleeping' modules to enable more functionality in your site, but for now, we will leave them alone.

Part 2: How to Install a Contributed Module

Yes, it is true that you can do a lot with Drupal with just the core modules, contributed modules can offer you even more, such as a module called Views. The Views module provides a flexible way of allowing Drupal administrators to control how lists of posts are retrieved and presented. In the words of some enthusiasts, the Views module is almost essential.

If you are on Drupal 8, then you're in luck! The Views module is now a core module for Drupal 8! While for me on Drupal 7 (or earlier), I have to install it myself. But that's okay, it allows me to practice on how to install a module and show you all how to do it.

Getting to your 'Install a module' page

Lucky for us, it is a lot easier to install modules on Drupal 7! Rather than having to use FTP (stands for File Transfer Protocol - a way of uploading files onto the web), we can just link the source file of the module (aka the link of the module itself) and Drupal will do the rest for us.

The first thing you have to do now is get to your "Install new module" page. To get to this, go to Modules > Install new module.

Now leave that page there, and open a new window/tab so that you can go to the Views module page.

Getting the right Module link to install

For whichever module you install, you always need to get the latest version of it under the "Recommended releases". So at the time of this post, the "7.x-3.7" version of Views is the latest:

Right click on the "tar.gz" link of the "7.x-3.7" version and 'copy link location'.

Installing the Module itself

Go back to your 'Install a module' page and paste the link into the "Install from a URL" section:

Click install, and if all goes well, you should get this:

However, sometimes, not all goes as planned. If the installation of your module fails, there are 2 ways to go about it.

#1. Go back and try again

You can press the back button, paste the link into the 'Install from a URL' again and click 'Install'. If that still doesn't work, you may have to do it the slightly longer way.

#2. Installing from a Module download

To do this, go back to the Views module (or whichever module) page, and download the "tar.gz" file. Save it on your computer, in a place that you can find.

Go back to the 'Install a module' page and search for the file under the "Upload a module or theme archive to install" section.

Click install and you should get the same installation page as above.

Enabling the module

Installing a module does not mean it is enabled. So to ensure that you enable it, go to the "Enable newly added modules" link that is on the page after you have successfully installed a module:

If you clicked on "Administration Pages" instead, not to worry. Just click on 'Modules' from the top navigational bar and you will be brought to your list of Modules. Scroll down until you find the 'Views' module, and enable it:

Click on the checkboxes and save configuration. Should you be asked to enable the Chaos module, just click continue. There certainly aren't any big problems with enabling a core module.

*drumroll* You are done with installing a module! For installing subsequent contributed modules, all you have to do is follow these same steps.

This guide is also available on Slideshare for easy download!

So there we go: How to change permissions for better control, and how to install a module in Drupal. I hope that was simple enough for you to learn how to about permissions and installing a module.

And now that we have Views installed, we can go on to our next content milestone of installing a basic blog! Have any suggestions/comments/questions? Would love to hear from you. Just drop me a note at nicole@olindata.com. Till the next post!