Index: extensions/meta/admin/admin.php
===================================================================
--- extensions/meta/admin/admin.php	(revision 23778)
+++ extensions/meta/admin/admin.php	(revision 24393)
@@ -26,4 +26,20 @@
                l10n('Personal Metadata'),
                $my_base_url.'&amp;tab=persometa');
+
+	$MPC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';"));
+	if($MPC['state'] == 'active')
+	{
+$tabsheet->add('contactmeta',
+               l10n('Contact page Metadata'),
+               $my_base_url.'&amp;tab=contactmeta');
+	}
+	$MAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';"));
+	if($MAP['state'] == 'active')
+	{
+$tabsheet->add('AdditionalPagesmeta',
+               l10n('Additional Pages Metadata'),
+               $my_base_url.'&amp;tab=AdditionalPagesmeta');
+	}
+			   
 $tabsheet->add('description',
                l10n('meta_onglet_description'),
@@ -209,4 +225,101 @@
 	break;
 
+	case 'contactmeta':
+
+$metacontact = explode(',', $conf['contactmeta']);
+	
+	$template->assign('contactmetaT',
+    array('CMKEY' => $metacontact[0],'CMDESC' => $metacontact[1],));
+
+if (isset($_POST['submitcm']))
+	{
+$INSCM = $_POST['inser'].",".$_POST['inser2'];
+conf_update_param('contactmeta', $INSCM);
+$template->assign(
+    'contactmetaT',
+	array('CMKEY' => stripslashes($_POST['inser']),'CMDESC' => stripslashes($_POST['inser2'])));
+	}
+	
+	break;
+	
+	case 'AdditionalPagesmeta':
+if (!defined('TITLE_AP_TABLE')) define('TITLE_AP_TABLE', $prefixeTable.'title_ap');
+$groups = array();
+$query = '
+select id,title
+  FROM ' . ADD_PAGES_TABLE . '
+  ORDER BY id ASC;';
+$result = pwg_query($query);
+	
+	while ($row = pwg_db_fetch_assoc($result))
+	{
+  $groups[$row['id']] = $row['id'].' : '.$row['title'];
+	}
+	
+	$selected = 0;
+	$options[] = l10n('Choose it page');
+	$options['a'] = '----------------------';
+	
+foreach($groups as $listid => $listid2)
+	{
+    $options[$listid] = $listid2;
+	}
+  $template->assign(
+    'gestionC',
+    array(
+	  'OPTIONS' => $options,
+      'SELECTED' => $selected
+      ));
+	
+	if (isset($_POST['submitchoixAP'])and is_numeric($_POST['APchoix']) and (!$_POST['APchoix'])==0)
+	{
+$lire=$_POST['APchoix'];
+	$query = '
+select id,metaKeyap,metadesap
+  FROM ' . META_AP_TABLE . '
+  WHERE id = \''.$lire.'\'
+  ;';
+$result = pwg_query($query);
+$row = pwg_db_fetch_assoc($result);
+$metaKeyapap=$row['metaKeyap'];
+$metadesap=$row['metadesap'];
+
+$query = '
+select id,title
+  FROM ' . ADD_PAGES_TABLE . '
+  WHERE id = \''.$lire.'\'
+    ;';
+$result = pwg_query($query);
+$row = pwg_db_fetch_assoc($result);
+$idap=$row['id'];
+$nameap=$row['title'];
+
+  $selected3 = 0;
+  
+  $template->assign(
+    'ap_edit',
+    array(
+      'VALUE' => $idap,
+	  'VALUEN' => $nameap,
+      'CONTENTMKAP' => $metaKeyapap,
+	  'CONTENTMDAP' => $metadesap,
+      'SELECTED' => $selected3
+      ));
+	}
+
+if (isset($_POST['submitinsapm']))
+	{
+	$query = '
+DELETE 
+  FROM ' . META_AP_TABLE . '
+  WHERE id = \''.$_POST['invisible'].'\'
+  ;';
+$result = pwg_query($query);
+	$q = '
+INSERT INTO ' . $prefixeTable . 'meta_ap(id,metaKeyap,metadesap)VALUES ('.$_POST['invisible'].',"'.$_POST['inser'].'","'.$_POST['inser2'].'");';
+    pwg_query($q);
+	}
+	
+	break;
 	
 } 
Index: extensions/meta/admin/admin.tpl
===================================================================
--- extensions/meta/admin/admin.tpl	(revision 23778)
+++ extensions/meta/admin/admin.tpl	(revision 24393)
@@ -90,2 +90,58 @@
 	{/if}
 {/if}
+
+{if isset ($contactmetaT)}
+	<form method="post" >
+	 <fieldset id="mainConf">
+					{'Keywords of contact page to be completed'|@translate}&nbsp;:<br>
+					<input type="text" name="inser" value="{$contactmetaT.CMKEY}" size="110" maxlenght="110">
+				<br>	
+				<br>
+					{'Description of contact page to be completed'|@translate}&nbsp;:<br>
+					<input type="text" name="inser2" value="{$contactmetaT.CMDESC}" size="110" maxlenght="110">
+				<br>	
+				<br>
+  <p>
+    <input class="submit" type="submit" name="submitcm" value="{'Submit'|@translate}">
+    <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
+  </p>
+  	</form>
+{/if}
+
+{if isset ($gestionC)}
+	<div>
+		<form method="post" >
+			<fieldset>
+				<legend>{'Choose Additional Pages'|@translate}</legend>
+		{html_options name="APchoix" options=$gestionC.OPTIONS selected=$gestionC.SELECTED}
+				<br>	
+				<br>
+					<div style="text-align:center;">
+					<input class="submit" name="submitchoixAP" type="submit" value="{'Submit'|@translate}" />
+					</div>
+			</fieldset>
+		</form>
+	</div>
+	{if isset ($ap_edit)}
+	<div>
+		<form method="post" >
+			<fieldset>
+				<legend>{'Add metadata for page'|@translate} {$ap_edit.VALUEN} (id : {$ap_edit.VALUE})</legend>
+					<input type="hidden" name="invisible" value="{$ap_edit.VALUE}">
+				<br>
+					{'Keywords of Additional Pages to be completed'|@translate}<br>
+					<input type="text" name="inser" value="{$ap_edit.CONTENTMKAP}" size="110" maxlenght="110">
+				<br>	
+				<br>
+					{'Description of Additional Pages to be completed'|@translate}<br>
+					<input type="text" name="inser2" value="{$ap_edit.CONTENTMDAP}" size="110" maxlenght="110">
+				<br>	
+				<br>
+					<div style="text-align:center;">
+					<input class="submit" name="submitinsapm" type="submit" value="{'Submit'|@translate}"/>
+					</div>
+			</fieldset>
+		</form>
+	</div>
+	{/if}
+{/if}
Index: extensions/meta/language/en_UK/plugin.lang.php
===================================================================
--- extensions/meta/language/en_UK/plugin.lang.php	(revision 23778)
+++ extensions/meta/language/en_UK/plugin.lang.php	(revision 24393)
@@ -42,3 +42,14 @@
 $lang['List Personal Metadata'] = 'List Personal Metadata';
 
+//tab contactform meta
+$lang['Contact page Metadata'] = 'Contact page Metadata';
+$lang['Keywords of contact page to be completed'] = 'Keywords of contact page to be completed';
+$lang['Description of contact page to be completed'] = 'Description of contact page to be completed';
+
+//tab Aditional page
+$lang['Additional Pages Metadata'] = 'Additional Pages Metadata';
+$lang['Choose Additional Pages'] = 'Choose Additional Pages';
+$lang['Add metadata for page'] = 'Add metadata for page';
+$lang['Keywords of Additional Pages to be completed'] = 'Keywords of Additional Pages to be completed';
+$lang['Description of Additional Pages to be completed'] = 'Description of Additional Pages to be completed';
 ?>
Index: extensions/meta/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/meta/language/fr_FR/plugin.lang.php	(revision 23778)
+++ extensions/meta/language/fr_FR/plugin.lang.php	(revision 24393)
@@ -42,4 +42,16 @@
 $lang['List Personal Metadata'] = 'Lister les Métadonnées Personnels';
 
+//tab contactform meta
+$lang['Contact page Metadata'] = 'Métadonnées de la page contact';
+$lang['Keywords of contact page to be completed'] = 'Mots clés de la page contact à complèter';
+$lang['Description of contact page to be completed'] = 'Description de la page contact à complèter';
+
+//tab Aditional page
+$lang['Additional Pages Metadata'] = 'Métadonnées des pages additionelles';
+$lang['Choose Additional Pages'] = 'Choisiser la page aditionnelle';
+$lang['Add metadata for page'] = 'Ajouter les Métadonnées de page';
+$lang['Keywords of Additional Pages to be completed'] = 'Mots clés de la page additionelle à complèter';
+$lang['Description of Additional Pages to be completed'] = 'Description de la page additionellet à complèter';
+
 
 ?>
Index: extensions/meta/main.inc.php
===================================================================
--- extensions/meta/main.inc.php	(revision 23778)
+++ extensions/meta/main.inc.php	(revision 24393)
@@ -11,5 +11,5 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-global $prefixeTable;
+global $prefixeTable, $page;
 
 define('meta_DIR' , basename(dirname(__FILE__)));
@@ -19,4 +19,5 @@
 define('meta_cat_TABLE' , $prefixeTable . 'meta_cat');
 define('METAPERSO_TABLE', $prefixeTable.'metaperso');
+define('META_AP_TABLE', $prefixeTable.'meta_ap');
 
   // Plugin for admin
@@ -128,6 +129,4 @@
 	$template->append('metapersos', $items);
   	}
-	
-
 }
 	
@@ -135,4 +134,56 @@
 	$template->append('head_elements', $template->parse('PERSO_META', true));
 }	
+
+ $MPC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';"));
+  if($MPC['state'] == 'active')
+	{
+	global $conf;
+	  if (isset($page['section']) and $page['section'] == 'contact')
+		{
+$metacontact = explode(',', $conf['contactmeta']);
+$metakeyED=trigger_event('AP_render_content', $metacontact[0]);
+$metadesED=trigger_event('AP_render_content', $metacontact[1]);
+			  if (!empty($metakeyED))
+			{
+			$template->append('related_tags', array('name' => $metakeyED));
+			}
+			  if (!empty($metadesED))
+			{
+			$template->assign('PLUG_META', $metadesED);
+			}
+		}
+	}
+	
+$MAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';"));
+  if($MAP['state'] == 'active')
+	{
+			if ( !empty($page['additional_page']['id']) )   
+				{echo $page['additional_page']['id'];
+	$lire=$page['additional_page']['id'];
+	$query = '
+  select id, metaKeyap, metadesap
+  FROM ' . META_AP_TABLE . '
+  WHERE id = \''.$lire.'\'
+  ;';
+	$result = pwg_query($query);
+	$row = pwg_db_fetch_assoc($result);
+	$metaKeyapap=$row['metaKeyap'];
+	$metadesapap=$row['metadesap'];
+	$metaKeyapapED=trigger_event('AP_render_content', $metaKeyapap);
+	$metadesapED=trigger_event('AP_render_content', $metadesapap);
+				}
+		  if (isset($page['section']) and $page['section'] == 'additional_page')
+		{
+			  if (!empty($metaKeyapapED))
+			{
+			$template->append('related_tags', array('name' => $metaKeyapapED));
+			}
+			  if (!empty($metadesapED))
+			{
+			$template->assign('PLUG_META', $metadesapED);
+			}
+		}
+	}
+
 	
  }
@@ -207,5 +258,4 @@
   }
 }
-
 
 function set_meta_back()
Index: extensions/meta/maintain.inc.php
===================================================================
--- extensions/meta/maintain.inc.php	(revision 23778)
+++ extensions/meta/maintain.inc.php	(revision 24393)
@@ -20,5 +20,20 @@
 PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
 	$result = pwg_query($query);
-		
+
+  if (empty($conf['contactmeta']))
+  {
+	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("contactmeta",",","contactmeta");';
+    pwg_query($query);
+  }
+  
+  	if (!defined('META_AP_TABLE')) define('META_AP_TABLE', $prefixeTable.'meta_ap');	
+	$query = "CREATE TABLE IF NOT EXISTS ". META_AP_TABLE ." (
+id SMALLINT( 5 ) UNSIGNED NOT NULL ,
+metaKeyap VARCHAR( 255 ) NOT NULL ,
+metadesap VARCHAR( 255 ) NOT NULL ,
+PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
+	$result = pwg_query($query);
+	
+	
 //Gestion MAJ2
 $majm2='meta 2.1.0';
@@ -124,5 +139,5 @@
 function plugin_install()
 {
-    global $prefixeTable;
+	global $conf, $prefixeTable;
 
     $q = 'CREATE TABLE ' . $prefixeTable . 'meta(
@@ -182,4 +197,23 @@
 	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("'.$majm2.'",1,"MAJ meta");';
     pwg_query($query);	
+	
+	
+
+  if (empty($conf['contactmeta']))
+  {
+	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("contactmeta",",","contactmeta");';
+    pwg_query($query);
+  }
+  
+  	if (!defined('META_AP_TABLE')) define('META_AP_TABLE', $prefixeTable.'meta_ap');	
+	$query = "CREATE TABLE IF NOT EXISTS ". META_AP_TABLE ." (
+id SMALLINT( 5 ) UNSIGNED NOT NULL ,
+metaKeyap VARCHAR( 255 ) NOT NULL ,
+metadesap VARCHAR( 255 ) NOT NULL ,
+PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
+	$result = pwg_query($query);
+	
+	
+	
 }
 
@@ -206,4 +240,10 @@
 	$q = 'DROP TABLE ' . $prefixeTable . 'meta_cat;';
     pwg_query($q);
+	
+	$q = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="contactmeta" LIMIT 1;';
+    pwg_query($q);
+	
+	$q = 'DROP TABLE ' . $prefixeTable . 'meta_cat;';
+    pwg_query($q);
 }
 
