Articles
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
Poll
Global Templates
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.
The Problem
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.
The Solution
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
Cons:- 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.
About the Author
Search all posts by Blitze
Blitze has been a member since October 13th, 2007, 3:08 pm. He/She has posted a total of 4 Articles item(s) for a total of 707 post(s).
View all Articles (items) by BlitzeSearch all posts by Blitze
Other Articles by Blitze
• How to Create a Primetime Block
• HOW TO: Creating a primetime module (PART 1)
• Introducing Phpbb Primetime
• HOW TO: Creating a primetime module (PART 1)
• Introducing Phpbb Primetime
