Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: eja8170 on January 31, 2018, 03:54:39 AM

Title: Set each category on Index to have an IMAGE instead of TEXT.
Post by: eja8170 on January 31, 2018, 03:54:39 AM
Hi! I am trying to get the category on my forum index to have an image (which will have text on it already) to replace the words for the category (as they don't really match what I'm trying to do with the rest of my site's design. I am absolutely baffled as to how to code this without messing something else up. Please, if anyone has a solution please help.

Again, this would be for a category image, NOT a board.
Title: Re: Set each category on Index to have an IMAGE instead of TEXT.
Post by: Pipke on January 31, 2018, 04:22:05 AM
check this topic (https://www.simplemachines.org/community/index.php?topic=58353.0)
Title: Re: Set each category on Index to have an IMAGE instead of TEXT.
Post by: Kindred on January 31, 2018, 11:58:23 AM
no no no no no....   adding html to the category or board description is a **BAD** idea.

There is a description running about on how to do something similar with CSS. do that. Do not use HTML in the description (that is not allowed in 2.1 anyway)
Title: Re: Set each category on Index to have an IMAGE instead of TEXT.
Post by: Pipke on January 31, 2018, 12:42:26 PM
Quote from: Kindred on January 31, 2018, 11:58:23 AM
no no no no no....   adding html to the category or board description is a **BAD** idea.


https://wiki.simplemachines.org/smf/Images_-_How_do_I_add_images_to_the_board%27s_description

thought this works the same for categories?
Title: Re: Set each category on Index to have an IMAGE instead of TEXT.
Post by: Illori on January 31, 2018, 12:47:32 PM
that is outdated advise and we no longer recommend it for anywhere in SMF.
Title: Re: Set each category on Index to have an IMAGE instead of TEXT.
Post by: eja8170 on January 31, 2018, 02:41:49 PM
So is there.. an actual solution that will give me what I want?
Title: Re: Set each category on Index to have an IMAGE instead of TEXT.
Post by: Antes on January 31, 2018, 02:58:12 PM
You can do it with simple tricks but problem is Curve (SMF2.0's default theme) using images to show most of the graphic output which limits lots of things. Like you can't use images bigger than 31px (height) on category headers unless you go ahead and change cat_bar / catbg into CSS based headers.
Title: Re: Set each category on Index to have an IMAGE instead of TEXT.
Post by: eja8170 on January 31, 2018, 10:09:59 PM
Well, I am able to do BOARDS with CSS code, but is there a CSS code for this ANYONE knows of?