• We've added extra Spam Protection. if you get problem with account registration / registration rejected. please contact us
  • You need minimum 5 good posts for download files. Don´t push posting-counter with posts copy paste, thx, good, smileys..... Read This.
  • Note: don´t push posting-counter with messages like thx, good, haha, only use reactions! threads will be deleted without any comment or notification. Read Rules.
XenForo

Display image for Thread Prefix

XenForo

Executive Member
Staff member
Administrator
Moderator
Joined
Jan 1, 2016
Messages
1,119
Reaction score
1,949
Points
113
XenForo submitted a new resource:

Display image for Thread Prefix - This will show you how to just have an image as a thread prefix

This little tip will show you how you can display an image as a thread prefix but also show a title with the image when a user is selecting a thread prefix...hope it helps.

NOTE: I use 18px x 18px images for my prefix images

1. Create a thread prefix
a. In your ACP (Admin Controlo Panel), go to Forums -> Thread prefixes and click the Add prefix button
b. Complete the form and instead of selecting a pre-set Display styling, click the "Other, using custom CSS class name"
c. Enter a...
Read more about this resource...
 

artscripts

New Member
Joined
Mar 13, 2019
Messages
5
Reaction score
1
Points
3
Age
38
it will be more correct


Less:
  .m_addIconPrefix(@className, @imagePath) {
  [email protected]{className} {
    background: url(@imagePath) no-repeat scroll left center;
    display: inline-block;
    line-height: 18px !important;
    padding: 0 0 0 20px;
    vertical-align: middle;
    margin-top: -4px !important;
    font-size: 0px;
  }
}


.m_addIconPrefix(question, 'styles/prefixes/question.gif');
.m_addIconPrefix(alert, 'styles/prefixes/alert.gif');
.m_addIconPrefix(information, 'styles/prefixes/information.gif');
.m_addIconPrefix(need_help, 'styles/prefixes/need_help.gif');
.m_addIconPrefix(important, 'styles/prefixes/important.gif');
.m_addIconPrefix(alert, 'styles/prefixes/alert.gif');
 

Lars

+ Member +
Joined
Mar 23, 2019
Messages
28
Reaction score
3
Points
3
thx artscripts! your code snippet actually helped a lot to wrap my head around the topic ;)

L
 

btmgreg

New Member
Joined
May 7, 2019
Messages
7
Reaction score
1
Points
3
Age
32
Thanks. What code would you use artscripts?
 
Top

AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock