Topic: Separate Stickies from Posts
Simple modification to separate the stickes from the regular posts by using a divider. This does not add any additional queries or add to runtime.
It will also not show if there are no stickied topics.
Files modified: 1
Filename: viewforum.php
Line 189
if ($cur_topic['sticky'] == '1')
{
$subject = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$subject;
$item_status .= ' isticky';
$icon_text .= ' '.$lang_forum['Sticky'];
}
CHANGE TO:
if ($cur_topic['sticky'] == '1')
{
$stickydivide = 1;
$stickyflag = 1;
$subject = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$subject;
$item_status .= ' isticky';
$icon_text .= ' '.$lang_forum['Sticky'];
}else{
$stickyflag = 0;
}
Line 214 (add below where it says, "ADD THIS PART")
// Should we show the "New posts" and/or the multipage links?
if (!empty($subject_new_posts) || !empty($subject_multipage))
{
$subject .= ' '.(!empty($subject_new_posts) ? $subject_new_posts : '');
$subject .= !empty($subject_multipage) ? ' '.$subject_multipage : '';
}
// ADD THIS PART:
if($stickyflag == 0 && $stickydivide == 1){
echo "<tr><td colspan=4 style=\"padding:0;margin:0;\"><h2><strong>Forum Topics</strong></h2></td></tr>";
$stickydivide = 0;
}
Here are some screenshots: