Start of pallet
This commit is contained in:
245
root/portal.php
245
root/portal.php
@@ -27,6 +27,16 @@ $user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup('mods/lang_portal');
|
||||
|
||||
// output page
|
||||
page_header($user->lang['PORTAL']);
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => '/portal/portal_body.html'
|
||||
));
|
||||
|
||||
|
||||
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
|
||||
|
||||
$load_center = true;
|
||||
|
||||
if ( is_dir( $phpbb_root_path . 'install_portal/' ) === TRUE )
|
||||
@@ -38,7 +48,6 @@ if ( is_dir( $phpbb_root_path . 'install_portal/' ) === TRUE )
|
||||
if ( version_compare( $current_version, $portal_config['portal_version'], '<=' ) === TRUE )
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_GENERAL' => true,
|
||||
'GEN_TITLE' => $user->lang['PORTAL_ERROR'],
|
||||
'GEN_MESSAGE' => sprintf( $user->lang['PORTAL_DELETE_DIR'], $phpbb_root_path . 'install_portal' )
|
||||
));
|
||||
@@ -46,16 +55,75 @@ if ( is_dir( $phpbb_root_path . 'install_portal/' ) === TRUE )
|
||||
else
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_GENERAL' => true,
|
||||
'GEN_TITLE' => $user->lang['PORTAL_UPDATE'],
|
||||
'GEN_MESSAGE' => sprintf( $user->lang['PORTAL_UPDATE_TEXT'], $phpbb_root_path . 'install_portal/install.'.$phpEx, $current_version )
|
||||
));
|
||||
}
|
||||
|
||||
if (!isset($template->filename['general_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'general_block' => 'portal/block/general_block.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('general_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_center', array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
|
||||
$load_center = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($load_center == TRUE && $user->data['user_perm_from'] && $auth->acl_get('a_switchperm'))
|
||||
{
|
||||
if (!isset($template->filename['general_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'general_block' => 'portal/block/general_block.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('general_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_center', array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ( $load_center != TRUE )
|
||||
{
|
||||
$where = ' AND block_type <> 1';
|
||||
} else {
|
||||
$where = '';
|
||||
}
|
||||
|
||||
$block_sql = 'SELECT * FROM phpbb_portal_blocks WHERE block_enabled = 1'.$where.' ORDER BY block_position ASC , block_order ASC';
|
||||
$block_result = $db->sql_query($block_sql);
|
||||
|
||||
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;
|
||||
}
|
||||
include($phpbb_root_path . 'portal/block/'.$block_row['block_name'].'.'.$phpEx);
|
||||
}
|
||||
|
||||
if ( $load_center === TRUE )
|
||||
{
|
||||
|
||||
@@ -75,169 +143,6 @@ if ( $load_center === TRUE )
|
||||
);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_recent'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/recent.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_wordgraph'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/wordgraph.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_poll_topic'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/poll.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_welcome'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/welcome.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_welcome_guest'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_WELCOME_GUEST' => true,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_announcements'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/announcements.'.$phpEx);
|
||||
$template->assign_vars(array(
|
||||
'S_ANNOUNCE_COMPACT' => ($portal_config['portal_announcements_style']) ? true : false,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_news'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/news.'.$phpEx);
|
||||
$template->assign_vars(array(
|
||||
'S_NEWS_COMPACT' => ($portal_config['portal_news_style']) ? true : false,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_custom_center'] or $portal_config['portal_custom_small'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/custom.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($config['load_online'] && $config['load_online_time'] && $portal_config['portal_whois_online'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/whois_online.'.$phpEx);
|
||||
}
|
||||
}
|
||||
|
||||
// show login box and user menu
|
||||
|
||||
// only registered user see user menu
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/user_menu.'.$phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/login_box.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_main_menu'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/main_menu.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_user_menu'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_USERMENU' => true,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_birthdays'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/birthday_list.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_search'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/search.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_attachments'] && $config['allow_attachments'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/attachments.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_advanced_stat'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/statistics.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_minicalendar'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/mini_cal.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_link_us'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/link_us.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_leaders'] && $portal_config['portal_leaders_ext'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/leaders_ext.'.$phpEx);
|
||||
}
|
||||
elseif ($portal_config['portal_leaders'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/leaders.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_load_last_visited_bots'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/latest_bots.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_top_posters'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/top_posters.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_latest_members'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/latest_members.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_random_member'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/random_member.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_friends'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/friends.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_change_style'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/change_style.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_clock'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_CLOCK' => true,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_links'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/links.'.$phpEx);
|
||||
}
|
||||
|
||||
|
||||
if ($portal_config['portal_pay_s_block'] or ( $portal_config['portal_pay_c_block'] && $load_center === TRUE ) )
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/donate.'.$phpEx);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
@@ -245,16 +150,6 @@ $template->assign_vars(array(
|
||||
'PORTAL_RIGHT_COLUMN' => $portal_config['portal_right_column_width'],
|
||||
));
|
||||
|
||||
// output page
|
||||
page_header($user->lang['PORTAL']);
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => '/portal/portal_body.html'
|
||||
));
|
||||
|
||||
|
||||
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
|
||||
|
||||
page_footer();
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user