idk, check it yourself, but the ideas should
It works if it is done correctly. The other methods ppl are suggesting are too advanced, imo. Changes to templates are tricky if you don't know wut you are doing. That is why it is better whenever possible to make the changes in extra.less.This doesn't work either . It's not even display on forum.
ExampleCan I usee capacity css code instead of 2 png icons?
Less:.m-nodeImgIcons(@node-id; @unreadImage; @readImage: false; @height: 40px; @width: 40px) { .node--id@{node-id} { .node-icon i { &:before { content: none; } .node--read& { & when (@readImage = false) { -webkit-filter: grayscale(100%); filter: grayscale(100%); } } .node--forum&, .node--category& { & when (isurl(@unreadImage)) { background: @unreadImage no-repeat; } & when (ispixel(@height)), (ispixel(@width)) { height: @height; width: @width; } .node--read& when (isurl(@readImage)) { background: @readImage no-repeat; } } .node--page& { & when (isurl(@unreadImage)) { background: @unreadImage no-repeat; } & when (ispixel(@height)), (ispixel(@width)) { height: @height; width: @width; } } .node--link& { & when (isurl(@unreadImage)) { background: @unreadImage no-repeat; } & when (ispixel(@height)), (ispixel(@width)) { height: @height; width: @width; } } } } } // NODE IDS .m-nodeImgIcons(2; url("styles/xenforo/forum_new.png"); url("styles/xenforo/forum_old.png"); 42px; 42px); .m-nodeImgIcons(3; url("styles/xenforo/forum_new.png"); false; 42px; 42px); .m-nodeImgIcons(4; url("styles/xenforo/forum_new.png"); false; 42px; 42px); .m-nodeImgIcons(5; url("styles/xenforo/forum_new.png"); false; 42px; 42px);
I am using this method and is working very well to me.
And do you using it on TH nodes with UIX theme?
I said you need to watch live, I do not know how to guess from screenshots and there are no additions.And do you using it on TH nodes with UIX theme?
All the codes that have been provided should work with [TH] Nodes and UI.X based themes. I've used both together on previous sites without any problems and my test site on localhost has no problems either. You are either going to need to provide a link or give someone access to your site to see what the problem is.And do you using it on TH nodes with UIX theme?
All the codes that have been provided should work with [TH] Nodes and UI.X based themes. I've used both together on previous sites without any problems and my test site on localhost has no problems either. You are either going to need to provide a link or give someone access to your site to see what the problem is.
Did you tick the box that says "use images for node icons"?Thanks, the issue is, once I have css code into extra.less then the original icon disappears and the new png file is not appearing at all on forum.
Did you tick the box that says "use images for node icons"?
Copy and paste the code you have in css so we can see if something is missing.
If you follow my posts. You can change node icon for each node. And with last extra.less code you can set %50 opacity of read nodes.
open the node_list_forum template
Find below code.
PHP:<span class="node-icon" aria-hidden="true"><i></i></span>
Replace this code with follows.
PHP:<span class="node-icon" aria-hidden="true"> <img class="cticnbrdr" src="/styles/default/xenforo/icon/{$node.node_id}.png" alt="{$node.title}" /> </span>
Icon location: /styles/default/xenforo/icon/ this is icon location in FTP, you replace it with your own.
Icon name: Icon name should match with node id. That's mean your icon name for node id 5 should be 5.png
if you upload icon to ftp as named;
for example
node id 1 --> 1.png
node id 2 --> 2.png
node id 3 --> 3.png
node id 4 --> 4.png
your node icon change automatically. and if you add below code to extra.less, node icon will seen %50 opacity if there is no new posts in forum.
Less:/* Node Forum Icon Use - Start */ .node--read .node-icon { opacity: 50%; } /* Node Forum Icon Use - End */
Thank you! It works perfectly.open the node_list_forum template
Find below code.
PHP:<span class="node-icon" aria-hidden="true"><i></i></span>
Replace this code with follows.
PHP:<span class="node-icon" aria-hidden="true"> <img class="cticnbrdr" src="/styles/default/xenforo/icon/{$node.node_id}.png" alt="{$node.title}" /> </span>
Icon location: /styles/default/xenforo/icon/ this is icon location in FTP, you replace it with your own.
Icon name: Icon name should match with node id. That's mean your icon name for node id 5 should be 5.png
We use essential cookies to make this site work, and optional cookies to enhance your experience.