Drupal

    How to get country list from locations module ?

    You can get country list array using following function :
    <?php
    //Simple array of countries
    $list = location_get_iso3166_list(); //Defined inside location.inc

    //Options list to use in form
    $options = array_merge(array('' => t('Please select'), 'xx' => t('NOT LISTED')), location_get_iso3166_list());

    $form['yourcountry'] = array(
     
    '#type' => 'select',
     
    '#title' => t('Your Country'),
     
    '#options' => $options,
    );
    ?>

    How to skip form validation on drupal elements?

    You can skip form validation on drupal forms using skip_validation module

    http://drupal.org/project/skip_validation

    How to show same form multiple time on a page

    You can use hook_forms($form_id) to do this You can call forms using this code with passing data to it <?php function hpsolan_forms_page($data = array()) { for ($i=0; $i < count($data); $i++) { $output = drupal_get_form("hpsolan_message_form_" .

    How to handle timezone in drupal?

    You can handle timezone using date module

    Check it at following link

    http://drupal.org/node/291799

    How to change theme for specific page in drupal?

    We can change drupal theme for specific page using following function in module
    <?php
    function <modulename>_init() {
      global
    $custom_theme;
       if (
    arg(0) == '<argument1>' && arg(1) == '<argument2>') {
       
    $custom_theme = variable_get('theme_default', '0');
       
    init_theme();
      }
    }
    ?>
    where => Name of module => First argument, => Second argument. *You can add these conditions as per your requirement.

    How to use drupal_http_request ?

    Use it in following way..
    <?php 
       $request
    = drupal_http_request('http://mohitsharma.net/',
        array(
    'Content-Type' => 'application/x-www-form-urlencoded'),
       
    'POST',
       
    'post1=value1&post2=value2');
    ?>

    How to add user edit form fields to profile content type form?

    You can do this in following way.

    How to theme pager in views?

    Check it at the following link

    http://drupal.org/node/552074

    How to show current weather on the basis of lattitude and longitude?

    Install weather and location module after that use following function to return weather condition on the basis of lattitude and longitude of the place. <?php function get_weather_condition($lat, $lon) { $station = weather_get_icao_from_lat_lon($lat, $lon); $config = _weather_get_config(WEATHER_DEFAULT_BLOCK, 1); $config = array_merge($config, $station); $config['real_name'] = $config['name']; $metar = weather_get_metar($config['icao']); $weather_block = theme('weather', $config, $metar); return $weather_block; } $lat = 53.139457; $lon = 113.3480934; print get