Line 30 | Line 30 |
---|
$forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array(); $parent_id = $visible_forums = 0;
|
$forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array(); $parent_id = $visible_forums = 0;
|
| $parent_subforum_limit = false;
|
// Mark forums read? $mark_read = $request->variable('mark', '');
| // Mark forums read? $mark_read = $request->variable('mark', '');
|
Line 70 | Line 71 |
---|
$data = array( 'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'], 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
|
$data = array( 'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'], 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
|
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time()) : '',
| 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time(), false) : '',
|
'MESSAGE_TITLE' => $user->lang['INFORMATION'], 'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED'] );
| 'MESSAGE_TITLE' => $user->lang['INFORMATION'], 'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED'] );
|
Line 266 | Line 267 |
---|
// Direct child of current branch $parent_id = $forum_id;
|
// Direct child of current branch $parent_id = $forum_id;
|
| $parent_subforum_limit = $row['display_subforum_limit'] ?? false;
|
$forum_rows[$forum_id] = $row;
if ($row['forum_type'] == FORUM_CAT && $row['parent_id'] == $root_data['forum_id'])
| $forum_rows[$forum_id] = $row;
if ($row['forum_type'] == FORUM_CAT && $row['parent_id'] == $root_data['forum_id'])
|
Line 278 | Line 280 |
---|
} else if ($row['forum_type'] != FORUM_CAT) {
|
} else if ($row['forum_type'] != FORUM_CAT) {
|
$subforums[$parent_id][$forum_id]['display'] = ($row['display_on_index']) ? true : false;
| $subforums[$parent_id][$forum_id]['display'] = ($row['display_on_index'] && (!$parent_subforum_limit || $parent_id == $row['parent_id']));
|
$subforums[$parent_id][$forum_id]['name'] = $row['forum_name']; $subforums[$parent_id][$forum_id]['orig_forum_last_post_time'] = $row['forum_last_post_time']; $subforums[$parent_id][$forum_id]['children'] = array();
| $subforums[$parent_id][$forum_id]['name'] = $row['forum_name']; $subforums[$parent_id][$forum_id]['orig_forum_last_post_time'] = $row['forum_last_post_time']; $subforums[$parent_id][$forum_id]['children'] = array();
|
Line 355 | Line 357 |
---|
$data = array( 'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'], 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
|
$data = array( 'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'], 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
|
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time()) : '',
| 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time(), false) : '',
|
'MESSAGE_TITLE' => $user->lang['INFORMATION'], 'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED'] );
| 'MESSAGE_TITLE' => $user->lang['INFORMATION'], 'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED'] );
|
Line 539 | Line 541 |
---|
{ if ($row['forum_password_last_post'] === '' && $auth->acl_gets('f_read', 'f_list_topics', $row['forum_id_last_post'])) {
|
{ if ($row['forum_password_last_post'] === '' && $auth->acl_gets('f_read', 'f_list_topics', $row['forum_id_last_post'])) {
|
$last_post_subject = censor_text($row['forum_last_post_subject']);
| $last_post_subject = utf8_decode_ncr(censor_text($row['forum_last_post_subject']));
|
$last_post_subject_truncated = truncate_string($last_post_subject, 30, 255, false, $user->lang['ELLIPSIS']); } else
| $last_post_subject_truncated = truncate_string($last_post_subject, 30, 255, false, $user->lang['ELLIPSIS']); } else
|
Line 548 | Line 551 |
---|
} $last_post_time = $user->format_date($row['forum_last_post_time']); $last_post_time_rfc3339 = gmdate(DATE_RFC3339, $row['forum_last_post_time']);
|
} $last_post_time = $user->format_date($row['forum_last_post_time']); $last_post_time_rfc3339 = gmdate(DATE_RFC3339, $row['forum_last_post_time']);
|
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
| $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
} else {
| } else {
|
Line 1083 | Line 1086 |
---|
// Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing) $num_predefined_bbcodes = NUM_PREDEFINED_BBCODES;
|
// Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing) $num_predefined_bbcodes = NUM_PREDEFINED_BBCODES;
|
$sql_ary = array( 'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline', 'FROM' => array(BBCODES_TABLE => 'b'),
| $sql_ary = [ 'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline, b.bbcode_match', 'FROM' => [BBCODES_TABLE => 'b'],
|
'WHERE' => 'b.display_on_posting = 1', 'ORDER_BY' => 'b.bbcode_tag',
|
'WHERE' => 'b.display_on_posting = 1', 'ORDER_BY' => 'b.bbcode_tag',
|
);
| ];
|
/** * Event to modify the SQL query before custom bbcode data is queried
| /** * Event to modify the SQL query before custom bbcode data is queried
|
Line 1113 | Line 1116 |
---|
$row['bbcode_helpline'] = $user->lang[strtoupper($row['bbcode_helpline'])]; }
|
$row['bbcode_helpline'] = $user->lang[strtoupper($row['bbcode_helpline'])]; }
|
$custom_tags = array( 'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
| // Convert Numeric Character References to UTF-8 chars. $row['bbcode_helpline'] = utf8_decode_ncr($row['bbcode_helpline']);
// Does the closing bbcode tag exists? If so display it. $bbcode_close_tag = '%\[\/' . utf8_strtolower($row['bbcode_tag']) . '\]%'; $bbcode_match_str = utf8_strtolower($row['bbcode_match']); $bbcode_name_clean = preg_match($bbcode_close_tag, $bbcode_match_str) ? "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'" : "'[{$row['bbcode_tag']}]', ''";
$custom_tags = [ 'BBCODE_NAME' => $bbcode_name_clean,
|
'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2), 'BBCODE_TAG' => $row['bbcode_tag'], 'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']), 'BBCODE_HELPLINE' => $row['bbcode_helpline'],
|
'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2), 'BBCODE_TAG' => $row['bbcode_tag'], 'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']), 'BBCODE_HELPLINE' => $row['bbcode_helpline'],
|
);
| ];
|
/** * Event to modify the template data block of a custom bbcode
| /** * Event to modify the template data block of a custom bbcode
|
Line 1592 | Line 1603 |
---|
if ($data['user_allow_viewonline'] || $auth->acl_get('u_viewonline')) {
|
if ($data['user_allow_viewonline'] || $auth->acl_get('u_viewonline')) {
|
$last_active = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
| $last_active = $data['user_last_active'] ?: ($data['session_time'] ?? 0);
|
} else {
| } else {
|
Line 1679 | Line 1690 |
---|
'U_EMAIL' => $email, 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '',
|
'U_EMAIL' => $email, 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '',
|
'USER_JABBER' => ($config['jab_enable']) ? $data['user_jabber'] : '', 'USER_JABBER_IMG' => ($config['jab_enable'] && $data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
| 'USER_JABBER' => ($config['jab_enable'] && $auth->acl_get('u_sendim')) ? $data['user_jabber'] : '', 'USER_JABBER_IMG' => ($config['jab_enable'] && $auth->acl_get('u_sendim') && $data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
|
'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username), 'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),
| 'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username), 'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),
|