Storing icon set states for different themes in the database
| Project: | Icon |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | ximo |
| Status: | closed |
Jump to:
I realised that the module shouldn't store the state (enabled/disabled) of icon sets in the systems table, as that would mean all enabled icon sets would be made available to all enabled themes. That's not always what people want.. I'm seeing a loooong list of possible icons to choose from, when you really only want to choose from 3 sets in one theme.
So I'm thinking of creating a new table, icon_sets, that stores the states of all icon sets on a per-theme basis. All available icon sets (with their info, etc.) should still be stored in the system table.
icon_sets
varchar(255) iconset <- links to name of icon set in system table
varchar(255) theme <- links to name of theme in system table
int(11) status <- 1 or 0
I'm no database expert, so my concern is whether this is a good idea or not? This would require joins when fetching iconsets per theme. But as this is only done when configuring icon sets and manually selecting icons, and then cached, I have a feeling it doesn't matter. Still, I'd like someone who knows SQL well to tell me what's the best way forward.
Or should I keep it simple and make enabled icon sets available to all enabled themes?

#1
After talking to someone who are good at databases, I went with using an
iconsetstable, with the following fields:varchar(255)
iconsetvarchar(255)
themeint(11)
statusint(11)
weightThe status for icon sets in the
systemtable now act as a "global status", in case we want to allow the user to select icon sets that should be globally enabled throughout all themes.#2
#3
Automatically closed -- issue fixed for two weeks with no activity.