Logo F2FInterview

Drupal Interview Questions

Q   |   QA

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.

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.

• 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

1. Pathauto
2. Nodewords/ Meta tags
3. Service links
4. Google analytics
5. Related Links
6. Search 404
7. Site map
8. Url list

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

  1. Mailhandler
  2. Mailssave
  3. Mediamover
  4. SWFTools
  5. FFMPEG_wrapper
  6. cck
  7. filefield
  8. imagefield

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: