Jump to content

[Solved] Index Forum Icons (MyBB)


gelly
 Share

Recommended Posts

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

affbutton.gif

Link to comment
Share on other sites

  • Admin

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

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

@Morrigan Thank you! Is there something else I should be editing, because I don't see any change taking effect 😕

affbutton.gif

Link to comment
Share on other sites

  • Admin

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

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

@Morrigan

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css">

So the newest version, I presume!

affbutton.gif

Link to comment
Share on other sites

  • Admin

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.

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

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 by perry the platypus

affbutton.gif

Link to comment
Share on other sites

  • Admin

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

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

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 ❤️

  • You're Welcome 1

affbutton.gif

Link to comment
Share on other sites

  • Admin

No problem. Glad I could help. ❤️

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.