credo che non sia il plugin ma il modulo mod_jea_search che da la possibilità di ricerca , vorrei aggiungere alle 3 scelte possibili (filtro per Tipi, Città, Provincia) aggiungere Riferimento , magari anche sostituire quello che non uso Province con Riferimento , allego immagine del modulo con le possibili opzioni
http://img507.imageshack.us/img507/9271/modjeasearch.jpgnon so se è possibile (per chi ne fosse capace)aggiungere una voce , scrivendo qualcosa nei file php o xml del modulo
il MODULo è così composto : cartella languages; cartella tmpl (contiene il file default); file mod_jea_search (script PHP) ; mod_jea_search (documento XML)
li copio qui sotto in ordine come citati nel caso fossero utili in qualche modo :
FILE PHP "default" nella cartella tmpldefined('_JEXEC') or die('Restricted access');
$use_ajax = $params->get('use_ajax', 0);
$category = $params->get('category', 0);
$sales_itemid = $params->get('sales_itemid', 0);
$rentals_itemid = $params->get('rentals_itemid', 0);
$document =& JFactory::getDocument();
$document->addStyleDeclaration("
#jea_search_form select {
width:12em;
}");
if ($use_ajax ) {
JHTML::script('search.js', 'media/com_jea/js/', true);
//initialize the form when the page load
$document->addScriptDeclaration("
window.addEvent('domready', function() {
refreshForm();
if ($('renting') && $('selling')) {
if ($('renting').checked) {
$('menuItemId').value = $rentals_itemid;
} else {
$('menuItemId').value = $sales_itemid;
}
$('renting').addEvent('click', function() {
if ($use_ajax) {
reinitForm();
}
$('menuItemId').value = $rentals_itemid;
});
$('selling').addEvent('click', function() {
if ($use_ajax) {
reinitForm();
}
$('menuItemId').value = $sales_itemid;
});
}
});");
}
?>
<form action="index.php?option=com_jea&task=search" method="post" id="jea_search_form" enctype="application/x-www-form-urlencoded" >
<?php if($category == 1): ?>
<input type="hidden" id="cat" name="cat" value="selling" />
<?php elseif($category == 2): ?>
<input type="hidden" id="cat" name="cat" value="renting" />
<?php else: ?>
<p>
<input type="radio" name="cat" id="renting" value="renting" checked="checked" />
<label for="renting"><?php echo JText::_('Renting') ?></label>
<input type="radio" name="cat" id="selling" value="selling" />
<label for="selling"><?php echo JText::_('Selling') ?></label>
</p>
<?php endif ?>
<?php if ( $use_ajax ): ?>
<p>
<?php if ($params->get('show_types', 1) == 1):?>
<select id="type_id" name="type_id" onchange="updateList(this)" class="inputbox"><option value="0"> </option></select>
<?php endif ?>
<?php if ($params->get('show_departments', 1) == 1):?>
<select id="department_id" name="department_id" onchange="updateList(this)" class="inputbox" ><option value="0"> </option></select>
<?php endif ?>
<?php if ($params->get('show_towns', 1) == 1):?>
<select id="town_id" name="town_id" onchange="updateList(this)" class="inputbox"><option value="0"> </option></select>
<?php endif ?>
</p>
<?php else: ?>
<p>
<?php if ($params->get('show_types', 1) == 1):?>
<?php echo getHtmlList('#__jea_types', '--'.JText::_( 'Property type' ).'--', 'type_id' ) ?>
<?php endif ?>
<?php if ($params->get('show_departments', 1) == 1):?>
<?php echo getHtmlList('#__jea_departments', '--'.JText::_( 'Department' ).'--', 'department_id' ) ?>
<?php endif ?>
<?php if ($params->get('show_towns', 1) == 1):?>
<?php echo getHtmlList('#__jea_towns', '--'.JText::_( 'Town' ).'--', 'town_id' ) ?>
<?php endif ?>
</p>
<?php endif ?>
<p><input type="submit" class="button" value="<?php echo JText::_('Search') ?>" />
<?php if($category == 1): ?>
<input type="hidden" name="Itemid" value=""<?php echo $sales_itemid ?>" />
<?php elseif($category == 2): ?>
<input type="hidden" name="Itemid" value="<?php echo $rentals_itemid ?>" />
<?php else: ?>
<input type="hidden" name="Itemid" id="menuItemId" value="0" />
<?php endif ?>
<?php echo JHTML::_( 'form.token' ) // Do not remove this ?>
</p>
</form>
FILE PHP "mod_jea_search"defined('_JEXEC') or die('Restricted access');
function getHtmlList($table, $title, $id ){
$sql = "SELECT `id` AS value ,`value` AS text FROM {$table} ORDER BY ordering" ;
$db = & JFactory::getDBO();
$db->setQuery($sql);
$rows = $db->loadObjectList();
if ( $db->getErrorNum() ) {
JError::raiseWarning( 200, $db->getErrorMsg() );
}
//unshift default option
array_unshift($rows, JHTML::_('select.option', '0', $title ));
return JHTML::_('select.genericlist', $rows , $id, 'class="inputbox" size="1" ' , 'value', 'text', 0);
}
//conflict between component searchform and module searchform because both use same id's
$conflict = JRequest::getVar('option') == 'com_jea' && JRequest::getVar('layout') == 'search' ;
$conflict2 = JRequest::getVar('option') == 'com_jea' && JRequest::getVar('layout') == 'form' ;
if(!$conflict && !$conflict2 ){
require(JModuleHelper::getLayoutPath('mod_jea_search'));
}
documento XML "mod_jea_search"<?xml version="1.0" encoding="UTF-8"?>
<install type="module" version="1.5" method="upgrade">
<name>JEA search V1.3</name>
<author>Sylvain Philip</author>
<creationDate>mars 2008</creationDate>
<copyright>(C) 2008 PHILIP Sylvain. All rights reserved.</copyright>
<license>
http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>contact@sphilip.com</authorEmail>
<authorUrl>www.sphilip.com</authorUrl>
<version>1.4</version>
<description>DESCJEASEARCHMOD</description>
<files>
<filename module="mod_jea_search">mod_jea_search.php</filename>
<filename module="mod_jea_search">tmpl/default.php</filename>
</files>
<languages folder="languages">
<language tag="en-GB">en-GB.mod_jea_search.ini</language>
<language tag="fr-FR">fr-FR.mod_jea_search.ini</language>
</languages>
<params>
<param name="use_ajax" type="radio" default="1" label="Use AJAX" description="PARAMUSEAJAX">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
<param name="category" type="list" default="0" label="Category" description="PARAMCATEGORY">
<option value="0">Renting or Selling</option>
<option value="1">Selling only</option>
<option value="2">Renting only</option>
</param>
<param name="show_types" type="radio" default="1" label="Filter on types">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
<param name="show_departments" type="radio" default="1" label="Filter on departments">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
<param name="show_towns" type="radio" default="1" label="Filter on towns">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
<param name="sales_itemid" type="menuitem" default="" label="Sales menu Item" description="PARAMSALESMENUITEM"/>
<param name="rentals_itemid" type="menuitem" default="" label="Rentals menu Item" description="PARAMRENTALSMENUITEM"/>
<param name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="PARAMMODULECLASSSUFFIX" />
</params>
</install>