Drupal Interview Questions - III

1. How To Define New Regions in Drupal
To add regions for Drupal 5.x
ADD this code in its entirety to the bottom of your template.php file:
/** Define the regions **/
function framework_regions() {
return array(
‘left’ => t(‘left sidebar’),
‘right’ => t(‘right sidebar’),
‘content’ => t(‘content’),
‘header’ => t(‘header’),
‘footer’ => t(‘footer’),
‘newregion’ => t(‘new region’),
Replace “newregion” with what you would like to call that region instead. Note that the name on the left before the = is the machine readable format, and cannot have spaces. the name after the = is the human readable format, and can have spaces, capital letters etc. You may add as many regions as you like in the same manner that “newregion” has been added in the example above.
Then, in your page.tpl.php file, define where you would like you regions to be using a print call like so:
You need to replace “newregion” with what you named your region. The id, class and any other html can be changed to anything.
To add regions for Drupal 6.x
ADD the following code to you themename.info file:
regions[left] = Left sidebar
regions[right] = Right sidebar
regions[content] = Content
regions[header] = Header
regions[footer] = Footer
regions[newregion] = New Region
The internal “machine” readable name in square brackets and the human readable name as the value, e.g., regions[theRegion] = The region label.
The contents of the .info file is cached in the database so altering it will not be noticed by Drupal. To clear it, do ONE of the following:
1. Clear button located at “Administer > Site configuration > Performance”.
2. With devel block enabled (comes with devel module), click the “Empty cache” link.
3. Simply visit the theme select page at “Administer > Site building > Themes”.
Then, in your page.tpl.php file, define where you would like you regions to be using a print call like so:
You need to replace “newregion” with what you named your region. The id, class and any other html can be changed to anything.

2. Explain the function and working of Dashboard module ?
The Dashboard module provides a Dashboard page in the administration menu. The intention of the Dashboard page is to give administrators a quick overview of important information on the website.

3. List the modules required for building a social networking website in Drupal.
• Activity
• Advanced Forum
• Advanced Profile Kit
• Application Toolbar (Appbar)
• Author Pane
• Buddylist2 Package
• Buddylist: list your social network
• CiviCRM: manage community contacts, relationships, and activities
• CiviNode and CiviNode CCK: Tools For Integrating CiviCRM Contacts Into Drupal Content
• Comment Notify
• FOAF: friends of a friend
• Facebook-style Statuses
• Family: Record, display, and analyze genealogical data.
• Flag Friend
• Friend
• FriendList
• Front: Show group membership and events
• Gigya Socialize Module
• Invite: send invitations to join your site
• Notice Feed
• Organic Group
• Profile Setup
• Radioactivity
• Sports Pickem
• Tellafriend Node
• User Invite
• User Relationships
• UserTag:Tag users with taxonomy terms
• meetü: The Social Networking Game from the OPL @ RIT

4. List the SEO modules available in Drupal.
1. Pathauto
2. Nodewords/ Meta tags
3. Service links
4. Google analytics
5. Related Links
6. Search 404
7. Site map
8. Url list

5. How to post videos from mobile to Drupal website ?
Posting video from mobile phone to drupal website via email requests from user to configure a mobile phone with smtp settings and reasonable Internet connection (3g). Costs depends from your mobile phone provider: at some networks you pay only for transfer volume, at others you might pay for “event” of establishing connection.
On server side you will probably need to setup smtp server and provide access to it to users of your website. Transcoding of posted video employs ffmpeg, its standard software on proper hosting server.
Process Overview
1. Email with video attachment from mobile phone is sent to a defined mailbox
2. Drupal website downloads Mail on cron (mailhandler module)
3. Emails are turned into nodes with videos as attachments
4. Media Mover runs on cron, trans-coding mobile video formats and creating thumbnails
5. Transcoded flash video files are added to cck file field
6. Thumbnail added to file field
7. Nodes are themed using swftools to display video using “JWplayer”
Modules used
• Mailhandler
• Mailssave
• Mediamover
• SWFTools
• FFMPEG_wrapper
• cck
• filefield
• imagefield

6. What is a patch?
A patch is a file that consists of a list of differences between one set of files and another. All code changes, additions, or deletions to Drupal core and contributed modules/themes between developers are done through patches.
The differences are presented in a structured, standard way, which means that a program (also named patch) can be used to apply the changes to another copy of the original file.

7. What is difference between Diff and Patch ?
diff creates patch
In simple terms, the diff command is used to compare differences between two versions of a file. The resulting file is called a patch, and typically is given (by the user) a “.patch” suffix.
This patch file then can be used on other copies of the “old” file by using the patch command, thus updating their “old” file(s) to match the “new” file(s).
Why you would use diff
When might one use diff to create a patch file? Let’s say you are customizing a module to fix a bug, and have saved a new version of the module. How will you pass on your bug fix to others? Simply passing on your version of the module may not work, because it’s quite possible someone else has modified some other aspect of the code at the same time and you both would be overwriting each others’ changes.
So instead, what you do is run diff between the two files, and then upload the resulting patch — which others can then apply to their files using the patch command. (And you can apply other people’s patches against your files, without losing your own changes.)
The added benefit of this type of workflow is that changes to the code can easily be tracked — and undone, if necessary — which is essential in a community-developed project such as Drupal.

8. List the features of Drupal ?
1. Rock solid & high quality platform
2. Powerful templating system. Any XHTML or CSS template can be easily converted to Drupal
3. Real multi-site-feature (only one installation for several sites)
4. Any Kind of user groups & user permissions, OpenId compliant in Version 6
5. Can run membership and community sites, not only CMS etc
6. Clear, high quality code and API (easy to integrate with other solutions etc)

9. How to port a joomla template to drupal ?
For explanation please visit

10. Explain the capabilities of views module.
The Views module provides a flexible method for Drupal site designers to control how lists and tables of content (nodes in Views 1, almost anything in Views 2) are presented. Traditionally, Drupal has hard-coded most of this, particularly in how taxonomy and tracker lists are formatted.
This tool is essentially a smart query builder that, given enough information, can build the proper query, execute it, and display the results. It has four modes, plus a special mode, and provides an impressive amount of functionality from these modes.
Among other things, Views can be used to generate reports, create summaries, and display collections of images and other content.


Popular posts from this blog

Solved Drupal Interview Questions

A List of the Best Drupal SEO & Social Media Modules