Saturday, January 9, 2010

SMTP and MIME

Hi,
Im writing after a long time.Y? Its just because i didn't learn anything new or found anything interesting to write. So , today while browsing I can across an interesting topic..

People studying engineering would know what is SMTP. But, few people know about MIME.As a student, I only knew MIME had something related to email header. So here we go.

SMTP or Simple Mail Transfer Protocol is used to send emails.These emails contain plain text and nothing else( It is because when SMTP was formulated in 1982, it had support only for US-ASCII characters).Now, when we send an email, we know that MIME adds a header to email, divides email into parts and does other technical stuff. But what if your email contains a binary file attachment? How will SMTP send the email since it contains binary information????

Now this is resolved by MIME. MIME( Multipurpose Internet Mail Extension) uses an algorithm "Base64" which does this encoding. This algorithm encodes the information, whether image,media or whatever into a form which can be understood by decoding at the recipient's end.



Saturday, September 19, 2009

Drupal - Pathauto Module

Hmm.. so u ppl are back... thank god u are :) , now I have some visits...
Without wasting any time, lets start..This time, vll learn pathauto module..So as always, lets begin by asking "WHY"....

Why are we learning this module?
You might have noticed, when you create a page or a story, it is allocated a URL automatically which by default is node/1 or node/2 and so on.. When your website is live, u obvioulsy wouldn't want to have such un-meaningful URLs. It looks more meaningful, if the URLs contain the type of information that the page displays.
So it time to add some meaning to our URLs..

Here we go now ...

1. So as described in my previous posts, u need to download this DHTML module( just goto drupal.org, click on modules do a search with DHTML menu), unzip it and save it in C:\wamp\www\drupal\sites\all\modules.
2. Make sure that you download the correct version.
3. Once you have downloaded it, start the WAMP server and go to http://localhost/drupal .
4. Now login into your account.
5. Goto Administer- Site Building - Module.
6. Click on URL aliases under Path heading.
7. Click on Add Alias.
8. On Existing Alias path, give the automatically generated path( node/1 ..)
9. On Path Alias, give a meaningful name to be associated with a particular page.
10. Click on Create new Alias and BINGO... there u go..

Thats it for now, keep giving some meaningful names to your pages or polls or wtever... I'll be back with some other important modules...

Happy naming :)....


Wednesday, September 16, 2009

Drupal - DHTML Menu Module

This is the simplest module that ive come across during my course fo learning Drupal.

Why are we learning this module?
Thats the first question I believe you shud ask yourself...In case uve not asked yourselves :) , lemme answer it since I raised it at the first place.. :)
Oh k.. If youve explored or played with drupal, you would have noticed that when you click on the parent menu, a new page opens.This increases the number of pages t be opened and makes the user wait. By using DHTML Menu, the sub menu opens up below the parent item and without opening or refreshing the current page.

Here we go, as always :)

1. So as described in my previous posts, u need to download this DHTML module( just goto drupal.org, click on modules do a search with DHTML menu), unzip it and save it in C:\wamp\www\drupal\sites\all\modules.
2. Make sure that you download the correct version.
3. Once you have downloaded it, start the WAMP server and go to http://localhost/drupal .
4. Now login into your account.
5. Goto Administer- Site Building - Module.
6. Check DHTML Menu and click on save configuration
7. Now again goto Administer- Site Configuration(Click on By Module on the top) - DHTML Menu.
8. Now you can check animate sliding effect and decide which menu you want to have DHTML effect.
9. Now keep playing with the options that you see and try to get the effect which suits your needs.

Ill come up with more modules in my next post...


Tuesday, September 15, 2009

Drupal Themes - Configuration

Oh k.. So now we know hot to install and enable themes and modules..
Lets start with the configuration of themes... Before I move ahead, let me tell you that drupal is more like a game.. By this I dont mean that its a child's play, its a kinda thing that the more you explore and play with it, the more you learn....
Let me explain some of the things realted to theme settings.
So lets hit it...
1.Goto Administer-Site Building-Themes.
2.Click on the configure link on the theme that is checked.

Ill discuss now some common things that everybody wants on their page.

Page Elements:These are the elements like logo, site names, slogon... basically self explanatory.
If you dont want to use the default logo, you can upload any other image from your computer.

Breadcrumbs: You would have often seen in websites the hierarchy of the page ie you move from home to careers to contact us etc.
So you can enable breadcrumbs to display your traversal like Home-Careers-Contact Us.
Woah.. m already feeling sleepy... explaining this stuff is boring.. it doesn't deserves and explanation.. I don't know why I wrote this post :) .. You can certainly skip it...

In my next post,Ill explain more about modules.. Yes the commonly used modules which you would be asked in interviews i guess... So pay attention.. No sleeping next time.... Good nite... :)

Monday, September 14, 2009

Installing Themes in Drupal

When we install drupal, there are a lot of themes that come with it. But there are a lot of themes freely available on drupal website. Download any of them in case you sont like the themes that come bundled with drupal.
So, lets get started...

1.Goto drupal.org and download the theme of your choice which comes as a tar.gz file.
2. Unzip the file.
3. Create a folder called themes in C:\wamp\www\drupal\sites\all\
4. Thats it.
5. Now on your drupal menu, goto Administer- Site Buliding.
6. Scroll down the page to see whether your theme name appears or not.
7. Check the box to use the theme.

In my next pos, Ill discuss about the configuration of themes according to your style...

Installing Modules in Drupal

In my previous posts, Ive explained about the installation and configuration of Drupal and WAMP.
Now, lets hit it...
When we install drupal, there are a lot of modules that come with it. But to use the complete power of drupal, we must use the freely available modules on drupal.org.
Here we go...

1.Goto drupal.org and download the module of your choice which comes as a tar.gz file.
2.Unzip the file.
3. Create a folder called modules in C:\wamp\www\drupal\sites\all\
4. Thats it.
5. Now on your drupal menu, goto Administer- Site Buliding.
6. Scroll down the page to see whether your module name appears or not.
7. Check the box to enable the module.

In my next post Ill write about the installation of themes.

Monday, September 7, 2009

Starting WAMP

In this post, Im gonna discuss about the WAMP issue which I faced when I got my hands on it. In the previous posts, Ive described the WAMP and drupal installation, configuration etc.
But after doing all this, when i restarted my computer and double clicked on WAMP, I wasn't able to open the http://localhost/drupal. I checked out services.msc, and I was amazed that inspite of double clicking on WAMP, there was no entry for wampmysqld and wampapache. WTF ...

So I re-installed everything and faced the same problem again on restarting my computer.
I decided to google it and found that WAMP has come issues with Skype , but I had no skype on my computer.
So, I disabled all the firewalls and anti virus on my system, started computer in safe mode with networking, checked ports and what not... Huff... I got tired of searching so I thot of trying it my way...And I did it finally......
So here it goes:

Starting WAMP

1. Double click on wamp. You'll see and icon for WAMP where the time appears on Win XP.
2.Click on the WAMP icon.Goto APACHE- Services- Install Service. A command window opens up, hit enter and it'll be gone.
3.Click on the WAMP icon.Goto MySQL-Service-Install Service.
4. Now goto APACHE- Services-Start/Resume Service.
5. Now goto MySQL- Services-Start/Resume Service.

BINGO !!! Its done now.. Now everythings gonna work. You can check services.msc and ull see wampmysqld and wampapache...

The steps look damn easy but they blow the mind of someone jus starting wid it...