Skip to main content
Topic: Post and Board icons  (Read 8303 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Post and Board icons

Wouldn't it be nice to have them as separate than embedding into a single image ? Not so easy for all to figure out. Or perhaps a mod which will allow use post, board icons of our choice..

Re: Post and Board icons

Reply #1

Oh yes! +1

Re: Post and Board icons

Reply #2

I believe that this is very convenient way of doing things faster when you have a single file. It shouldn't be hard to separate this using the way I mentioned in the other post. In the CSS file you have a image-url and below this you have CSS that tells in what position the image needs to be read from.

Unfortunately as I said, there is no way I can show this before I come back from holidays.

Re: Post and Board icons

Reply #3

I think you mean this part of the CSS file:

Code: [Select]
/* $BOARDICONS */
/* ------------------------------------------------------- */
.board_icon {
display: block;
float: left;
width: 48px;
height: 48px;
}
.board_key:before {
display: block;
float: left;
height: 24px;
width: 26px;
content: "";
}
.category_boards .board_icon, .board_key:before {
background-repeat: no-repeat;
background-image: url(../../images/_light/board_icons.png);
}
.on_board {
background-position: 0 0;
}
.on2_board {
background-position: -72px 0;
}
.off_board {
background-position: -144px 0;
}
.redirect_board {
background-position: -216px 0;
}
.new_some_board:before {
background-position: -300px -14px;
}
.new_none_board:before {
background-position: -372px -14px;
}
.new_redirect_board:before {
background-position: -444px -14px;
}
So the solution can be to tell the forum that it has to use single images for on, on2, off, and the new stuff. For example:
Code: [Select]
.on_board {
background-image: url(../../images/_light/board_icon_on.png);
}
Not tested.

But what needs to be done with:

Code: [Select]
.category_boards .board_icon, .board_key:before {
background-repeat: no-repeat;
background-image: url(../../images/_light/board_icons.png);
}

Re: Post and Board icons

Reply #4

This is the exact thing that I meant.

I think that if you remove this part or use display none it should be okay.

Re: Post and Board icons

Reply #5

So a mod won't be difficult. :D

Re: Post and Board icons

Reply #6

A mod could be easily written ;)


Re: Post and Board icons

Reply #8


Well, if it is - which one of you is going to write this mod? ;)

I would be very glad and grateful to use it O:-) for ever and ever and ever...

Re: Post and Board icons

Reply #9

I won't have time for it until Friday.

Re: Post and Board icons

Reply #10

Quote from: CrimeS – I won't have time for it until Friday.
Quote from: CrimeS – I won't have time for it until Friday.
Quote from: CrimeS – I won't have time for it until Friday.
Quote from: CrimeS – I won't have time for it until Friday.

We can wait will next week ;)

Re: Post and Board icons

Reply #11

A first very basic try:
https://github.com/emanuele45/BoardIcons

You should create (ooops I forgot to add it lol) a directory "boardicons" in the "images" directory of the default theme and of your "custom" theme (this last is optional).

Then you can start adding files with a certain name:
default_on.png
default_off.png
default_on2.png
default_redirect.png
If you add only these files then all the icons will be replaced by those ones (including keys and the end of the board).
If you want to add a different icon for each board, you can use this name scheme:
1_on.png
1_off.png
1_on2.png
1_redirect.png
where "1" is the id of the board.

All the boards with a "custom" icon will use that custom one, the others will use the default you set (default_*.png) or the default of the theme.

If you are using different icons for each boards the addons will hide the legend at the end of the board index.

I may have missed something, for the moment I'm too lazy to write an admin interface, in the future if anyone is interested he can poke (don't worry, I'm not going to code it unless I'm in a good mood :P) and/or code it. ;D

Quote from: CrimeS – I won't have time for it until Friday.
Arg... there was no post when I started coding!! :'(
Well, feel free to code your version! ;D
I guess something like this should end up into 1.1... O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: Post and Board icons

Reply #12

Great! I will use this one too! Thank you! :)

Re: Post and Board icons

Reply #13

 emanuele has not tested it. O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: Post and Board icons

Reply #14

So? Let your customer test it like all others do. ;)