[feature/module_services] Move search module to module services
This commit is contained in:
93
modules/search.php
Normal file
93
modules/search.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package Board3 Portal v2.1
|
||||
* @copyright (c) Board3 Group ( www.board3.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
namespace board3\portal\modules;
|
||||
|
||||
/**
|
||||
* @package Search
|
||||
*/
|
||||
class search extends module_base
|
||||
{
|
||||
/**
|
||||
* Allowed columns: Just sum up your options (Exp: left + right = 10)
|
||||
* top 1
|
||||
* left 2
|
||||
* center 4
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
public $name = 'PORTAL_SEARCH';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
public $image_src = 'portal_search.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_search_module';
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
public $custom_acp_tpl = '';
|
||||
|
||||
/** @var \phpbb\template */
|
||||
protected $template;
|
||||
|
||||
/** @var phpbb root path */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
/** @var php file extension */
|
||||
protected $php_ext;
|
||||
|
||||
/**
|
||||
* Construct a search object
|
||||
*
|
||||
* @param \phpbb\template $template phpBB template
|
||||
* @param string $phpbb_root_path phpbb root path
|
||||
* @param string $php_ext php file extension
|
||||
*/
|
||||
public function __construct($template, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->template = $template;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
$this->template->assign_var('S_SEARCH_ACTION', append_sid("{$this->phpbb_root_path}search.{$this->php_ext}"));
|
||||
|
||||
return 'search_side.html';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'PORTAL_SEARCH',
|
||||
'vars' => array(),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user