Phpbb Primetime


Not your daddy's portal

Categories

Who is online

In total there are 11 users online :: 2 registered, 0 hidden and 9 guests

Most users ever online was 84 on December 7th, 2011, 11:36 pm

Registered users: Bing [Bot], Google [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
(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
4
24%


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


Create primetime's own css classes
7
41%


Other
2
12%


 
Total votes : 17
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

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 1015 post(s).

View all Articles (items) by Blitze
Search all posts by Blitze

Comments

deadeye536
deadeye536
August 3rd, 2009, 3:12 am
1. 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.

nextgen
nextgen
September 17th, 2009, 2:23 am
I 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.

Drenferalis
Drenferalis
February 3rd, 2010, 10:30 am
After 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).

  • Login
Username:

Password:


Remember Me
Hide Me
Register
  • Topics Calendar
May 2013

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 31
cron