Hi there,
Kristoffer here, or Jansson as I’m also called. If you haven’t heard of me, I’m the guy behind PunRes. I’ve been a user of PunBB since sometime in beta, and a developer since November. What’s always been fascinating to me about PunBB is that the code is so simple and structured that anyone with even the smallest PHP knowledge are able to modify it to their own needs. This is very important to PunBB as it ships with a rather slim set of features.
It is almost impossible to make software that appeals to everybody. The reason for this is that everybody’s needs are different. However, there is a solution, and it’s quite simple: Let the users decide their own set of features! As I write this, there are 269 projects/modifications at PunRes and new ones are created at a regular basis. All the common features are there, private messaging, polls, attachments, gallery, wiki, you name it. There are several reasons modding has become such a widespread thing in the PunBB community. Firstly, because the code is kept simple enough for most people to understand it, we almost get this for free by not implementing huge and complex systems in the main package. Secondly, modding has been around since the release of PunBB 1.0, and even before. Thirdly, the availability. PunRes has always been there to keep all mods in one place for the users to browse and discuss modding.
There is only one downside with mods, and it’s huge. Actually, there’s two, but let’s concentrate on one of them. It relates to the way in which mods are installed. Installing a mod requires the user to modify the source manually. This can be a bit complicated for the inexperienced user, and there are often mistakes. Another problem is when updates to PunBB are released, you either have to install all the mods again manually, or apply the PunBB update manually, either way it can be very annoying. This also indirectly leads to less security because some people don’t bother updating at all. Wouldn’t it be awesome if you could just install a mod by a single click on your mouse?
Enter PunBB 1.3.
With 1.3, there will be Extensions. Extensions are not mods, though sometimes referred to as “the mods of 1.3″. Mods and extensions are completely different things created to solve the same problem; let the user decide. The extension, instead of editing the source directly, hooks into the code at specific locations causing PunBB to behave different. The source of the extension is stored separately in the database and can therefore be put in and be taken out at any given time without anyone touching a single line of PHP code. I will not go into any technical details at the time but focus on the advantage of this new system. Apart from the obvious ease of installation, it also makes updating PunBB as easy as cake.
Mods have never been officially supported, and Extensions in themselves won’t be either. However, now when the developer team consists of more than one guy we will be able to create “official extensions” that are sure to always be compatible with the latest version, plus they will come with the same exceptional quality as the rest of PunBB. It will also allow us to update the extensions without having to release a new version of PunBB each time, making the users that doesn’t use the feature less annoyed. Mods will probably continue to exist as they do today, though they just won’t be as many. PunRes will be focusing on extensions and mods will be shared primarily through the wiki.
What about the Plug-ins?
Yes, the plug-ins will also be replaced by the extension system as it will be possible to acquire the same functionality through extensions.
As I said above, there are two problems with today’s mods, the first one is the user’s problem, and the second one is the developer’s. Feel free to speculate about what it is, it shouldn’t be too hard to guess. There is a solution to the problem in the making, but I won’t reveal that just yet, it has been hinted about on the forums though :-)
Take care,
Kristoffer
The Extensions system sounds GREAT. I love PunBB, but I’ve always wished that there was some way to have “plugins” like WordPress does. I hate the idea of hacking the “core” of an app like PunBB (easy upgrades are a must).
I wonder, though, is there something planned like “themes” in WordPress. It might be nice to have a way to hack up your own main.tpl and put that into a different “themes” folder, because I almost always edit the main.tpl file whenever I set up a PunBB installation.
February 15th, 2007, at 3:49 am #more teasing… for shame. ;-)
February 15th, 2007, at 9:30 am #Trevor: Each style is now in its own folder and custom tpl files can be used by placing the tpl file in the style folder. If there are no tpl files in the style folder then the default tpl files are used. The tpl files now contain more replaced items enabling major board elements to be moved around. For example, if you wanted a style with a sidebar you could add a custom tpl file with an extra wrapping div, put the appropriate board elements inside it and then float it.
February 15th, 2007, at 12:14 pm #This is all sounding wonderful, and I’m really looking forward to the release of PunBB 1.3. You guys are doing a fantastic job!
A few questions though: has the extension system been implemented in the current 1.3 source tree yet? And if so, I don’t suppose there would be any kind of documentation or list of available ‘hooks’ around, so we may start developing extensions in time for the 1.3 release? I think it would be nice if there’d be a couple of extensions available at launch.
February 15th, 2007, at 1:59 pm #At the moment, the extension system isn’t fully implemented. There are a few things regarding the XML format for the extension manifest that we need to sort out and we have yet to add the bulk of the hooks. It is our intention to both release a list of all hooks as well as hold some kind of “call for hooks” in the forums. We will do this in time for a beta release so that people will have time to work on extensions before 1.3 is released.
February 15th, 2007, at 3:58 pm #I can’t wait !!! I hated editing the source & I hope this way will make it much easier to install and more developers will make extensions :)
February 15th, 2007, at 11:03 pm #It sounds good.
I find it interesting that the extensions source code will be stored in the database.
February 16th, 2007, at 12:43 am #Extensions sound great. Spam is getting out of control and I’ve taken a look at the captcha mod, but the installation looks like a hastle and will make upgrades painful. I’m really hoping that there will be a captcha extension that’s just a matter of copying some files into a directory.
February 16th, 2007, at 2:23 am #Ben,
For spam try these steps:
a) Turn on Rules, this throws off any automated signup bots.
b) Try the Akismet plugin, it’s stopped spam on one of my boards that was getting out of hand.
http://www.punres.org/viewtopic.php?id=1850
February 16th, 2007, at 3:02 pm #Thanks for the note about plug-ins. Now I don’t have to ask about configuring extensions.
February 17th, 2007, at 2:45 am #So, when is 1.3 going to be released?
TOTALLY KIDDING! ;oP
I’ve been resistant to installing mods because:
1) So often there are tons of pages / sections to modify
2) Makes upgrades more tricky
3) Unistalling is a total pain
4) Concerned multiple mods won’t play nice together
I really like the idea of taking the top 5 most requested mods and creating “official extensions”.
Right now I’m at an inflection point, for example: Private Messages Mod. Do I install this now and then hope I can convert it later, or do I hold out for the release of 1.3 and the PM extension? There are definite pros and cons to either choice.
Keep up the great work guys!
February 18th, 2007, at 9:44 pm #Just to let you know, there will be a private message extension available on release of 1.3, and it will upgrade 1.2.x private messages.
February 18th, 2007, at 11:38 pm #Installing and testing mods are what make Punbb fun!
Who am I kidding. I’ve always hated having a heavily modded installation of Punbb and then a new version comes out and you’re afraid to update because it may break your forum.
Keep up the good work guys. I’ve always loved using Punbb and I can’t wait to continue using it with the release of 1.3.
February 20th, 2007, at 2:22 am #About those themes: Is it like you describe in the 1.2 or 1.3 branch of PunBB, Paul? Can I develop my own theme for 1.2 without having to hack the original PunBB files, or do I have to wait for 1.3? If I have to wait for 1.3, I think I’ll wait with my custom theme until then, because it will be too much work doing it twice.
February 21st, 2007, at 11:26 am #Asbjorn: I was talking about 1.3. I wouldn’t actually use word “themes” because many people equate that with a full blown templating system. PunBB 1.3 will use the same basic system as 1.2 with the addition of per style page templates and a few more replaced items for the major blocks of markup. You will still need to do most of you styling via css. If you want to alter the existing markup you will need to edit the php files.
A note for everybody, this blog is for discussing the furture development of PunBB so just about everything you read hear relates to 1.3.
February 21st, 2007, at 1:22 pm #Ah ok, Paul. I’m looking forward to the release of 1.3, then! As I’d also prefer to do most styling in CSS, there are some things I’d like to change in the markup. I think WordPress has a pretty nice extension system here, where you can just drop a file in the theme folder called e.g. “page.php” that will display pages, and if it doesn’t exist, the default page will be displayed instead. That way, theme development is really simplified as you only have to develop the stuff you need to modify. Plus, it makes an upgrade totally safe since your theme code lives untouched outside of the original source code.
But as I understand, nothing of this sort is planned for 1.3? When will a more “full-blown” templating system be available? I don’t want much to be honest, just to be able to adjust the markup a bit and to do it without touching the original source of PunBB (which I will have to re-do on every upgrade).
February 21st, 2007, at 11:24 pm #Asbjorn: The short answer is that there are no plans to introduce templating.
February 22nd, 2007, at 5:50 pm #Paul meant, more than what’s already in. With an “all CSS” visual design, it’s quite easy to turn it around exactly the way we need (minus some CSS effects bug in rendition that need special markup, but we can leave without them). Distribute a couple CSS files, and there’s your template :)
If one really, really, wants to edit the markup, he can learn to use Subversion… that will solve 99.99% of the upgrade issues :)
February 23rd, 2007, at 12:24 am #I just made a test extension that adds a link to punbb.org in the navlinks. It’s nothing special, but clicking the install button and seeing it appear is great! :D
February 23rd, 2007, at 4:39 am #Hm, it’s a bit sad that you won’t introduce full templating to PunBB. Not because PunBB’s templates suck, but because PunBB is a good basis to build upon when you want to create a forum-based website with some extra functions. As I understand it, now you have only access to modify the looks of PunBB with CSS, but you don’t have access to modify the content in any way. Please correct me if I’m wrong here.
What I’d want to do for instance, is introducing more stuff in the template, like extracting information from other systems and showing it inside PunBB’s templates. Without a PHP-based templating system, that’s not possible.
February 24th, 2007, at 1:20 pm #Adding more things to the template? Certainly possible, that’s why we have the ability to include the output from other PHP files. And extensions can certainly mess with markup if they want to.
February 24th, 2007, at 1:32 pm #Right, extensions is surely a possibility. But with “ability to include the output from other PHP files”, do you mean editing the core PunBB files and adding PHP include statements? If so, that means upgrading PunBB removes those include statements, right? Not that it’s a big job putting them back in, but a template mechanism could circumvent it completely by separating the theme’s code from PunBB’s core. Just my ¢2. :-)
February 26th, 2007, at 11:13 am #No, I mean pun_include in the templates
February 26th, 2007, at 11:23 am #http://docs.punbb.org/faq.html#faq3_4
Aha, I see. Thanks for the information. :-)
February 26th, 2007, at 4:52 pm #No templating planned aye? :(
The default design is really nice for most users (kudos to Paul for all his hard work ;)
but is a real PITA if you want to make anything but the most minor changes, not to mention installing updates afterwards.
Seems a real shame to let this legacy follow into 1.3
I got away from tables years ago because of all the nesting. No tables in pun, but theres some serious nestin’ going on :)
much more than needed IMO.
cheers
March 2nd, 2007, at 8:30 pm #Gregk: Unfortunately not everybody is happy with minimalist design. That means providing enough hooks to, for example, add rounded corners and sliding door backgrounds. Some level of nesting is unavoidable if you want people to be able to apply styles without touching the markup.
In some ways I agree with you about templates. In the first place, it means each style only requires the markup needed to make that particular style work so you get lighter pages and better semantics. In the second place, it makes creating the markup a lot easier because the final result isn’t set in stone so I don’t have to worry about trying to think of every possible styling variation in advance.
The downside is nobody has yet come up with a simple NO OVERHEAD template system. The other downside is that if you have say, 20 templates sets (themes), installed then you have to maintain all of them everytime there is an upgrade which impacts on markup. A number of people like PunBB specifically because it avoids that problem. Templates certainly make life easier for skinners and for people wanting a bespoke style for site integration but they can be a real pain in the backside for forum admins.
March 3rd, 2007, at 12:54 am #Paul, let me describe you a simple opt-in templating system. You start out with a “template” folder. Inside this folder, you have 5 .tpl files, just like in PunBB today. You rename this folder to “theme” to better reflect what people can do with it (they can both change the looks with CSS files and change the markup with template files) and put a default CSS file inside so you start out with 6 files as the base PunBB theme.
To create a new theme, you create a new folder in the “theme” folder, e.g. “theme/MyTheme”. Inside this folder you create the files you want to override in the default theme. If you only want to override the CSS, you only create a CSS file. If you want to override the CSS and the “main.tpl” file, you create a CSS file and an “main.tpl” file. That way, PunBB’s default theme will take over when the selected theme doesn’t contain a given file, and it gives the theme author the option to create a theme system that either just contains a CSS file or contains a CSS file and 5 template files (or more, if he’d like to modularize things a bit by including files and such).
It’s not really that hard to create. When PunBB is to be rendered, it first looks for the “theme/MyTheme/main.tpl” file. If the file doesn’t exist, it includes the “theme/main.tpl” file instead. And so on for all of the different .tpl files.
March 4th, 2007, at 12:21 pm #Asbjørn: PunBB 1.3 has per-style templates ;)
March 4th, 2007, at 12:44 pm #However, that’s not really what people are asking for: there’s only so much you can do with PunBB’s templates.
Asbjorn: As Neal said, PunBB 1.3 has per style templates as you described. As Rickard pointed out to me the problem here is if you want to separate the markup its a lot more than 6 files. In fact, most of the files would have to be split in two, back end code in one and markup in the other.
The only system I can see working which overcomes the ease of maintenance problem would be a templating system that is purely for site integration i.e. the webmaster would create or obtain a templated theme which would be the only theme installed. There would then be a number of css styles for that theme which would be user selectable.
March 4th, 2007, at 2:26 pm #Ah, I see. Great to hear about the improvements coming in 1.3. Looking forward to it; let’s see a beta soon! :-)
March 5th, 2007, at 2:13 pm #Hey Paul =)
I totally understand what you posted in your reply.
Once 1.3 gets closer, maybe we could create a second uber-minimalist layout.
If we had a couple people interested to help maintain it, it wouldn’t be that hard to upkeep.
Not looking forward to keeping one up to date on my own though.
cheers
March 6th, 2007, at 6:40 pm #just wanted to add…
Out of all the forum and cms apps I’ve run over the years, TXP’s layout system is by far my favorite.
I have a big grin on my face just thinking about something similar for PUN ;)
over & out
March 6th, 2007, at 6:43 pm #How does TXP’s layout system work, Greg? And as to maintaining a simple layout template, I could help with that. As I have some comments on the default templates (they don’t include the required ‘xmlns’ attribute on the ‘html’ element (the validator doesn’t complain because it doesn’t really understand namespaces) etc), I’d like to cooperate in creating a simpler PunBB template.
March 7th, 2007, at 3:51 pm #Asbjørn,
I use Textpattern, it’s a very simple layout system with Pages, Forms and the Style.
Look for Defaults: Pages, Styles, Forms here:
March 7th, 2007, at 9:24 pm #http://textbook.textpattern.net/wiki/index.php?title=En/Main_Page
TextPattern looks neat. I don’t like the naming conventions all that much, but that’s just a matter of taste. Perhaps Textpattern can be used as a drop-in replacement for the PunBB templates in the future?
March 8th, 2007, at 3:35 pm #That would be bloating the system. TXP is not a templating system at all, it’s a full CMS. If a templating system would to be created in PunBB (and I haven’t yet seen anything going in that direction, apart from a very, tiny, small need on this from some users), I’m sure the dev team could do something by themselves.
March 9th, 2007, at 1:27 am #Oh, I just looked at the examples and wrongfully thought that it was a stand-alone templating system. Something similar to TextPattern’s template system would be nice to have in PunBB. Using the Cake framework as a basis for PunBB would make PunBB development easier and give a free template engine as well. Perhaps some food for thought.
March 9th, 2007, at 11:49 am #Oh, and the following article gives a really nice twist to the whole template discussion: http://www.sitepoint.com/article/beyond-template-engine
March 9th, 2007, at 11:57 am #Eventually, PunBB will have a templating system, as to when, it’s anybody’s point release guess.
Personally, I’d like to see a homegrown system in the spirit of Textpattern, where the designer is isolated from PHP and all they have to learn is Pun:tags to add to their XHTML knowledge.
The future looks interesting, I can see many uses for PunBB other than setting it up as a traditional forum.
March 9th, 2007, at 4:22 pm #I’m officially guessing that version 13.49 might have templates.
Although I don’t need the functionality of a template system, I’d still consider it a plus if separating the markup code made the php flies easier to read.
March 9th, 2007, at 11:23 pm #So since the source codes for the extensions are stored in the databse and taken out everytime when the page loads, won’t that mean more disk I/O(for the database part) since there’s no way for caching methods like eAccelerator or APC to store the bytescodes in the memory?
And it that case, if eAccelerator or APC is used for both punBB 1.2 and 1.3, then I assume tat punBB 1.2 will be much much faster, is that right?
Do I mistaken anything or does eAccelerator or APC caches the bytecodes from the source codes from the database to the memory as well?
April 11th, 2007, at 6:39 am #jamesb: The extension code is cached to .php files, so it would also benefit from a PHP opcode cache.
April 11th, 2007, at 6:52 am #Thanks for clearing it up. Can’t wait for punBB 1.3 to be released! :)
April 11th, 2007, at 1:42 pm #Wouldn’t a “proper” setup leave the markup to the template file?
May 19th, 2007, at 6:27 pm #guardian34: Yes, I think that’s Paul’s point. If, say, the markup for viewtopic.php changed slightly, the template file would need to be updated. If I had 20 styles, I would need to update 20 files.
May 24th, 2007, at 11:08 pm #