/[drupal]/contributions/modules/address/address_node.module
ViewVC logotype

Contents of /contributions/modules/address/address_node.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.1.1 - (show annotations) (download) (as text) (vendor branch)
Tue Jan 29 17:06:27 2008 UTC (21 months, 4 weeks ago) by brmassa
Branch: MAIN, brmassa
CVS Tags: HEAD, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/x-php


1 <?php
2 /**
3 * $Id: $
4 * @author Bruno Massa
5 * @file address_node.module
6 * You can associate a geographic address with content.
7 */
8
9 define('ADDRESS_NODE_PATH' , drupal_get_path('module', 'address_node'));
10
11 /**
12 * Implementation of hook_address_fields_api().
13 */
14 function address_node_address_fields_api($op) {
15 if ($op == 'field') {
16 }
17 elseif ($op == 'group') {
18 return array(
19 'user' => array(
20 'is_primary' => ADDRESS_FIELD_SHOW,
21 'aname' => ADDRESS_FIELD_SHOW,
22 'street' => ADDRESS_FIELD_SHOW,
23 'city' => ADDRESS_FIELD_SHOW,
24 'province' => ADDRESS_FIELD_SHOW,
25 'postal_code' => ADDRESS_FIELD_SHOW,
26 'country' => ADDRESS_FIELD_SHOW
27 )
28 );
29 }
30 }
31
32 /**
33 * Implementation of hook_form_alter().
34 *
35 * It will modify the general behaviour of your node forms.
36 */
37 function address_node_form_alter(&$form, $form_state, $form_id) {
38 if (isset($form['type'])
39 and isset($form['#node'])
40 and $form['type']['#value'] .'_node_form' == $form_id) {
41 }
42 }

  ViewVC Help
Powered by ViewVC 1.1.2