Style Chooser

Who is online

In total there are 3 users online :: 1 registered, 0 hidden and 2 guests

Most users ever online was 42 on September 4th, 2009, 10:45 am

Registered users: Yahoo [Bot]


Legend :: Administrators, Primetime Staff, Registered users

Recent Articles

Articles

Making Primetime Work for Subsilver

by Blitze on June 27th, 2009, 10:25 pm
Rating:
(2 votes)

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
How can we make Primetime work for Subsilver

Create custom template files for subsilver-based styles
3
19%


Create additional css file for subsilver-based styles
4
25%


Create primetime's own css classes
7
44%


Other
2
13%


 
Total votes : 16
How can we make primetime compatible with subsilver-based phpbb styles. Well, first a little background information. How do templates work in phpbb primetime?

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:

  1. 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

  2. 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

  3. 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

  4. Other (please post comment)


So what do you think? Please let me know.

 

About the Author
User avatar

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 Blitze
Search all posts by Blitze

Advertisement

Login

Username:

Password:


Remember Me
Hide Me
Register

Topics Calendar

September 2010

S M T W T F S
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30