Advertisement:

Author Topic: 2.1 board icons  (Read 845 times)

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,955
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • What's Ur Beef
2.1 board icons
« on: January 06, 2019, 01:40:09 PM »
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.

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,259
  • Gender: Female
Re: 2.1 board icons
« Reply #1 on: January 06, 2019, 02:15:12 PM »
Code: [Select]
.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.
Energy follows attention.

There is nothing more precious than being yourself and following your heart.

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,955
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • What's Ur Beef
Re: 2.1 board icons
« Reply #2 on: January 06, 2019, 03:47:40 PM »
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.

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,955
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • What's Ur Beef
Re: 2.1 board icons
« Reply #3 on: January 06, 2019, 03:49:36 PM »
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,228
    • StoryBB/StoryBB on GitHub
Re: 2.1 board icons
« Reply #4 on: January 06, 2019, 03:53:09 PM »
You make one image with on/off/off2/redirect in it, like SMF does, and do it with CSS...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,955
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • What's Ur Beef
Re: 2.1 board icons
« Reply #5 on: January 06, 2019, 03:58:14 PM »
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.

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,259
  • Gender: Female
Re: 2.1 board icons
« Reply #6 on: January 06, 2019, 04:07:58 PM »
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.
Energy follows attention.

There is nothing more precious than being yourself and following your heart.

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,955
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • What's Ur Beef
Re: 2.1 board icons
« Reply #7 on: January 06, 2019, 05:24:20 PM »
I've been tryin this. I'll get it sooner or later, lol. :)

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,955
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • What's Ur Beef
Re: 2.1 board icons
« Reply #8 on: January 07, 2019, 11:43:08 PM »
Well, I cheated a bit and it still needs some work but here are a couple screenshots.