XF 1.x Thread Icons

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:




read:

 

Steve

Pixel Exit Staff
Edit: Missed you wanted this for THREADS.

Will need to look for the right code and procedure.
 
Last edited:

Russ

Pixel Exit Staff
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?
 

Commodore

Registered
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?)

 

Russ

Pixel Exit Staff
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">
 

Russ

Pixel Exit Staff
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.
 

Commodore

Registered
Well I added the code and I got this:



I am just using 2 icons.
(new threads) and
{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:

Commodore

Registered
You rock! Looks really great!!!!

Anyway to get the white + sign out of there? Its redundant with the mini icon that pops up on top of the thread starter icon...
 

Russ

Pixel Exit Staff
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
 

Commodore

Registered
Trying to do a Sticky icon... Got the flame Icon I want, now just either lookinbg for a way to make the pin icon go away or replacing the scroll on the left.

 

Russ

Pixel Exit Staff
To remove the icon:

Code:
.discussionListItem .iconKey .sticky .fa { display: none; }
 

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.