Is goedbennybernaer schreef:Super! Ik ga hem gauw uitproberen.
Demo kun je hier bekijken onderaan: http://www.peppersrus-forum.nl/
Terug naar “National flags extensie (wijzigen)”
Is goedbennybernaer schreef:Super! Ik ga hem gauw uitproberen.
Code: Selecteer alles
public function get_template_acp($module_id)
{
return array(
'title' => 'PORTAL_FLAGS',
'vars' => array(),
);
}
Code: Selecteer alles
public function get_template_acp($module_id)
{
return array(
'title' => 'PORTAL_FLAGS',
'vars' => array(
'legend1' => 'ACP_FLAG_SETTINGS',
)
);
}
Code: Selecteer alles
<?php
/**
*
* @package Board3 Portal v2 - National flags
* @copyright (c) Board3 Group ( www.board3.de )
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
namespace board3\portal\modules;
/**
* @package National flags
*/
class portal_flags 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 = 21;
/**
* Default modulename
*/
public $name = 'PORTAL_FLAGS';
/**
* Default module-image:
* file must be in "{T_THEME_PATH}/images/portal/"
*/
public $image_src = 'portal_custom.png';
/**
* module-language file
* file must be in "language/{$user->lang}/mods/portal/"
*/
public $language = 'portal_flags_module';
/**
* custom acp template
* file must be in "adm/style/portal/"
* public $custom_acp_tpl = 'acp_portal_';
*/
/** @var \phpbb\config\config */
protected $config;
/** @var \phpbb\template */
protected $template;
/** @var string PHP file extension */
protected $php_ext;
/** @var string phpBB root path */
protected $phpbb_root_path;
/**
* Construct object
*
* @param \phpbb\config\config $config phpBB config
* @param \phpbb\request\request $request phpBB request
* @param \phpbb\template $template phpBB template
* @param \phpbb\user $user phpBB user
* @param string $phpbb_root_path phpBB root path
* @param string $phpEx php file extension
*/
public function __construct($config, $phpEx, $phpbb_root_path)
{
$this->config = $config;
$this->template = $template;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $phpEx;
}
/**
* {@inheritdoc}
*/
public function get_template_center($module_id)
{
$portal_config = obtain_portal_config();
//Begin: National_Flag
if (!empty($config['allow_flags']))
{
if (!function_exists('top_flags'))
{
include($phpbb_root_path . 'ext/rmcgirr83/nationalflags/functions_nationalflags' . $phpEx);
}
top_flags();
}
//End: National_Flag
return 'flags_center.html';
}
public function get_template_acp($module_id)
{
return array(
'title' => 'PORTAL_FLAGS',
'vars' => array(),
);
}
/**
* {@inheritdoc}
*/
public function install($module_id)
{
return true;
}
/**
* {@inheritdoc}
*/
public function uninstall($module_id)
{
return true;
}
}
Code: Selecteer alles
{$C_BLOCK_H_L}{$TITLE}{$C_BLOCK_H_R}
<div class="panel bg1 portal-no-margin" id="flags">
<ul class="topiclist bg1">
<li class="header">
<dl>
<dt><div class="list-inner"><!-- IF U_FLAGS --><a href="{U_FLAGS}"><!-- ENDIF -->{L_NATIONAL_FLAGS}<!-- IF U_FLAGS --></a><!-- ENDIF --></div></dt>
</dl>
</li>
</ul>
<ul class="flags">
<!-- BEGIN flag -->
<li class="bg1">
<a href="{flag.U_FLAG}">{flag.FLAG}</a><br />{flag.L_FLAG_USERS}
</li>
<!-- END flag -->
</ul>
</div>
{$C_BLOCK_F_L}{$C_BLOCK_F_R}