Index: extensions/title/admin/admin.php
===================================================================
--- extensions/title/admin/admin.php	(revision 21766)
+++ extensions/title/admin/admin.php	(revision 22676)
@@ -21,4 +21,18 @@
                l10n('title_tab_plgtitle'),
                $my_base_url.'&amp;tab=plugtitle');
+	$PAC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';"));
+	if($PAC['state'] == 'active')
+	{
+$tabsheet->add('contacttitle',
+               l10n('Contact Title'),
+               $my_base_url.'&amp;tab=contacttitle');
+	}
+		$PAAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';"));
+	if($PAAP['state'] == 'active')
+	{
+$tabsheet->add('AdditionalPagestitle',
+               l10n('Additional Pages Title'),
+               $my_base_url.'&amp;tab=AdditionalPagestitle');
+	}			   
 $tabsheet->select($page['tab']);
 $tabsheet->assign();
@@ -71,5 +85,4 @@
 $template->assign('titlepagelistT', $titlepagelistT);
 
-//edit title
 if (isset($_POST['subtitlespecialET']) and (!$_POST['titlelist'])==0 and !is_adviser())
 	{
@@ -97,5 +110,4 @@
 	}
 
-//insert title in database
 if (isset($_POST['subtitlespecial']) and !is_adviser())
 	{
@@ -110,4 +122,98 @@
     break;
 	
+	case 'contacttitle':
+	
+	$template->assign('gestB',
+    array('CTBASE' => $conf['contacttitle'],));
+
+if (isset($_POST['submitct']))
+	{
+conf_update_param('contacttitle', $_POST['contacttitle']);
+$template->assign(
+    'gestB',
+    array('CTBASE' => stripslashes($_POST['contacttitle']),));
+	}
+	
+	break;
+
+	case 'AdditionalPagestitle':
+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,title
+  FROM ' . TITLE_AP_TABLE . '
+  WHERE id = \''.$lire.'\'
+  ;';
+$result = pwg_query($query);
+$row = pwg_db_fetch_assoc($result);
+$idap=$row['id'];
+$titleap=$row['title'];
+
+$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,
+      'CONTENT' => $titleap,
+      'SELECTED' => $selected3
+      ));
+	}
+
+if (isset($_POST['submitinsapt']))
+	{
+	$query = '
+DELETE 
+  FROM ' . TITLE_AP_TABLE . '
+  WHERE id = \''.$_POST['invisible'].'\'
+  ;';
+$result = pwg_query($query);
+	$q = '
+INSERT INTO ' . $prefixeTable . 'title_ap(id,title)VALUES ('.$_POST['invisible'].',"'.$_POST['insertitle'].'");';
+    pwg_query($q);
+	}
+	
+	break;
+	
 } 
 
Index: extensions/title/admin/admin.tpl
===================================================================
--- extensions/title/admin/admin.tpl	(revision 21766)
+++ extensions/title/admin/admin.tpl	(revision 22676)
@@ -1,4 +1,4 @@
 <div class="titrePage">
-  <h2>Title</h2>
+  <h2>{'Page title'|@translate}</h2>
 </div>
 {if isset ($gestionA)}
@@ -35,2 +35,49 @@
 	{/if}
 {/if}
+
+{if isset ($gestB)}
+	<form method="post" >
+	 <fieldset id="mainConf">
+			<span class="property">
+				<label for="contacttitle">{'Contact Title'|@translate}</label><br><br>
+			</span>
+			<textarea rows="5" cols="50" class="description" name="contacttitle" id="contacttitle">{$gestB.CTBASE}</textarea>
+  <p>
+    <input class="submit" type="submit" name="submitct" 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="{'sumit'|@translate}" />
+					</div>
+			</fieldset>
+		</form>
+	</div>
+	{if isset ($ap_edit)}
+	<div>
+		<form method="post" >
+			<fieldset>
+				<legend>{'Add title for pages'|@translate} {$ap_edit.VALUE}</legend>
+					<input type="hidden" name="invisible" value="{$ap_edit.VALUE}">
+					id&nbsp;:&nbsp;{$ap_edit.VALUE}&nbsp;->&nbsp;{$ap_edit.VALUEN}<br>
+					<textarea rows="5" cols="50" class="description" name="insertitle" id="contacttitle">{$ap_edit.CONTENT}</textarea>
+				<br>	
+				<br>
+					<div style="text-align:center;">
+					<input class="submit" name="submitinsapt" type="submit" value="{'sumit'|@translate}"/>
+					</div>
+			</fieldset>
+		</form>
+	</div>
+	{/if}
+{/if}
Index: extensions/title/initadmin.php
===================================================================
--- extensions/title/initadmin.php	(revision 21766)
+++ extensions/title/initadmin.php	(revision 22676)
@@ -1,5 +1,5 @@
 <?php
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
+load_language('plugin.lang', TITLE_PATH);
 
 //Add link menu
@@ -8,5 +8,5 @@
 {
   array_push($menu, array(
-	'NAME' => 'Title',
+	'NAME' => l10n('Page title'),
     'URL' => get_admin_plugin_menu_link(TITLE_PATH . 'admin/admin.php')));
   return $menu;
Index: extensions/title/language/en_UK/plugin.lang.php
===================================================================
--- extensions/title/language/en_UK/plugin.lang.php	(revision 21766)
+++ extensions/title/language/en_UK/plugin.lang.php	(revision 22676)
@@ -12,3 +12,10 @@
 $lang['title_page'] = 'Page title';
 
+$lang['Page title'] = 'Page title';
+$lang['Contact Title'] = 'Contact Title';
+$lang['Additional Pages Title'] = 'Additional Pages Title';
+$lang['Choose it page'] = 'Choose it page';
+$lang['Choose Additional Pages'] = 'Choose Additional Pages';
+$lang['Add title for pages'] = 'Add title for pages';
+
 ?>
Index: extensions/title/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/title/language/fr_FR/plugin.lang.php	(revision 21766)
+++ extensions/title/language/fr_FR/plugin.lang.php	(revision 22676)
@@ -12,3 +12,10 @@
 $lang['title_page'] = 'Titre pour la page';
 
+$lang['Page title'] = 'Titre des pages';
+$lang['Contact Title'] = 'Titre de la page Contact';
+$lang['Additional Pages Title'] = 'Titre des pages supplémentaires';
+$lang['Choose it page'] = 'Choisissez la page';
+$lang['Choose Additional Pages'] = 'Choisissez la Pages supplémentaires';
+$lang['Add title for pages'] = 'Ajouter le titre de la page';
+
 ?>
Index: extensions/title/main.inc.php
===================================================================
--- extensions/title/main.inc.php	(revision 21766)
+++ extensions/title/main.inc.php	(revision 22676)
@@ -117,5 +117,5 @@
  function Titleother()
  {
-	global $template, $page;
+	global $template, $page, $conf;
 	
 		$query = '
@@ -180,5 +180,40 @@
 		{
 			$template->assign('PERSO_TITLE', $titlespecialED['notification']);
-		}		
+		}
+	
+	$PAC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';"));
+	if($PAC['state'] == 'active')
+	{
+		$titlespecialED['contact']=trigger_event('AP_render_content', $conf['contacttitle']);
+	  if (isset($page['section']) and $page['section'] == 'contact' and !empty($titlespecialED['contact']))
+		{
+			$template->assign('PERSO_TITLE', $titlespecialED['contact']);
+		}
+	}
+	
+	$PAAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';"));
+	if($PAAP['state'] == 'active')
+	{
+	
+	global $prefixeTable;
+			if ( !empty($page['additional_page']['id']) )   
+				{
+		if (!defined('TITLE_AP_TABLE')) define('TITLE_AP_TABLE', $prefixeTable.'title_ap');	
+	$lire=$page['additional_page']['id'];
+	$query = '
+  select id,title
+  FROM ' . TITLE_AP_TABLE . '
+  WHERE id = \''.$lire.'\'
+  ;';
+	$result = pwg_query($query);
+	$row = pwg_db_fetch_assoc($result);
+	$titleap=$row['title'];
+	$titlespecialED['AdditionalPages']=trigger_event('AP_render_content', $titleap);	
+				}
+	  if (isset($page['section']) and $page['section'] == 'additional_page' and !empty($titlespecialED['AdditionalPages']))
+		{
+			$template->assign('PERSO_TITLE', $titlespecialED['AdditionalPages']);
+		}
+	}
  }
  
Index: extensions/title/maintain.inc.php
===================================================================
--- extensions/title/maintain.inc.php	(revision 21766)
+++ extensions/title/maintain.inc.php	(revision 22676)
@@ -65,4 +65,36 @@
 	$result = pwg_query($query);
 	
+  global $conf;
+  if (empty($conf['contacttitle']))
+  {
+	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("contacttitle","","contacttitle");';
+    pwg_query($query);
+  }
+  
+  	if (!defined('TITLE_AP_TABLE')) define('TITLE_AP_TABLE', $prefixeTable.'title_ap');	
+	$query = "CREATE TABLE IF NOT EXISTS ". TITLE_AP_TABLE ." (
+id SMALLINT( 5 ) UNSIGNED NOT NULL ,
+title VARCHAR( 255 ) NOT NULL ,
+PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
+	$result = pwg_query($query);
+	
+}
+
+function plugin_activate()
+{
+  global $conf;
+  if (empty($conf['contacttitle']))
+  {
+	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("contacttitle","","contacttitle");';
+    pwg_query($query);
+  }
+  
+  	if (!defined('TITLE_AP_TABLE')) define('TITLE_AP_TABLE', $prefixeTable.'title_ap');	
+	$query = "CREATE TABLE IF NOT EXISTS ". TITLE_AP_TABLE ." (
+id SMALLINT( 5 ) UNSIGNED NOT NULL ,
+title VARCHAR( 255 ) NOT NULL ,
+PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
+	$result = pwg_query($query);
+    
 }
 
@@ -80,4 +112,10 @@
 	$q = 'DROP TABLE ' . $prefixeTable . 'title_album;';
     pwg_query($q);
+	
+	$q = 'DROP TABLE ' . $prefixeTable . 'title_ap;';
+    pwg_query($q);
+	
+	$q = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="contacttitle" LIMIT 1;';
+    pwg_query($q);
 }
 
