determineTopicClass
Description
Determines the "class" of a topic (normal, "hot" or "very hot").
Syntax
void determineTopicClass (array $topic_context)
Parameter $topic_context
Expected type: Array
Description: $context['topic'][{ID_TOPIC}] array for a specific topic (contains a lot of information - keys shown here are the only ones used by this function)
Array Elements of $topic_context | |||
Key | Optional | Expected type | Description |
is_hot | no | Boolean | Whether or not the topic is "hot" (checked only if is_very_hot is false - sets the class to "hot"; if false, class is set to "normal") |
is_locked | no | Boolean | Whether or not the topic is locked (if so, "_locked" is appended to the class) |
is_poll | no | Boolean | Whether or not the topic contains a poll (if true, "_poll" is appended to the class, otherwise "_post" is appended) |
is_sticky | no | Boolean | Whether or not the topic is sticky (if so, "_sticky" is appended to the class) |
is_very_hot | no | Boolean | Whether or not the topic is "very hot" (checked first - sets the class to "veryhot") |
Notes
- Used to determine what status icon to display next to a topic in the messageindex and at the top of the page on the topic display.
- Called after the $context['topic'] array has been loaded, so it does not need to check settings
- Sets the "class" index of the $themContext array, and also sets the "extended_class" index for compatibility with older themes