Start of pallet

This commit is contained in:
Ice
2008-09-28 22:59:25 +00:00
parent b4c27b2f0d
commit b800ee0c96
41 changed files with 1190 additions and 854 deletions

View File

@@ -0,0 +1,164 @@
<?php
/**
*
* @package - Board3portal
* @version $Id: acp_pallet.php 325 2008-08-17 18:59:40Z kevin74 $
* @copyright (c) kevin / saint ( www.board3.de/ ), (c) Ice, (c) nickvergessen ( www.flying-bits.org/ ), (c) redbull254 ( www.digitalfotografie-foren.de ), (c) Christian_N ( www.phpbb-projekt.de )
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
class acp_pallet
{
function main($id, $mode)
{
global $db, $user, $template;
global $config, $portal_config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang('mods/lang_pallet_acp');
define('IN_PALLET_ACP', true);
$block_sql = 'SELECT * FROM phpbb_portal_blocks ORDER BY block_position ASC , block_order ASC';
$block_result = $db->sql_query($block_sql);
$block_array = array();
while ($block_row = $db->sql_fetchrow($block_result))
{
switch( $block_row['block_position'] )
{
case 0:
$block_pos = 'left';
$block_type = 'side';
break;
case 1:
$block_pos = 'center';
$block_type = '';
break;
case 2:
$block_pos = 'right';
$block_type = 'side';
break;
}
$block_array[$block_pos][$block_row['block_order']] = array(
'block_name' => ( $block_type == '' ) ? $block_row['block_name'] : $block_row['block_name'] . '_' . $block_type,
'block_enabled' => $block_row['block_enabled'],
);
}
$left_count = sizeof($block_array['left']);
$center_count = sizeof($block_array['center']);
$right_count = sizeof($block_array['right']);
$table_length = max($left_count, $center_count, $right_count);
for($i = 0; $i < $table_length; $i++) {
$table_row = array(
'LEFT' => '',
'S_LEFT_ENALBED' => false,
'CENTER' => '',
'S_CENTER_ENALBED' => false,
'RIGHT' => '',
'S_RIGHT_ENALBED' => false,
'S_LEFT_FIRST_ROW' => false,
'S_LEFT_LAST_ROW' => false,
'S_CENTER_FIRST_ROW' => false,
'S_CENTER_LAST_ROW' => false,
'S_RIGHT_FIRST_ROW' => false,
'S_RIGHT_LAST_ROW' => false,
);
if( isset( $block_array['left'][$i] ) )
{
if( $i == 0 )
{
$table_row['S_LEFT_FIRST_ROW'] = true;
}
if( $i == $left_count-1 )
{
$table_row['S_LEFT_LAST_ROW'] = true;
}
if ( $block_array['left'][$i]['block_enabled'] )
{
$table_row['S_LEFT_ENABLED'] = true;
}
$table_row['LEFT'] = $block_array['left'][$i]['block_name'];
}
if( isset( $block_array['center'][$i] ) )
{
if( $i == 0 )
{
$table_row['S_CENTER_FIRST_ROW'] = true;
}
if( $i == $center_count-1 )
{
$table_row['S_CENTER_LAST_ROW'] = true;
}
if ( $block_array['center'][$i]['block_enabled'] )
{
$table_row['S_CENTER_ENABLED'] = true;
}
$table_row['CENTER'] = $block_array['center'][$i]['block_name'];
}
if( isset( $block_array['right'][$i] ) )
{
if( $i == 0 )
{
$table_row['S_RIGHT_FIRST_ROW'] = true;
}
if( $i == $right_count-1 )
{
$table_row['S_RIGHT_LAST_ROW'] = true;
}
if ( $block_array['right'][$i]['block_enabled'] )
{
$table_row['S_RIGHT_ENABLED'] = true;
}
$table_row['RIGHT'] = $block_array['right'][$i]['block_name'];
}
$template->assign_block_vars('table_row', $table_row);
}
$l_title = 'ACP_ATTACHMENT_LAYOUT';
$this->tpl_name = 'acp_pallet';
$this->page_title = $l_title;
$template->assign_var('S_LAYOUT_SETTINGS', true);
/*$template->assign_vars(array(
'L_TITLE' => $user->lang[$l_title],
'L_TITLE_EXPLAIN' => $user->lang[$l_title . '_EXPLAIN'],
'U_ACTION' => $this->u_action)
);
$template->assign_block_vars('options', array(
'KEY' => $config_key,
'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
'S_EXPLAIN' => $vars['explain'],
'TITLE_EXPLAIN' => $l_explain,
'CONTENT' => build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars),
)
);*/
}
}
?>

View File

@@ -81,7 +81,7 @@ class acp_portal
'portal_news_show_last' => array('lang' => 'PORTAL_NEWS_SHOW_LAST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_news_archive' => array('lang' => 'PORTAL_NEWS_ARCHIVE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_news_permissions' => array('lang' => 'PORTAL_NEWS_PERMISSIONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_show_news_replies_views' => array('lang' => 'PORTAL_SHOW_REPLIES_VIEWS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_show_news_replies_views' => array('lang' => 'PORTAL_SHOW_REPLIES_VIEWS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
)
);
break;
@@ -89,16 +89,16 @@ class acp_portal
$display_vars = array(
'title' => 'ACP_PORTAL_ANNOUNCE_SETTINGS',
'vars' => array(
'legend1' => 'ACP_PORTAL_ANNOUNCE_SETTINGS',
'portal_announcements' => array('lang' => 'PORTAL_ANNOUNCEMENTS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_announcements_style' => array('lang' => 'PORTAL_ANNOUNCEMENTS_STYLE' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_number_of_announcements' => array('lang' => 'PORTAL_NUMBER_OF_ANNOUNCEMENTS' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'portal_announcements_day' => array('lang' => 'PORTAL_ANNOUNCEMENTS_DAY' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'portal_announcements_length' => array('lang' => 'PORTAL_ANNOUNCEMENTS_LENGTH' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'portal_global_announcements_forum' => array('lang' => 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' , 'validate' => 'string', 'type' => 'text:10:200', 'explain' => true),
'portal_announcements_archive' => array('lang' => 'PORTAL_ANNOUNCEMENTS_ARCHIVE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_announcements_permissions' => array('lang' => 'PORTAL_ANNOUNCEMENTS_PERMISSIONS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_show_announcements_replies_views' => array('lang' => 'PORTAL_SHOW_REPLIES_VIEWS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend1' => 'ACP_PORTAL_ANNOUNCE_SETTINGS',
'portal_announcements' => array('lang' => 'PORTAL_ANNOUNCEMENTS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_announcements_style' => array('lang' => 'PORTAL_ANNOUNCEMENTS_STYLE' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_number_of_announcements' => array('lang' => 'PORTAL_NUMBER_OF_ANNOUNCEMENTS' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'portal_announcements_day' => array('lang' => 'PORTAL_ANNOUNCEMENTS_DAY' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'portal_announcements_length' => array('lang' => 'PORTAL_ANNOUNCEMENTS_LENGTH' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'portal_global_announcements_forum' => array('lang' => 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' , 'validate' => 'string', 'type' => 'text:10:200', 'explain' => true),
'portal_announcements_archive' => array('lang' => 'PORTAL_ANNOUNCEMENTS_ARCHIVE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_announcements_permissions' => array('lang' => 'PORTAL_ANNOUNCEMENTS_PERMISSIONS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_show_announcements_replies_views' => array('lang' => 'PORTAL_SHOW_REPLIES_VIEWS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
)
);
break;

View File

@@ -0,0 +1,32 @@
<?php
/**
*
* @package - Board3portal
* @version $Id: acp_pallet.php 325 2008-08-17 18:59:40Z kevin74 $
* @copyright (c) kevin / saint ( www.board3.de/ ), (c) Ice, (c) nickvergessen ( www.flying-bits.org/ ), (c) redbull254 ( www.digitalfotografie-foren.de ), (c) Christian_N ( www.phpbb-projekt.de )
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @package module_install
*/
class acp_pallet_info
{
function module()
{
return array(
'filename' => 'acp_pallet',
'title' => 'ACP_PALLET_INFO',
'version' => '1.0.0',
'modes' => array(
'list' => array('title' => 'ACP_PALLET_LIST_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
'layout' => array('title' => 'ACP_PORTAL_LAYOUT_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
),
);
}
}
?>