This module is a plugin for Addressfield and provides support for Portuguese addresses to Drupal's Addressfield (Drupal 7).

The Portuguese Address Field contains a hierarchical select for the District (distrito), Locality (concelho) and Parish (freguesia).

The list with districts, localities and parishes is based on the CAOP 2011 (http://www.igeo.pt/produtos/cadastro/caop/inicial.htm) from the Instituto Geográfico Português (http://www.igeo.pt/).

There are field for District, Locality and Parish, but when rendering the address the District and Parish fields are hidden thus showing a standard Portuguese address.

The project sandbox can be found here (http://drupal.org/sandbox/danielfdsilva/1846652)

Git repo: git clone http://git.drupal.org/sandbox/danielfdsilva/1846652.git address_field_portugal

Comments

vineet.osscube’s picture

Hi danielfdsilva,

first of all there are quite a few issues to sort out such as indentation, whitespace and incorrect comment formats.

You can find them all here:
http://ventral.org/pareview/httpgitdrupalorgsandboxdanielfdsilva1846652git

Here you can check source code whether it meets drupal coding standards or not, and advise you what to change in your code. You can repeat review after your commits, and can fix those errors.

Manual Reviews :

1) Please do not write '?>' PHP delimiter at the end of addressfield_pt_data.inc file

2) All functions should be prefixed with your module name to avoid name clashes.

danielfdsilva’s picture

@osscube,
Cleaned up all errors

fr3shw3b’s picture

Status: Needs work » Needs review

Read the next comment, I forgot to mark needs work.
Thanks,

fr3shw3b’s picture

Status: Needs review » Needs work

Hi danielfdsilva,

Firstly you need to work off of a version specific branch such as 7.x-1.x or 6.x-1.x and not the version with alpha or beta as you don't deal with alpha and beta versions until project is an accepted full project.

Secondly you must have the same consistent module name. Throughout the functions and file names it is best you use address_field_portugal as the name of files and function prefixes/hooks.

So it would look like this:

-- address_field_portugal
---- addressfield_portugal.module
---- address_field_portugal.info
---- README.txt
---- plugins
------ format
-------- address_field_portugal.inc
-------- address_field_portugal.data.inc

For functions:

/**
 * Implements hook_ctools_plugin_directory().
 */
function address_field_portugal_ctools_plugin_directory($module, $plugin) {
  if ($module == 'addressfield') {
    return 'plugins/' . $plugin;
  }
}

On the other hand you could rename the module folder addressfield_pt but then that will be used for the project URL. But you probably want something that is more self explanatory.

Thanks,

klausi’s picture

Status: Needs review » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (found some problems with the project) or "reviewed & tested by the community" (found no major flaws).