Index: nodewords_basic/nodewords_basic.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodewords/nodewords_basic/nodewords_basic.module,v
retrieving revision 1.8.2.32
diff -u -p -r1.8.2.32 nodewords_basic.module
--- nodewords_basic/nodewords_basic.module	15 Dec 2009 02:46:58 -0000	1.8.2.32
+++ nodewords_basic/nodewords_basic.module	15 Dec 2009 12:39:42 -0000
@@ -266,34 +266,7 @@ function nodewords_basic_canonical_prepa
     $content['value'] = drupal_substr($content['value'], 1);
   }
 
-  $base_url = rtrim(variable_get('nodewords_base_url', ''), '/');
-  $options = array(
-    'absolute' => TRUE,
-    'base_url' => $base_url,
-  );
-
-  $tags['canonical'] = !empty($content['value']) ? check_url(url($content['value'], $options)) : '';
-}
-
-function nodewords_basic_canonical_settings_form(&$form, $form_id, $options) {
-  if ($form_id == 'nodewords_settings_form') {
-    $form['metatags_creation']['nodewords_base_url'] = array(
-      '#type' => 'textfield',
-      '#title' => t('Base URL'),
-      '#description' => t('Enter the base URL that will be used for canonical URLs.'),
-      '#default_value' => variable_get('nodewords_base_url', ''),
-      '#element_validate' => array('nodewords_basic_canonical_settings_form_validate'),
-      '#size' => 60,
-    );
-  }
-}
-
-function nodewords_basic_canonical_settings_form_validate($element, &$form_state) {
-  $base_url = rtrim($element['#value'], '/');
-
-  if (!empty($base_url) && !valid_url($base_url, TRUE)) {
-    form_error($element, t('Invalid base URL.'));
-  }
+  $tags['canonical'] = !empty($content['value']) ? check_url(nodewords_url($content['value'])) : '';
 }
 
 /**
Index: nodewords_extra/nodewords_extra.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodewords/nodewords_extra/nodewords_extra.module,v
retrieving revision 1.7.2.18
diff -u -p -r1.7.2.18 nodewords_extra.module
--- nodewords_extra/nodewords_extra.module	15 Dec 2009 02:46:52 -0000	1.7.2.18
+++ nodewords_extra/nodewords_extra.module	15 Dec 2009 12:39:43 -0000
@@ -735,16 +735,10 @@ function nodewords_extra_pics_prepare(&$
       );
     }
     elseif ($options['type'] == NODEWORDS_TYPE_PAGE) {
-      $base_url = rtrim(variable_get('nodewords_base_url', ''), '/');
-      $options = array(
-        'absolute' => TRUE,
-        'base_url' => $base_url,
-      );
-
       $tags['pics-label'] = strtr(
         '(pics-1.1 "http://www.icra.org/pics/vocabularyv03/" l gen true for %url r (%pics))',
         array(
-          '%url' => url("node/{$options['id']}", array('absolute' => TRUE)),
+          '%url' => nodewords_url("node/{$options['id']}"),
           '%pics' => $value,
         )
       );
Index: nodewords.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodewords/nodewords.admin.inc,v
retrieving revision 1.6.2.22
diff -u -p -r1.6.2.22 nodewords.admin.inc
--- nodewords.admin.inc	12 Dec 2009 04:58:13 -0000	1.6.2.22
+++ nodewords.admin.inc	15 Dec 2009 12:39:43 -0000
@@ -441,6 +441,15 @@ function nodewords_settings_form() {
     '#group' => 'nodewords',
   );
 
+  $form['metatags_creation']['nodewords_base_url'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Base URL'),
+    '#description' => t('Enter the base URL that will be used for any URL generated by the module.'),
+    '#default_value' => variable_get('nodewords_base_url', ''),
+    '#element_validate' => array('nodewords_base_url_validate'),
+    '#size' => 60,
+  );
+
   $form['third_party_integration']['nodewords_enable_checkall'] = array(
     '#type' => 'checkbox',
     '#title' => t(
@@ -513,11 +522,21 @@ function nodewords_settings_form() {
 }
 
 /**
+ * Function to validate the base URL.
+ */
+function nodewords_base_url_validate($element, &$form_state) {
+  if (!empty($element['#value']) && !($base_url = rtrim($element['#value'], '/'))) {
+    form_error($element, t('Invalid base URL.'));
+  }
+  elseif (!empty($base_url) && !valid_url($base_url, TRUE)) {
+    form_error($element, t('Invalid base URL.'));
+  }
+}
+
+/**
  * Function to validate the regular expression.
- *
  */
 function nodewords_filter_regexpr_validate($element, &$form_state) {
-
   if (!empty($element['#value'])) {
     $value = trim($element['#value']);
 
@@ -529,7 +548,6 @@ function nodewords_filter_regexpr_valida
 
 /**
  * Function to validate the value entered for the maximum meta tags length.
- *
  */
 function nodewords_max_size_validate($element, &$form_state) {
 
Index: nodewords.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodewords/nodewords.module,v
retrieving revision 1.66.2.47
diff -u -p -r1.66.2.47 nodewords.module
--- nodewords.module	15 Dec 2009 02:46:48 -0000	1.66.2.47
+++ nodewords.module	15 Dec 2009 12:39:44 -0000
@@ -46,7 +46,7 @@ define('NODEWORDS_MINIMUM_API_VERSION', 
 /**
  * The current API version implemented.
  */
-define('NODEWORDS_API_VERSION', '2.11');
+define('NODEWORDS_API_VERSION', '2.12');
 
 /*****************************************************************************
  * Drupal hooks.
@@ -1435,6 +1435,19 @@ function nodewords_unique_values($text, 
   return implode($options['separator'] . " ", $unique_values);
 }
 
+/**
+ * Return the absolute URL of a path built using the base URL saved in the
+ * Drupal variable nodewords_base_url.
+ */
+function nodewords_url($path) {
+  $base_url = rtrim(variable_get('nodewords_base_url', ''), '/');
+  $options = array(
+    'absolute' => TRUE,
+    'base_url' => empty($base_url) ? NULL : $base_url,
+  );
+
+  return url($path, $options);
+}
 /*****************************************************************************
  * Private functions.
  ****************************************************************************/
