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()
' : $txt[146]) . '';
if ($context['can_mark_notify'])
$buttonArray[] = '' . ($settings['use_image_buttons'] ? '
' : $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']) . '';
- elseif ($context['can_add_poll'])
+/* if ($context['user']['is_logged'] && $settings['show_mark_read'])
+ $buttonArray[] = '' . ($settings['use_image_buttons'] ? '
' : $txt['mark_unread']) . '';*/
+ if ($context['can_add_poll'])
$buttonArray[] = '' . ($settings['use_image_buttons'] ? '
' : $txt['add_poll']) . '';
- if ($context['can_send_topic'])
+ if (false && $context['can_send_topic'])
$buttonArray[] = '' . ($settings['use_image_buttons'] ? '
' : $txt[707]) . '';
$buttonArray[] = '' . ($settings['use_image_buttons'] ? '
' : $txt[465]) . '';
@@ -238,12 +236,18 @@ function template_main()