Index: /extensions/ASearchEngine/admin/ase_config.tpl
===================================================================
--- /extensions/ASearchEngine/admin/ase_config.tpl	(revision 7207)
+++ /extensions/ASearchEngine/admin/ase_config.tpl	(revision 7207)
@@ -0,0 +1,134 @@
+
+<h2>{'ase_config'|@translate}</h2>
+
+{literal}
+<script type='text/javascript'>
+
+  function configManager()
+  {
+
+    this.init = function ()
+    {
+      this.displayTab('gallery');
+    }
+
+    /**
+     * manage the tabsheet
+     *
+     * @param String tabsheet : id of the tabsheet to display
+     */
+    this.displayTab = function (tabsheet)
+    {
+      switch(tabsheet)
+      {
+        case 'gallery':
+          $('#iTabGallery').css('display', 'block');
+          $('#iTabConfig').css('display', 'none');
+          break;
+        case 'keyword':
+          $('#iTabGallery').css('display', 'none');
+          $('#iTabConfig').css('display', 'block');
+          break;
+      }
+    }
+
+    this.checkValidity = function(tabsheet)
+    {
+      $('.error').removeClass('error');
+
+      re=/\d+/i;
+
+      ok=true;
+
+      if(tabsheet==null || tabsheet=='gallery')
+      {
+
+        if($('#iPAActive').attr('checked') && $('input.checkModules:checked').length==0)
+        {
+          $('input.checkModules').parent().addClass('error');
+          $('#itabcfggallery a').click();
+          ok=false;
+          alert('{/literal}{"ase_error_no_module_checked"|@translate}{literal}');
+        }
+
+        if(re.exec($('#iPALimits').val())==null || $('#iPALimits').val()=='0')
+        {
+          $('#iPALimits').addClass('error');
+          $('#itabcfggallery a').click();
+          ok=false;
+          alert("{/literal}{'ase_error_limit_must_be_integer_gt_0'|@translate}{literal}");
+        }
+      }
+
+      if(tabsheet==null || tabsheet=='keyword')
+      {
+        if(re.exec($('#iKMinLength').val())==null || $('#iKMinLength').val()=='0')
+        {
+          $('#iKMinLength').addClass('error');
+          $('#itabcfgkeyword a').click();
+          ok=false;
+          alert("{/literal}{'ase_error_key_word_min_length_must_be_integer_gt_0'|@translate}{literal}");
+        }
+      }
+
+      return(ok);
+    }
+
+    this.submit = function ()
+    {
+      var ok=this.checkValidity();
+
+
+      if(ok) $('#iForm').get(0).submit();
+    }
+
+    this.init();
+  }
+
+</script>
+{/literal}
+
+{$configTabsheet}
+
+
+<form method="POST" action="" id='iForm'>
+
+  <div id='iTabGallery' style='display:none;'>
+    <div>
+      <label><input type="checkbox" id='iPAActive' name='fPAActive' {if $aseConfig.ase_publicAccess_active}checked{/if}>&nbsp;{'ase_publicAccess_active'|@translate}</label>
+    </div>
+
+    <div style='margin-left:30px;'>
+      {'ase_publicAccess_allowedPlugins'|@translate}
+      <ul class='modulesList'>
+        {foreach from=$datas.modules item=module}
+          <li><label><input class='checkModules' type="checkbox" name="fModule{$module.id}" {if $module.accessible}checked{/if}>&nbsp;{$module.name}</label></li>
+        {/foreach}
+      </ul>
+    </div>
+
+    <div class='cfgBloc'>
+      <label><input type="checkbox" id='iPAApplyLimits' name='fPAApplyLimits' {if $aseConfig.ase_publicAccess_applyLimits}checked{/if}>&nbsp;{'ase_publicAccess_applyLimits'|@translate}</label>
+      <input id="iPALimits" name="fPALimits" type="text" maxlength='6' size='6' value="{$aseConfig.ase_publicAccess_limits}">
+    </div>
+
+  </div>
+
+  <div id='iTabConfig' style='display:none;'>
+    {'ase_keyword_minLength'|@translate}&nbsp;
+    <input id="iKMinLength" name="fKMinLength" type="text" maxlength='2' size='2' value="{$aseConfig.ase_keyword_minLength}">
+  </div>
+
+
+  <div class='cfgBloc'>
+    <input type="button" onclick="cm.submit();" value="{'ase_apply'|@translate}">
+  </div>
+
+</form>
+
+
+{literal}
+<script type="text/javascript">
+  var cm=new configManager();
+</script>
+{/literal}
Index: /extensions/ASearchEngine/admin/ase_search.tpl
===================================================================
--- /extensions/ASearchEngine/admin/ase_search.tpl	(revision 7206)
+++ /extensions/ASearchEngine/admin/ase_search.tpl	(revision 7207)
@@ -3,2 +3,3 @@
 
 {$ase_search_page}
+
Index: /extensions/ASearchEngine/ase.css
===================================================================
--- /extensions/ASearchEngine/ase.css	(revision 7206)
+++ /extensions/ASearchEngine/ase.css	(revision 7207)
@@ -1,83 +1,10 @@
-#iHeaderListMaps { width:100%; border:1px solid; border-collapse: collapse; margin-top:3px; }
-#iListMaps, #iListAssoc, #iListKml { width:100%; border:1px solid; height:280px; border-top:0px; overflow:auto; position:relative; left:-1px;}
-#iListMapsNb, #iListAssocNb, #iListKmlNb { width:99%; text-align:right; margin-bottom:8px; padding:2px; font-size:80%; }
-
-#iListMaps table, table.listMaps,
-#iListAssoc table,
-#iListKml table  { width:100%; text-align:left; border-collapse: collapse; }
-
-#iListMaps.roma table tr:hover,
-#iListAssoc.roma table tr:hover,
-#iListKml.roma table tr:hover  { cursor:pointer; background:#303030; }
-
-#iListMaps.clear table tr:hover,
-#iListAssoc.clear table tr:hover,
-#iListKml.clear table tr:hover { cursor:pointer; color: #D54E21; background:#dbe8f3; }
-
-#iBDAssocCatId {
-  width:560px;
+ul.modulesList {
+  margin:0px;
+  padding:0px;
+  list-style:none;
 }
 
-div.addMap { text-align:left; }
-
-img.pointer, span.pointer, div.pointer { cursor:pointer; }
-
-.error, input.error {
-  background:#FFAAAA;
-  border:1px solid #800000;
-  color:#800000;
-}
-ul.error {
-  min-height:30px;
-  -moz-border-radius:8px;
-  -webkit-border-radius:8px;
-  -khtml-border-radius:8px;
-  border-radius:8px;
+div.cfgBloc {
+  margin-top:10px;
 }
 
-.ui-slider {
-  width:708px;
-  height:10px;
-  border-width:1px;
-  border-style:solid;
-  margin-right:5px;
-  padding-right:14px;
-}
-.ui-slider-handle {
-  width:12px;
-  height:12px;
-  position:relative;
-  top:-2px;
-  border-width:1px;
-  border-style:solid;
-  display:block;
-}
-
-#itab2 {
-  border-top:1px solid;
-  margin:25px -6px 0 -10px;
-  padding-top:3px;
-}
-
-#iDialogGMapNfo {
-  height:18px;
-  margin:5px 5px 0 60px;
-  text-align:left;
-}
-#iDialogGMapNfo span {
-  position:relative;
-  top:-3px;
-  margin-left:3px;
-}
-#iDialogGMapWaiting {
-  position:absolute;
-  z-index:1500;
-  background:#000000;
-  opacity:0.55;
-  filter:alpha(opacity:55);
-}
-
-
-// fix IE8 compatibility bugs from GPC 3.2.0 (fixed in next release)
-.formtable, .formtable P { margin-left:0px;  }
-.tabsheet2 { list-style:none; }
Index: /extensions/ASearchEngine/ase_aip.class.inc.php
===================================================================
--- /extensions/ASearchEngine/ase_aip.class.inc.php	(revision 7206)
+++ /extensions/ASearchEngine/ase_aip.class.inc.php	(revision 7207)
@@ -23,4 +23,5 @@
 {
   protected $tabsheet;
+  protected $modules;
 
   public function __construct($prefixeTable, $filelocation)
@@ -157,9 +158,84 @@
     global $template;
 
-    /*$template->set_filename('body_page',
+    $this->modules=GPCRequestBuilder::getRegistered();
+    $this->updateConfig();
+    $this->configForTemplate();
+
+    $template->set_filename('body_page',
                 dirname($this->getFileLocation()).'/admin/ase_config.tpl');
 
-
-    $template->assign_var_from_handle('ASE_BODY_PAGE', 'body_page');*/
+    $cfgTabsheet = new GPCTabSheet('configTabsheet', $this->tabsheet->get_titlename(), 'tabsheet2 gcBorder', 'itabcfg');
+    $cfgTabsheet->add('gallery',
+                        l10n('ase_gallery_integration'),
+                        '', true, "cm.displayTab('gallery');");
+    $cfgTabsheet->add('keyword',
+                        l10n('ase_keyword_module'),
+                        '', false, "cm.displayTab('keyword');");
+    $cfgTabsheet->assign();
+
+
+    foreach($this->modules as $key=>$val)
+    {
+      $this->modules[$key]=array(
+        'name' => l10n($val['name']),
+        'id' => $val['name'],
+        'accessible' => in_array($val['name'], $this->config['ase_publicAccess_allowedPlugins'])
+      );
+    }
+
+    $datas=Array(
+      'urlRequest' => $this->getAdminLink('ajax'),
+      'modules' => $this->modules
+    );
+    $template->assign('datas', $datas);
+
+    $template->assign_var_from_handle('ASE_BODY_PAGE', 'body_page');
+  }
+
+  /**
+   * update config values
+   */
+  protected function updateConfig()
+  {
+    global $infos;
+
+    if(!isset($_POST) or count($_POST)==0) return(false);
+
+
+    if(isset($_POST['fPAActive']) and $_POST['fPAActive']=='on')
+    {
+      $this->config['ase_publicAccess_active']=true;
+    }
+    else
+    {
+      $this->config['ase_publicAccess_active']=false;
+    }
+
+
+    if(isset($_POST['fPAApplyLimits']) and $_POST['fPAApplyLimits']=='on')
+    {
+      $this->config['ase_publicAccess_applyLimits']=true;
+    }
+    else
+    {
+      $this->config['ase_publicAccess_applyLimits']=false;
+    }
+
+    if(isset($_POST['fKMinLength'])) $this->config['ase_keyword_minLength']=$_POST['fKMinLength'];
+
+    if(isset($_POST['fPALimits'])) $this->config['ase_publicAccess_limits']=$_POST['fPALimits'];
+
+    $this->config['ase_publicAccess_allowedPlugins']=array();
+    foreach($this->modules as $key=>$val)
+    {
+      if(isset($_POST['fModule'.$val['name']]) and $_POST['fModule'.$val['name']]=='on') $this->config['ase_publicAccess_allowedPlugins'][]=$val['name'];
+    }
+
+    if($this->saveConfig())
+    {
+      $this->displayResult(l10n('ase_config_saved'), true);
+      return(true);
+    }
+    return(false);
   }
 
Index: /extensions/ASearchEngine/ase_ajax.php
===================================================================
--- /extensions/ASearchEngine/ase_ajax.php	(revision 7206)
+++ /extensions/ASearchEngine/ase_ajax.php	(revision 7207)
@@ -62,6 +62,5 @@
 
       // check if asked function is valid
-      if(!($_REQUEST['ajaxfct']=='admin.maps.getList'
-           //$_REQUEST['ajaxfct']=='public.maps.getMarkerInfos'
+      if(!($_REQUEST['ajaxfct']=='admin.config.setConfig'
            )) $_REQUEST['ajaxfct']='';
 
@@ -71,8 +70,4 @@
       if($_REQUEST['ajaxfct']!='')
       {
-        /*
-         * no check for admin.maps.getList & admin.assoc.getList requests
-         */
-
 
       }
@@ -86,12 +81,11 @@
     {
       $result="<p class='errors'>An error has occured</p>";
-      /*
+
       switch($_REQUEST['ajaxfct'])
       {
-        case 'admin.maps.getList':
+        case 'admin.config.setConfig':
           $result=$this->ajax_gmaps_admin_mapsGetList();
           break;
       }
-      */
       GPCAjax::returnResult($result);
     }
Index: /extensions/ASearchEngine/ase_root.class.inc.php
===================================================================
--- /extensions/ASearchEngine/ase_root.class.inc.php	(revision 7206)
+++ /extensions/ASearchEngine/ase_root.class.inc.php	(revision 7207)
@@ -61,5 +61,5 @@
 
     /*
-      intialize default values
+      initialize default values
     */
     public function initConfig()
@@ -67,4 +67,9 @@
       //global $user;
       $this->config=array(
+        'ase_keyword_minLength' => 3,
+        'ase_publicAccess_active' => false,
+        'ase_publicAccess_applyLimits' => true,
+        'ase_publicAccess_limits' => 1000,
+        'ase_publicAccess_allowedPlugins' => array()
       );
     }
Index: /extensions/ASearchEngine/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/ASearchEngine/language/fr_FR/plugin.lang.php	(revision 7206)
+++ /extensions/ASearchEngine/language/fr_FR/plugin.lang.php	(revision 7207)
@@ -4,4 +4,10 @@
 
 $lang['ase_release']='v';
+
+$lang['ASERate']="Advanced Search Engine - Note moyenne";
+$lang['ASEDate']="Advanced Search Engine - Dates";
+$lang['ASECategory']="Advanced Search Engine - Catégories";
+$lang['ASEKeyword']="Advanced Search Engine - Mots-clefs";
+$lang['ASEHD']="Advanced Search Engine - Photos HD";
 
 $lang['ase_search']='Rechercher';
@@ -94,3 +100,19 @@
 
 
+$lang['ase_config']="Configuration";
+$lang['ase_gallery_integration']="Intégration dans la galerie";
+$lang['ase_keyword_module']="Module 'Mots-clefs'";
+
+$lang['ase_publicAccess_active']="Remplacer la page de recherche de Piwigo par celle d'<i>Advanced Search Engine</i>";
+$lang['ase_publicAccess_allowedPlugins']="Modules accessibles :";
+$lang['ase_publicAccess_applyLimits']="Limiter le nombre d'élements restitués";
+$lang['ase_keyword_minLength']="Nombre minimum de caractères requis pour un accepter la recherche sur un mot-clef";
+
+$lang['ase_error_limit_must_be_integer_gt_0']="Le nombre d'élements restitués doit être un entier supérieur à 0";
+$lang['ase_error_key_word_min_length_must_be_integer_gt_0']="Le nombre minimum de caractères doit être un entier supérieur à 0";
+$lang['ase_error_no_module_checked']="Si la page de recherche Piwigo est à remplacer, au moins un module doit être sélectionné";
+
+$lang['ase_apply']="Appliquer";
+$lang['ase_config_saved']="La configuration est enregistrée";
+
 ?>
Index: /extensions/ASearchEngine/templates/ase_dialog_keyword_choose.tpl
===================================================================
--- /extensions/ASearchEngine/templates/ase_dialog_keyword_choose.tpl	(revision 7206)
+++ /extensions/ASearchEngine/templates/ase_dialog_keyword_choose.tpl	(revision 7207)
@@ -91,5 +91,5 @@
     returned=true;
 
-    if($('#iASEKeywordKeyword').val().length<3)
+    if($('#iASEKeywordKeyword').val().length< {/literal}{$aseConfig.ase_keyword_minLength}{literal} )
     {
       $("#iASEKeywordKeyword").addClass('error');
