瀏覽代碼

! Death to hot topics.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 年之前
父節點
當前提交
be8dec5b62
共有 5 個文件被更改,包括 2 次插入15 次删除
  1. 0 2
      Sources/Display.php
  2. 0 2
      Sources/MessageIndex.php
  3. 0 2
      Sources/Recent.php
  4. 0 2
      Sources/Search.php
  5. 2 7
      Sources/Subs.php

+ 0 - 2
Sources/Display.php

@@ -524,8 +524,6 @@ function Display()
 	// Information about the current topic...
 	$context['is_locked'] = $topicinfo['locked'];
 	$context['is_sticky'] = $topicinfo['is_sticky'];
-	$context['is_very_hot'] = $topicinfo['num_replies'] >= $modSettings['hotTopicVeryPosts'];
-	$context['is_hot'] = $topicinfo['num_replies'] >= $modSettings['hotTopicPosts'];
 	$context['is_approved'] = $topicinfo['approved'];
 
 	// @todo Tricks? We don't want to show the poll icon in the topic class here, so pretend it's not one.

+ 0 - 2
Sources/MessageIndex.php

@@ -562,8 +562,6 @@ function MessageIndex()
 				'is_sticky' => !empty($row['is_sticky']),
 				'is_locked' => !empty($row['locked']),
 				'is_poll' => $modSettings['pollMode'] == '1' && $row['id_poll'] > 0,
-				'is_hot' => $row['num_replies'] >= $modSettings['hotTopicPosts'],
-				'is_very_hot' => $row['num_replies'] >= $modSettings['hotTopicVeryPosts'],
 				'is_posted_in' => false,
 				'icon' => $row['first_icon'],
 				'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.png',

+ 0 - 2
Sources/Recent.php

@@ -1281,8 +1281,6 @@ function UnreadTopics()
 			'is_sticky' => !empty($row['is_sticky']),
 			'is_locked' => !empty($row['locked']),
 			'is_poll' => $modSettings['pollMode'] == '1' && $row['id_poll'] > 0,
-			'is_hot' => $row['num_replies'] >= $modSettings['hotTopicPosts'],
-			'is_very_hot' => $row['num_replies'] >= $modSettings['hotTopicVeryPosts'],
 			'is_posted_in' => false,
 			'icon' => $row['first_icon'],
 			'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.png',

+ 0 - 2
Sources/Search.php

@@ -1997,8 +1997,6 @@ function prepareSearchContext($reset = false)
 		'is_sticky' => !empty($message['is_sticky']),
 		'is_locked' => !empty($message['locked']),
 		'is_poll' => $modSettings['pollMode'] == '1' && $message['id_poll'] > 0,
-		'is_hot' => $message['num_replies'] >= $modSettings['hotTopicPosts'],
-		'is_very_hot' => $message['num_replies'] >= $modSettings['hotTopicVeryPosts'],
 		'posted_in' => !empty($participants[$message['id_topic']]),
 		'views' => $message['num_views'],
 		'replies' => $message['num_replies'],

+ 2 - 7
Sources/Subs.php

@@ -2800,19 +2800,14 @@ function url_image_size($url)
 }
 
 /**
- * Sets the class of the current topic based on is_very_hot, veryhot, hot, etc
+ * Sets the class of the current topic based on, normal, sticky, locked, etc
  *
  * @param array &$topic_context
  */
 function determineTopicClass(&$topic_context)
 {
 	// Set topic class depending on locked status and number of replies.
-	if ($topic_context['is_very_hot'])
-		$topic_context['class'] = 'veryhot';
-	elseif ($topic_context['is_hot'])
-		$topic_context['class'] = 'hot';
-	else
-		$topic_context['class'] = 'normal';
+	$topic_context['class'] = 'normal';
 
 	$topic_context['class'] .= $topic_context['is_poll'] ? '_poll' : '_post';