devdaily home | career | drupal | java | mac | mysql | perl | php | uml | unix

Drupal example source code file (isle_of_man_833_1.cif)

This example Drupal source code file (isle_of_man_833_1.cif) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

833, city, country_id, country_iso_code_2, function, imn, last_name\r\n, man, of, php, street1\r\n, uc_set_address_format, version

The isle_of_man_833_1.cif Drupal example source code

<?php

/**
 * Implements hook_install() using the name of the country as the base of
 * the function name.
 */
function isle_of_man_install() {
  // Make the entry in the country table.
  // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
  db_insert('uc_countries')
    ->fields(array(
      'country_id' => 833,
      'country_name' => 'Isle of Man',
      'country_iso_code_2' => 'IM',
      'country_iso_code_3' => 'IMN',
      'version' => 1,
    ))
    ->execute();

  // Set address format
  uc_set_address_format(
    833,
    "!company\r\n".
    "!first_name !last_name\r\n".
    "!street1\r\n".
    "!street2\r\n".
    "!city !zone_code !postal_code\r\n".
    "!country_name_if"
  );
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal isle_of_man_833_1.cif source code file:

new blog posts


 


"Drupal" is a registered trademark of Dries Buytaert.

our drupal tutorials and examples  
 
Sponsored by:
Mat-Su Valley Programming (Wasilla and Palmer, Alaska)

Copyright 1998-2011 Alvin Alexander, devdaily.com
All Rights Reserved.