Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: vbgamer45 on September 21, 2021, 01:19:09 PM

Title: How are these icons set?
Post by: vbgamer45 on September 21, 2021, 01:19:09 PM
How are these icons set?
icons.PNG
Title: Re: How are these icons set?
Post by: Arantor on September 21, 2021, 01:21:04 PM
IIRC the 'icon' reference in the big array in Admin.php drives some CSS to point to the image to use.
Title: Re: How are these icons set?
Post by: vbgamer45 on September 21, 2021, 01:22:16 PM
Was hoping I can override and set an icon somehow. Or do I have to do css?
Title: Re: How are these icons set?
Post by: Arantor on September 21, 2021, 01:34:09 PM
Think you'll need to do CSS :(
Title: Re: How are these icons set?
Post by: vbgamer45 on September 21, 2021, 01:49:36 PM
Thanks ok will look into it.
Title: Re: How are these icons set?
Post by: Antes on September 21, 2021, 03:53:16 PM
You need to add something like

.large_admin_menu_icon.<item-class>::before {
background-image: url('...') no-repeat;
}
Title: Re: How are these icons set?
Post by: vbgamer45 on September 21, 2021, 04:05:33 PM
Thanks do you advise just added it to html_headers instead of modifying the css file?
Title: Re: How are these icons set?
Post by: Antes on September 21, 2021, 04:16:03 PM
Quote from: vbgamer45 on September 21, 2021, 04:05:33 PMThanks do you advise just added it to html_headers instead of modifying the css file?

I advise not to touch any core file anymore... either hook your custom adminCSS via file or headers directly... While I don't have much knowledge in minimized content, i think @albertlast made it work with all files so you can hook your custom admin related CSS and minimization can put them togather so you no longer load many many files...

loadCSSFile is your friend I guess :)
Title: Re: How are these icons set?
Post by: vbgamer45 on September 21, 2021, 04:18:17 PM
Yeah was just debating if that was the best way if I create a single css file for each mod that has admin area. Or just override via a <style> tag.
Style tag seems less work.
Title: Re: How are these icons set?
Post by: Diego Andrés on September 21, 2021, 05:26:20 PM
Yea if it's just for the icon that's probably alright
Some of them you could just use one of the default icons too, e.g. ad seller could prob use the money icon
Title: Re: How are these icons set?
Post by: vbgamer45 on September 21, 2021, 05:46:18 PM
Hmm yeah got idea about the default icons.