viewforum.php
find
- Mã: Chọn tất cả
'S_UNREAD_TOPIC' => $unread_topic,
after add
- Mã: Chọn tất cả
'S_TOPIC_HOT' => ($row['topic_replies'] >= $config['hot_threshold']) ? true : false,
now you can use
- Mã: Chọn tất cả
<!-- IF topicrow.S_HOT_TOPIC -->hot<!-- ELSE -->not hot<!-- ENDIF -->
in topicrow in viewforum_body.html
this code is tested
- Mã: Chọn tất cả
'S_TOPIC_TYPE' => $row['topic_type'],
'S_USER_POSTED' => (isset($row['topic_posted']) && $row['topic_posted']) ? true : false,
'S_UNREAD_TOPIC' => $unread_topic,
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id)) ? true : false,
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
'S_POSTS_UNAPPROVED' => $posts_unapproved,
'S_HAS_POLL' => ($row['poll_start']) ? true : false,
'S_POST_ANNOUNCE' => ($row['topic_type'] == POST_ANNOUNCE) ? true : false,
'S_POST_GLOBAL' => ($row['topic_type'] == POST_GLOBAL) ? true : false,
'S_POST_STICKY' => ($row['topic_type'] == POST_STICKY) ? true : false,
'S_TOPIC_LOCKED' => ($row['topic_status'] == ITEM_LOCKED) ? true : false,
'S_TOPIC_MOVED' => ($row['topic_status'] == ITEM_MOVED) ? true : false,
Tham khảo thêm: https://wiki.phpbb.com/Tutorial.Template_syntax