48 lines
880 B
PHP
Executable File
48 lines
880 B
PHP
Executable File
<?php
|
|
if (!defined('_CAN_LOAD_FILES_'))
|
|
exit;
|
|
|
|
class BlockText extends Module
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->name = 'blocktext';
|
|
$this->tab = 'advertising_marketing';
|
|
$this->version = 0.3;
|
|
$this->author = 'Antadis';
|
|
$this->need_instance = 0;
|
|
|
|
parent::__construct();
|
|
|
|
$this->displayName = $this->l('Block text');
|
|
$this->description = $this->l('Adds a block to display a text.');
|
|
}
|
|
|
|
public function install()
|
|
{
|
|
if (!parent::install())
|
|
return false;
|
|
if (!$this->registerHook('leftColumn') OR !$this->registerHook('rightColumn'))
|
|
return false;
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Returns module content
|
|
*
|
|
* @param array $params Parameters
|
|
* @return string Content
|
|
*/
|
|
function hookRightColumn($params)
|
|
{
|
|
return $this->display(__FILE__, 'blocktext.tpl');
|
|
}
|
|
|
|
function hookLeftColumn($params)
|
|
{
|
|
return $this->hookRightColumn($params);
|
|
}
|
|
}
|
|
|
|
|