Your Portal Version: 3.0.11
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner
What have you done before the problem was there?
What have you already tryed to solve the problem?
Description and Message
There is a National Flags plugin:
https://www.phpbb.com/customise/db/mod/national_flags/
It shows the flags on the forum, but not the portal page. Is it possible to show it on the portal page as well?
National Flags on Portal
-
Topic author - Active Member
- Posts: 7
- Joined: 19. June 2012 17:15
- phpBB.com User: greybox
-
- Active Member
- Posts: 11
- Joined: 25. August 2011 14:24
Re: National Flags on Portal
National Flags on board 3 portal 2.x
Create a new php file called: portal_flags.php
Put the following inside that file:
Save this file to: root/portal/modules/
Create a new php file called: portal_flags_module.php
Put the following inside that file:
save this file to: root/language/en/mods/portal/
Create a new html file called: flags_center.html
put the following inside that file:
Save this file to: root/styles/your-style/template/portal/modules/
Refresh templates
Add your new national flags block
Create a new php file called: portal_flags.php
Put the following inside that file:
Code: Select all
<?php
/**
*
* @package Board3 Portal v2 - Team
* @copyright (c) Board3 Group ( www.board3.de ) , theriddler ( http://www.phpbbservice.nl )
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* @package Team
*/
class portal_flags_module
{
/**
* 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 = '';
public function get_template_center($module_id)
{
global $config, $user, $phpEx, $phpbb_root_path;
//Begin: National_Flag
if (!empty($config['allow_flags']))
{
if (!function_exists('top_flags'))
{
include($phpbb_root_path . 'includes/functions_flag.' . $phpEx);
}
top_flags();
}
//End: National_Flag
return 'flags_center.html';
}
public function get_template_acp($module_id)
{
return array(
'title' => 'PORTAL_FLAGS',
'vars' => array(),
);
}
/**
* API functions
*/
function install($module_id)
{
return true;
}
function uninstall($module_id)
{
return true;
}
}
Create a new php file called: portal_flags_module.php
Put the following inside that file:
Code: Select all
<?php
/**
*
* @package Board3 Portal v2 - Team
* @copyright (c) Board3 Group ( www.board3.de ) , theriddler ( http://www.phpbbservice.nl )
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* 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',
));
Create a new html file called: flags_center.html
put the following inside that file:
Code: Select all
{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" /> <!-- ENDIF -->{$TITLE}{$LR_BLOCK_H_R}
<span style="width:100%;"><!-- BEGIN fnum --><span style="width:10%;float:left;text-align:center;">{fnum.FLAG}<br />{fnum.L_FLAG_USERS}</span><!-- END fnum --></span><br style="clear:both" />
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
Refresh templates
Add your new national flags block
-
- Active Member
- Posts: 25
- Joined: 29. June 2008 17:58
- phpBB.de User: Z-MANN
Re: National Flags on Portal
Hallo,
habe die Dateien erstellt und meinem Portal hinzugefügt. Soweit so gut!
Nun das Problem, die Darstellung ist nicht Perfekt.
Siehe meine Portalseite ganz unten ---> http://www.elongated-coin.de/phpBB3/portal.php
Gibt es eine Möglichkeit mehr abstand zwischen den Flaggen zu bekommen und sie Zentrieren!?
Es müsste so aussehen wie auf meiner Indexseite ganz unten.
Was ich noch besser fände wäre die Flaggen in einem Modul ganz unten.
habe die Dateien erstellt und meinem Portal hinzugefügt. Soweit so gut!
Nun das Problem, die Darstellung ist nicht Perfekt.
Siehe meine Portalseite ganz unten ---> http://www.elongated-coin.de/phpBB3/portal.php
Gibt es eine Möglichkeit mehr abstand zwischen den Flaggen zu bekommen und sie Zentrieren!?
Es müsste so aussehen wie auf meiner Indexseite ganz unten.
Was ich noch besser fände wäre die Flaggen in einem Modul ganz unten.
Admin von www.elongated-coin.de
-
- Dev
- Posts: 1955
- Joined: 27. July 2010 18:02
- phpBB.de User: Kirk
Re: National Flags on Portal
Hallo
Probier mal bei <span style="width:10% dieses zu erhöhen.
Probier mal bei <span style="width:10% dieses zu erhöhen.
Gruß Udo
-
- Active Member
- Posts: 25
- Joined: 29. June 2008 17:58
- phpBB.de User: Z-MANN
Re: National Flags on Portal
Hi,Kirk wrote:Hallo
Probier mal bei <span style="width:10% dieses zu erhöhen.
habe <span style="width:20% eingestellt und es ist jetzt Perfekt!
Danke für die schnelle Hilfe!
Gruß Z-MANN
Admin von www.elongated-coin.de
-
- Dev
- Posts: 1955
- Joined: 27. July 2010 18:02
- phpBB.de User: Kirk