Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
index.html000064400000000054151160535300006537 0ustar00<html><body
bgcolor="#FFFFFF"></body></html>mod_market_locationsearch.php000064400000004260151160535300012456
0ustar00<?php
/**
* @package HikaMarket for Joomla!
* @version 3.1.1
* @author Obsidev S.A.R.L.
* @copyright (C) 2011-2020 OBSIDEV. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
if(!defined('DS'))
define('DS', DIRECTORY_SEPARATOR);
if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikamarket'.DS.'helpers'.DS.'helper.php'))
{
echo '<div>This module can not work without the HikaMarket
Component</div>';
return;
}
$params->set('from_module', $module->id);
$marketConfig = hikamarket::config();
$module_options =
$marketConfig->get('params_'.$module->id);
if(empty($module_options)) {
$shopConfig = hikamarket::config(false);
$module_options = $shopConfig->get('default_params');
}
foreach($module_options as $key => $option) {
if($key != 'moduleclass_sfx')
$params->set($key,$option);
}
foreach(get_object_vars($module) as $k => $v) {
if(!is_object($v))
$params->set($k,$v);
}
$menu_id = $params->get('menu_id');
$search_button = $params->get('search_button');
$app = JFactory::getApplication();
$menus = $app->getMenu();
$menu = null;
if(!empty($menu_id)) {
$menu = $menus->getItem($menu_id);
}
$app = JFactory::getApplication();
$location_search =
$app->getUserState(HIKAMARKET_COMPONENT.'.vendor_location_filter.search',
null);
$opt = hikaInput::get()->getString('option');
$ctrl = hikaInput::get()->getString('ctrl');
$task = hikaInput::get()->getString('task');
if($opt != 'com_hikashop' || ($ctrl != 'product'
&& $ctrl != 'category') || $task != 'listing'
|| $params->get('force_menu')) {
$url = '';
if(!empty($menu->query['option']))
$url =
JRoute::_('index.php?option='.$menu->query['option'].'&Itemid='.$menu_id);
if(empty($url))
$url = JRoute::_(@$menu->link.'&Itemid='.$menu_id);
} else {
$url = hikashop_currentUrl();
}
$block_empty_search = false;
$script = '';
if(@$params->get('block_empty_search')) {
$block_empty_search = true;
$script = ' onsubmit="return
window.localPage.locationsearchSubmit(this);"';
}
require(JModuleHelper::getLayoutPath('mod_market_locationsearch'));
mod_market_locationsearch.xml000064400000005200151160535300012462
0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="2.5.0"
method="upgrade">
<name>HikaMarket Location Search module</name>
<creationDate>20 juillet 2020</creationDate>
<version>3.1.1</version>
<author>Obsidev</author>
<authorEmail>contact@obsidev.com</authorEmail>
<authorUrl>http://www.hikashop.com</authorUrl>
<copyright>(C) 2011-2020 OBSIDEV. All rights
reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html
GNU/GPL</license>
<description>Display the location search field for HikaMarket
filtering</description>
<files>
<filename
module="mod_market_locationsearch">mod_market_locationsearch.php</filename>
<folder>tmpl</folder>
<filename>index.html</filename>
</files>
<params addpath="/components/com_hikamarket/params">
<param name="menu_id" type="menuitem"
disable="separator" default="" label="Targeted
menu" description="" state="1" />
<param name="force_menu" type="radio"
default="0" label="Force menu"
description="">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
<param name="block_empty_search" type="radio"
default="0" label="Block empty search"
description="">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
<param name="placeholder" type="text"
default="" label="Placeholder"
description="Placeholder text" />
<param name="search_button" type="text"
default="" label="Search button"
description="Search button text (hide if empty)" />
<param name="moduleclass_sfx" type="text"
default="" label="Module Class Suffix"
description="PARAMMODULECLASSSUFFIX" />
</params>
<config>
<fields name="params"
addfieldpath="/components/com_hikamarket/fields">
<fieldset name="basic">
<field name="menu_id" type="menuitem"
disable="separator" default="" label="Targeted
menu" description="" />
<field name="force_menu" type="radio"
default="0" label="Force menu"
description="">
<option value="0">No</option>
<option value="1">Yes</option>
</field>
<field name="block_empty_search" type="radio"
default="0" label="Block empty search"
description="">
<option value="0">No</option>
<option value="1">Yes</option>
</field>
<field name="placeholder" type="text"
default="" label="Placeholder"
description="Placeholder text" />
<field name="search_button" type="text"
default="" label="Search button"
description="Search button text (hide if empty)" />
<field name="moduleclass_sfx" type="text"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
</fieldset>
</fields>
</config>
</extension>
tmpl/default.php000064400000002772151160535300007664 0ustar00<?php
/**
* @package HikaMarket for Joomla!
* @version 3.1.1
* @author Obsidev S.A.R.L.
* @copyright (C) 2011-2020 OBSIDEV. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><div class="hikamarket_vendor_module"
id="hikamarket_vendor_locationsearch">
<form action="<?php echo $url; ?>"<?php echo
$script; ?> method="POST">
<div>
<input name="location_search" type="text"
value="<?php echo $location_search; ?>"
id="hikamarket_vendor_locationsearch_input"
placeholder="<?php echo @$params->get('placeholder');
?>" />
<?php if(!empty($search_button)) { ?>
<input type="submit" value="<?php echo
JText::_($search_button); ?>" />
<?php } ?>
</div>
<div id="hikamarket_vendor_locationsearch_error"
style="display:none;">
<span><?php echo
JText::_('PLEASE_INDICATE_YOUR_LOCATION'); ?></span>
</div>
</form>
<?php if($block_empty_search) { ?>
<script type="text/javascript">
if(!window.localPage) window.localPage = {};
window.localPage.locationsearchSubmit = function(form) {
var d = document, el =
d.getElementById('hikamarket_vendor_locationsearch_input');
if(!el)
return true;
var v = el.value.replace(/^\s*|\s*$/g, '');
if(v != '')
return true;
el.className = 'hikamarket_location_search_error';
var err_el =
d.getElementById('hikamarket_vendor_locationsearch_error');
if(err_el)
err_el.style.display = '';
return false;
};
</script>
<?php } ?>
</div>
tmpl/index.html000064400000000054151160535300007513
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>