Added clock;
Users are now able to change the clock in the ACP;
This commit is contained in:
43
root/language/en/mods/portal/portal_clock_module.php
Normal file
43
root/language/en/mods/portal/portal_clock_module.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Portal - Clock
|
||||
* @version $Id: portal_birthday_list_module.php 678 2010-08-29 12:49:25Z marc1706 $
|
||||
* @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(
|
||||
'CLOCK' => 'Clock',
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_CLOCK_SETTINGS' => 'Clock Settings',
|
||||
'ACP_PORTAL_CLOCK_SETTINGS_EXP' => 'This is where you customize your clock',
|
||||
'ACP_PORTAL_CLOCK_SRC' => 'Clock',
|
||||
'ACP_PORTAL_CLOCK_SRC_EXP' => 'Enter the filename of your clock. The clock needs to be located in styles/*yourstyle*/theme/images/portal/.',
|
||||
));
|
||||
|
||||
?>
|
||||
93
root/portal/modules/portal_clock.php
Normal file
93
root/portal/modules/portal_clock.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Portal - Clock
|
||||
* @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_clock_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 = 'CLOCK';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_clock.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_clock_module';
|
||||
|
||||
function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'CLOCK_SRC' => $config['board3_clock_src'],
|
||||
));
|
||||
|
||||
return 'clock_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_CLOCK_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_CLOCK_SETTINGS',
|
||||
'board3_clock_src' => array('lang' => 'ACP_PORTAL_CLOCK_SRC', 'validate' => 'string', 'type' => 'text:50:200', 'explain' => false),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
{
|
||||
set_config('board3_clock_src', 'board3clock.swf');
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$del_config = array(
|
||||
'board3_clock_src',
|
||||
);
|
||||
$sql = 'DELETE FROM ' . CONFIG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!--version $Id$ //-->
|
||||
{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{T_THEME_PATH}/images/portal/portal_clock.png" width="16" height="16" alt="" /> <!-- ENDIF -->{L_CLOCK}{$LR_BLOCK_H_R}
|
||||
<div style="text-align: center;">
|
||||
<br />
|
||||
<object type="application/x-shockwave-flash" data="{T_THEME_PATH}/images/portal/{CLOCK_SRC}" width="140" height="140">
|
||||
<param name="wmode" value="transparent" />
|
||||
<param name="movie" value="{T_THEME_PATH}/images/portal/board3clock.swf" />
|
||||
</object>
|
||||
</div>
|
||||
<br />
|
||||
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
|
||||
BIN
root/styles/prosilver/theme/images/portal/board3clock.swf
Normal file
BIN
root/styles/prosilver/theme/images/portal/board3clock.swf
Normal file
Binary file not shown.
BIN
root/styles/prosilver/theme/images/portal/portal_clock.png
Normal file
BIN
root/styles/prosilver/theme/images/portal/portal_clock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user