New "General Message" block along with detecting of install_portal directory.
This commit is contained in:
@@ -34,6 +34,11 @@ $lang = array_merge($lang, array(
|
|||||||
'PORTAL' => 'Portal',
|
'PORTAL' => 'Portal',
|
||||||
'WELCOME' => 'Willkommen',
|
'WELCOME' => 'Willkommen',
|
||||||
|
|
||||||
|
'PORTAL_ERROR' => 'Portal Error',
|
||||||
|
'PORTAL_DELETE_DIR' => 'Please delete the portal installation directory: %s',
|
||||||
|
'PORTAL_UPDATE' => 'Portal Update',
|
||||||
|
'PORTAL_UPDATE_TEXT' => 'There\'s an update for portal waiting to be installed! Install <a href="%1$s">%2$s</a>!',
|
||||||
|
|
||||||
// news & global announcements
|
// news & global announcements
|
||||||
'LATEST_ANNOUNCEMENTS' => 'Letzte Bekanntmachung',
|
'LATEST_ANNOUNCEMENTS' => 'Letzte Bekanntmachung',
|
||||||
'LATEST_NEWS' => 'Aktuelle Beiträge',
|
'LATEST_NEWS' => 'Aktuelle Beiträge',
|
||||||
|
|||||||
@@ -34,6 +34,11 @@ $lang = array_merge($lang, array(
|
|||||||
'PORTAL' => 'Portal',
|
'PORTAL' => 'Portal',
|
||||||
'WELCOME' => 'Welcome',
|
'WELCOME' => 'Welcome',
|
||||||
|
|
||||||
|
'PORTAL_ERROR' => 'Portal Error',
|
||||||
|
'PORTAL_DELETE_DIR' => 'Please delete the portal installation directory: %s',
|
||||||
|
'PORTAL_UPDATE' => 'Portal Update',
|
||||||
|
'PORTAL_UPDATE_TEXT' => 'There\'s an update for portal waiting to be installed! Install <a href="%1$s">%2$s</a>!',
|
||||||
|
|
||||||
// news & global announcements
|
// news & global announcements
|
||||||
'LATEST_ANNOUNCEMENTS' => 'Latest global announcements',
|
'LATEST_ANNOUNCEMENTS' => 'Latest global announcements',
|
||||||
'LATEST_NEWS' => 'Latest news',
|
'LATEST_NEWS' => 'Latest news',
|
||||||
|
|||||||
156
root/portal.php
156
root/portal.php
@@ -24,6 +24,99 @@ $user->session_begin();
|
|||||||
$auth->acl($user->data);
|
$auth->acl($user->data);
|
||||||
$user->setup('mods/lang_portal');
|
$user->setup('mods/lang_portal');
|
||||||
|
|
||||||
|
$load_center = true;
|
||||||
|
|
||||||
|
if( is_dir( $phpbb_root_path . 'install_portal/' ) === TRUE )
|
||||||
|
{
|
||||||
|
if( is_file( $phpbb_root_path . 'install_portal/install.php' ) === TRUE )
|
||||||
|
{
|
||||||
|
include $phpbb_root_path . 'install_portal/install.php';
|
||||||
|
|
||||||
|
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' )
|
||||||
|
));
|
||||||
|
}
|
||||||
|
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.php', $current_version )
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
$load_center = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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'])
|
||||||
|
{
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_DISPLAY_WELCOME' => true,
|
||||||
|
'PORTAL_WELCOME_INTRO' => str_replace("\n", "<br />", $portal_config['portal_welcome_intro']),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
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_ads_center'])
|
||||||
|
{
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_ADS_CENTER' => ($portal_config['portal_ads_center_box']) ? true : false,
|
||||||
|
// 'ADS_CENTER_BOX' => $portal_config['portal_ads_center_box'],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($portal_config['portal_whois_online'])
|
||||||
|
{
|
||||||
|
include($phpbb_root_path . 'portal/block/whois_online.'.$phpEx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// show login box and user menu
|
// show login box and user menu
|
||||||
|
|
||||||
// only registered user see user menu
|
// only registered user see user menu
|
||||||
@@ -65,11 +158,6 @@ if ($portal_config['portal_attachments'])
|
|||||||
include($phpbb_root_path . 'portal/block/attachments.'.$phpEx);
|
include($phpbb_root_path . 'portal/block/attachments.'.$phpEx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($portal_config['portal_recent'])
|
|
||||||
{
|
|
||||||
include($phpbb_root_path . 'portal/block/recent.'.$phpEx);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($portal_config['portal_advanced_stat'])
|
if ($portal_config['portal_advanced_stat'])
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'portal/block/statistics.'.$phpEx);
|
include($phpbb_root_path . 'portal/block/statistics.'.$phpEx);
|
||||||
@@ -90,16 +178,6 @@ if ($portal_config['portal_leaders'])
|
|||||||
include($phpbb_root_path . 'portal/block/leaders.'.$phpEx);
|
include($phpbb_root_path . 'portal/block/leaders.'.$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_load_last_visited_bots'])
|
if ($portal_config['portal_load_last_visited_bots'])
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'portal/block/latest_bots.'.$phpEx);
|
include($phpbb_root_path . 'portal/block/latest_bots.'.$phpEx);
|
||||||
@@ -125,11 +203,6 @@ if ($portal_config['portal_friends'])
|
|||||||
include($phpbb_root_path . 'portal/block/friends.'.$phpEx);
|
include($phpbb_root_path . 'portal/block/friends.'.$phpEx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($portal_config['portal_whois_online'])
|
|
||||||
{
|
|
||||||
include($phpbb_root_path . 'portal/block/whois_online.'.$phpEx);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($portal_config['portal_change_style'])
|
if ($portal_config['portal_change_style'])
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'portal/block/change_style.'.$phpEx);
|
include($phpbb_root_path . 'portal/block/change_style.'.$phpEx);
|
||||||
@@ -150,38 +223,8 @@ if ($portal_config['portal_links'])
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($portal_config['portal_welcome'])
|
|
||||||
{
|
|
||||||
$template->assign_vars(array(
|
|
||||||
'S_DISPLAY_WELCOME' => true,
|
|
||||||
'PORTAL_WELCOME_INTRO' => str_replace("\n", "<br />", $portal_config['portal_welcome_intro']),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($portal_config['portal_welcome_guest'])
|
if ($portal_config['portal_pay_s_block'] or ( $portal_config['portal_pay_c_block'] && $load_center === TRUE ) )
|
||||||
{
|
|
||||||
$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_pay_s_block'] or $portal_config['portal_pay_c_block'])
|
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'portal/block/donate.'.$phpEx);
|
include($phpbb_root_path . 'portal/block/donate.'.$phpEx);
|
||||||
}
|
}
|
||||||
@@ -194,23 +237,14 @@ if ($portal_config['portal_ads_small'])
|
|||||||
// 'ADS_SMALL_BOX' => $portal_config['portal_ads_small_box'],
|
// 'ADS_SMALL_BOX' => $portal_config['portal_ads_small_box'],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($portal_config['portal_ads_center'])
|
|
||||||
{
|
|
||||||
$template->assign_vars(array(
|
|
||||||
'S_ADS_CENTER' => ($portal_config['portal_ads_center_box']) ? true : false,
|
|
||||||
// 'ADS_CENTER_BOX' => $portal_config['portal_ads_center_box'],
|
|
||||||
));
|
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_DISPLAY_JUMPBOX' => true, // SQL + ACP eklenecek
|
'S_DISPLAY_JUMPBOX' => $load_center, // SQL + ACP eklenecek
|
||||||
'PORTAL_LEFT_COLLUMN' => $portal_config['portal_left_collumn_width'],
|
'PORTAL_LEFT_COLLUMN' => $portal_config['portal_left_collumn_width'],
|
||||||
'PORTAL_RIGHT_COLLUMN' => $portal_config['portal_right_collumn_width'],
|
'PORTAL_RIGHT_COLLUMN' => $portal_config['portal_right_collumn_width'],
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
// output page
|
// output page
|
||||||
page_header($user->lang['PORTAL']);
|
page_header($user->lang['PORTAL']);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<div class="panel">
|
||||||
|
<div class="inner">
|
||||||
|
<span class="corners-top"><span></span></span>
|
||||||
|
<h3>{GEN_TITLE}</h3>
|
||||||
|
{GEN_MESSAGE}
|
||||||
|
<span class="corners-bottom"><span></span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br style="clear:both" />
|
||||||
@@ -64,6 +64,10 @@
|
|||||||
<td valign="top">
|
<td valign="top">
|
||||||
<br style="clear:both" />
|
<br style="clear:both" />
|
||||||
|
|
||||||
|
<!-- IF S_DISPLAY_GENERAL -->
|
||||||
|
<!-- INCLUDE portal/block/general_block.html -->
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF S_DISPLAY_WELCOME -->
|
<!-- IF S_DISPLAY_WELCOME -->
|
||||||
<!-- IF S_DISPLAY_WELCOME_GUEST and S_USER_LOGGED_IN -->
|
<!-- IF S_DISPLAY_WELCOME_GUEST and S_USER_LOGGED_IN -->
|
||||||
<!-- ELSE -->
|
<!-- ELSE -->
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<table class="tablebg" cellspacing="1" width="100%">
|
||||||
|
<tr>
|
||||||
|
<th>{GEN_TITLE}</th>
|
||||||
|
</tr>
|
||||||
|
<tr class="row1">
|
||||||
|
<td>
|
||||||
|
{GEN_MESSAGE}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br />
|
||||||
@@ -96,6 +96,10 @@ small, .small {
|
|||||||
<!-- [+] center block area -->
|
<!-- [+] center block area -->
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
|
|
||||||
|
<!-- IF S_DISPLAY_GENERAL -->
|
||||||
|
<!-- INCLUDE portal/block/general_block.html -->
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF S_DISPLAY_WELCOME -->
|
<!-- IF S_DISPLAY_WELCOME -->
|
||||||
<!-- IF S_DISPLAY_WELCOME_GUEST and S_USER_LOGGED_IN -->
|
<!-- IF S_DISPLAY_WELCOME_GUEST and S_USER_LOGGED_IN -->
|
||||||
<!-- ELSE -->
|
<!-- ELSE -->
|
||||||
|
|||||||
Reference in New Issue
Block a user