Mukesh Agarwal's blog

Use entity reference in your custom entities (without bundles)

Thursday, December 8, 2011 -- Mukesh Agarwal

Entities are a big boon to Drupal, just that the learning curve is a bit longer than CCKs and nodes. I've read a lot about how these entities work but the more I read, the more complex they sound. Here are small snippets of code that I would like to share to allow you to create an entity reference field with your custom entities.

Install Memcache on your ubuntu server & make your drupal faster

Sunday, October 30, 2011 -- Mukesh Agarwal

NOTE: This post explains setting up memcache on Drupal 6. We will very soon follow up for Drupal 7.

Why do I need memcache for my drupal site?

Drupal's default cache mechanism stores a lot of cached content in the database, so every time an http request needs this cached content, they have to make a request to the cache tables of the drupal database. This means the web server has to load your database server into the memory ...NOTE: This post explains setting up memcache on Drupal 6. We will very soon follow up for Drupal 7.

Use profile fields as tokens in user emails in Drupal

Sunday, September 11, 2011 -- Mukesh Agarwal

In Drupal, many a times I have found the need of using user profile values in my email configurations at "User Settings" and let the client use that too. The need for tokens in user emails can be addressed with a very small piece of code. Lets say we need the tokens of profile first name, last name, full name and profile title like 'Mr.', 'Mrs.', etc, here is what we can do ...In Drupal, many a times I have found the need of using user profile values in my email configurations at "User Settings" and let the client use that too. The need for tokens in user emails can be addressed with a very small piece of code. Lets say we need the tokens of profile first name, last name, full name and profile title like 'Mr.', 'Mrs.', etc, here is what we can do:

Handling files with Drupal (CSV import)

Sunday, September 11, 2011 -- Mukesh Agarwal

Drupal allows pretty smooth file management API for developers.. Here is a small piece of code in which I tried to take CSVs as input, process them to get the data and insert the values into the database..

  1. Create a menu item for your file upload form
  2. Define the callback for the menu item and make sure to set the form encoding
  3. Make sure that the file imported is of CSV type (check the mime type of the file uploaded)
  4. And finally get data from the csv

And TA-DA :-

Why Drupal?

Friday, May 20, 2011 -- Mukesh Agarwal

Here are a few reasons why Drupal will be your choice of technology for your website:

  1. With Drupal you get the advantages of a CMS as well as a framework. A content management system (CMS) allows you to store content in a database and lets you publish them with ease on the web. CMS allows you to choose from automated templates, work with a solid access control system to differentiate between users, content moderators, and administrators, collaborate content by allowing more than one authors to take control of the same content. Whereas a framework allows you to develop dynamic websites where users can interact with each other and the content, alleviates the problem of overhead associated with common activities and allows developers to reuse code as and when possible, and provides the developers with a platform where they can hook into the existing framework with their custom solutions with ease. Using the framework, the community has created more than 7000 modules and it keeps growing day by day. "Drupal = CMS + Framework" and that is extremely powerful. See http://drupal.org/about
Subscribe to RSS - Mukesh Agarwal's blog

Drop Us A Line

+91-33-22624671
+91-80172-20799
+91-89024-91694
+91-97480-91409

Come Visit Us

Innoraft Solutions
1, British India Street
Room 711, 7th Floor
Kolkata - 700069
West Bengal, India

Connect With Innoraft