Index: ad_views.views.inc
===================================================================
--- ad_views.views.inc	(revision 560)
+++ ad_views.views.inc	(working copy)
@@ -20,11 +20,11 @@
 function ad_views_views_handlers() {
   return array(
     'info' => array(
-      'path' => drupal_get_path('module', 'ad_views'),
+      'path' => drupal_get_path('module', 'ad_views')  . '/handlers',
       ),
     'handlers' => array(
-      'ad_views_handler_field_markup' => array(
-        'parent' => 'views_handler_field_markup',
+      'ad_html_views_handler_field_markup' => array(
+        'parent' => 'views_handler_field',
         ),
       ),
     );
@@ -869,6 +869,139 @@
       'handler' => 'views_handler_sort'
     )
   );
+  
+/*
+   // If the view is like base table "node"
+   $data['ads']['table']['join']['node'] = array(
+     'left_field' => 'nid',  //key of table node
+     'field'      => 'aid', //key of table ads
+   );
+
+  // field date 'autoactivate'
+  $data['ads']['autoactivate_date'] = array(
+    'real field' => 'autoactivate',
+    'title'       => t('The date scheduled for activation'),
+    'help'        => t('The date scheduled by the user which advertising will be enabled.'),
+    'description' => t('The date scheduled by the user which advertising will be enabled.'),
+    'field' => array(
+      'handler' => 'views_handler_field_date',
+      'click sortable' => TRUE
+    ),
+    'argument' => array(
+      'handler' => 'views_handler_argument_date',
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_date'
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort_date'
+    )
+  );
+  
+  // field date 'autoactivated'
+  $data['ads']['autoactivated_date'] = array(
+    'real field'  => 'autoactivated',
+    'title'       => t('Actual date of activation'),
+    'help'        => t('The date on which the advertising has been enabled by the system.'),
+    'description' => t('The date on which the advertising has been enabled by the system.'),
+    'field' => array(
+      'handler'        => 'views_handler_field_date',
+      'click sortable' => TRUE
+    ),
+    'argument' => array(
+      'handler' => 'views_handler_argument_date',
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_date'
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort_date'
+    )
+  );
+  
+ // field date 'autoexpire'
+  $data['ads']['autoexpire_date'] = array(
+    'real field'  => 'autoexpire',
+    'title'       => t('The date scheduled for deactivation'),
+    'help'        => t('The date scheduled by the user which advertising will be disabled.'),
+    'description' => t('The date scheduled by the user which advertising will be disabled.'),
+    'field'      => array(
+      'handler'        => 'views_handler_field_date',
+      'click sortable' => TRUE
+    ),
+    'argument'   => array(
+      'handler' => 'views_handler_argument_date',
+    ),
+    'filter'     => array(
+      'handler' => 'views_handler_filter_date'
+    ),
+    'sort'       => array(
+      'handler' => 'views_handler_sort_date'
+    )
+  );
+  
+  // field date 'autoexpired'
+  $data['ads']['autoexpired_date'] = array(
+    'real field'  => 'autoexpired',
+    'title'       => t('Actual date of deactivation'),
+    'help'        => t('The date on which the advertising has been disabled by the system.'),
+    'description' => t('The date on which the advertising has been disabled by the system.'),
+    'field' => array(
+      'handler'        => 'views_handler_field_date',
+      'click sortable' => TRUE
+    ),
+    'argument'    => array(
+      'handler' => 'views_handler_argument_date',
+    ),
+    'filter'      => array(
+      'handler' => 'views_handler_filter_date'
+    ),
+    'sort'        => array(
+      'handler' => 'views_handler_sort_date'
+    )
+  );
+  
+  // field date 'activated'
+  $data['ads']['date_activated'] = array(
+    'real field'  => 'activated',    
+    'title'       => t('The last date of activation'),
+    'help'        => t('The latest activation date of the advertisement.'),
+    'description' => t('The latest activation date of the advertisement.'),
+    'field' => array(
+      'handler'  => 'views_handler_field_date',
+      'click sortable' => TRUE
+    ),
+    'argument'   => array(
+      'handler' => 'views_handler_argument_date',
+    ),
+    'filter'     => array(
+      'handler' => 'views_handler_filter_date'
+    ),
+    'sort'       => array(
+      'handler' => 'views_handler_sort_date'
+    )
+  );
+
+  // field date 'expired'
+  $data['ads']['date_expired'] = array(
+    'real field'  => 'expired',
+    'title'       => t('The last date deactivation'),
+    'help'        => t('The latest deactivation date of the advertisement.'),
+    'description' => t('The latest deactivation date of the advertisement.'),
+    'field' => array(
+      'handler' => 'views_handler_field_date',
+      'click sortable' => TRUE
+    ),
+    'argument' => array(
+      'handler' => 'views_handler_argument_date',
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_date'
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort_date'
+    )
+  );  */
   return $data;
 }
 
Index: ad_views.views-ad_text.inc
===================================================================
--- ad_views.views-ad_text.inc	(revision 560)
+++ ad_views.views-ad_text.inc	(working copy)
@@ -19,6 +19,17 @@
       'left_field' => 'aid',
       'field' => 'aid'
     );
+
+    // If the view is like base table "node"
+    // And we want to join the table "ad_text".
+    // It passes through the table "ads"
+    // See declaration $data['ads']['table']['join']['node']
+    $data['ad_text']['table']['join']['node'] = array(
+      'left_table' => 'ads',
+      'left_field' => 'aid',
+      'field' => 'aid' /*key of table ad_text*/
+    );   
+
     // Ad URL - 'url'
     $data['ad_text']['url'] = array(
       'title' => t('URL'),
Index: ad_views.views-ad_external.inc
===================================================================
--- ad_views.views-ad_external.inc	(revision 560)
+++ ad_views.views-ad_external.inc	(working copy)
@@ -20,6 +20,16 @@
       'field' => 'aid'
     );
 
+    // If the view is like base table "node"
+    // And we want to join the table "ad_external".
+    // It passes through the table "ads"
+    // See declaration $data['ads']['table']['join']['node']
+    $data['ad_external']['table']['join']['node'] = array(
+      'left_table' => 'ads',
+      'left_field' => 'aid',
+      'field' => 'aid' /*key of table ad_external*/
+    );
+
     // Ad external - 'url'
     $data['ad_external']['url'] = array(
       'title' => t('URL'),
Index: ad_views.views-ad_html.inc
===================================================================
--- ad_views.views-ad_html.inc	(revision 560)
+++ ad_views.views-ad_html.inc	(working copy)
@@ -46,6 +46,7 @@
       'field' => 'nid'
     );
 
+/*
     // Ad HTML - 'html'
     $data['ad_html']['html'] = array(
       'title' => t('HTML'),
@@ -57,6 +58,31 @@
 	'format' => 0
       )
     );
+*/
+
+    // If the view is like base table "node"
+    // And we want to join the table "ad_html".
+    // It passes through the table "ads"
+    // See declaration $data['ads']['table']['join']['node']
+    $data['ad_html']['table']['join']['node'] = array(
+      'left_table' => 'ads',
+      'left_field' => 'aid',
+      'field' => 'aid' /*key of table ad_html*/
+    );   
+
+    // Ad HTML - 'html'
+    // Creation of a handler because the table "ad_html" has no field "format".
+    // In the ad module, advertising type 'html' takes the format of the node 'ad'.
+    $data['ad_html']['html'] = array(
+      'title' => t('HTML'),
+      // The help that appears on the UI
+      'help' => t('The ad HTML.'),
+      // Information for displaying
+      'field' => array(
+        'handler' => 'ad_html_views_handler_field_markup',
+        'format' => 'format'
+      ),
+    );
   }
   return $data;
 }
Index: handlers/ad_html_views_handler_field_markup.inc
===================================================================
--- handlers/ad_html_views_handler_field_markup.inc	(revision 0)
+++ handlers/ad_html_views_handler_field_markup.inc	(revision 0)
@@ -0,0 +1,46 @@
+<?php
+// $Id: ad_html_views_handler_field_markup.inc
+
+/**
+ * A handler to run a field through check_markup, using a companion
+ * format field.
+ *
+ * - format: (REQUIRED) The field in this table used to control the format
+ *           such as the 'format' field in the node, which goes with the
+ *           'body' field.
+ *
+ * @ingroup views_field_handlers
+ */
+class ad_html_views_handler_field_markup extends views_handler_field {
+  /**
+   * Constructor; calls to base object constructor.
+   */
+  function construct() {
+    parent::construct();    
+  }
+
+  function query() {
+    parent::query();
+    // Add the field.
+    $name_field_format = $this->definition['format'];
+    $alias_revisions =  $this->query->ensure_table('node_revisions');
+    $this->field_alias_format_content = $this->query->add_field($alias_revisions, $name_field_format);
+  }
+  
+  function render($values) {
+    $value = $values->{$this->field_alias};
+    $format = isset($values->{$this->field_alias_format_content}) ? $values->{$this->field_alias_format_content} : FILTER_FORMAT_DEFAULT;
+    if ($value) {
+      return check_markup($value, $format, FALSE);
+    }
+  }
+  
+  function element_type() {
+    if (isset($this->definition['element type'])) {
+      return $this->definition['element type'];
+    }
+
+    return 'div';
+  }
+
+}
Index: ad_views.views-ad_image.inc
===================================================================
--- ad_views.views-ad_image.inc	(revision 560)
+++ ad_views.views-ad_image.inc	(working copy)
@@ -20,6 +20,16 @@
       'left_field' => 'aid',
       'field' => 'aid'
     );
+    
+    // If the view is like base table "node"
+    // And we want to join the table "ad_image".
+    // It passes through the table "ads"
+    // See declaration $data['ads']['table']['join']['node']
+    $data['ad_image']['table']['join']['node'] = array(
+      'left_table' => 'ads',
+      'left_field' => 'aid',
+      'field' => 'aid' /*key of table ad_image*/
+    );
 
     // Ad image - 'fid' relationship
     $data['ad_image']['fid'] = array(
Index: ad_views.views-ad_flash.inc
===================================================================
--- ad_views.views-ad_flash.inc	(revision 560)
+++ ad_views.views-ad_flash.inc	(working copy)
@@ -20,6 +20,16 @@
       'field' => 'aid'
     );
 
+    // If the view is like base table "node"
+    // And we want to join the table "ad_flash".
+    // It passes through the table "ads"
+    // See declaration $data['ads']['table']['join']['node']
+    $data['ad_flash']['table']['join']['node'] = array(
+        'left_table' => 'ads',
+        'left_field' => 'aid',
+        'field' => 'aid' /*key of table ad_flash*/
+    );
+
     // Ad flash - 'fid' relationship
     $data['ad_flash']['fid'] = array(
       'title' => t('Fid'),
