August 3rd, 2009, 3:12 am1. Might work out, but as you mentioned, it does defeat the global template idea.
2. Hmm, something that comes to mind is that subsilver loads everything into one stylesheet.css file, while prosilver usually has them separated out. Perhaps we can check for those additional files?
3. A big issue I see is the page not looking right because it may not be using the same colors, link types, etc. A partial solution can be to inherit as much from the base style as possible.
4. I can't think of anything myself, but I do see 2 other votes, if you do have an idea, go ahead and post, even if an idea doesn't work out, and can help provide to a larger solution.
Making Primetime Work for Subsilver
Have you wanted to use Phpbb Primetime with a subsilver-based style, or are you not using phpbb primetime because you use a subsilver-based style, or you just want to see this mod reach its full potential, this article discusses phpbb Primetime's compatibility with subsilver-based styles
I started using phpbb2 about a year or two before the first beta release of phpbb3. After spending hours to install mods I had to spend even longer to figure out ways to modify my template files to work with these mods. When I started developing phpbb primetime, one of my very first objectives was to make sure this does not have to happen. I set out to create a system that would have global templates that can be used by all styles yet flexible enough to allow customization for each style.
If you read the introductory articles on phpbb primetime, you surely know that it has modules and each module has it's own template directory. That way with very little modifications, we can have primetime work without having to create templates for each active phpbb style. But if you want to customize a particular module's display for a particular style, you can do that too. Take for example, if you want to create a custom template for, say, the "Recent Topics" block, which is provided by the forums module and uses a template file called recent_topics.html (global), and you want this to be used only by a style called xxyz, you'd create a .html file (in this case, recent_topics.html) with the same name as the global template and place it in root/styes/xxyz/template/cms/forums/recent_topics.html.
But why doesn't this work with subsilver? Well, to avoid having to re-invent the wheel and avoid bloat, primetime uses prosilver's css classes for color (bg, bg1, bg2, bg3) and layout (left-box, right-box, column1, column2, etc). For blocks like the Recent Topics block, it is more than just a question of classes. For a tabular display of data, prosilver uses css but subsilver uses tables and this is the biggest problem.
So how can we make this work? Well, I can think of three possible solutions:
- Create custom template files for subsilver-based styles
Pros: Using existing classes limits bloating
- what if the style does not have those classes? Are styles always either pro/subsilver-based?
- Defeats the idea of having global templates
- Create additional css file for subsilver-based styles
Pros: No bloating for prosilver styles
Cons: Will have to be able to identify a style as either pro/subsilver-based
- Create primetime's own css classes for layout and diplay and use it for all styles
Pros: Primetime will not depend on any style
Cons: Possible bloating as we're creating css classes that prosilver already has
- Other (please post comment)
So what do you think? Please let me know.
September 17th, 2009, 2:23 amI vote for number 3. Your own css classes. Anything to make it a more seperate set of files. Would solve a bunch of support issues before they get started and makes things a bit more flexible when porting.
February 3rd, 2010, 10:30 amAfter almost successfully porting a subsilver style I know that the easiest way is to make custom CSS for subsilver. Use the /style/theme/*.css and add css to THAT, then add subsilver tags to the div blocks to fit the new styles.
If css includes tr or td then css is subsilver (usually). Vice Versa...
The hardest part of porting the theme over was getting the theme specific global files to run without error. (Posting_editor.html, etc.) Then getting tr/td css data to port into div and span files (make the nightmares go away!)
BUT most of the important css modifications added to .cms-block worked well. Its still hard to add block title specific details without adding more classes to the blocks.
So I'm leaning on 3, as it may bloat things down a little, it increases flexibility and decreases workload A LOT.
A subsilver install.xml for /(Subsilver theme)/template/*.* would be VERY useful and I believe that all the global/root mods work with subsilver styles (still getting my white screen of death when posting on the subsilver style).