1 (edited by snowman 2006-03-09 01:38)

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:

Without Divider
With Divider

Re: Separate Stickies from Posts

COOL!

~James
FluxBB - Less is more

Re: Separate Stickies from Posts

Looks very nice!! Thanks for this mod it helps keep members inline because stickeys are more noticeable!

My PunRes Wiki Mods:
1.) Remove Post Icon in View Topic And in Index
2.) Bold Links In Header
[img]http://www.the-artbreak.com/forum/img/smilies/socom.png[/img]