1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Implementing Unread Post Icons

Discussion in 'Styling and Customization Questions' started by Baron, Nov 18, 2014.

  1. Baron

    Baron Member

    So I recently installed a mod that replaced the "Last Post" area beside each forum with a list of 5 threads that have had recent posts. By default, the list only includes the thread titles, but my users are requesting that I implement Unread Post Icons to the left of those threads that have unread posts. The problem is that when I try to implement the same unread post code found on a traditional thread list page, it doesn't do anything, such as:

    {xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}
    It's as if the "isNew" function isn't available to me on the forum index page. How can I make this work?
    Last edited: Nov 18, 2014
  2. Brogan

    Brogan XenForo Moderator Staff Member

    If the issue is related to the add-on you have installed, you will need to ask in the dedicated thread for it.
  3. Baron

    Baron Member

    I did a month ago but he never responded, so I'm trying to hack his add-on in an effort to make it behave how I want, especially since I paid for it. I thought it would be a matter of just implementing the "$thread.isNew" if statement shown above while looping through each thread in the list, but there must be more to it than that.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    We are unable to provide support for add-ons, not least because we aren't familiar with the code.
  5. Baron

    Baron Member

    Ok, forget the add-on completely because the question is still valid. Within the context of a default XF installation, if one wanted to implement an unread post icon to the left of the latest thread (shown to the right of each forum) ONLY IF that thread has unread post(s), how could that be accomplished?
  6. big-k

    big-k Member

    Something like this in your thread_list template?

    <xen:if is="{$thread.isNew}">
    <img src="ICONxxx" >

Share This Page