Drupal

  Home  Content Management System (CMS)  Drupal


“Drupal Interview Questions and Answers will guide us now that Drupal is a free and open source Content Management System (CMS) written in PHP and distributed under the GNU General Public License. It is used as a back-end system for many different types of websites, ranging from small personal blogs to Enterprise 2.0 collaboration. Learn Drupal Programming by this Drupal Interview Questions and Answers guide”



40 Drupal Questions And Answers

21⟩ How to install Drupal on a local WAMP server?

Preparing your computer with a local installation of Drupal with WampServer is comparatively a trouble-free process to follow. Since WampServer will install an Apache-server, SQL, PHP and phpMySQL on your computer, with those tools you can install and run Drupal locally even without an internet connection.

 173 views

22⟩ How to backup a Drupal site?

Backing up your Drupal site is now very easy, you just need to download and install a module called Backup & Migrate. To install the module click on the Administer » Modules check the Backup and Migrate module and enable it and save the settings.

Then navigate to the Administer » Content Management » Backup and Migrate then do the following settings.

► Exclude the following tables altogether: select the table which you dont want to take backup.

► Give the backup file name.

► There are also options to compress the file before download, or add a datestamp.

► And then click Backup Database.

Alternately you can take backups using PhpMyAdmin.

 176 views

23⟩ How to add custom PHP codes in my Drupal pages or blocks?

By default, drupal will not allow inserting PHP code directly inside a post or in a block. To do this, you need to activate a drupal module called PHP filter via, Administer » Site building » Modules. Even though this module ships with drupal, it remains disabled by default.

 178 views

24⟩ How to remove breadcrumbs from my Drupal pages?

Breadcrumbs or breadcrumb trail is a navigation aid used in drupal interfaces. Normally it appears in between the top banner area and the page title. It gives users a way to keep track of their location within programs. Breadcrumbs are really useful in a comparatively bigger website with plenty of sections and subsections. But when it comes to smaller websites, it may found useless. In those cases you may either hide it using CSS (eg. .breadcrumb {display: none;}) or in the page.tpl.php file remove the line that says <?php if ($breadcrumb) print $breadcrumb; ?>

 173 views

25⟩ How can I create a custom region in my Drupal template?

Adding a new region in your drupal template is not a hard thing, but its not as easy as adding a new block. It's basically a two-step process:

► define the custom region in your theme's .info file

► insert some PHP in your theme's page.tpl.php file wherever you would like the new region to appear

 165 views

26⟩ How to handle upgrades in Drupal?

It's a fact of life that you'll have to upgrade your Drupal installation and contributed modules fairly frequently. Your candidate should mention:

► backing up the site,

► putting it into maintenance mode

► downloading the new version of the module

► uncompressing it

► running update.php

► testing the site

► taking the site out of maintenance mode

Ideally, your candidate would also mention creating a development environment to minimize downtime. There is also a big difference between upgrading a module (process described above) and a Drupal minor version upgrade, which requires more careful patching. Drupal major version upgrades, which happen every couple years, are another can of worms entirely.

 167 views

27⟩ What does Views do and how do you use it?

Views is a practical necessity for sites built on Drupal 6, and it's imperative that your developer understands how to take advantage of it. Earl Miles has written a great summary on the Views project page.

 156 views

28⟩ How can I add a new Block In Drupal?

Adding a new block is a simple process in drupal 6.

► Go to Administer » Blocks and click on the Add Block link (tab).

► Fill in the form with the necessary PHP/HTML code in the block body. And click the 'Save Block' button.

 171 views

29⟩ How can I customize my 404 - Page not found page?

Create a new page with some extra information, so that your visitors don't ever plunge on to the default boring 404 - page not found error page.

Once this page is created:

► Remember its node ID,

► Go to Administer > Site configuration > Error reporting

► Set Default 404 (not found) page to the node ID you just created

► Save your settings

You can also use the Search 404 module as an alternative.

 159 views

31⟩ How do I add images to Drupal?

Image module allows users with proper permissions to upload images into Drupal. Thumbnails and additional sizes are created automatically.

Images could be posted individually to the front page, included in stories or grouped in galleries.

 177 views

32⟩ How do I remove the title 'Navigation' from the navigation block?

To prevent the navigation block title or any other block title from appearing in the pages, just do the following.

► Navigate to Administer » Site building » Blocks and click the configure link next to the Navigation block.

► In the block configuration page, enter <none> in the Block title filed. This will override the default title for the block and remove the title.

 161 views

33⟩ How can I enable clean URLs in Drupal?

Drupal's default URL structure is like "http://www.sitename.com/?q=node/10″ This URL format can be hard to read, and can sometimes prevent search engines from indexing all your pages properly. In this case you can eliminate this "?q=" and clean the URLs through the following steps.

Navigate to Administer » Site configuration » Clean URLs. By default, it will be disabled. Select enabled and click the save configuration button. You are done.

You can make your URLs even more cleaner with the help of path module.

Home » Administer » Site building » Modules: enable the Path Module.

 168 views

34⟩ How can I change the favicon in my Drupal Site?

► Create your own favicon.ico file using any graphic tools or with the help of any online favicon generator tools like dnamicdrive.

► Navigate to admin » site building » themes and click the configure link next to your current theme. This will bring up the theme configuration page.

► Here you will see a section titled Shortcut icons settings. You can either upload your favicon file or specify the path to your customized icon file.

The changes may not appear immediately in your browser, you need to clear your browser's cache and reload the page. If you have bookmarked your site, you may need to delete the bookmark and then recreate it again so that the new favicon will appear in the bookmarks menu.

 160 views

35⟩ How do I get my site to have SEO-friendly URLs?

The Pathauto module automatically generates URL/path aliases for various kinds of content (nodes, taxonomy terms, users) without requiring the user to manually specify the path alias. This allows you to have URL aliases like /category/my-node-title instead of /node/123. The aliases are based upon a "pattern" system that uses tokens which the administrator can change.

 158 views

36⟩ How can I translate Drupal to my local language?

The interface text (like the "Log in" button and the "Add new comment" text) is in English by default, but can be translated. For many languages, there are completed or partly completed translations available. (See the locale module on how to use them.)

All languages need more translation contributions. Some have only incomplete versions of the text in core, so that parts of the interface will show up in English. Others may be complete but need corrections and improvements of the language. And no language has a complete set of translations for all contributed modules.

 153 views

37⟩ Explain favicon in Drupal?

A favicon (short for favorites icon), also known as a website icon or bookmark icon is a 16×16 pixel square icon that appears near the address bar and in the bookmarks folder in a visitor's browser. By default, a drupal site shows that water drop kinda drupal logo as favicon.

 147 views

38⟩ How can I reset my Drupal admin password?

Login to cPanel -> Databases box -> phpMyAdmin;

► Select the Druapl database folder from the left navigation bar. The page will refresh and and the Drupal database's tables will be displayed on it.

► Click on the SQL tab.

► In the text field write the following SQL query:

update users set pass=md5('NEWPASS') where uid = 1; where "NEWPASS" is your new Drupal administrative password.

Click the GO button to submit the query. If the query is executed correctly and no errors are displayed then you should be able to login with the new password.

 180 views

39⟩ How to install a new module in Drupal?

After finding and downloading a module, the next step would be to copy it the modules folder. Most people copy the file to the default modules folder here http://sitename.com/drupal/modules this is where all the modules that ship with Drupal are stored so it seems somewhat logical to do this. But this folder is actually meant to store only Drupal's default modules. Instead you should go to http://sitename.com/drupal/sites/all folder, there you will see a readme.txt file. This file will clearly tell you the trick. You just need to create a new folder named modules here. Now copy the modules folder here. That's all, you have successfully installed the module.

Next step would be to enable the module through the Admin interface. To do this navigate to Administer » Site Building » Modules. Here you will see a list off all installed modules, and our newly installed module will also be listed here. You just have to check the enable check box against the new module and then click the Save Configuration button. That's all.

 159 views

40⟩ How can I install a new theme in Drupal?

This is another common question among Drupal newbies all time. After trying out all available themes under Drupals theme directory, we may naturally want to try new themes. Installing a new theme is very simple and straightforward. Follow the steps below.

Download a new theme package. Note that themes for different Drupal versions are not compatible, version 5.x themes do not work with Drupal 6.x and reverse.

Read any README or INSTALL files in the package to find out if there are any special steps needed for this theme.

Upload the contents of the theme package to a new directory in the themes directory in your Drupal site. In Drupal 5.x & 6.x, you place your themes in /sites/all/themes/yourThemeName

Click administer » themes and enable the new theme (Drupal will auto-detect its presence).

Edit your user preferences and select the new theme. If you want it to be the default theme for all users, check the default box in the themes administration page.

 170 views