Drupal Module : Avatar Selection -- No more faceless member!

"You have 2000 members but only 200 of them actually upload a user picture.... now your site is full of "default" user picture"

Imagine if you have that kind of problem lying in your site. Sure it wont break your site. Just makes it a bit "ugly", is it acceptable?

We all know that user are lazy in general, asking them to click and upload a file is a daunting task for them. They will just either ignore it or flip away from your registration page.

Drupal Module : Cloud Zoom

Do you want to beautify your gallery or user profile?

You can enable image zooming using the cloudzoom module. the module utilizes jQuery script by Professor Cloud the idea is simple yet effective.

The idea of this is to utilize 2 different size of image, one is the small one and the other is the 3 times larger than the small one size.

Drupal Tips : Creating simple login & register block

In this case we are going to build a simple login and register block that links to drupal login and register page. The aim in this tutorial is to build the simple block using drupal create block feature only. Now to start the building, we need to point our self to drupal block management area at admin/build/block. In the admin/build/block area, there is a link to build a new block in the primary tabs, click the "Add block" link in the primary tabs.

Drupal : MySQL has gone away....

Have you ever been in situation where while building your drupal site using your local server, loading a page keep throwing ... mysql has gone away ... error?

You tried to rebuild the cache but the problem persist?.

The solution is ...

1. Put these lines in your my.ini mysql config file

max_allowed_packet = 100M // change the value to whatever you think is sufficient and not over limiting the available memory in the server
wait_timeout = 1000000000 // change this to whatever you think is enough

2. You can try to put this line in your php.ini

Drupal - Too many stale drupal module themes

Many developer faces the issue of cleaning unused database table or system variable that left there by uninstalled modules.

Some of the contrib drupal modules just didn't perform cleaning of its own database system variable or table when we uninstall it.

Now we have a solution to quickly clean it up using the System table cleaner module

The module is still in dev version, so don't use them in a live production site. It is still very helpful if we need to clean our local dev site before submitting it to a live production site.

Drupal tips : AHAH button piggybacking another AHAH

If you are using drupal 6 and facing this situation :

I have a AHAH button that will fetch a part of a form, then in that part of fetched form another ahah button exist. Also the new fetched part of the form will replace the first AHAH button

Then the problem will occurs :

The first AHAH button is working but when the newly fetched form content replaced it, the new AHAH button in the newly created form content failed to utilize AHAH, instead it work just like a normal button

Drupal Tips : Counting user download

If you provide a free download file then you might want to know how many times it has been downloaded by your user. Setting this feature in drupal is no rocket science, just that you need to know what to do.

Drupal has 2 different download system that you can use, one is the private download method and the other is the public download method. This article is going to discuss only the public download method.

Drupal Utilizing drupal_add_js

When you are building a custom module, sometimes you need to link drupal to a jQuery plugin.

Here is an example of using Drupal.setting together with drupal_add_js to pass information from drupal to jQuery.

Drupal emulating required for form file upload

Drupal form api by standard doesn't allow for developer to use

'#required' => true

to make the form element to be "required".

We can circumvent the problem by utilizing the hook_validate and set the form element to error state if there is no file uploaded.