PhpBB theme thoughts

classic Classic list List threaded Threaded
Assigned to bas at priority
 3 
(Normal)
6 messages Options
bas
Reply | Threaded
Open this post in threaded view
|

PhpBB theme thoughts

bas
Administrator
I looked at PhpBB's theming system. A theme in PhpBB is basically a collection of css files, html template files, and images. The naming of most of the files seem to be consistent between themes.

Each theme PhpBB theme contains a file called "stylesheet.css" which includes all other css files. You can actually make blasma look vaguely like a PhpBB theme, if you download a PhpBB theme and you replace the reference to "site.css" in Threads_page.luan with a reference to the stylesheet.css file in the theme folder. It is a very vague resemblance though, probably because the html tags in blasma are different from the ones in PhpBB.

The html template files seem like they provide the basic layout of a page. They contain lots of words in curly brackets {LIKE THIS}, I presume the bracketed stuff is templates that are to be substituted by some other part of the program.

There are also 3 javascript files: ajax.js, timezone.js, and forum_fn.js. But I do not think they are a very significant part of the theme. There is also no php in the themes. Bulk of the theme seems to be just css files, html templates, and images.

Overall, I was surprised at how simple PhpBB's theming system seems to be.
Reply | Threaded
Open this post in threaded view
|

Re: PhpBB theme thoughts

fschmidt
Administrator
Can you link to the PhpBB theme docs?  Is there a hosted PhpBB site where we can test theming?

How is it different from Tumblr?

I originally implemented Tumblr-like theming for Blasma but then I ripped it out.  This is based on my experience with NAML which is the theming for Nabble.  The basic problem is that all these theming systems are based on model/view separation and don't allow logic in the view.  But in real life, logic is needed.  And Luan is almost as simple as a theming language if just used for that purpose.  Maybe we can compare PhpBB with Luan/Blasma and see.
bas
Reply | Threaded
Open this post in threaded view
|

Re: PhpBB theme thoughts

bas
Administrator
Here is a page that describes theming in PhpBB:

https://www.phpbb.com/styles/create/

I am not aware of a good site for hosting PhpBB. For testing, I just downloaded PhpBB on my computer and ran it on an apache server.

I am not sure how the theming is different from tumblr. I didn't notice any differences in capability in the two systems but maybe I do not know enough about them. I also have not looked at the tumblr theme source code because I do not know if it is available online. You can look at the PhpBB theme source code by downloading a theme here and unzipping the folder:

https://www.phpbb.com/customise/db/styles-2

PhpBB html templates seem to contain logic in comments, to be processed by some other part of the software. I see lines like
<!-- IF S_DISPLAY_ONLINE_LIST and U_VIEWONLINE -->
in the html template files. I do not know why they do it this way instead of using PHP.
bas
Reply | Threaded
Open this post in threaded view
|

Re: PhpBB theme thoughts

bas
Administrator
Actually the guide for making tumblr themes is here:

https://www.tumblr.com/docs/en/custom_themes

At first glance, it looks exactly the same to me as PhpBB themes.
bas
Reply | Threaded
Open this post in threaded view
|

Re: PhpBB theme thoughts

bas
Administrator
In reply to this post by fschmidt
Here are the demo changes I made to the PhpBB theme:

1. changed colors (colours.css)
2. switched columns (forumlist_body.html)
3. Detect login (forumlist_body.html)
4. Indent posts (viewtopic_body.html)
Reply | Threaded
Open this post in threaded view
|

Re: PhpBB theme thoughts

fschmidt
Administrator
I added a test module.  You enable it by adding this line to your configuration.
require "site:/modules/test/Test.luan"
I will explain tomorrow.