Archive for category Drupal

Converting 5.x themes to 6.x

Drupal:How to add user picture at the time of registration

You can use hook_form_alter() for that.
Here is some sample code

function hook_form_alter($form_id, &$form) {
if ($form_id == ‘user_register’) {
$form['#attributes']['enctype'] = ‘multipart/form-data’;
$form['file'] = array(
‘#type’ => ‘file’,
‘#title’ => t(’Title’),
‘#size’ => 40,
‘#default_value’ => ”,
‘#weight’ => 6
);
}
}

And in hook_user

do following coding

case ‘insert’ :
$file = file_check_upload(’file’);
if ($file){
$file = file_save_upload($file,$filename);
db_query(”);
……………
}

Tags: , , , ,

First use of Google map API

I use google map API first time for the http://trackarma.org project. That was a site for a German client. It was like, a coin moving one place to another place all over the world and register the place & user. From the user & admin end all travel path ,distance & location can be seen.

We have done this project successfully last year and later on we did 2-3 another project for this german client.

Tags: , , , , , , , , , , , ,

  Domain Name + 1GB Linux India Web Hosting in Rs.349