ext\board3\portal\styles\prosilver\template\portal\modules
flags_center.htm
Code: Select all
{$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}
flags.php
Code: Select all
<?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.php.' . $phpEx);
}
top_flags();
}
//End: National_Flag
return 'flags_center.html';
}
public function get_template_acp($module_id)
{
return array(
'title' => 'PORTAL_FLAGS',
'vars' => array(
'legend1' => 'ACP_FLAG_SETTINGS',
)
);
}
/**
* {@inheritdoc}
*/
public function install($module_id)
{
return true;
}
/**
* {@inheritdoc}
*/
public function uninstall($module_id)
{
return true;
}
}
portal_flags_module.php
Code: Select all
<?php
/**
*
* [Dutch] translated by Dutch Translators (https://github.com/dutch-translators)
* @package Board3 Portal v2.1 - national flags
* @copyright (c) 2013 Board3 Group ( www.board3.de )
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
exit;
}
if (empty($lang) || !is_array($lang))
{
$lang = array();
}
// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
'PORTAL_FLAGS' => 'National flags',
));