Managing access control in drupal 7

Drupal has a powerful access control system which allow administrator to manage the access for specific user role. The access control system consists of user roles and persmission set. User role are group of users and permssions are set of task that certain roles can perform. Whenever we assign some permission to a specific role, it will assign to all users of that role.

Upgrading site from Drupal 6 to Drupal 7

Recently I got an assignment upgrade a site from Drupal 6 to Drupal 7. First, I create a list of all installed modules into Drupal 6 site and check whether Drupal 7 version of that module is available. I also check that cck module is included into core of Drupal 7 version.

The upgrade process is as:

Backup your existing site and database:First, I backed up database and code of existing Drupal 6 website. If something corrupt during the up-gradation, so I restore my site using backed up database and code.

Drupal 7 ten most useful module

When we start developing Drupal website, its biggest hurdle for us which module we need to install and which module is not. If you are begginer in Drupal, then its necessary for you to set up basic configuration for drupal website.

Note that the following modules were added to core in Drupal 7 and thus do not appear on this list:

Clean URL setting in Drupal 7

By default, Drupal uses and generates URLs for site's pages that look like "http://www.sitename.com/?q=node/1". This style of URLS can be hard to read and can prevent search engine indexing.

If you want to avoid these types of URLs styles, you can use "Clean URL" feature of the Drupal. This will eliminate "?q=" from the URLs and will generate the clean url.

Clean URL use the "mod_rewrite" feature of the Apache server which allow us to create a rules for rewriting the URLS for the all pages of the website.

Creating block using custom module

In this post, we will discuss how to create a block using custom module. The benefit of creating block from module is that we can theme the content of the block or we can use this block in any other site.

We can create the block using following step:

Step 1: Creating directory for the module

First we need to create a directory in the "sites/all/modules" directory of Drupal site. For example, we have created the directory "customblock". The name of the direcotry will become the name of your module. Now, we need to create two files in the "customblock" directory.

Creating custom module in Drupal

A module is the software which define the functionality to Drupal website.  There can be three kind of module in a Drupal website.

Core Module:  These modules that are approved by core developer and community of the Drupal. These modules are installed by default when Drupal is installed.

Contributed Module: These modules are written by the Drupal community and shared under the GNU Public License. The administrator of the Drupal website can download the contributed module as per requirement of his website and can install in the Drupal website.

Creating new user roles

User role is an important feature of the user management in Drupal 7. Drupal allow administration to set up as many user roles as the requirement of the website.  It helps the administrator to set up complex functionality in the website very easily.

 For example, we can set up “moderator” role to create content in the website and “editor” role to validate the content of the “moderator” in the website and can edit the content. 

By default, Drupal 7 provides only three user roles in the website as:

Add new user in Drupal 7

  • Go to administration -> people
  • Click on “Add user” link in the page. It will redirect to user creation form.

    user management

  • In the user creation form, you will find the following field:

    User name: username of the user to login into website.

    E-mail address: Will add the e-mail address of the user. All site mail related to this user will send on this email address.

Drupal 7 : Setting default text format for content type.

I am developing a site using drupal 7 cms and I need to set the "Full html" as default text format in my site. I searched on the internet about this but did not find anything. 
 
I started explore the administration of the drupal 7 site. After doing some setting in admin, I found the solution to set the default text format for all text area in drupal 7 site.
 
  • Go to administration.
  • Click on configurtion link in top tool bar in the site.

Adding new user role in drupal 6

A role defined the group of user that have certain privileges. User roles be used to fine tune the security and administration of the site.

By default, there is only two roles assigned by drupal  : authenticated user and anonymous user.

Authenticated user : When a new user be created in the site, authenticated user role be assigned to that user automatically.

Anonymous user: This is related to user which are not authenticated or related to the site.

 We can add new user role as:

Go to administer -> user management -> roles

Pages