[cXF] Icons in Visitor menu

[cXF] Icons in Visitor menu

BassMan

Well-known member
BassMan submitted a new resource:

[cXF] Icons in Visitor menu - DIY guide for icons in Visitor menu.

Would you like to have icons in Visitor menu like this?

View attachment 196355


Add this to your extra.less template:

Less:
/* Icons in Visitor menu */
.menu-content.js-visitorMenuBody a.menu-linkRow {
    &:before {
        .m-faBase();
        padding-right: 5px;
    }
    &[href*="/whats-new/news-feed"]:before {
        .m-faContent(@fa-var-rss);
    }
    &[href*="/search/member"]:before {
        .m-faContent(@fa-var-comments);
    }...

Read more about this resource...
 
I couldn't add a key icon.
Css add Code;
CSS:
        &[href*="/account/xenforo-license"]:before {
            .m-faContent(@fa-var-key);
        }

Screenshot;

Ekran Alıntısı.webp
 
Interesting, I've updated the code. Check for the padding-right. Just uncomment it and adjust the value if needed.

I don't need this code inside to work as it should.
 
This doesn't work at all on ThemeHouse UIX. I'm assuming because TH customizes a lot of stuff. Is there any other solution? I had a similar mod on XF 1.5 and it was really cool.
 
This doesn't work at all on ThemeHouse UIX. I'm assuming because TH customizes a lot of stuff. Is there any other solution? I had a similar mod on XF 1.5 and it was really cool.
I've just tested and it works on UI.X. Make sure you've pasted the code to the right style.
 
K, working. There is no space between icons and the menu items and text tho. hehe And the icons are the exact same color as text lol
 
Last edited:
@BassMan is there an easy way to apply this to the Conversations and Alerts menus?

Some time ago I've done it by adding a Template Modification, along with the related CSS rules in extra.less.

But then I've updated to XF 2.2.12, and today I'm checking if I have to edit those templates that are changed. I've noticed that there are some differences on the new PAGE_CONTAINER (I have quite a few Template Modifications on this one) so I've been adding my edits to match the new template.

The problem is that with the old modifications from the previous XF version I still see all icons in XF 2.2.12, while if I put the new code bunches in FIND and in REPLACE fields, the TEST button shows the differences while the icons in the front end are not shown.

So I was wondering if this can be done from within extra.less only, just like yours.
 
@BassMan is there an easy way to apply this to the Conversations and Alerts menus?

Some time ago I've done it by adding a Template Modification, along with the related CSS rules in extra.less.

But then I've updated to XF 2.2.12, and today I'm checking if I have to edit those templates that are changed. I've noticed that there are some differences on the new PAGE_CONTAINER (I have quite a few Template Modifications on this one) so I've been adding my edits to match the new template.

The problem is that with the old modifications from the previous XF version I still see all icons in XF 2.2.12, while if I put the new code bunches in FIND and in REPLACE fields, the TEST button shows the differences while the icons in the front end are not shown.

So I was wondering if this can be done from within extra.less only, just like yours.
Not sure where exactly you want it, by in Conversation menu you can add it here:

Less:
.menu-footer.menu-footer--split a {
    &:before {
        .m-faBase();
        /*padding-right: 5px;*/
    }
    &[href*="conversations"]:before {
        .m-faContent(@fa-var-envelope);
    }
    &[href*="conversations/add"]:before {
        .m-faContent(@fa-var-edit);
    }
}

... to have it like this:
Screenshot 2022-12-22 at 11.16.43.webp
 
Yep! 😃
That's exactly what I want! (y)

This is advanced coding that I still don't know 😅

So, to extend this to the alert menu as well, I assume that I only have to add the related href within the same rule, since I see the footer block class is the same "menu-footer.menu-footer--split", right?

alerts icons.webp

Thanks a lot buddy!
 
Back
Top Bottom