XF 1.x Highlighting unread messages in the New Posts widget

Redh

Customer
Hello! I added this to my site earlier, and thought I'd share it here in case anyone else is interested. This makes unread posts on the "New Posts" sidebar widget stand out by adding a small arrow and making the thread title bold. It's very simple, but I didn't see any other options for it. Ok, here goes!

You want to edit the template "sidebar_new_posts", and replace the following code:

Code:
            <div class="messageContent">
                <div class="title">
                <xen:if is="{$thread.isNew} AND {$thread.haveReadData}">
                    <a href="{xen:link threads/unread, $thread}">{xen:helper threadPrefix, $thread}{$thread.title}</a>
                <xen:else />
                    <a href="{xen:link posts, $thread.lastPostInfo}">{xen:helper threadPrefix, $thread}{$thread.title}</a>
                </xen:if>
                </div>
            </div>
with this code:

Code:
            <div class="messageContent">
                <div class="title">
                <xen:if is="{$thread.isNew} AND {$thread.haveReadData}">
                <i class="fa fa-chevron-circle-right"></i>
                    <a href="{xen:link threads/unread, $thread}">{xen:helper threadPrefix, $thread}<b>{$thread.title}</b></a>
                <xen:else />
                    <a href="{xen:link posts, $thread.lastPostInfo}">{xen:helper threadPrefix, $thread}{$thread.title}</a>
                </xen:if>
                </div>
            </div>
And that's really it! Here is what it changes:

Before:

sibebar_unread1.jpg


and after:

sibebar_unread2.jpg


If you want to change the colour of the arrow, or add a background to it, you can wrap it in <span> tags and create a custom class in your extra.css template.

I think this makes the New Posts widget much more useful, and easier to see new content! I hope this helps :)
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.