[byebye-themes-part-deux 7f58d5b]
27 files changed, 383 insertions(+), 618 deletions(-)
- Started removing id_theme and we::$user['theme'] from Wedge, and turning theme previews into skin previews, things like that. The loadTheme function has a much simpler intro now, being 54 lines shorter. Still need to turn themes into skins entirely, notably all of the edit/copy/install code, but it's not as urgent, and I might remove them entirely and rely on FTP exclusively. (Most of the files in this commit are concerned by this, so I won't list them. I only need to list files when I need to quickly find a specific change I made in a large commit, really.)
* Rewrote the skin selector (both the plugin and Themes.php versions) to get rid of all theme code. Also used the opportunity to cache the results, so it'll save quite a bit of parsing on every page if you're using the SkinSelector plugin, really. Also, skin previews are no longer stored in the session variable, because if you can navigate your way through the skin selector in a preview state, then I'm sure you can make your decision immediately, without needing to browse the forum. I'm even considering removing the feature altogether, but as of now it's only using a couple of lines, so it's alright. (Load.php, Themes.php, Themes.template.php)
+ Proper support for choosing the 'default skin' from within the skin selectors, rather than just the currently default skin. e.g., choosing 'default skin' will reset your choice to what a guest would see, and if the admin changes the default skin, your skin will follow that choice. (Many files.)
! loadLanguage() no longer takes '+' separated strings as arguments. Oops. (Load.php)
- A very, very old bug: $file[3] was never used in loadLanguage(), meaning the last param was always declared for nothing. (Load.php)
- Removed id_theme from language_changes table. This is only half-done, I have yet to commit ManageLanguages with which I've been having problems. So, basically, the language editor won't work in the current commit. Sorry about that. (Load.php, install.sql)
* Moved issue_http_header() to Errors, the only place where it was used. (Subs.php, Errors.php)
* Note: $ssi_theme is now $ssi_skin, as could be expected. (SSI.php, Load.php)
@ Note: there's a bit of a hack in the skin code update. As of now, default skin = '', root skin = '/' and non-root skin = 'folder'. The slash in root skin doesn't match the non-root folder structure, but this is because I didn't want the extra slash to be stored in all non-root skin choices. That's probably a bad idea, but I'd still rather not have unneeded bytes in skin names, because of their varchar nature within database keys. If I can't live with that hack, I'll restore the starting slash on skin names.
@ Note: $context['skin'] is still being filled in, and represents the folder of your current skin, relative to the skin folder. The new $context['skin_actual'] is also interesting, as it holds your skin choice, which can include 'default', and is used internally in more places.
@ Note: listing here all database changes that need to be made by anyone who currently has Wedge installed. Remove boards:id_theme, add boards:skin_mobile based on boards:skin (haven't yet written this feature, though), remove language_changes:id_theme and update the associated keys, remove members:id_theme and members:id_theme_mobile, add a skin(20) key to members, and remove themes:id_theme. Also, you may want to go to your admin panel, and update the default skins, because the format has changed. You should also reset everyone's skins, for the same reason, or update them manually with phpMyAdmin.
27 files changed, 383 insertions(+), 618 deletions(-)
- Started removing id_theme and we::$user['theme'] from Wedge, and turning theme previews into skin previews, things like that. The loadTheme function has a much simpler intro now, being 54 lines shorter. Still need to turn themes into skins entirely, notably all of the edit/copy/install code, but it's not as urgent, and I might remove them entirely and rely on FTP exclusively. (Most of the files in this commit are concerned by this, so I won't list them. I only need to list files when I need to quickly find a specific change I made in a large commit, really.)
* Rewrote the skin selector (both the plugin and Themes.php versions) to get rid of all theme code. Also used the opportunity to cache the results, so it'll save quite a bit of parsing on every page if you're using the SkinSelector plugin, really. Also, skin previews are no longer stored in the session variable, because if you can navigate your way through the skin selector in a preview state, then I'm sure you can make your decision immediately, without needing to browse the forum. I'm even considering removing the feature altogether, but as of now it's only using a couple of lines, so it's alright. (Load.php, Themes.php, Themes.template.php)
+ Proper support for choosing the 'default skin' from within the skin selectors, rather than just the currently default skin. e.g., choosing 'default skin' will reset your choice to what a guest would see, and if the admin changes the default skin, your skin will follow that choice. (Many files.)
! loadLanguage() no longer takes '+' separated strings as arguments. Oops. (Load.php)
- A very, very old bug: $file[3] was never used in loadLanguage(), meaning the last param was always declared for nothing. (Load.php)
- Removed id_theme from language_changes table. This is only half-done, I have yet to commit ManageLanguages with which I've been having problems. So, basically, the language editor won't work in the current commit. Sorry about that. (Load.php, install.sql)
* Moved issue_http_header() to Errors, the only place where it was used. (Subs.php, Errors.php)
* Note: $ssi_theme is now $ssi_skin, as could be expected. (SSI.php, Load.php)
@ Note: there's a bit of a hack in the skin code update. As of now, default skin = '', root skin = '/' and non-root skin = 'folder'. The slash in root skin doesn't match the non-root folder structure, but this is because I didn't want the extra slash to be stored in all non-root skin choices. That's probably a bad idea, but I'd still rather not have unneeded bytes in skin names, because of their varchar nature within database keys. If I can't live with that hack, I'll restore the starting slash on skin names.
@ Note: $context['skin'] is still being filled in, and represents the folder of your current skin, relative to the skin folder. The new $context['skin_actual'] is also interesting, as it holds your skin choice, which can include 'default', and is used internally in more places.
@ Note: listing here all database changes that need to be made by anyone who currently has Wedge installed. Remove boards:id_theme, add boards:skin_mobile based on boards:skin (haven't yet written this feature, though), remove language_changes:id_theme and update the associated keys, remove members:id_theme and members:id_theme_mobile, add a skin(20) key to members, and remove themes:id_theme. Also, you may want to go to your admin panel, and update the default skins, because the format has changed. You should also reset everyone's skins, for the same reason, or update them manually with phpMyAdmin.