News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

2.1 board icons

Started by Bigguy, January 06, 2019, 01:40:09 PM

Previous topic - Next topic

Bigguy

So I am working on board icons on my site and I was just wondering something. It the screen shot you can see where I have placed new icons for each board. I was wondering....is there any SIMPLE way to overlay the new.gif icon when there is a new post in a board. If not that'c cool I figured I would ask.

Gwenwyfar

.board_icon a {
position: relative;
}

.board_icon {iconclass}:after {
content: "";
display: inline-block;
width: width;
height: height;
position: absolute;
bottom: 0;
right: 0;
background: yourimage;
}


You can also add things to "content" instead if you want to add text or the image directly there, but adding images may not work in some browsers.
"It is impossible to communicate with one that does not wish to communicate"

Bigguy

Ok, the code I use is css, that is what displays those icons. How do I use what you posted with what I have. I am trying to figure out how to do the cbi mod for 2.1. I also figured using css to do most of it would be the best way to go. I was trying to use two images like the mod used to. One on and one off. I can't figure how to switch between the two for a new post so I figured overlaying the new.gif image on top of the custom icon would give the same effect.

Bigguy

I also thought that the way it looks now was pretty cool and might just leave it like that with the original board icons to show new posts and the custom ones there just for eye candy so to speak.

Arantor

You make one image with on/off/off2/redirect in it, like SMF does, and do it with CSS...

Bigguy

Well, I had two images made. one on and one off, just to test. I could never get the on image to show with a new post. I wanted the off by default and on to be triggered with a new post. I know I will probably have to do something in the php code but I was trying to do it with just css. Personally I am not sure I can by myself but it is something I have been trying to work on slowly. I have been enjoying it and thought I would come for ideas or to find out if I am way off base, lol.

Gwenwyfar

That's what you replace in {iconclass}. There's "board_on" and "board_off" for that, as well as the others like redirect.

And no, what you have is not the same, so it will only stack.
"It is impossible to communicate with one that does not wish to communicate"

Bigguy

I've been tryin this. I'll get it sooner or later, lol. :)

Bigguy

Well, I cheated a bit and it still needs some work but here are a couple screenshots.

Advertisement: