diff --git a/Sources/Display.php b/Sources/Display.php index cf18cfb..143dacb 100644 --- a/Sources/Display.php +++ b/Sources/Display.php @@ -645,6 +645,25 @@ function Display() // Set the callback. (do you REALIZE how much memory all the messages would take?!?) $context['get_message'] = 'prepareDisplayContext'; + // Check if the topic is been watched by user + if ($user_info['is_guest']) { + $context['is_watched'] == false; + } else { + $result = db_query(" + SELECT watch FROM {$db_prefix}watch_topics + WHERE + ID_MEMBER='{$ID_MEMBER}' AND + ID_TOPIC='{$topic}'", + __FILE__, __LINE__); + if(mysql_num_rows($result) == 0) { + $context['is_watched'] = false; + } else { + list($w) = mysql_fetch_row($result); + $context['is_watched'] = (bool) $w; + } + } + + // Basic settings.... may be converted over at some point. $context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']) || ($user_info['is_guest'] && !empty($modSettings['guest_hideContacts'])); diff --git a/Sources/Load.php b/Sources/Load.php index ceb5a09..c5ff37e 100644 --- a/Sources/Load.php +++ b/Sources/Load.php @@ -526,7 +526,7 @@ function loadMemberContext($user) // Set things up to be used before hand. $gendertxt = $profile['gender'] == 2 ? $txt[239] : ($profile['gender'] == 1 ? $txt[238] : ''); $profile['signature'] = str_replace(array("\n", "\r"), array('
', ''), $profile['signature']); - $profile['signature'] = doUBBC($profile['signature']); + $profile['signature'] = doUBBC($profile['signature'], true, 'size,color'); if ($profile['warning'] == 1) $warn = 'warn'; elseif ($profile['warning'] == 2) diff --git a/Sources/Recent.php b/Sources/Recent.php index ead2b99..a4e3fd2 100644 --- a/Sources/Recent.php +++ b/Sources/Recent.php @@ -466,10 +466,11 @@ function UnreadTopics() { $request = db_query(" SELECT COUNT(DISTINCT t.ID_TOPIC), MIN(t.ID_LAST_MSG) - FROM ({$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ml, {$db_prefix}messages AS m) + FROM ({$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ml, {$db_prefix}messages AS m, {$db_prefix}watch_topics as w) LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER) WHERE m.ID_TOPIC = t.ID_TOPIC + AND w.ID_TOPIC=t.ID_TOPIC AND w.ID_MEMBER=$ID_MEMBER AND w.watch=1 AND m.ID_MEMBER = $ID_MEMBER AND ml.ID_MSG = t.ID_LAST_MSG AND b.ID_BOARD = t.ID_BOARD diff --git a/Themes/default/Display.template.php b/Themes/default/Display.template.php index f0f4cd4..e3f1a10 100644 --- a/Themes/default/Display.template.php +++ b/Themes/default/Display.template.php @@ -181,18 +181,16 @@ function template_main() '; $buttonArray = array(); - if ($context['can_reply']) - $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; if ($context['can_mark_notify']) $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; // This is a special case; if they can see mark unread, put it at the top... otherwise show add poll. - if ($context['user']['is_logged'] && $settings['show_mark_read']) - $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; - elseif ($context['can_add_poll']) +/* if ($context['user']['is_logged'] && $settings['show_mark_read']) + $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . '';*/ + if ($context['can_add_poll']) $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['add_poll'] . '' : $txt['add_poll']) . ''; - if ($context['can_send_topic']) + if (false && $context['can_send_topic']) $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[707] . '' : $txt[707]) . ''; $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[465] . '' : $txt[465]) . ''; @@ -238,12 +236,18 @@ function template_main() '; // Show the message anchor and a "new" anchor if this message is new. - if ($message['id'] != $context['first_message']) + $id = 'msg' . $message['id']; + if ($message['first_new']) + echo ' + '; + +/* if ($message['id'] != $context['first_message']) echo ' ', $message['first_new'] ? '' : ''; +*/ echo ' - +
- '; } @@ -592,7 +596,7 @@ document.write('
'; // Show information about the poster of this message. @@ -471,7 +475,7 @@ function template_main() echo ' '; +