Index: /extensions/title/admin.php
===================================================================
--- /extensions/title/admin.php	(revision 32419)
+++ /extensions/title/admin.php	(revision 32420)
@@ -3,5 +3,5 @@
 // | Title plugin for piwigo by TEMMII                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
+// | Copyright(C) 2011 - 2021 ddtddt             http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/title/index.php
===================================================================
--- /extensions/title/index.php	(revision 32419)
+++ /extensions/title/index.php	(revision 32420)
@@ -1,10 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | This file is part of Piwigo.                                          |
-// |                                                                       |
-// | For copyright and license information, please view the COPYING.txt    |
-// | file that was distributed with this source code.                      |
-// +-----------------------------------------------------------------------+
-
 // Recursive call
 $url = '../';
Index: /extensions/title/initadmin.php
===================================================================
--- /extensions/title/initadmin.php	(revision 32419)
+++ /extensions/title/initadmin.php	(revision 32420)
@@ -3,5 +3,5 @@
 // | Title plugin for piwigo by TEMMII                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
+// | Copyright(C) 2011 - 2021 ddtddt             http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
@@ -24,5 +24,5 @@
 
 //Add link menu
-add_event_handler('get_admin_plugin_menu_links', 'title_admin_menu');
+/*add_event_handler('get_admin_plugin_menu_links', 'title_admin_menu');
 function title_admin_menu($menu){
   $menu[] = array(
@@ -32,5 +32,5 @@
   return $menu;
 }
-
+*/
 
 //add prefiltre photo
@@ -44,5 +44,5 @@
 
 function titlePadminfT($content, &$smarty){
-  $search = '#<p style="margin:40px 0 0 0">#';
+  $search = '#<input type="hidden" name="pwg_token"#';
   $replacement = '
     <p>
@@ -52,5 +52,5 @@
     </p>
 	
-<p style="margin:40px 0 0 0">';
+<input type="hidden" name="pwg_token"';
 
   return preg_replace($search, $replacement, $content);
Index: /extensions/title/language/en_UK/index.php
===================================================================
--- /extensions/title/language/en_UK/index.php	(revision 32419)
+++ /extensions/title/language/en_UK/index.php	(revision 32420)
@@ -1,10 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | This file is part of Piwigo.                                          |
-// |                                                                       |
-// | For copyright and license information, please view the COPYING.txt    |
-// | file that was distributed with this source code.                      |
-// +-----------------------------------------------------------------------+
-
 // Recursive call
 $url = '../';
Index: /extensions/title/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/title/language/en_UK/plugin.lang.php	(revision 32419)
+++ /extensions/title/language/en_UK/plugin.lang.php	(revision 32420)
@@ -3,5 +3,5 @@
 // | Title plugin for piwigo by TEMMII                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
+// | Copyright(C) 2011 - 2021 ddtddt             http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/title/language/fr_FR/index.php
===================================================================
--- /extensions/title/language/fr_FR/index.php	(revision 32419)
+++ /extensions/title/language/fr_FR/index.php	(revision 32420)
@@ -1,10 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | This file is part of Piwigo.                                          |
-// |                                                                       |
-// | For copyright and license information, please view the COPYING.txt    |
-// | file that was distributed with this source code.                      |
-// +-----------------------------------------------------------------------+
-
 // Recursive call
 $url = '../';
Index: /extensions/title/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/title/language/fr_FR/plugin.lang.php	(revision 32419)
+++ /extensions/title/language/fr_FR/plugin.lang.php	(revision 32420)
@@ -3,5 +3,5 @@
 // | Title plugin for piwigo by TEMMII                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
+// | Copyright(C) 2011 - 2021 ddtddt             http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/title/language/index.php
===================================================================
--- /extensions/title/language/index.php	(revision 32419)
+++ /extensions/title/language/index.php	(revision 32420)
@@ -1,10 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | This file is part of Piwigo.                                          |
-// |                                                                       |
-// | For copyright and license information, please view the COPYING.txt    |
-// | file that was distributed with this source code.                      |
-// +-----------------------------------------------------------------------+
-
 // Recursive call
 $url = '../';
Index: /extensions/title/main.inc.php
===================================================================
--- /extensions/title/main.inc.php	(revision 32419)
+++ /extensions/title/main.inc.php	(revision 32420)
@@ -7,4 +7,5 @@
 Author: ddtddt
 Author URI: http://temmii.com/piwigo/
+Has Settings: true
 */
 
@@ -12,5 +13,5 @@
 // | Title plugin for piwigo by TEMMII                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
+// | Copyright(C) 2011 - 2021 ddtddt             http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
@@ -90,10 +91,11 @@
 $result = pwg_query($query);
 $row = pwg_db_fetch_assoc($result);
-$titleP=$row['title'];
-$titlePED=trigger_change('AP_render_content', $titleP);
+ if(isset($row['title'])){$titleP=$row['title'];
+  $titlePED=trigger_change('AP_render_content', $titleP);
 	if (!empty($titlePED)){
 	  $template->assign('PERSO_TITLE', $titlePED);
 	}
   }
+ }
 }
 
@@ -110,10 +112,11 @@
 $result = pwg_query($query);
 $row = pwg_db_fetch_assoc($result);
-$titleA=$row['title'];
-$titleAED=trigger_change('AP_render_content', $titleA);
+ if(isset($row['title'])){$titleA=$row['title'];
+   $titleAED=trigger_change('AP_render_content', $titleA);
 	if (!empty($titleAED)){
 				$template->assign('PERSO_TITLE', $titleAED);
 	}
   }
+ }
 }
 
@@ -178,16 +181,18 @@
   if (isset($pwg_loaded_plugins['AdditionalPages'])){	
 	global $prefixeTable;
-	if ( !empty($page['additional_page']['id']) ){
+    if ( !empty($page['additional_page']['id']) ){
 		if (!defined('TITLE_AP_TABLE')) define('TITLE_AP_TABLE', $prefixeTable.'title_ap');	
-	$lire=$page['additional_page']['id'];
-	$query = '
+	  $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_change('AP_render_content', $titleap);	
+	  $result = pwg_query($query);
+	  $row = pwg_db_fetch_assoc($result);
+	  if(isset($row['title'])){
+		$titleap=$row['title'];
+	    $titlespecialED['AdditionalPages']=trigger_change('AP_render_content', $titleap);	
+	  }
 	}
 	if (isset($page['section']) and $page['section'] == 'additional_page' and !empty($titlespecialED['AdditionalPages'])){
Index: /extensions/title/maintain.class.php
===================================================================
--- /extensions/title/maintain.class.php	(revision 32419)
+++ /extensions/title/maintain.class.php	(revision 32420)
@@ -3,5 +3,5 @@
 // | Title plugin for piwigo by TEMMII                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2011 - 2020 ddtddt             http://temmii.com/piwigo/ |
+// | Copyright(C) 2011 - 2021 ddtddt             http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
