• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Separate Sticky and Normal Threads

Nice and easy, just the way I like it. If it's this easy, perhaps it *is* worthwhile including into the default XF. If Kier/Mike think this is not the way to go, it could be disabled by default. I personally would add this to every board I run, though.
 
Yeah I tried searching for that in the templates, doesn't seem to be there.
Just noticed this...

You can add some css to EXTRA.css like so:
HTML:
.discussionListItem.visible.sticky {
background-color: #cc0000;
}
That will change the background colour to red so just change the css to suit.
 
Thanks for that Brogan, any idea how to change the replies/views box and the avatar background for it?
I didn't actually test it but now I see the problem.

In that case use this instead:
HTML:
.discussionListItem.visible.sticky, .discussionListItem.visible.sticky .posterAvatar, .discussionListItem.visible.sticky .stats{
background: #cc0000;
}
 
I didn't actually test it but now I see the problem.
In that case use this instead ...

Mate, you're THE bomb :). I changed it a little bit to give the gradient on the replies/views:

.discussionListItem.visible.sticky, .discussionListItem.visible.sticky .posterAvatar
{
background: #c8c8c8;
}

.discussionListItem.visible.sticky .stats
{
background: #c8c8c8 url('@imagePath/xenforo/gradients/category-23px-light.png') repeat-x top;
}

Thanks heaps for your help.
 
This is really good, i tried it on my forum but it looks just a little off, is there a way I can remove the small spacing so it looks more natural like the screenshot in the first post? I am running beta 5, cheers.

XF.webp
 
Need help finding this code in Thread_list I think it got moved in 1.0.1??
Code:
 <xen:foreach loop="$stickyThreads" value="$thread">
            <xen:include template="thread_list_item" />
        </xen:foreach>
 
Need help finding this code in Thread_list I think it got moved in 1.0.1??
Code:
 <xen:foreach loop="$stickyThreads" value="$thread">
            <xen:include template="thread_list_item" />
        </xen:foreach>

It hasn't been moved. It is still at the same template, thread_list.
 
This template modification will allow you to separate sticky threads from normal threads.

open
--> Appearance --> Templates : [thread_list]

find

Code:
        <xen:foreach loop="$stickyThreads" value="$thread">
            <xen:include template="thread_list_item" />
        </xen:foreach>

Add below

Code:
        <xen:if is="{$stickyThreads}">
            <li class="sectionHeaders">&nbsp;</li>
        </xen:if>

I've done it like this instead:

In thread_list:

Code:
        <xen:if is="{$stickyThreads}">
            <hr class="stickySeparator"/>
        </xen:if>

Then at the bottom of discussion_list.css:

Code:
.stickySeparator {
  height: 2px;
  background-color: @secondaryLighter;
  border: none;
  padding: 0px;
  margin: 0px;
}

Looks like the attachment. I think it's less intrusive, but still enough of a cue to separate the stickies from the other threads.
 

Attachments

  • sticky_separator.webp
    sticky_separator.webp
    14.5 KB · Views: 90
Top Bottom