Added Link Us Block;
Fixed a small bug in user menu;
This commit is contained in:
38
root/language/en/mods/portal/portal_link_us_module.php
Normal file
38
root/language/en/mods/portal/portal_link_us_module.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Portal - Link Us
|
||||
* @version $Id$
|
||||
* @copyright (c) 2009, 2010 Board3 Portal Team
|
||||
* @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(
|
||||
'LINK_US' => 'Link to us',
|
||||
'LINK_US_TXT' => 'Please feel free to link to <strong>%s</strong>. Use the following HTML:',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -65,6 +65,8 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_NEWS_SHOW_LAST_EXP' => 'When activated, the newest will be sorted in order to the newest posts. When deactivated, the news will be sorted in order to the newest topic.',
|
||||
'PORTAL_NEWS_ARCHIVE' => 'Enable the news archive system',
|
||||
'PORTAL_NEWS_ARCHIVE_EXP' => 'If enabled the news archive system / page numbers will be displayed.',
|
||||
'PORTAL_SHOW_REPLIES_VIEWS' => 'Display the number of replies and views',
|
||||
'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'This setting pertains to the compact block.<br />When Yes, the number of replies and views are shown in 2 extra columns. When No, replies and views will be shown beside the forum name. Select No if you have problems with the display of the extra columns due to the extra width required.',
|
||||
));
|
||||
|
||||
?>
|
||||
84
root/portal/modules/portal_link_us.php
Normal file
84
root/portal/modules/portal_link_us.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Portal - Link Us
|
||||
* @version $Id$
|
||||
* @copyright (c) 2009, 2010 Board3 Portal Team
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @package Clock
|
||||
*/
|
||||
class portal_link_us_module
|
||||
{
|
||||
/**
|
||||
* Allowed columns: Just sum up your options (Exp: left + right = 10)
|
||||
* top 1
|
||||
* left 2
|
||||
* center 4
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'LINK_US';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_link_us.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_link_us_module';
|
||||
|
||||
function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $user;
|
||||
|
||||
//doing the easy way ;)
|
||||
$u_link = generate_board_url();
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'LINK_US_TXT' => sprintf($user->lang['LINK_US_TXT'], $config['sitename']),
|
||||
'U_LINK_US' => '<a href="' . $u_link . '" ' . (($config['site_desc']) ? 'title="' . $config['site_desc'] . '"' : '' ) . '>' . (($config['sitename']) ? $config['sitename'] : $u_link ) . '</a>',
|
||||
));
|
||||
|
||||
return 'link_us_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -157,7 +157,7 @@ class portal_user_menu_module
|
||||
|
||||
function get_template_acp($module_id)
|
||||
{
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<!--version $Id$ //-->
|
||||
{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{T_THEME_PATH}/images/portal/portal_link_us.png" width="16" height="16" alt="" /> <!-- ENDIF -->{L_LINK_US}{$LR_BLOCK_H_R}
|
||||
{LINK_US_TXT}<br /><br />
|
||||
<input type="text" tabindex="9" size="28" value="{U_LINK_US}" class="inputbox autowidth" onclick="this.focus();this.select();" /><br />
|
||||
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
|
||||
BIN
root/styles/prosilver/theme/images/portal/portal_link_us.png
Normal file
BIN
root/styles/prosilver/theme/images/portal/portal_link_us.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 895 B |
Reference in New Issue
Block a user