MyBB Community Forums

Full Version: Sticky Threads Fa Icon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If you're using thread icons as Fa icons and wondering how to set Important Threads with sticky fa icon like xenforo this is how you would want to do it.

Edit: Template Conditionals plugin needs to be installed for this.

Forumdisplay Template > Forumdisplay_Thread

Find:
<span class="{$folder}" title="{$folder_label}">&nbsp;</span>

Replace With:
<if $thread['sticky'] then>
<i class="fa fa-thumb-tack sticky-icon" aria-hidden="true"></i>
<else>
<span class="{$folder}" title="{$folder_label}">&nbsp;</span>
</if>

Now go to global.css and add
.sticky-icon {
    color: orange;
}

You're free to change the color to whatever you like.
Thank you, looks great! More tutorials are welcomed Smile
thanks for tutorial , if you don't mind it would be great if you post preview image to first post
Tried and failed unfortunately

Found
<span class="thread_status {$folder}" title="{$folder_label}">&nbsp;</span>

Tried replacing with
<if $thread['sticky'] then>
<i class="fa fa-thumb-tack sticky-icon" aria-hidden="true"></i>
<else>
<span class="{$folder}" title="{$folder_label}">&nbsp;</span>
</if>

Then tried replacing with

<if $thread['sticky'] then>
<i class="thread_status fa fa-thumb-tack sticky-icon" aria-hidden="true"></i>
<else>
<span class="thread_status {$folder}" title="{$folder_label}">&nbsp;</span>
</if>

Both ended with not showing threads whatsoever (in categories that have sticky threads) and this on top of the screen

Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier
(T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in
/home1/toptip/mysitename.com/forumdisplay.php(1360) : eval()'d code on line 4

Any ideas what to change?

P.S. I did edit global.css
Do you have this plugin installed?
http://mybbhacks.zingaburga.com/showthread.php?tid=260

If not install it then do it, should work.