Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Sticky Threads Fa Icon
#1
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:
Code:
<span class="{$folder}" title="{$folder_label}">&nbsp;</span>

Replace With:
Code:
<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
Code:
.sticky-icon {
    color: orange;
}

You're free to change the color to whatever you like.
Do NOT PM me for support unless I ask you for anything on your support thread.
Reply
#2
Thank you, looks great! More tutorials are welcomed Smile
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#3
thanks for tutorial , if you don't mind it would be great if you post preview image to first post
Reply
#4
Tried and failed unfortunately

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

Tried replacing with
Code:
<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

Code:
<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

Code:
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
Reply
#5
Do you have this plugin installed?
http://mybbhacks.zingaburga.com/showthread.php?tid=260

If not install it then do it, should work.
Do NOT PM me for support unless I ask you for anything on your support thread.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)