Commodore

Registered
The next thing I want to do is place these icons as THREAD icons for all threads. How do I accomplish this?

unread:

Z0Rr6Rt.png



read:

rGxsbhM.png
 
I think you may be referring to the thread_list_item template (list of threads). Where would you want the icons to show? Replace the avatars?
 
Well I'm not sure. Let me show you an example from our original site from years back...

Threads had six possible icons:

New posts (Unread)
New posts (Unread - HOT) -- posts that had a predetermined number of views, say 50 views.
Old posts (Read)
Old posts (Read - HOT) -- posts that had a predetermined number of views, say 50 views.

Sticky
Global Announcement (This was a post that became a sticky in EVERY forum. can this be done in xenforo?)

6GFGrDx.png
 
This is just some generic code but open thread_list_item,

Add this:
Code:
  <div class="listBlock unreadImage">
   <xen:if is="{$thread.isNew}">
       <a href="{xen:link threads/unread, $thread}" class="unreadThreadLink" title="{xen:phrase go_to_first_unread_message}"><img src="@imagePath/xenforo/sources/thread_list_unread.png" /></a>
   <xen:else />
       <img src="@imagePath/xenforo/sources/thread_list_read.png" />
   </xen:if>
       <xen:if is="{$thread.user_post_count}"><div class="selfPost" title="{xen:phrase you_have_posted_x_messages_in_this_thread, 'count={xen:number $thread.user_post_count}'}"><i class="fa fa-plus fa-fw"></i></div></xen:if>
   </div>

right above:

Code:
   <div class="listBlock posterAvatar">
 
It would add a column next to the avatar which you can choose your own icons. Additionally you could replace the avatar code in the same template.

Icon names would be: thread_list_read.png and thread_list_unread.png, you may need to tweak it depending on what exactly what you want but this should get you pointed in the right way. Checks if the thread is old or new, and if you have a post in it. Past that you may need an add-on for additional functionality depending on what is it.
 
Well I added the code and I got this:

wqB9k96.png


I am just using 2 icons.
PcfYA9H.png
(new threads) and
gT8EMRl.png
{read threads).

I renamed them thread_list_unread.png and thread_list_read.png respectively, and ftp'ed them to the proper location (I think).

What am I doing wrong?
 
Last edited:
Remove this:

Code:
 <xen:if is="{$thread.user_post_count}"><div class="selfPost" title="{xen:phrase you_have_posted_x_messages_in_this_thread, 'count={xen:number $thread.user_post_count}'}"><i class="fa fa-plus fa-fw"></i></div></xen:if>
   </div>
from the edit, second to bottom line
 

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.

Back