[cXF] Coloured Node Icons

[cXF] Coloured Node Icons

BassMan

Well-known member
I can't get the subforum icon changes with a new FA icon, i tried many times but fail.
This is my last code...

Less:
.node.node--id66 {
    
    &.node--forum {

        .node-icon i:before {
            .m-faBase();
            .m-faContent(@fa-var-bug);
        }
        
        .node-icon i:before, .subNodeLink.subNodeLink--forum .subNodeLink-icon:before {
            .m-faBase();
            .m-faContent(@fa-var-bug);
        }
        
    }
    
}

This code works for the forum displayed in its parent forum view but not on homepage...
 
I can't get the subforum icon changes with a new FA icon, i tried many times but fail.
This is my last code...

Less:
.node.node--id66 {
   
    &.node--forum {

        .node-icon i:before {
            .m-faBase();
            .m-faContent(@fa-var-bug);
        }
       
        .node-icon i:before, .subNodeLink.subNodeLink--forum .subNodeLink-icon:before {
            .m-faBase();
            .m-faContent(@fa-var-bug);
        }
       
    }
   
}

This code works for the forum displayed in its parent forum view but not on homepage...
Check here: https://xenforo.com/community/threads/cxf-change-default-fa-node-icon.172082/#post-1542955
 
Hello,

You mean here?
Screenshot 2023-02-27 at 08.35.10.png

Add this code:
Less:
/* for read node */
[data-container-key="node-212"] .node.node--depth2.node--forum.node--read .node-icon i:before {
    color: #9E5596;
}
/*for unread node */
[data-container-key="node-212"] .node.node--depth2.node--forum.node--unread .node-icon i:before {
    color: #9E5596;
}
 
Last edited:
Yep those ones, but weirdly your code doesn't work.
Less:
/* forum suggestion */
[data-container-key="node-57"] .node.node--depth2.node--suggestion.node--read .node-icon i:before {
    color: #F2930D;
    opacity: 30%;
}
[data-container-key="node-57"] .node.node--depth2.node--suggestion.node--unread .node-icon i:before {
    color: #F2930D;
}


/* forum general */
[data-container-key="node-48"] .node.node--depth2.node--forum.node--read .node-icon i:before {
    color: #F2930D;
    opacity: 30%;
}
[data-container-key="node-48"] .node.node--depth2.node--forum.node--unread .node-icon i:before {
    color: #F2930D;
}
 
The data-container-key for your Suggestions node is node-39. Inspect the page where that subforum is.

In other words, the node ID is from the parent node.
 
What you are showing here (in the second screenshot) is the filter bar. Try with this code (haven't tested) in the extra.less template:
Less:
[data-container-key="node-53"] .block-filterBar {
    background: red;
}

Change the node number and background value.
 
Perfect! You are the best! ;)

Do you perhaps have any advice on how I can fill the empty field with the name and pimp it up? Just like in the picture. With the forum description.

filtercolor.webp

Best regards,
Chris
 
In that case, I would rather change the code to this:

Less:
[data-container-key="node-53"] .p-body-header {
    background: red;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
}

Now you won't have duplicated forum name and the forum title will be in colour. Maybe you will like this better.
 
You are simply awesome, my friend! :love:(y)
Much better!!
Do you have any other ideas on how I can change the font color for the forum description? ;)

bvb-farben.webp

I'm almost a little ashamed, but if I had such a helpful and competent person like you "in charge"...how would you enhance/highlight these football club forums?
I was thinking of a club logo that would be integrated in front of the respective forum name?!
Is this also possible with modification? Or is there an addon needed/is there for this?

vereinsforen.webp

Thank you very much in advance for your great help and support. I just have the best memories of the good old vBulletin 3 days in the early and mid-2000s! :giggle:


Best regards,
Chris
 
Do you have any other ideas on how I can change the font color for the forum description? ;)
Add this to your extra.less template:
Less:
[data-container-key="node-53"] .p-description {
    color: #fff;
}

I was thinking of a club logo that would be integrated in front of the respective forum name?!
Is this also possible with modification? Or is there an addon needed/is there for this?
Maybe this can help: https://xenforo.com/community/resources/cxf-node-icons-with-image.7490/
 
Back
Top Bottom