Hej Kirk -
na da kann ich freilich aushelfen.
du -a luath|egrep -v ts3_php_framework_1.1.23/
Code: Select all
4 luath/ts3fju/composer.json
4 luath/ts3fju/config/services.yml
8 luath/ts3fju/config
12824 luath/ts3fju/ts3_php_framework_1.1.23
4 luath/ts3fju/language/en/ts3fju.php
8 luath/ts3fju/language/en
4 luath/ts3fju/language/de/ts3fju.php
8 luath/ts3fju/language/de
20 luath/ts3fju/language
20 luath/ts3fju/LICENSE
4 luath/ts3fju/styles/all/template/ts3fju_side.html
8 luath/ts3fju/styles/all/template
12 luath/ts3fju/styles/all
16 luath/ts3fju/styles
4 luath/ts3fju/view.php
12900 luath/ts3fju
12904 luath
view.php
Code: Select all
<?php
/**
*
* @package Board3 Portal Teamspeak3 Viewer Module
* @copyright (c) ...
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace luath\ts3fju;
/**
* @package Board3 Portal Teamspeak3 Viewer Module
*/
class view extends \board3\portal\modules\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;
public $name = 'TS3FJU';
public $image_src = '';
public $language = array(
'vendor' => 'luath/ts3fju',
'file' => 'ts3fju',
);
/** @var \phpbb\config\config */
protected $config;
/** @var \phpbb\template */
protected $template;
/**
* Construct a default module object
*
* @param \phpbb\config\config $config phpBB config
* @param \phpbb\template $template phpBB template
*/
public function __construct($config, $template)
{
$this->config = $config;
$this->template = $template;
}
/**
* {@inheritdoc}
*/
public function get_template_side($module_id)
{
return '@luath_ts3fju/ts3fju_side.html';
}
/**
* {@inheritdoc}
*/
public function get_template_acp($module_id)
{
return array(
'title' => 'TS3FJU',
'legend1' => 'WHATEVER',
'vars' => array(
'luath_ts3fju_hostname_' . $module_id => array(
'lang' => 'LUATH_TS3FJU_HOSTNAME',
'validate' => 'string',
'type' => 'text:30:100',
'explain' => false),
'luath_ts3fju_port_' . $module_id => array(
'lang' => 'LUATH_TS3FJU_PORT',
'validate' => 'int',
'type' => 'text:5:5',
'explain' => false),
'luath_ts3fju_server_' . $module_id => array(
'lang' => 'LUATH_TS3FJU_SERVER',
'validate' => 'int',
'type' => 'text:2:2',
'explain' => false),
'luath_ts3fju_login_' . $module_id => array(
'lang' => 'LUATH_TS3FJU_LOGIN',
'validate' => 'string',
'luath_ts3fju_password_' . $module_id => array(
'lang' => 'LUATH_TS3FJU_PASSWORD',
'validate' => 'string',
'type' => 'text:8:64',
'explain' => false),
),
);
}
/**
* {@inheritdoc}
*/
public function install($module_id)
{
$this->config->set('luath_ts3fju_hostname_' . $module_id, 'localhost');
$this->config->set('luath_ts3fju_port_' . $module_id, 10011);
$this->config->set('luath_ts3fju_server_' . $module_id, 1);
$this->config->set('luath_ts3fju_login_' . $module_id, 'user');
$this->config->set('luath_ts3fju_password_' . $module_id, 'pass');
return true;
}
/**
* {@inheritdoc}
*/
public function uninstall($module_id, $db)
{
$this->config->delete('luath_ts3fju_hostname_' . $module_id);
$this->config->delete('luath_ts3fju_port_' . $module_id);
$this->config->delete('luath_ts3fju_login_' . $module_id);
$this->config->delete('luath_ts3fju_server_' . $module_id);
$this->config->delete('luath_ts3fju_password_' . $module_id);
return true;
}
}
?>
services.yml
Code: Select all
services:
luath.ts3fju.view:
class: luath\ts3fju\view
arguments:
- @config
- @template
tags:
- { name: board3.portal.module }
Das Template ist ene Standardbox ohne Funktion. Wieso genau sich das Modul überhaupt hat aktivieren lassen, entzieht sich aktuell meiner Kenntnis. Deaktiveren lässt es sich nicht, ohne den Code zu verschieben (Ajax schiebt einen "Service unavailable" vor, Freund Firebug meint, "Language file ./../ext/board3/portal/language/de/modules/Array.php couldn't be opened .").
Edited: code=php