More website questions! I’m going to split these over several posts to avoid confusing myself.
----
I currently have a spiffy php file (skinChooser.php) for skins. It checks to see what skin has been saved in the cookie, verifies that it’s valid - that kind of thing. Inside the file I have an array declared that contains both of my skins’ names. I want to start including more information than just skin name. I’m thinking stuff like “short name”, “full name”, “description.”
One thought was to store this in a database. That way skinChooser could look up said information. The advantage is that I wouldn’t have to modify skinChooser when I make a change. The disadvantage is that my webhost is slow. I’m already starting to see some delay opening pages. Additionally, most pages would not care about this additional information anyway, only one page (themes.php) would. Perhaps the time wouldn’t be much of a factor, and then I would have the information easily available in case I want to have some other file aware of it.
Another thought is to store it in the additional information in the skinChooser (or themes). That way no database call is needed. It would require me to update the files whenever I want to make a change, and there’s some risk that I would forget and the two files would fall out of sink. Perhaps this is not horrible because I have a function validSkin() in skinChooser, so at the very least I would not display old or removed skins.
A final thought is a hybrid of the two. I can have an array of skin names, just as before, and have only the functions that need the additional information call the database. I think this is more work than its worth.
What do you think/what would you do? Keep in mind the number of skins is, and will likely remain, small (currently 2). I have vague plans to add more, but not an idea of what I want them to look like and it takes me a couple weeks to be happy with a new skin.