drupal

11
THE BORN AND BIOGRAPHY What is Drupal? What is CMS? Drupal was born by experimental effort of Dries Bytrate and its friends. It was named by combining two words drop and pal. It have earned the good name in worlds most popular, stable and well built CMS in few years. Webware 100 - 2007, 2008, 2009 Packt Publishing 2007 Best Overall Open Source CMS Packt Publishing 2008 Best Overall Open Source CMS. Packt Publishing 2008 Best PHP Open Source CMS. 2009 best Open Source CMS Award Hall of Fame Award in the 2009.

Post on 21-Oct-2014

1.182 views

Category:

Documents


7 download

DESCRIPTION

It is basic Drupal presentation which is given by one of our Drupal developer to the other developers who don't know Drupal CMS.

TRANSCRIPT

Page 1: Drupal

THE BORN AND BIOGRAPHY

• What is Drupal?• What is CMS?• Drupal was born by experimental effort of Dries Bytrate and its friends.• It was named by combining two words drop and pal.• It have earned the good name in worlds most popular, stable and well built CMS in few years.

Webware 100 - 2007, 2008, 2009 Packt Publishing 2007 Best Overall Open Source CMS Packt Publishing 2008 Best Overall Open Source CMS. Packt Publishing 2008 Best PHP Open Source CMS. 2009 best Open Source CMS Award Hall of Fame Award in the 2009.

Page 2: Drupal

How Its Different Then Other CMS

Initial package size. ( near about 1.5 Mb with is 1/10th then popular joomla CMS) Light weight (You will feel it when work). Large quantity of contributed modules are available. You can find lot lot lot ready made modules on drupal.org if you don’t which saves lot of

time. Follows strict MVC structure. If you want to use this CMS without care of coding standards then please be away. This CMS is not built for you then. Perl script support for checking your modules coding standards. You can check your code for coding standard using Perl script provided with drupal. I

think this is for Linux based plate form only. Following is the command to check your script.

Multiple site with single package is possible which reduce disk usage as well as resource usage.

Well built menu section. Reliable and extended user permission management. Easy to extend core functionality without affecting core code. Database Switching. Compatible with MySql, PGSQL and SQLLite. Not need to change your queries when you change data type. Nice database abstraction

layer.

Page 3: Drupal

Compitibility

Operating Sytems : Linux. windows. Mac OS X. BSD. Solaris.

Programming langauge : PHP Javascript library :

Jquery . Prototype. AHAH ( Its drupal own built functionality base on javascript and ajax. This is part of drupal

form api.) lets see example of ahah.

Databases Mysql PGSQL SQLLite ( after release of drupal 7).

Web servers : Apache. IIS. Lighttpd.

Page 4: Drupal

Directory Nest

Page 5: Drupal

Directory Nest files folder doesn’t ship with Drupal by default, but it is needed if you plan on using

a custom logo, enabling user avatars, or uploading other media associated with your new site.

The includes folder contains libraries of common functions that Drupal uses. We don’t need to add anything here its core drupal directory.

The misc folder stores JavaScript and miscellaneous icons and images available to a stock Drupal installation.

The modules folder contains the core modules, with each module in its own folder. It is best not to touch anything in this folder.

The profiles folder contains different installation profiles for a site. If there are other profiles besides the default profile in this subdirectory, Drupal will ask you which profile you want to install when first installing your Drupal site. The main purpose of an installation profile is to enable certain core and contributed modules automatically. An example would be an e-commerce profile that automatically sets up Drupal as an e-commerce platform.

The scripts folder contains scripts for checking syntax, cleaning up code, and handling special cases with cron. It is not used within the Drupal request life cycle; these are shell and Perl utility scripts.

The sites directory (see Figure 1-5) contains your modifications to Drupal in the form of settings, modules, and themes. When you add modules to Drupal from the contributed modules repository or by writing your own, they go into sites/all/modules. This keeps all your Drupal modifications within a single folder. Inside the sites directory will be a subdirectory named default that holds the default configuration file for your Drupal site settings.php. The default directory is typically copied and renamed to the URL of your site, so your settings file would be at sites/www.example.com/settings.php.

The themes folder contains the template engines and default themes for Drupal.

Page 6: Drupal

Site Directory Nest

Page 7: Drupal

Installing and core functionalities

Lets see demo station for it.

Page 8: Drupal

Extend The Drupal

Drupal have very good core features as we seen. But there is characteristic of being human that they always try

to expand the things(Only humans). Ok so we may want to expand it too! There are main two ways to extend Drupal. By making modules we can extend functionality of Drupal. By making themes we can increase ( or may decrease if not

created well) the beauty of Drupal site. First we will learn how to create modules then we go for theme

creation so , Friends make your weapons ready and keep your brain engine

running to raise questions.

Page 9: Drupal

Hook ?????

There is no war without weapons my friends. So In this war your weapon is HOOK. So, what the hook may be? Speaking in simple words, It’s the prefix for all function we

will write in our module. For convenience intelligent programmers keeps it same as

name of our module. And hope being intelligent we will not rename it. Yes you will ask can I change it to something else? Why not sure, you can change it. But then you have to

change one parameter in hook_info function (we write this function in .module file). So, we can change is at our risk. It may fail your module if not taken care!

So, first we will write a module and then answer how we can change name of hook.

Page 10: Drupal

Module Structure

There are main three files for module. <module name>.info [Required] This file is used to describe the module. It submit its decriptional info to Drupal engine. If you don’t have written this file you will not get your module listed on

installation page. <module name>.install [Optional] This file will be called at install , update and uninstall instances of the module. We can specify additional process during this instances by coding this file. This is optional. If not coded Drupal will do normal install , uninstall or update

of module. <module name>.module [Optional] This file will contain all other code For forms, validation, listing data, view

data as well as insert, update, delete the form data. So this is our war station where we are going to fight…! [Show the module live and its structure].

Page 11: Drupal

Thanks!