Drupal defined for newbies
Wednesday, December 31, 2008
Drupal is a free and open source Content Management System (CMS) written in PHP with a wealth of features that helps developers, designers and websites administrators to make their life easier. Technically also tagged a Content Management Framework (CMF), Drupal is very popular, modular, flexible, customizable, user friendly and easy to learn but hard to master CMS. It helps you organize many types of content is a painless and easy way you always wanted.
1: What is Drupal?
Drupal now a very popular Content Management System (CMS), was originally written by Dries Buytaert in 2001 as a bulletin board system for his dorm. Now with massive support from a dynamic and every enthusiastic community after 7 years it is one of the most widespread Content Management System. More than 350,000 user accounts have been created on Drupal.org, and over 2000 people have signed up for developer accounts.Drupal is praised by website administrators, designers and programmers for its solid base that allows modular development, easy extension and wide flexibility options. The separation of "core" and contributes/add-on modules makes Drupal a great CMS and also helps programmers to code better for Drupal. Currently at version 6.8, Drupal 5.x the previous version is also very popular due to reasons and parts of code for Drupal 7 is complete.
Photo by Matt Farina and picture of Dries Buytaert from http://www.buytaert.net2: Why Drupal?
It's boasted that Drupal is modular, flexible, robust customizable and meets the need for any kind of website. But still there are other reasons to use Drupal, There are lots of free and open source Content Management Systems (CMS) available let's see some of the striking Drupal features:Some great Drupal features;
- Easy to install
- Easy to learn and use (user friendly)
- Separation of core and add-on makes website development clear and independent
- Ability to run multiple Drupal sites with same code base
- Out of the box flexibility lets you turn your Drupal installation to a blog, forum or any kind of website
- Search Engine Friendly (SEF) out of the box
- Easy to add features like search, user permissions, category/taxonomy and Really Simple Syndication (RSS) etc
- A big community to support you
- Many contributed modules that plug in effortlessly to add a feature you want
- Effortless user and access control with roles and amazing user management
- Many easily changeable themes for the look and feel you need for your website
- A great software to design, code and work in

3: Drupal the four legged chair
Drupal basically stands on four main pillars. The concept that Drupal uses is simply extraordinary but the vocabulary used confuses many. A Drupal admin telling "Add a node of page content type and in menu section select primary menu then give the link home text" - might confuse many non Drupal users.Drupal being automated and intuitive also helps people starting Drupal like the theme in single folder helps a lot just upload the theme to themes folder and go to the administration to enable and activate it. Here now let's will see how Drupal is composed of from a surface level.
- Modules
- Nodes
- Blocks
- Themes

Drupal's Basic Components
- Modules are the components of Drupal, that provide certain functionality or feature to the system. A user module can manage users and carry out the Create Read Update Delete (CRUD) operation of users. Drupal modules can provide many functionality add-ons like blog, forum, RSS, social book-marking to point some. From Drupal version 5.x and above the concept of separating Drupal core modules and contributed/add-on modules has been practiced which has led to greater clarity and independence. It also allows multiple sites to be hosted with the same code base/core that helps a lot when you upgrade Drupal to a newer version. Modules simply put is a piece of code packaged to extend the functionality of the website when implemented.
- Nodes are the building blocks of Drupal content, rendered by the system. It can also be termed an abstract data type as almost everything is a node in Drupal. All the content you add in Drupal are nodes be it blog, forum post, page, story, poll or others like your own content type called "news". Comments are not nodes on the other hand. As everything is a node it helps in central control and keep track of the website and its contents. The use of the effective data structure has led to ease of coding and adding data that affects multiple aspects. Like you can add a page which has a menu item and also edit its URL/path from the same form with just one submit. This has made Drupal really easy to use.
- Blocks are the placeholders to place content in them. Blocks will mainly be of two sorts, one generated by modules like the user login block and other custom user made blocks like a block where you want to place a picture with the img tag and some text. A typical block can hold anything like it can be a block of 5 latest blogs you posted or even a block that shows the tag cloud. Menus can also be considered special kinds of blocks that hold links to nodes or other URLs. Blocks are placed in block regions and sorted as per weight assigned to them. A block with weight 2 will appear below a block with weight 1 on the same block region. Regions on the other hand, depend on the currently active theme. Block architecture to present data in Drupal has greatly effected its flexibility and made it effortless to manage sites for the website administrators.
- Themes dictate the look and feel of the website. Themes have customizable block regions which show blocks in them and a content area to show the content of that particular URL linked to a node or any other constructed content or view. As themes keep the business and presentation logic separate, regardless of the content you can change theme in a painless manner. There can be many enabled themes but at a time only one active theme. It is a package of HTML/PHP templates, CSS files, images and may be javascript files also.
4: Digging deeper into Drupal
Drupal always has something new to offer. If you want to start off Drupal right away I suggest you Drupal How to for Beginners (Drupal 5 based), it was written by us at Young Innovations Pvt. Limited. Surprisingly got reviewed by CMSWire.com, here. Mr. John Conroy called it "Goldilocks Teaches Drupal".You can also try Getting Started at Drupal.org, see the wide range of Drupal themes and modules at Drupal.org. You will also want to learn more things like 10 must have Drupal Modules, 5 Drupal Themes to Use, Dozen websites a Drupal user should not miss and more is available at my blog here.
If you want to know what modules can be used for what purpose with user reviews see DrupalModules.com. In case you want to see how the Drupal themes look in a live site then check out Theme Garden. After taking a good tour of what Drupal is and how it functions, hope you do register at Drupal.org and be a part of one of the most active and vibrant online community.

To Sum Up
You don't know it until you try it. If you have not tried Drupal till now try it once. There are reasons it is being used by giants like NASA, United Nations for http://www.standagainstpoverty.org/ to name some and all the sites can be viewed at Dries's blog here. Now with Acquia in the scene, Drupal has become more reliable and commercially supported by the man himself Dries Buytaert.Lastly I believe Drupal is surely going to change the world with around 500 Drupal sites deployed everyday. Yes Drupal.org is being redesigned, have a look here, how it would look after the redesign.
Wrote it for some other purpose but was not utilized there so, here it is in my blog :-). Happy New Year 2009 To everyone.
Start learning PHP with slides and sample code 3 (Day 5-7)
Monday, December 29, 2008The course continues for PHP and MYSQL. Learn PHP and MYSQL database handling with slides/presentation and sample code. Get the slides and code samples below:
All the slides and code is available here for download. Alternate link here to slides and sample code.
Have fun learning PHP and MYSQL, HAPPY NEW Year 2009.
Load Shedding Schedule December 28, 2008, Kathmandu, 12 hours per day
Sunday, December 28, 2008Load shedding increased again now to 12 hours per day, what next for us??
(Click the button at top right to view in full screen mode)
Ah!! I almost forgot the government is planning for Diesel plant that will provide us electricity at 3 or 4 times more financial cost and unlimited environmental harm.
Isn't there anything we can do to solve this problem as soon as possible?
Taming Drupal Node Teaser and Node Title 2 (for custom content)
Saturday, December 27, 2008In continuation to my previous post about "Taming Drupal Node Title and Teaser" this is part 2 of the Drupal node title and teaser taming tweak by editing node-type.tpl.php.(type is your content type like story, project or custom type like news or project etc). This is what your teaser for front page look like after the tweak is applied and after some great theming :-). tag for the script to work.
The previous Node title and teaser tweak works for content types that have just two fields Node Title and Node body and may be file attachments. Now picture a custom node type called project that has node title, node body, a link to the project and a screen-shot of the project. In that case the previous tweak will not give desired output so here is the code to tweak your title and teaser.
In this tweak if the last character is space then it will also be cut/omitted from the display making it look better like it would display "Saathi Sanga..." rather than "Saathi Sanga .." the space there. As the previous tweak it is targeted for teaser for the homepage.
For this teaser tweak the node-body must be shown first so that it can be extracted and separated from the body. Your CCK field weighs (ordering) should look something like below putting the body above other custom fields:
It was done in Drupal 6 but for Drupal 5 also see that Body is above other fields you created.
For node title length control, in your node-type.tpl.php use the following code by replacing
WITH following code, download the code in txt file at the end:
The above code will make your teaser be of just 12 characters for the front page only.
Similarly, for the node teaser lenght control for the front page, in the node-type.tpl.php replace:
WITH (Code downoad in .txt form at the end)
The tweak will make your teaser just 66 characters for the front page.This tweak will not affect your teasers on other pages than the front page and your full nodes. The above tweak is done on a website that had FCK editor enabled in case if FCK editor or any WYSIWYG editor is not active then wrap your paragraphs in
The teasers on other page will appear like below:
To make it look this cool you must do great theming.
Get the code in .txt format here (opens in new window), or see it here. (Links open in new window)
The text file is also uploaded to scribd here if you want to analyze the code in full screen flash interface.
I hope it helps your Drupal development and custom Drupal Theming, HAPPY THEMING.
Start learning PHP with slides and sample code 2 (Day 2-4)
Tuesday, December 23, 2008The PHP classes are running on Friday, Saturday and Sunday. These are the slides of Day 2, 3 and 4 and the sample codes as below:
The Day 2 Slide on PHP Variables, Operators ETC:
The Day 3 Slide on PHP String, Array and other funcitons:
The Day 4 Slide on HTML Forms with PHP and simple login system with session (no database)
All the slides and code can be downloaded here or Alternate Link. If you use the slides or the code please give me credit :-).
Hope you get a better idea on how PHP functions.
Load Shedding Schedule December 18, 2008, Kathmandu, 10 hours per day no light
Thursday, December 18, 2008Some one said it right "If you can't cure it ENDURE it.". That is what we will have to do with this load shedding. After all the government has promised us to 14 hours per day load shedding just wait and watch.
God save Nepal.
Start learning PHP with slides and sample code
Tuesday, December 16, 2008I recently had to start PHP class for BIM 5th Batch of Prime College so thought I'd post the slides and sample code online at my new Drupal 6 site http://www.geshanmanandhar.com/slides/php . Grab the slides and codes at the above URL. Here is the slide for day 1, other things will be updated soon.
You can get the related links at http://delicious.com/geshan/107
I hope these slides and sample code will help you learn PHP from scratch/level 0. Happy PHP learning.
Job situation 2009: a humorous video
Thursday, December 4, 2008The financial crisis has hit hard on all the developed nations and this could well be the future. CNN Money here reports 1.2 Million job loss in 2008. Though this video may be funny but there is something to think about.
In this video, Why Speak Java???
World-Crisis.net has more details about the crisis. Check out the facts and you will be amazed. For instance check the graph below:
Jokes apart, this may be the future. Let's hope we don't have to see a day like this.
Ways to get your ringtone
Ringtone in this day and era of mobiles and gadgets define who you are and what your personality comprises of. As per wikipedia "A ringtone or ring tone is the sound made by a mobile phone to indicate an incoming call or text message. The term is a misnomer, as it is often used to refer to any ring sound, almost all of which are not tones. The term is most often used to refer to the customizable sounds used on mobile phones."
So what are the ways to get the latest ringtone in your mobile phone. It also depends on the type of mobile you have but now a days having a mobile set that plays MP3 ringtones is not a big deal. Even if you have a set that plays polyphonic ringtone then its good.
There are many ways to get a ringtone. A good way is to put on your bluetooth and get some from your friends. You can download some from any site and copy it to your mobile. Another way is to pay for a ringtone from sites like http://worldringtones.com/. You can get Mobile Ringtones at this site but its for selected countries only.
So if you want to get new ringtones, buzz your friends. Download some or visit this site for Mobile Ringtones. Have your phone ringing with your favorite tunes.





