gelly 32 Share Posted December 6, 2018 Hello! The theme I'm using uses FontAwesome icons for most, if not all, of the images sans the actual header. I've been trying to figure out how to make it so that the icon can be different when there's a new post as opposed to no new posts. Ideally, I would like for the icon to be an outline version when there's no new post and a filled in version when there's a new post. If not, then a lighter color for no new posts and a default for a new post would be okay too. The only tutorial I've found is how to make different forums have different icons, but that's not what I want. I hope I explained myself properly! https://inkslingers.rpginit.com/index.php Link to comment Share on other sites More sharing options...
Admin Morrigan 1,825 Admin Share Posted December 6, 2018 Should actually be pretty easy actually. .forum_on .fa-comments:before { content: "\UNICODE"; } .forum_off .fa-comments:before { content: "\UNICODE"; } The Unicode is the 4 character thing on the font awesome page that starts with an f. So like "\f5db" for the FA5 outline books (I believe it's a pro icon). I don't know if you're using FA4 or FA5 but it will work for both. @perry the platypus Profile set made by myself and original Artwork by Fae Merriman, my daughter. Link to comment Share on other sites More sharing options...
gelly 32 Author Share Posted December 6, 2018 @Morrigan Thank you! Is there something else I should be editing, because I don't see any change taking effect 😕 Link to comment Share on other sites More sharing options...
Admin Morrigan 1,825 Admin Share Posted December 6, 2018 You might need to add the font family. Also, do you know what version of font awesome is in the theme versus what you're using? FA5 is only partly backwards compatible with FA4. @perry the platypus Profile set made by myself and original Artwork by Fae Merriman, my daughter. Link to comment Share on other sites More sharing options...
gelly 32 Author Share Posted December 6, 2018 @Morrigan <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"> So the newest version, I presume! Link to comment Share on other sites More sharing options...
Admin Morrigan 1,825 Admin Share Posted December 6, 2018 Alright, that code appears to be FA5 but the code is FA4 (fa is no longer used in font awesome 5). Try adding: font-family: "Font Awesome 5 Free"; Note, that some icons, including many of the not filled ones, are part of the pro pack and may not work. But this should fix it. Profile set made by myself and original Artwork by Fae Merriman, my daughter. Link to comment Share on other sites More sharing options...
gelly 32 Author Share Posted December 6, 2018 (edited) It's strange because the only time the icon shows up is when it's put in the forumbit_depth2_forum template. That's how it is originally. I just updated it to the v5 code. But if I remove it from the template, there's nothing there. @Morrigan <tr> <td class="{$bgcolor}" align="center" width="1"><span class="forum_status forum_{$lightbulb['folder']} ajax_mark_read" title="{$lightbulb['altonoff']}" id="mark_read_{$forum['fid']}"><i class="far fa-comments"></i></span></td> <td class="{$bgcolor}"> <strong><a href="{$forum_url}"><span style="font-size: 14px; text-transform: uppercase;">{$forum['name']}</span></a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div> </td> <td id="threads" class="{$bgcolor}" align="center" style="font-size: 14px;white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td> <td id="replies" class="{$bgcolor}" align="center" style="font-size: 14px;white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td> <td id="lastpost" class="{$bgcolor}" align="center" style="white-space: nowrap">{$lastpost}</td> </tr> Edited December 6, 2018 by perry the platypus Link to comment Share on other sites More sharing options...
Admin Morrigan 1,825 Admin Share Posted December 6, 2018 Don't remove it from the template. All the CSS that I provided does is replaces the icon based on the class. It appears to be working now though. @perry the platypus Profile set made by myself and original Artwork by Fae Merriman, my daughter. Link to comment Share on other sites More sharing options...
gelly 32 Author Share Posted December 6, 2018 Lmao. I'm dumb. It's for new /posts/, not new threads. Okay, it's definitely working, then! Thank you so much, @Morrigan! I appreciate it ❤️ 1 Link to comment Share on other sites More sharing options...
Admin Morrigan 1,825 Admin Share Posted December 6, 2018 No problem. Glad I could help. ❤️ Profile set made by myself and original Artwork by Fae Merriman, my daughter. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now