Quote:
Originally Posted by KuraFire
That's currently an issue with the HTL, yes. It will insert them into your default style.
I'm looking into ways to improve this situation. For instance, not everyone will want the templates added to EVERY style, yet some people do. However, I can't just have them be imported into the MASTER style unless people are okay with having to manually re-import all templates for Each hack after every vBulletin upgrade they do (vb upgrades delete the master style first and then recreate it).
Maybe I should hold a poll about that.... and see if I can create some sort of feature (like List All Modifications) that reiterates over step 3 for ALL the hacks in one single sitting (ie. it will do the Import Templates step for every hack that has templates to import).
If I can make the latter, and import templates into the master style.... the only thing people would no longer have is having their templates appear in red (== non-default template) in the Style Manager.
*sigh* choices choices...
Anyhoo, as you can see, I'm going over many various possibilities to solve that...
|
The only ideas I can think of are:
1) This may be a pain in the butt (especialy for those with it already installed), but have the HTL, upon installation:
- create a non-visible to users global "HTL Global Templates (do not remove)" style
- iterate through all available styles and make "upper level" templates (i.e. - no parents) have the parent of the "HTL Global Templates" style
Then, each "install" would apply the new templates to the "HTL Global Templates" style and all style underneath would have the new templates available to them. Since changed templates are done "by hand", the admin / installer person could choose to either apply the template changes to the "HTL Global Templates" for every template to inherit (except ones that have those templates already changed) and / or specific templates only.
2) Have the importing of new templates display a page with all styles (user selectable and not) list like:
- Parent Style 1
- Sub 1 Style 1
- Sub 1 Style 2
- Parent Style 2
- etc.
Each style (whether user selectable or not, or parent or sub) would have a checkbox where the admin / installer person would select as many (or few) styles to apply the new templates to. On second thought, maybe just have the parent styles with checkboxes (but still show sub styles), since the code would probably error out if the new templates weren't available.
3) Automatically apply the new templates to all parent (or all styles, although that may be overkill).
4) Apply all new templates to built-in master style and provide a utility to reapply all new templates from all hacks marked as installed.
The problem that I see with option 2 and option 3, is if a new "parent" style is created. There would need to be a way to apply each hacks new templates to new parent styles, or else users could run into problems and not realize what the issue really is.
The only time "new" templates would ever come into play is when a file specifically loads and either it "calls" the template, or one of the modified, already existing templates "calls" the template. If a file is having to load the template, then it should be available in every style that a user can choose (by either applying it to one master parent style, each parent style, or each style period).
Personally, my fav is option 1 (probably why it is 1

). The only thing that would make that cooler, is to have the functionality of "disappearing" (like the "master style") when the forum is not in debug mode. That would be good for the non-technical admins, so they don't get confused, but it could be bad for applying hacks (so maybe not). Reasoning for not would be that logically if one wanted to truely make a hack "global" then, rather than creating another "global" style, the changed templates should be changed in the "HTL Global Templates" style. Then all new and all changed tempaltes are available to child styles (i.e. - all styles), except in the case of the actual template being customized in the child style.
Actually, makes me think of another idea (don't you hate me yet

)... No matter what option you choose, a good tool for the HTL would be a child "checker" for changed templates. The "checker" would go through each "parent" and their children and make sure that "customized" templates in the parent aren't being overriden in the child (or maybe just on a per hack basis, and just go through the "changed templates" list). That way, if you have say 20 children and you had to customize a certain template on maybe one or two of them, but the new hack you installed changed that template (which would have been applied to the parent), then you could get a list of the children that may also need to be "hacked" as well (rather than just hoping you didn't miss one)...