Tuesday, November 30, 2010

How to assign an theme for an particular callback?

In template.php you have to write a function mytheme_proprocess_page() in tha page you have to write the code below

function theme_preprocces_page(&$vars){
if(arg(0)=='test')
$vars['template-file']= 'page-test';
}

What are core required module in drupal7?

1.Block
2.File
3.Menu

Whats new in drupal 7?

1.Better user interface for administrator & users
2.Dashboard menu for administrator to display some important content on login of administrator. it is more often configurable.
3.IP Address blocking configuration is provided.
4.CCK,imagecache & URL alias is in built in Drupal.
5.Naming convention are changed in drupal for eg.Themes are represented as Appearance & User links are represented as people.
6.Module list page itself contains the link to its permission & Configuration.
7.Upload module in user interface itself .Module list page has provision to upload an module folder in an specified format.
8.All files in the module other than module file must be declared in the info file of that module.
9.If the module uses any admin configuration then the configuration path must be declared in the info file

What are the advantages & disadvantages of using drupal?

Advantages of the Drupal way of doing things:

1. It's consistent. For example, if you always use the "correct" way to print out usernames, changing the style of those printed usernames in one place changes them across the entire site.
2. It's integrated.
3. It's convenient.

But there are some disadvantages:

1. It's slow(er).
2. It uses memory.

What are the core required module in Drupal 6?

1.Block
2.System
3.Filter
4.User
5.Node

Monday, November 29, 2010

What are the compulsary files for theme folder?

page.tpl.php
info file

What is MVC architechture

I will explain this based on drupal

MVC means MODEL VIEW CONTROLLER

Controller
Controller receive input from user and tells the model & view to perform the input & get that response from it & displays.For example.In drupal index.php is the controller

View
It is an user interface element.Makes the model more intractable with user.For example. themes in drupal is considered as view.

Model
Manages data & behavior of the domain.It responds to the request from controller.
For example.Modules & database comes under the model

How does drupal works?

1. In htacces file index.php page will be mentioned as first processing page of drupal.

2.In index.php bootstrap.inc file has been included which is core part of drupal

3.Then a function menu_execute_active_handler() is called

4.In the above function will check whether any call back is there at address bar else it will get the default call back defined in drupal.

5.menu_execute_active_handler() WILL also check whether there is any access denied for this callback,site is offline,callback not found.

6.Drupal will process this callback return the page content in string.

7.Then Drupal theme the string content by calling theme_page function

8.drupal_page_footer() is called to display the footer content

Friday, November 26, 2010

How can we open a popup when browser is popups blocked

You can use the popups module in drupal to lead any content in popup in drupal 7 they have introduced overlay module.
This overlay module makes the content of all drupal administrator menu to be displayed in dialog box.

Other that this i am not much sure about about this module,but soon i will tell you about this module

What is the latest version of drupal 5 & 6?

U may think silly about this question ,but of course it is an important thing.

Drupal 6 : 6.19*
Drupal 5 : 5.22*

Drupal5 wont be maintained on release of Drupal7

*Version may change please check http://drupal.org once

Why is drupal is widely used for cms?

Use Drupal to build everything from personal blogs to enterprise applications. Thousands of add-on modules and designs let you build any site you can imagine.

Drupal is free, flexible, robust and constantly being improved by hundreds of thousands of passionate people from all over the world.

Whats new in drupal7?

Usablity

1.Better User Interface for administrator sine there is page loading instead they have user dialog box.

2.Dashboard Menu introduced so that administrator which have important content in that dashboard eg. who's online,List Recent post so that administrator can approve which is configurable.

3.CCKS,Image cache & Url alias module is inbuilt in drupal7

4.They have changed the title of some of the administrator Configuration

5.All the files used in an module folder must be defined in info file

6.More secure implementation for scheduled tasks (cron.php).

7.Module can be updated via web interface

Database

1.Added query builders for INSERT, UPDATE, DELETE, MERGE, and SELECT queries.
Support for master/slave replication, transactions, multi-insert queries,delayed inserts, and other features.

2.Added support for the SQLite database engine.

3.Default to InnoDB engine, rather than MyISAM, on MySQL when available for greater scalability and data integrity.

JavaScript changes

1.Upgraded the core JavaScript library to jQuery version 1.4.2.

2.Upgraded the jQuery Forms library to 2.36.

3.Added jQuery UI 1.8, which allows improvements to Drupal's user experience.