Start of pallet
This commit is contained in:
@@ -315,9 +315,28 @@ $template->assign_vars(array(
|
||||
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
|
||||
'READ_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
||||
'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
|
||||
'S_DISPLAY_ANNOUNCEMENTS' => true,
|
||||
'S_DISPLAY_ANNOUNCEMENTS_RVS' => ( $portal_config['portal_show_announcements_replies_views'] ) ? true : false,
|
||||
'S_TOPIC_ICONS' => $topic_icons,
|
||||
));
|
||||
|
||||
if( $portal_config['portal_announcements_style'] )
|
||||
{
|
||||
$template_file = 'portal/block/announcements_compact.html';
|
||||
} else {
|
||||
$template_file = 'portal/block/announcements.html';
|
||||
}
|
||||
|
||||
if (!isset($template->filename['announcements_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'announcements_block' => $template_file)
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('announcements_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
?>
|
||||
@@ -89,16 +89,18 @@ if( $attach_forums === TRUE )
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_ATTACHMENTS' => true,
|
||||
));
|
||||
} else {
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_ATTACHMENTS' => false,
|
||||
));
|
||||
if (!isset($template->filename['attachments_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'attachments_block' => 'portal/block/attachments.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('attachments_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -71,14 +71,26 @@ if ($config['load_birthdays'] && $config['allow_birthdays'])
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Assign index specific vars
|
||||
$template->assign_vars(array(
|
||||
'BIRTHDAY_LIST' => $birthday_list,
|
||||
'BIRTHDAYS_AHEAD_LIST' => ( $portal_config['portal_birthdays_ahead'] > 0 ) ? $birthday_ahead_list : '',
|
||||
'L_BIRTHDAYS_AHEAD' => sprintf($user->lang['BIRTHDAYS_AHEAD'], $portal_config['portal_birthdays_ahead']),
|
||||
));
|
||||
|
||||
if (!isset($template->filename['birthday_list_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'birthday_list_block' => 'portal/block/birthday_list.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('birthday_list_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
}
|
||||
|
||||
// Assign index specific vars
|
||||
$template->assign_vars(array(
|
||||
'BIRTHDAY_LIST' => $birthday_list,
|
||||
'BIRTHDAYS_AHEAD_LIST' => ( $portal_config['portal_birthdays_ahead'] > 0 ) ? $birthday_ahead_list : '',
|
||||
'L_BIRTHDAYS_AHEAD' => sprintf($user->lang['BIRTHDAYS_AHEAD'], $portal_config['portal_birthdays_ahead']),
|
||||
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -22,44 +22,55 @@ if (!defined('IN_PORTAL'))
|
||||
|
||||
$style = request_var('style', 0);
|
||||
|
||||
$sql = 'SELECT style_id, style_name, style_copyright
|
||||
FROM ' . STYLES_TABLE . '
|
||||
WHERE style_active = 1
|
||||
ORDER BY style_name ASC';
|
||||
$sql = 'SELECT style_id, style_name, style_copyright
|
||||
FROM ' . STYLES_TABLE . '
|
||||
WHERE style_active = 1
|
||||
ORDER BY style_name ASC';
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$style_select = '<option selected="selected" disabled="disabled">' . $user->lang['STYLE_CHOOSE'] . '</option>';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$selected = ( $style == $row['style_id'] ) ? ' selected="selected"' : '';
|
||||
$style_value = append_sid("{$phpbb_root_path}portal.$phpEx", 'style=' . $row['style_id']);
|
||||
$style_select .= '<option value="' . $style_value . '"' . $selected . '> ' . $row['style_name'] . ' </option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// style info
|
||||
$sql2 = 'SELECT style_id, style_name, style_copyright
|
||||
FROM ' . STYLES_TABLE . '
|
||||
WHERE style_active = 1
|
||||
AND style_id = ' . $style;
|
||||
$result = $db->sql_query($sql);
|
||||
$style_select = '<option selected="selected" disabled="disabled">' . $user->lang['STYLE_CHOOSE'] . '</option>';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$selected = ( $style == $row['style_id'] ) ? ' selected="selected"' : '';
|
||||
$style_value = append_sid("{$phpbb_root_path}portal.$phpEx", 'style=' . $row['style_id']);
|
||||
$style_select .= '<option value="' . $style_value . '"' . $selected . '> ' . $row['style_name'] . ' </option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$result = $db->sql_query($sql2);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
// style info
|
||||
$sql2 = 'SELECT style_id, style_name, style_copyright
|
||||
FROM ' . STYLES_TABLE . '
|
||||
WHERE style_active = 1
|
||||
AND style_id = ' . $style;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_STYLE_ACTION'=> append_sid("{$phpbb_root_path}portal.$phpEx"),
|
||||
'STYLE_NAME' => $row['style_name'],
|
||||
'STYLE_COPY' => $row['style_copyright'],
|
||||
'STYLE_SELECT' => $style_select,
|
||||
));
|
||||
$result = $db->sql_query($sql2);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($user->data['user_style']),
|
||||
'S_DISPLAY_CHANGE_STYLE' => true,
|
||||
'S_STYLE_ACTION'=> append_sid("{$phpbb_root_path}portal.$phpEx"),
|
||||
'STYLE_NAME' => $row['style_name'],
|
||||
'STYLE_COPY' => $row['style_copyright'],
|
||||
'STYLE_SELECT' => $style_select,
|
||||
));
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($user->data['user_style']),
|
||||
));
|
||||
|
||||
if (!isset($template->filename['change_style_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'change_style_block' => 'portal/block/change_style.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('change_style_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
?>
|
||||
26
root/portal/block/clock.php
Normal file
26
root/portal/block/clock.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id: clock.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
|
||||
*
|
||||
*/
|
||||
|
||||
if (!isset($template->filename['clock_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'clock_block' => 'portal/block/clock.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('clock_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
?>
|
||||
@@ -12,85 +12,106 @@
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
$allow_bbcode = 1;
|
||||
$allow_urls = 1;
|
||||
$allow_smilies = 1;
|
||||
|
||||
// Center Box
|
||||
if ($portal_config['portal_custom_center'])
|
||||
if ($block_type == '')
|
||||
{
|
||||
// Center Box
|
||||
if ($portal_config['portal_custom_center_bbcode'])
|
||||
{
|
||||
if ($portal_config['portal_custom_center_bbcode'])
|
||||
{
|
||||
$message_parser = new parse_message($portal_config['portal_custom_code_center']);
|
||||
$message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies);
|
||||
$message_parser = new parse_message($portal_config['portal_custom_code_center']);
|
||||
$message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies);
|
||||
|
||||
$text_center = $message_parser->message;
|
||||
$bbcode_uid = $message_parser->bbcode_uid;
|
||||
$bbcode_bitfield = $message_parser->bbcode_bitfield;
|
||||
$text_center = $message_parser->message;
|
||||
$bbcode_uid = $message_parser->bbcode_uid;
|
||||
$bbcode_bitfield = $message_parser->bbcode_bitfield;
|
||||
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
$text_center = censor_text($text_center);
|
||||
$bbcode->bbcode_second_pass($text_center, $bbcode_uid, $bbcode_bitfield);
|
||||
$text_center = bbcode_nl2br($text_center);
|
||||
$text_center = smiley_text($text_center);
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
$text_center = censor_text($text_center);
|
||||
$bbcode->bbcode_second_pass($text_center, $bbcode_uid, $bbcode_bitfield);
|
||||
$text_center = bbcode_nl2br($text_center);
|
||||
$text_center = smiley_text($text_center);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_CUSTOM_CENTER_CODE' => $text_center,
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_CUSTOM_CENTER_CODE' => htmlspecialchars_decode($portal_config['portal_custom_code_center'],ENT_QUOTES),
|
||||
));
|
||||
}
|
||||
$template->assign_vars(array(
|
||||
'S_CUSTOM_CENTER' => true,
|
||||
'PORTAL_CUSTOM_CENTER_HEADLINE' => $portal_config['portal_custom_center_headline'],
|
||||
));
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_CUSTOM_CENTER_CODE' => $text_center,
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_CUSTOM_CENTER_CODE' => htmlspecialchars_decode($portal_config['portal_custom_code_center'],ENT_QUOTES),
|
||||
));
|
||||
}
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_CUSTOM_CENTER_HEADLINE' => $portal_config['portal_custom_center_headline'],
|
||||
));
|
||||
|
||||
if (!isset($template->filename['custom_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'custom_block' => 'portal/block/custom_center.html')
|
||||
);
|
||||
}
|
||||
|
||||
// Small Box
|
||||
if ($portal_config['portal_custom_small'])
|
||||
$block_temp = $template->assign_display('custom_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
} else {
|
||||
// Small Box
|
||||
if ($portal_config['portal_custom_small_bbcode'])
|
||||
{
|
||||
if ($portal_config['portal_custom_small_bbcode'])
|
||||
{
|
||||
$message_parser = new parse_message($portal_config['portal_custom_code_small']);
|
||||
$message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies);
|
||||
$message_parser = new parse_message($portal_config['portal_custom_code_small']);
|
||||
$message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies);
|
||||
|
||||
$text_small = $message_parser->message;
|
||||
$bbcode_uid = $message_parser->bbcode_uid;
|
||||
$bbcode_bitfield = $message_parser->bbcode_bitfield;
|
||||
$text_small = $message_parser->message;
|
||||
$bbcode_uid = $message_parser->bbcode_uid;
|
||||
$bbcode_bitfield = $message_parser->bbcode_bitfield;
|
||||
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
$text_small = censor_text($text_small);
|
||||
$bbcode->bbcode_second_pass($text_small, $bbcode_uid, $bbcode_bitfield);
|
||||
$text_small = bbcode_nl2br($text_small);
|
||||
$text_small = smiley_text($text_small);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_CUSTOM_SMALL_CODE' => $text_small,
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_CUSTOM_SMALL_CODE' => htmlspecialchars_decode($portal_config['portal_custom_code_small'],ENT_QUOTES),
|
||||
));
|
||||
}
|
||||
$template->assign_vars(array(
|
||||
'S_CUSTOM_SMALL' => true,
|
||||
'PORTAL_CUSTOM_SMALL_HEADLINE' => $portal_config['portal_custom_small_headline'],
|
||||
));
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
$text_small = censor_text($text_small);
|
||||
$bbcode->bbcode_second_pass($text_small, $bbcode_uid, $bbcode_bitfield);
|
||||
$text_small = bbcode_nl2br($text_small);
|
||||
$text_small = smiley_text($text_small);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_CUSTOM_SMALL_CODE' => $text_small,
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_CUSTOM_SMALL_CODE' => htmlspecialchars_decode($portal_config['portal_custom_code_small'],ENT_QUOTES),
|
||||
));
|
||||
}
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_CUSTOM_SMALL_HEADLINE' => $portal_config['portal_custom_small_headline'],
|
||||
));
|
||||
|
||||
if (!isset($template->filename['custom_side_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'custom_side_block' => 'portal/block/custom_small.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('custom_side_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
}
|
||||
?>
|
||||
@@ -20,26 +20,42 @@ if (!defined('IN_PORTAL'))
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($portal_config['portal_pay_acc'])
|
||||
if ($block_type == '')
|
||||
{
|
||||
if ($portal_config['portal_pay_c_block'])
|
||||
if (!isset($template->filename['donate_block']))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_PAY_C' => true,
|
||||
));
|
||||
$template->set_filenames(array(
|
||||
'donate_block' => 'portal/block/donation.html')
|
||||
);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_pay_s_block'])
|
||||
$block_temp = $template->assign_display('donate_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isset($template->filename['donate_side_block']))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_PAY_S' => true,
|
||||
));
|
||||
$template->set_filenames(array(
|
||||
'donate_side_block' => 'portal/block/donation_small.html')
|
||||
);
|
||||
}
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'PAY_ACC' => $portal_config['portal_pay_acc'],
|
||||
));
|
||||
$block_temp = $template->assign_display('donate_side_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
}
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'PAY_ACC' => $portal_config['portal_pay_acc'],
|
||||
));
|
||||
|
||||
?>
|
||||
40
root/portal/block/forum_index.php
Normal file
40
root/portal/block/forum_index.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id: forum_index.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
|
||||
*
|
||||
*/
|
||||
|
||||
display_forums('');
|
||||
|
||||
$template->assign_vars(array(
|
||||
'FORUM_IMG' => $user->img('forum_read', 'NO_NEW_POSTS'),
|
||||
'FORUM_NEW_IMG' => $user->img('forum_unread', 'NEW_POSTS'),
|
||||
'FORUM_LOCKED_IMG' => $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
|
||||
'FORUM_NEW_LOCKED_IMG' => $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'),
|
||||
'S_DISPLAY_PORTAL_FORUM_INDEX' => true,
|
||||
|
||||
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'mark=forums') : '',
|
||||
'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '')
|
||||
);
|
||||
|
||||
if (!isset($template->filename['forum_index_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'forum_index_block' => 'portal/block/forum_index.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('forum_index_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
@@ -25,55 +25,26 @@ $s_display_friends = false;
|
||||
// Output listing of friends online
|
||||
$update_time = $config['load_online_time'] * 60;
|
||||
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
||||
'SELECT' => 'u.user_id, u.username, u.user_colour, u.user_allow_viewonline, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline',
|
||||
'FROM' => array(
|
||||
USERS_TABLE => 'u',
|
||||
ZEBRA_TABLE => 'z'
|
||||
),
|
||||
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
||||
'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_colour, u.user_allow_viewonline, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline',
|
||||
'FROM' => array(
|
||||
USERS_TABLE => 'u',
|
||||
ZEBRA_TABLE => 'z'
|
||||
),
|
||||
|
||||
'LEFT_JOIN' => array(
|
||||
array(
|
||||
'FROM' => array(SESSIONS_TABLE => 's'),
|
||||
'ON' => 's.session_user_id = z.zebra_id'
|
||||
)
|
||||
),
|
||||
'LEFT_JOIN' => array(
|
||||
array(
|
||||
'FROM' => array(SESSIONS_TABLE => 's'),
|
||||
'ON' => 's.session_user_id = z.zebra_id'
|
||||
)
|
||||
),
|
||||
|
||||
'WHERE' => 'z.user_id = ' . $user->data['user_id'] . '
|
||||
AND z.friend = 1
|
||||
AND u.user_id = z.zebra_id',
|
||||
'GROUP_BY' => 'z.zebra_id, u.user_id, u.username, u.user_allow_viewonline, u.user_colour',
|
||||
'ORDER_BY' => 'u.username ASC',
|
||||
));
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
||||
'SELECT' => 'u.user_id, u.username, u.user_colour, u.user_allow_viewonline, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline',
|
||||
'FROM' => array(
|
||||
USERS_TABLE => 'u',
|
||||
ZEBRA_TABLE => 'z'
|
||||
),
|
||||
|
||||
'LEFT_JOIN' => array(
|
||||
array(
|
||||
'FROM' => array(SESSIONS_TABLE => 's'),
|
||||
'ON' => 's.session_user_id = z.zebra_id'
|
||||
)
|
||||
),
|
||||
|
||||
'WHERE' => 'z.user_id = ' . $user->data['user_id'] . '
|
||||
AND z.friend = 1
|
||||
AND u.user_id = z.zebra_id',
|
||||
'GROUP_BY' => 'z.zebra_id, u.user_id, u.username, u.user_allow_viewonline, u.user_colour',
|
||||
'ORDER_BY' => 'u.username_clean ASC',
|
||||
));
|
||||
break;
|
||||
}
|
||||
'WHERE' => 'z.user_id = ' . $user->data['user_id'] . '
|
||||
AND z.friend = 1
|
||||
AND u.user_id = z.zebra_id',
|
||||
'GROUP_BY' => 'z.zebra_id, u.user_id, u.username, u.user_allow_viewonline, u.user_colour',
|
||||
'ORDER_BY' => 'u.username_clean ASC',
|
||||
));
|
||||
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_max_online_friends']);
|
||||
|
||||
@@ -92,10 +63,23 @@ while ($row = $db->sql_fetchrow($result))
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_FRIENDS' => $s_display_friends,
|
||||
'S_ZEBRA_ENABLED' => true,
|
||||
));
|
||||
|
||||
//if( $s_display_friends )
|
||||
//{
|
||||
if (!isset($template->filename['friends_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'friends_block' => 'portal/block/online_friends.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('friends_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
//}
|
||||
|
||||
|
||||
?>
|
||||
27
root/portal/block/jumpbox.php
Normal file
27
root/portal/block/jumpbox.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id: jumpbox.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
|
||||
*
|
||||
*/
|
||||
|
||||
if (!isset($template->filename['jumpbox_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'jumpbox_block' => 'portal/block/jumpbox.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('jumpbox_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
@@ -57,7 +57,19 @@ $db->sql_freeresult($result);
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'LAST_VISITED_BOTS' => sprintf($user->lang['LAST_VISITED_BOTS'], $portal_config['portal_last_visited_bots_number']),
|
||||
'S_LAST_VISITED_BOTS' => ($portal_config['portal_load_last_visited_bots']) ? true : false,
|
||||
));
|
||||
|
||||
if (!isset($template->filename['latest_bots_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'latest_bots_block' => 'portal/block/latest_bots.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('latest_bots_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
?>
|
||||
@@ -36,8 +36,17 @@ while( ($row = $db->sql_fetchrow($result)) && ($row['username']) )
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LATEST_MEMBERS' => true,
|
||||
));
|
||||
if (!isset($template->filename['latest_members_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'latest_members_block' => 'portal/block/latest_members.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('latest_members_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
?>
|
||||
@@ -140,9 +140,17 @@ while ($row = $db->sql_fetchrow($result))
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!isset($template->filename['leaders_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'leaders_block' => 'portal/block/leaders.html')
|
||||
);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LEADERS' => true,
|
||||
));
|
||||
$block_temp = $template->assign_display('leaders_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
?>
|
||||
@@ -110,8 +110,17 @@ if( sizeof($groups) )
|
||||
}
|
||||
}
|
||||
}
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LEADERS_EXT' => true,
|
||||
));
|
||||
if (!isset($template->filename['leaders_ext_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'leaders_ext_block' => 'portal/block/leaders_ext.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('leaders_ext_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
?>
|
||||
@@ -24,9 +24,22 @@ $u_link = $config['server_protocol'] . $config['server_name'] . $config['script_
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LINK_US' => true,
|
||||
'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>',
|
||||
));
|
||||
|
||||
if (!isset($template->filename['link_us_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'link_us_block' => 'portal/block/link_us.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('link_us_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
@@ -33,8 +33,18 @@ foreach( $links as $link_id => $link_data )
|
||||
));
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LINKS' => true,
|
||||
));
|
||||
if (!isset($template->filename['links_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'links_block' => 'portal/block/links.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('links_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
@@ -21,10 +21,23 @@ if (!defined('IN_PORTAL'))
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_MAINMENU' => true,
|
||||
'U_M_BBCODE' => append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode'),
|
||||
'U_M_TERMS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
|
||||
'U_M_PRV' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
|
||||
));
|
||||
|
||||
if (!isset($template->filename['main_menu_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'main_menu_block' => 'portal/block/main_menu.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('main_menu_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
@@ -145,7 +145,6 @@ $prev_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m=$do
|
||||
$next_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m=$up") . '"><img src="' . $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/mini_cal_icon_right_arrow.png' . '" title="' . $user->lang['View_next_month'] . '" height="16" width="16" alt=">>" /></a>';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_MINICAL' => true,
|
||||
'L_MINI_CAL_MONTH' => $user->lang['mini_cal']['long_month'][$mini_cal->day[0][4]] . " " . $mini_cal->day[0][5],
|
||||
'L_MINI_CAL_ADD_EVENT' => $user->lang['Mini_Cal_add_event'],
|
||||
'L_MINI_CAL_CALENDAR' => $user->lang['Mini_Cal_calendar'],
|
||||
@@ -162,4 +161,17 @@ $template->assign_vars(array(
|
||||
'U_NEXT_MONTH' => $next_month,
|
||||
));
|
||||
|
||||
if (!isset($template->filename['mini_cal_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'mini_cal_block' => 'portal/block/mini_calendar.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('mini_cal_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
?>
|
||||
@@ -297,14 +297,35 @@ if( isset($fetch_news['topic_icons']) )
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
|
||||
'READ_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
||||
'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
|
||||
'S_NEWEST_OR_FIRST' => ( $portal_config['portal_news_show_last'] ) ? $user->lang['JUMP_NEWEST'] : $user->lang['JUMP_FIRST'],
|
||||
'POSTED_BY_TEXT' => ( $portal_config['portal_news_show_last'] ) ? $user->lang['LAST_POST'] : $user->lang['POSTED'],
|
||||
'S_DISPLAY_NEWS' => true,
|
||||
'S_DISPLAY_NEWS_RVS' => ( $portal_config['portal_show_news_replies_views'] ) ? true : false,
|
||||
'S_TOPIC_ICONS' => $topic_icons,
|
||||
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
|
||||
'READ_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
||||
'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
|
||||
'S_NEWEST_OR_FIRST => ( $portal_config['portal_news_show_last'] ) ? $user->lang['JUMP_NEWEST'] : $user->lang['JUMP_FIRST'],
|
||||
'POSTED_BY_TEXT' => ( $portal_config['portal_news_show_last'] ) ? $user->lang['LAST_POST'] : $user->lang['POSTED'],
|
||||
'S_DISPLAY_NEWS' => true,
|
||||
'S_DISPLAY_NEWS_RVS' => ( $portal_config['portal_show_news_replies_views'] ) ? true : false,
|
||||
'S_TOPIC_ICONS' => $topic_icons,
|
||||
));
|
||||
|
||||
if( $portal_config['portal_news_style'] )
|
||||
{
|
||||
$template_file = 'portal/block/news_compact.html';
|
||||
} else {
|
||||
$template_file = 'portal/block/news.html';
|
||||
}
|
||||
|
||||
if (!isset($template->filename['news_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'news_block' => $template_file)
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('news_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
@@ -388,11 +388,23 @@ if( $poll_forums === TRUE )
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_POLL' => true,
|
||||
'S_HAS_POLL' => $has_poll,
|
||||
'POLL_LEFT_CAP_IMG' => $user->img('poll_left'),
|
||||
'POLL_RIGHT_CAP_IMG'=> $user->img('poll_right'),
|
||||
));
|
||||
if (!isset($template->filename['poll_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'poll_block' => 'portal/block/poll.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('poll_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -79,8 +79,18 @@ $template->assign_block_vars('random_member', array(
|
||||
));
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_RANDOM_MEMBER' => true,
|
||||
));
|
||||
if (!isset($template->filename['random_member_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'random_member_block' => 'portal/block/random_member.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('random_member_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
@@ -135,8 +135,17 @@ while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title']) )
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_RECENT' => true,
|
||||
));
|
||||
if (!isset($template->filename['recent_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'recent_block' => 'portal/block/recent.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('recent_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
?>
|
||||
@@ -21,9 +21,21 @@ if (!defined('IN_PORTAL'))
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_PORTALSEARCH' => true,
|
||||
'S_SEARCH_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx"),
|
||||
|
||||
));
|
||||
|
||||
if (!isset($template->filename['search_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'search_block' => 'portal/block/search.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('search_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
@@ -125,7 +125,6 @@ $l_posts_per_topic_s = ($total_posts == 0) ? 'POSTS_PER_TOPIC_ZERO' : 'POSTS_PER
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_ADVANCED_STAT' => true,
|
||||
'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
|
||||
'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics),
|
||||
'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users),
|
||||
@@ -143,4 +142,18 @@ $template->assign_vars(array(
|
||||
'POSTS_PER_TOPIC' => sprintf($user->lang[$l_posts_per_topic_s], $posts_per_topic),
|
||||
));
|
||||
|
||||
if (!isset($template->filename['statistics_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'statistics_block' => 'portal/block/statistics.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('statistics_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
@@ -40,8 +40,18 @@ while( ($row = $db->sql_fetchrow($result)) && ($row['username']) )
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_TOP_POSTERS' => true
|
||||
));
|
||||
if (!isset($template->filename['top_posters_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'top_posters_block' => 'portal/block/top_poster.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('top_posters_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
@@ -58,49 +58,66 @@ if ($user->data['is_registered'])
|
||||
WHERE user_id = " . $user->data['user_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$you_posts_count = (int) $db->sql_fetchfield('user_posts');
|
||||
|
||||
//
|
||||
// - new posts since last visit & you post number
|
||||
//
|
||||
|
||||
|
||||
// Get user...
|
||||
$user_id = $user->data['user_id'];
|
||||
$username = $user->data['username'];
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id");
|
||||
$result = $db->sql_query($sql);
|
||||
$member = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
$avatar_img = get_user_avatar($member['user_avatar'], $member['user_avatar_type'], $member['user_avatar_width'], $member['user_avatar_height']);
|
||||
$rank_title = $rank_img = '';
|
||||
get_user_rank($member['user_rank'], $member['user_posts'], $rank_title, $rank_img, $rank_img_src);
|
||||
$username = $member['username'];
|
||||
$user_id = (int) $member['user_id'];
|
||||
$colour = $member['user_colour'];
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'L_NEW_POSTS' => $user->lang['SEARCH_NEW'] . ' (' . $new_posts_count . ')',
|
||||
'L_SELF_POSTS' => $user->lang['SEARCH_SELF'] . ' (' . $you_posts_count . ')',
|
||||
|
||||
'AVATAR_IMG' => $avatar_img,
|
||||
|
||||
'RANK_TITLE' => $rank_title,
|
||||
'RANK_IMG' => $rank_img,
|
||||
'RANK_IMG_SRC' => $rank_img_src,
|
||||
|
||||
'USERNAME_FULL' => get_username_string('full', $user_id, $username, $colour),
|
||||
'USERNAME' => get_username_string('username', $user_id, $username, $colour),
|
||||
'USER_COLOR' => get_username_string('colour', $user_id, $username, $colour),
|
||||
'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $colour),
|
||||
|
||||
'U_NEW_POSTS' => append_sid($phpbb_root_path . 'search.' . $phpEx . '?search_id=newposts'),
|
||||
'U_SELF_POSTS' => append_sid($phpbb_root_path . 'search.' . $phpEx . '?search_id=egosearch'),
|
||||
'U_UM_BOOKMARKS' => ($config['allow_bookmarks']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "i=main&mode=bookmarks") : '',
|
||||
'U_UM_MAIN_SUBSCRIBED' => append_sid($phpbb_root_path . 'ucp.' . $phpEx . '?i=main&mode=subscribed'),
|
||||
));
|
||||
|
||||
if (!isset($template->filename['user_menu_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'user_menu_block' => 'portal/block/user_menu.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('user_menu_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
} else {
|
||||
include($phpbb_root_path . 'portal/block/login_box.'.$phpEx);
|
||||
}
|
||||
//
|
||||
// - new posts since last visit & you post number
|
||||
//
|
||||
|
||||
|
||||
// Get user...
|
||||
$user_id = $user->data['user_id'];
|
||||
$username = $user->data['username'];
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id");
|
||||
$result = $db->sql_query($sql);
|
||||
$member = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
$avatar_img = get_user_avatar($member['user_avatar'], $member['user_avatar_type'], $member['user_avatar_width'], $member['user_avatar_height']);
|
||||
$rank_title = $rank_img = '';
|
||||
get_user_rank($member['user_rank'], $member['user_posts'], $rank_title, $rank_img, $rank_img_src);
|
||||
$username = $member['username'];
|
||||
$user_id = (int) $member['user_id'];
|
||||
$colour = $member['user_colour'];
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'L_NEW_POSTS' => $user->lang['SEARCH_NEW'] . ' (' . $new_posts_count . ')',
|
||||
'L_SELF_POSTS' => $user->lang['SEARCH_SELF'] . ' (' . $you_posts_count . ')',
|
||||
|
||||
'AVATAR_IMG' => $avatar_img,
|
||||
|
||||
'RANK_TITLE' => $rank_title,
|
||||
'RANK_IMG' => $rank_img,
|
||||
'RANK_IMG_SRC' => $rank_img_src,
|
||||
|
||||
'USERNAME_FULL' => get_username_string('full', $user_id, $username, $colour),
|
||||
'USERNAME' => get_username_string('username', $user_id, $username, $colour),
|
||||
'USER_COLOR' => get_username_string('colour', $user_id, $username, $colour),
|
||||
'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $colour),
|
||||
|
||||
'U_NEW_POSTS' => append_sid($phpbb_root_path . 'search.' . $phpEx . '?search_id=newposts'),
|
||||
'U_SELF_POSTS' => append_sid($phpbb_root_path . 'search.' . $phpEx . '?search_id=egosearch'),
|
||||
'U_UM_BOOKMARKS' => ($config['allow_bookmarks']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "i=main&mode=bookmarks") : '',
|
||||
'U_UM_MAIN_SUBSCRIBED' => append_sid($phpbb_root_path . 'ucp.' . $phpEx . '?i=main&mode=subscribed'),
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -20,26 +20,41 @@ if (!defined('IN_PORTAL'))
|
||||
exit;
|
||||
}
|
||||
|
||||
$allow_bbcode = 1;
|
||||
$allow_urls = 1;
|
||||
$allow_smilies = 1;
|
||||
if ( !$portal_config['portal_welcome_guest'] || ( $portal_config['portal_welcome_guest'] && (!isset($user->data['is_registered']) || !$user->data['is_registered']) ) )
|
||||
{
|
||||
$allow_bbcode = 1;
|
||||
$allow_urls = 1;
|
||||
$allow_smilies = 1;
|
||||
|
||||
$message_parser = new parse_message($portal_config['portal_welcome_intro']);
|
||||
$message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies);
|
||||
$message_parser = new parse_message($portal_config['portal_welcome_intro']);
|
||||
$message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies);
|
||||
|
||||
$text = $message_parser->message;
|
||||
$bbcode_uid = $message_parser->bbcode_uid;
|
||||
$bbcode_bitfield = $message_parser->bbcode_bitfield;
|
||||
$text = $message_parser->message;
|
||||
$bbcode_uid = $message_parser->bbcode_uid;
|
||||
$bbcode_bitfield = $message_parser->bbcode_bitfield;
|
||||
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
$text = censor_text($text);
|
||||
$bbcode->bbcode_second_pass($text, $bbcode_uid, $bbcode_bitfield);
|
||||
$text = bbcode_nl2br($text);
|
||||
$text = smiley_text($text);
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
$text = censor_text($text);
|
||||
$bbcode->bbcode_second_pass($text, $bbcode_uid, $bbcode_bitfield);
|
||||
$text = bbcode_nl2br($text);
|
||||
$text = smiley_text($text);
|
||||
|
||||
if (!isset($template->filename['welcome_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'welcome_block' => 'portal/block/welcome.html')
|
||||
);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_WELCOME' => true,
|
||||
'PORTAL_WELCOME_INTRO' => $text,
|
||||
));
|
||||
$template->assign_vars(array(
|
||||
'PORTAL_WELCOME_INTRO' => $text,
|
||||
));
|
||||
|
||||
$block_temp = $template->assign_display('welcome_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
}
|
||||
?>
|
||||
@@ -20,73 +20,84 @@ if (!defined('IN_PORTAL'))
|
||||
exit;
|
||||
}
|
||||
|
||||
//
|
||||
// who is online borrowed from index.php (phpBB-3.0.B3)
|
||||
// if this gets changed (in index.php) and I don't notice it, please tell me)
|
||||
//
|
||||
|
||||
// Grab group details for legend display
|
||||
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
if ($config['load_online'] && $config['load_online_time'])
|
||||
{
|
||||
$sql = 'SELECT group_id, group_name, group_colour, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_legend = 1
|
||||
ORDER BY group_name ASC';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g
|
||||
LEFT JOIN ' . USER_GROUP_TABLE . ' ug
|
||||
ON (
|
||||
g.group_id = ug.group_id
|
||||
AND ug.user_id = ' . $user->data['user_id'] . '
|
||||
AND ug.user_pending = 0
|
||||
)
|
||||
WHERE g.group_legend = 1
|
||||
AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
|
||||
ORDER BY g.group_name ASC';
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
// who is online borrowed from index.php (phpBB-3.0.B3)
|
||||
// if this gets changed (in index.php) and I don't notice it, please tell me)
|
||||
//
|
||||
|
||||
$legend = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
|
||||
|
||||
if ($row['group_name'] == 'BOTS')
|
||||
// Grab group details for legend display
|
||||
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
{
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<span' . $colour_text . '>' . $user->lang['G_BOTS'] . '</span>';
|
||||
$sql = 'SELECT group_id, group_name, group_colour, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_legend = 1
|
||||
ORDER BY group_name ASC';
|
||||
}
|
||||
else
|
||||
{
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g
|
||||
LEFT JOIN ' . USER_GROUP_TABLE . ' ug
|
||||
ON (
|
||||
g.group_id = ug.group_id
|
||||
AND ug.user_id = ' . $user->data['user_id'] . '
|
||||
AND ug.user_pending = 0
|
||||
)
|
||||
WHERE g.group_legend = 1
|
||||
AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
|
||||
ORDER BY g.group_name ASC';
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$legend = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
|
||||
|
||||
if ($row['group_name'] == 'BOTS')
|
||||
{
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<span' . $colour_text . '>' . $user->lang['G_BOTS'] . '</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
//
|
||||
// users online list borrowed from includes/functions.php (phpBB-3.0.B3)
|
||||
// if this gets changed (in functions.php) and I don't notice it, please tell me)
|
||||
//
|
||||
$display_online_list = true;
|
||||
|
||||
// Get users online list ... if required
|
||||
$l_online_users = $online_userlist = $l_online_record = '';
|
||||
|
||||
if ($config['load_online'] && $config['load_online_time'] && $display_online_list)
|
||||
{
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'LEGEND' => $legend,
|
||||
));
|
||||
|
||||
if (!isset($template->filename['whois_online_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'whois_online_block' => 'portal/block/whois_online.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('whois_online_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
//
|
||||
// users online list borrowed from includes/functions.php (phpBB-3.0.B3)
|
||||
// if this gets changed (in functions.php) and I don't notice it, please tell me)
|
||||
//
|
||||
$display_online_list = true;
|
||||
|
||||
// Get users online list ... if required
|
||||
$l_online_users = $online_userlist = $l_online_record = '';
|
||||
|
||||
if ($config['load_online'] && $config['load_online_time'] && $display_online_list)
|
||||
{
|
||||
$portal_whois_show = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$portal_whois_show = false;
|
||||
}
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_ONLINE_PORTAL_LIST' => $portal_whois_show,
|
||||
'LEGEND' => $legend,
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -69,9 +69,20 @@ foreach ( $words as $word )
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_WORDGRAPH' => true,
|
||||
'L_WORDGRAPH' => $user->lang['WORDGRAPH'],
|
||||
)
|
||||
));
|
||||
if (!isset($template->filename['wordgraph_block']))
|
||||
{
|
||||
$template->set_filenames(array(
|
||||
'wordgraph_block' => 'portal/block/wordgraph.html')
|
||||
);
|
||||
}
|
||||
|
||||
$block_temp = $template->assign_display('wordgraph_block');
|
||||
|
||||
$template->assign_block_vars('portal_column_'.$block_pos, array(
|
||||
'BLOCK_DATA' => $block_temp)
|
||||
);
|
||||
unset( $block_temp );
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user