Showing posts from August, 2012


SQL can be divided into two parts: The Data Manipulation Language (DML) and the Data Definition Language (DDL).
The query and update commands form the DML part of SQL:
SELECT - extracts data from a databaseUPDATE - updates data in a databaseDELETE - deletes data from a databaseINSERT INTO - inserts new data into a database The DDL part of SQL permits database tables to be created or deleted. It also defines indexes (keys), specifies links between tables, and imposes constraints between tables. The most important DDL statements in SQL are:
CREATE DATABASE - creates a new databaseALTER DATABASE - modifies a databaseCREATE TABLE - creates a new tableALTER TABLE - modifies a tableDROP TABLE - deletes a tableCREATE INDEX - creates an index (search key)DROP INDEX - deletes an index

What is difference between Primary Key and Unique key?

A UNIQUE constraint is similar to PRIMARY key, but you can have more than one UNIQUE constraint per table.
When you declare a UNIQUE constraint, SQL Server creates a UNIQUE index to speed up the process of searching for duplicates. In this case the index defaults to NONCLUSTERED index, because you can have only one CLUSTERED index per table.
* The number of UNIQUE constraints per table is limited by the number of indexes on the table i.e 249 NONCLUSTERED index and one possible CLUSTERED index.
Contrary to PRIMARY key UNIQUE constraints can accept NULL but just once. If the constraint is defined in a combination of fields, then every field can accept NULL and can have some values on them, as long as the combination values is unique.

Remove Contact settings (Personal contact form) from User profile.

Remove Contact settings (Personal contact form) from User profile.


This section of the Drupal documentation covers distributions, which can be searched and downloaded from the Drupal distributions section of Download and Extend.
What are distributions? Distributions are full copies of Drupal that include Drupal Core, along with additional software such as themes, modules, libraries, and installation profiles. There are two main types of Drupal distributions:
Full-featured distributionsAll-inclusive products: complete solutions for specialized use cases.Other distributionsQuick-start tools: starting points for developers and site builders. With a "full-featured" distribution, you can quickly and easily set up a site for a specialized purpose such as academic, business, government, nonprofit, publishing, social, etc., in few steps:
Choose your Drupal distribution. You can search on the Distributions page (Download & Extend), which is all-inclusive, or use this list of several specific distributions.Install it on your web server. See th…

What is the difference between page callback and access callback

page_callback is a function called which will be used to generate contents of the pageaccess_callback is a function called which will be used determine if a user has access to view the page. This can be used where a simple permission isn't enough. An example would be that the author of the node would be allowed to edit the node or any user with a special admin permission.
Note the access_callback will by default be the user_access function which will check that the user has a specific permission. Both of these keys have a sidekick, [page/access] arguments which should be an array of arguments that is passed to the function. arguments can either be static or you can use numbers to reference the URL. If a load function us used on a URL arg, like %user, referencing it will yield the return of the load function, like the user object instead of the user id (uid). Page callbacks will receive any URL args that aren't used for pattern matching. So if you define an URL foo/bar and user …

Module - Views RSS

This module allows users to take control of their feeds by providing a fields-based views style plugin for RSS.
Extension modules for Views RSS 2.x In addition to modules included in the main Views RSS package, there are several helper modules which extend its functionality with additional feed element sets:

Read More....

Module - Poormanscron

A module which runs the Drupal cron operation using normal browser/page requests instead of having to set up a crontab to request the cron.php script. The module inserts a small amount of JavaScript on each page of your site that when a certain amount of time has passed since the last cron run, calls an AJAX request to run the cron tasks. Your users should not notice any kind of delay or disruption when viewing your site. However, this approach requires that your site gets regular traffic/visitors in order to trigger the cron request.
The 2.x versions are a backport of the automatic cron-running functionality included in Drupal 7. This module also includes the performance improvements of #566494: Running cron in a shutdown function breaks the site and only runs through an AJAX callback that is triggered via JavaScript only when necessary. This verison will be completely compatible with Drupal 7 core, so when you upgrade, you will no longer need to use this module.
The …

Module - Responsive Images

The purpose of this library is to load images in different sizes based upon
the resolution of the browser loading the page. This allows for mobile-optimized images.
This module provides a "Responsive Images" image field formatter for which you can select
both a small (mobile-optimized) image style as well as a large (for normal screens) image style.
The image style configuration options are provided by Drupal core.
IMPORTANTThis module is currently no longer actively maintained.
Alternative modules that you might want to check out:
Responsive images and stylesAdaptive imageAdaptive Image StylesClient-side adaptive image If you like to revive this project and have some good ideas on how to implement responsive images into Drupal, get in touch!

Read More....

Module - Scheduler

This module allows nodes to be published and unpublished on specified dates.
Dates can be entered either as plain text or with Javascript calendar popups (JSCalendar in Drupal 5, Date Popup in Drupal 6).
JSCalendar is part of the JSTools module.
The Date Popup module is part of the the Date module.
Please check if cron is running correctly if scheduler does not publish your scheduled nodes.Scheduler does only schedule publishing and unpublishing of nodes. If you want to schedule any other activity check out Workflow, Rules and Actions. Scheduler is the work of many people. Some of them are listed here: But there are even more: All the people who created patches but did not check them in themselfs, who posted bug or feature request and those who provided translations and documentation.
Translations to other languages than English can be found over there:
Heather James has record…

API reference

Welcome to the Drupal 6 developer's documentation. Newcomers to Drupal development should read the conceptual information provided in the "Components of Drupal" section, and then proceed to examine one of the heavily-documented example modules below. The examples are fully-functioning Drupal modules, so you can download them from the contributions repository and alter them as you experiment.
Components of Drupal Module system (Drupal hooks)Database abstraction layerMenu systemForm generationFile upload systemSearch systemNode access systemTheme systemConstantsGlobal variablesExample modulesIn-depth discussions Form API Quickstart GuideForm API ReferenceJavaScript in Drupal 5 and Drupal 6

Read More ...

Views' hooks

Hooks that can be implemented by other modules in order to implement the Views API.
Functions & methodsNameDescriptionhook_views_admin_links_alterThis hook should be placed in and it will be auto-loaded. This must either be in the same directory as the .module file or in a subdirectory named 'includes'.hook_views_apiRegister View API information. This is required for your module to have its include files loaded; for example, when implementing hook_views_default_views().hook_views_convertStub hook documentationhook_views_dataDescribe table structure to Views.hook_views_data_alterAlter table structure.hook_views_default_viewsThis hook allows modules to provide their own views which can either be used as-is or as a "starter" for users to build from.hook_views_default_views_alterAlter default views defined by other modules.hook_views_form_submitViews form (View with form elements) submit handler. Called for all steps ($form_state['storage…

Module - Embedded Google Docs Viewer

Overview The Embedded Google Docs Viewer module adds a new formatter to the File field using the Field API. This formatter displays PDFs, Microsft Word documents, Powerpoint presentations, or Excel spreadsheets directly within a Drupal node.
Requirements The Embedded Google Docs Viewer is a custom formatter for the Core "Field" module - therefore the "Field" module must be enabled.
Any files to be formatted/rendered by this module must be accessible on the open web - Google needs to be able to access them in order for Google Docs to be able to format them - so your Drupal system must not be behind a firewall, must be reachable by normal web users, and your system must store the files as "public:".
Tutorials To use this module and add embedded documents to your Drupal nodes, add a "File" field to one of your site's Content Types. Under the "Manage Fields" tab, add appropriate "Allowed file extensions," i.e. one…


Problem :-

Safer Login is not configured correctly. Please download the jQuery MD5 plugin and install it under sites/all/modules/safer_login/jquery_md5. If you are using the Libraries API module, you may also install it under site/all/libraries/jquery_md5. The file should be renamed to jquery.md5.js. If you have already installed the plugin using the Libraries API method and have just enabled this module, try refreshing the page to see if this message disappears.

Solution :-

Requires the jQuery MD5 plugin, available here:
or here:

Module - Safer Login

This module encrypts the user's password when they type it in during login, so a 3rd party up to no good can't see the user's plain text password (as is currently the case with Drupal logins).
Encryption is accomplished by replacing what the user enters for their password with a uniquely-salted MD5 hash of the MD5 hash of what they typed (so it is 2-layers deep). If the user does not have JavaScript enabled, then the default Drupal behavior (no hashing) still works.
Of course, this is no substitute for an SSL certificate on your server, as that would protect all form submissions, as well as prevent other types of attacks. This module is intended for those who desire password security, but either cannot afford a certificate, or only need basic protection from hackers during login.


Module developer's guide

A Drupal site can have three kinds of modules (the 3 Cs): Core modules that ship with Drupal and are approved by the core developers and the community.Contributed modules written by the Drupal community and shared under the same GNU Public License (GPL) as Drupal.Custom modules created by the developer of the website. This section of the Developing for Drupal handbook will help you to write your own modules and to collaborate with the community on shared projects. Before you begin writing your own modules you should also become familiar with the following sections of the Developing for Drupal handbook: Working with the Drupal API (Forms, AJAX, Localization, etc.)Drupal API ReferenceMaintaining a project on drupal.orgDrupal coding standardsWriting secure code Collaboration over competition Module duplication is a growing concern within the Drupal community, which values joining forces on improving one awesome project rather than building several sub-standard ones that overwhelm end user…

Module - Module Grants

Module Grantsmakes modules that deal with content access permissions operate better onunpublished(as well as published) content. It also makes sure that access grants behave in an orderly fashion when such modules are usedtogether. Access grants are tested forunpublishedcontent just as they are for published contentAllows modules that feature fine-grained access control (e.g.Workflow,TAC-Lite) to worktogetherWhileModule Grants'raison d'etre is to act as a catalyst amongst other modules when dealing with unpublished content and/or fine-grained access control, it does come with a handy feature of its own via theModule Grants Monitorsubmodule, which is bundled with the package download. After enabling Module Grants Monitor, a new item,Accessible content, appears in your navigation menu. Clicking on it reveals a summary of all the content the logged-in user has access to (i.e. view, edit) after access controls have been applied by the content access modules installed on your site. …

Module - Content Access

What is Content Access? Yet another content access module. This module allows you to manage permissions for content types by role and author. It allows you to specifiy custom view, edit and delete permissions for each content type. Optionally you can enable per content access settings, so you can customize the access for each content node. FeaturesIt comes with sensible defaults, so you need not configure anything and everything stays workingIt is as flexible as you want. It can work with per content type settings, per content node settings as well as with flexible Access Control Lists.It tries to reuse existing functionality instead of reimplementing it. So one can install theACLmodule and set per user access control settings per content node.
Furthermore the module provides conditions and actions forworkflow-ng/rules, which allows one to configure even rule-based access permissions.It optimizes the written content node grants, so that only the really necessary grants are written. Th…

Module - Revisioning

Revisioningis a module for the configuration ofworkflows to create, moderate and publish content revisions. You use it in scenario's like this: Authors write content that prior to being made publicly visible must be reviewed (and possibly edited) by moderators. Once the moderators have published the content, authors should be prevented from modifying it while “live”, but they should be able to submit new revisions to their moderators.We shouldn't have to grant these roles “god-like” powers (e.g. D6's "administer nodes" permission) to implement this. For the majority of use-cases configuration is straight-forward. The tricky bit are the permissions. To get you up and running quickly (D6 or D7), follow the steps described here:Revisioning at its simplest. Read More ...

Module - Workflow

The workflow module allows the creation and assignment of arbitrary workflows to Drupal node types. Workflows are made up of workflow states. For example, a workflow with the states Draft, Review, and Published could be assigned to the Story node type. Transitions between workflow states can have actions assigned to them. In our example, we could assign an action so that when the story moves from the Draft state to the Review state an email is sent out. Another action could be assigned to the transition from Review to Published so that the node's status is set to Published (and becomes visible on your website). Read More ...

Module - User Permissions

User Permissions provides an interface for giving additional permissions to individual users without the need to assign them to a special role. When this module is enabled, users with the 'administer permissions' permission can access the 'User Permissions' tab on each user's account.

Read More ....

Module - Taxonomy Term Permissions

This module allows taxonomy administrators the ability to restrict setting individual terms on nodes by user or role. This developed out of a need to allow limiting creation of specific newsletters in theSimpleNews moduleto a user or role. For example, franchise owners can be limited to their own newsletters while managers can have access to all newsletters. However, the module could be applied to other situations where specific terms are considered to be "privileged" terms, such as marking a wiki page as stable or verified.

Read More........

Module - Menu Subtree Permissions

Provide means to allow users to modify parts of the menu without giving permissions for the whole menu structure.

Read More ....