Amitav Roy

Blog on web and travel

The trip to Ganpatipule

Posted on 17 Nov 2011 by Amitav Roy

Ganpatipule reminds me of clean beach, blue sky and the best part – when you stand in the water you can see your feet (yes, that is my way of measuring how clean the beach is).

Drupal cache_get and cache_set

Posted on 10 Nov 2011 by Amitav Roy

Drupal cache is very important when you are working on a site which will have a lot of visitors daily and performance becomes a crucial part. In this tutorial, I will demonstrate how you can use the cache_set() drupal function to save something in the cache and retrieve that on user request instead of unnecessary processing if the content has not changed.

SyntaxHighlighter with Drupal 7

Posted on 22 Aug 2011 by Amitav Roy

As told in my previous micro blog post, I was looking for an easy way to format the code that I was putting on my site based on drupal. I wanted it to be quick and easy to integrate with Drupal. And yes, I wanted something which would work on the client side and not on the server side. So, no PHP code or things like that.

How to use hook_theme and hook_node_load in Drupal 7

Posted on 11 Aug 2011 by Amitav Roy

Recently I had a requirement of having social networking icons like Facebook share, Retweet, Google plus on all node pages of a site. So, I decided to have my own SNS module and use hook_theme() function to theme my variables.That is I don’t have to put any SNS codes in the node tpl and everything can be managed from one place. So, the first thing is the hook_node_load() function (Here I assume that the name of the module is “example”).

Using Drupal features: example of a custom blog module

Posted on 30 Apr 2011 by Amitav Roy

Recently I had a requirement of having social networking icons like Facebook share, Retweet, Google plus on all node pages of a site. So, I decided to have my own SNS module and use hook_theme() function to theme my variables.That is I don’t have to put any SNS codes in the node tpl and everything can be managed from one place.

Making a simple web app with Yii framework

Posted on 18 Mar 2011 by Amitav Roy

Today we are going to learn how to make use of the Yii framework and make a web app. I have been doing a bit of reading at my office on different frameworks available for PHP and in the end, the decision was Yii. So, will be diving into the Yii framework and check the possibilities. To accomplish this tutorial, I assume you have Apache, MySQL and PHP installed on your system. There are a lot of frameworks available for PHP and a lot of them rely completely on the command line for most of the work. But Yii has a nice GUI for the same which was a big advantage… at least I don’t like the black screen too much personally speaking.

CSS font size and its units explained

Posted on 28 Feb 2011 by Amitav Roy

With the web 2.0 style web designs, minimalist designs etc, one thing is certain – fonts are playing a very important part of the visuals of the site. Gone are those days where big images, boxy buttons were “The thing to do”. And another aspect is the different mediums through which our websites are accessed now.