1 (edited by Louis 2004-02-14 21:40)

Topic: Let's improve PunBB mod installation/building!

Rickard wrote:

Mods are good! We like mods :)

Then lets focus on the mods. Let's make it easier to create mods. Let's make it easier to install mods. Let's make it easier to update mods for newer versions of PunBB. Let's make it easier to find mods. Please post your ideas here.

My idea? Well, this is quite undefined and preliminary, but having worked on a few PunBB mods of my own and seeing the difficulty involved in updating modifications for new version of PunBB,  I feel that some kind of tool would make life easier for PunBB modification makers.

As a starting point for this discussion, please think about or answer the following questions.

* How do you start (creating, installing or udpating) a mod for PunBB? What tools do you use?

* What do you like about the way you (create, install or udpate) mods for PunBB right now?

* If you could change anything in the mod-building or mod-installing processes, what would it be? Why would you change it?

* What criteria would you use to judge the value of any improvements?

* What, if anything, makes you feel optimistic about the potential for improvement of the current mod-making or mod-installing processes?

* What are some examples of situations when you did not want to work on your PunBB mod? (Or when did you not want to install a mod?) Why do you suppose that is?

* Where do you think this course of action will eventually lead? How do you think the proposed tool or PunBB changes will make a difference to creating, updating or installing mods?

* What is your wish list for installing mods to PunBB? For easier integration of mods with PunBB? For a PunBB mod building tool?

We're just exploring the possibilities here. Write anything, be creative, explore crazy ideas and thoughts to their fullest. Every idea is good. Just don't stop typing ;)

Thanks everyone,


Louis.

PS. This isn't just for mod builders. If you use PunBB on your website and have tried installing a mod, just ignore the "mod building" and focus on "mod installing". Thanks.

Re: Let's improve PunBB mod installation/building!

A mod installer would work for a couple of mods, but when the mods are starting to change each others lines there will be problem, trust me, I've written one for PunBB for a long time ago.

Re: Let's improve PunBB mod installation/building!

If the readme-files are made at the same time as the mod, it's quite easy... if you know exactly what the mod should do :) I've tried a somehow different approach with the last mods: Including files instead of changing alot of code. It makes it much easier to update the mods for people, as they often just need to replace a file.

Though, it would be much easier to have a CVS or something like that...

4 (edited by Louis 2004-02-15 00:14)

Re: Let's improve PunBB mod installation/building!

Jansson wrote:

A mod installer would work for a couple of mods, but when the mods are starting to change each others lines there will be problem.

Well, the same excuse could have been said for Windows, after all, if an application overwrites a file or registry entry, or replaces a DLL with a newer version then there would be problems. But Windows has guidelines for creating programs, including using a separate folder for program files and naming conventions for software registry entries, plus improved DLL handling in Windows XP, so it gives freedom to use "installation" programs, instead of manual x-copy.

So we could create module guidelines that explain where and when to modify PunBB and include standardized conventions for naming and location. Then we can create installation PHP scripts for every modification and perhaps use another utility to automatically check for interoperatibility between modifications, with the modifications listed in another section.

Or we could go the Firefox/Mozilla route and support "Extensions" in PunBB, with an integrated method for installing PunBB extensions and more programmable access to PunBB, like being able to add your own code to various parts of PunBB without needed to edit the PunBB files themselves. Like calling the following to add a "Signatures" link to the admin page.

$PunBBex->AddToAdminMenu("Signatures","/extensions/signatures/signatures.php?section=admin");

Either way, it would be nice to extend PunBB with more support for Extensions. The difference between the two is that with the first, most of it is dependant on the mod's installation script and in the second, it's more dependant on the PunBB software. But the good parts with both is that suddenly, Firefox-like, PunBB can be fast and extensible for any user. Combined with a full CSS-based layout and I would say we've easily the best forum software out there, perfect for a version 2.0 ;)

Chacmool wrote:

... Including files instead of changing alot of code.

Yes, that makes sense. In some ways what I mentioned about creating PunBB extension support would allow PunBB to include the modification's files, then let the modification change PunBB dynamically.



Please don't ignore the questions in my original post ... I am quite interested in how people create their modifications ? do they start from a newly extracted PunBB and open the files they need in Dreamweaver (or notepad, ultraedit)? Do they work on the HTML first, creating the look they want, then adding the functionality afterward? Do they write out the requirements, create planning documents? That's just part of the first question, please continue with the rest of the questions, if you feel like it.

Answering these questions may help us build the prefect PunBB modding solution that will benefit everyone, plus help encourage PHP newbies delve into the source code and perhaps make the entire mod creation process easier and faster for everyone.

For example the tool I mentioned in my first post. With these answers, I could try to design the tool's "workflows", the way I intend it to be used, with the way people actually create mods. There's no point in making something that people don't like using. Same with PunBB. Why standardize the readme.txt if people don't like using it? Or can we make it easier to produce them? In which case, how? This is a larger topic than you'd think at first glance ;)

Re: Let's improve PunBB mod installation/building!

Making it easier to add admin interface "modules" is already on the todo list for 1.2. It will only be a matter of putting a file in a specific directory and it will pop up in the admin interface.

Rewriting PunBB so that it allows "plug-ins" a la Firefox is a massive undertaking. It's also very un-PunBB:ish. If it is not absolutely clear why, I refer to the about page. It is simply not where I want to go with PunBB. Also, writing "modular code" in PHP that is short, fast and pretty is virtually impossible. Well, as far as I know anyway.

Regarding the whole mod create/install thing, I think the only viable solution is to create a visual application (not a script) that "helps" you create and/or install a mod. You start the app, load up the mod and then the app tries to patch the scripts. If it runs into trouble (i.e. conflict with an earlier mod), that perticular step will have to be done manually. However, someone needs to write this app. Also, the app must work on Windows, *NIX and MacOSX. Perhaps with the help of wxWindows.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

6 (edited by Paul 2004-02-15 02:12)

Re: Let's improve PunBB mod installation/building!

Rickard wrote:

Making it easier to add admin interface "modules" is already on the todo list for 1.2. It will only be a matter of putting a file in a specific directory and it will pop up in the admin interface.

Any chance of vertical navigation. The current horizontal menu could get rather messy with say a dozen items on it.

Rickard wrote:

Rewriting PunBB so that it allows "plug-ins" a la Firefox is a massive undertaking. It's also very un-PunBB:ish. If it is not absolutely clear why, I refer to the about page. It is simply not where I want to go with PunBB. Also, writing "modular code" in PHP that is short, fast and pretty is virtually impossible. Well, as far as I know anyway.

Good. I would rather see a simple portal system build around PunBB with modules being developed for the portal. They would essentially be standalone scripts which simply utilised PunBB's membership and other database tables and, where appropriate, included PunBB files. I am not at all convinced that such things as file uploading, image galleries and even private messaging need to be embedded in a bbs sytems, they simply need to work with it. One thing I would like to see though is an idiot proof (and I speak as an highly trained idiot) way of utilising PunBB's membership system outside of PunBB.

My own view, for what its worth, is that I would like to see Rickards efforts directed to making PunBB as perfect as it possibly can be within the original design parameters. There is also the question of reputation to consider. If PunBB carries on as it is now with each new version being a refinement of the previous version then eventually it will become the automatic first choice for anybody looking for a fast, light, reliable and easily customized board. If it keeps chopping and changing it will never establish itself. Thats not to say that nothing new should be added but the additions should be improvements and enhancements to the existing functionaility and not new features. As usual I have slipped slightly off topic, but maybe thats because I have yet to see a mod which I actually had any use for.

Re: Let's improve PunBB mod installation/building!

Paul wrote:

Any chance of vertical navigation. The current horizontal menu could get rather messy with say a dozen items on it.

Yes, it will have a vertical layout.

Paul wrote:

Good. I would rather see a simple portal system build around PunBB with modules being developed for the portal. They would essentially be standalone scripts which simply utilised PunBB's membership and other database tables and, where appropriate, included PunBB files. I am not at all convinced that such things as file uploading, image galleries and even private messaging need to be embedded in a bbs sytems, they simply need to work with it. One thing I would like to see though is an idiot proof (and I speak as an highly trained idiot) way of utilising PunBB's membership system outside of PunBB.

My own view, for what its worth, is that I would like to see Rickards efforts directed to making PunBB as perfect as it possibly can be within the original design parameters. There is also the question of reputation to consider. If PunBB carries on as it is now with each new version being a refinement of the previous version then eventually it will become the automatic first choice for anybody looking for a fast, light, reliable and easily customized board. If it keeps chopping and changing it will never establish itself. Thats not to say that nothing new should be added but the additions should be improvements and enhancements to the existing functionaility and not new features. As usual I have slipped slightly off topic, but maybe thats because I have yet to see a mod which I actually had any use for.

It's nice to hear I'm not alone in the battle agains bloat and feature frenzy :D

"Programming is like sex: one mistake and you have to support it for the rest of your life."

8 (edited by Louis 2004-02-15 07:53)

Re: Let's improve PunBB mod installation/building!

Rickard wrote:

It's nice to hear I'm not alone in the battle agains bloat and feature frenzy :D

I understand feeping creaturism and the second-system syndrome, but this isn't bloatware, but something that could strengthen PunBB's extensibility and make it more versitile. (It's not bells and whistles either, since PunBB was designed to be elegant, yet also to have modifications to improve it's functionality.)

Perhaps I'll try forking 1.1.2 and attempt to integrate both CSS/XHTML and some kind of mod system to see what the result could be. ;)

Re: Let's improve PunBB mod installation/building!

Louis wrote:

I understand feeping creaturism and the second-system syndrome, but this isn't bloatware, but something that could strengthen PunBB's extensibility and make it more versitile. (It's not bells and whistles either, since PunBB was designed to be elegant, yet also to have modifications to improve it's functionality.)

Exactly! Providing PunBB with a general extensibility "system" will ruin that part about it being elegant. It's just not possible to do with PHP in a sensible manner. The code will be filled with one ugly solution after another. The very first thing that would have to be done is to move more or less every line of code into a class so that the default class behavior can be overridden from an extension.

Also, FireFox has the same problems as PunBB when it comes to multiple extensions modifying some of the same behaviour. You can't have two extensions loaded that modify e.g. how mouse gestures work.

Louis wrote:

Perhaps I'll try forking 1.1.2 and attempt to integrate both CSS/XHTML and some kind of mod system to see what the result could be. ;)

Be my guest. I would love to replace the bad markup/CSS in PunBB 1 with a full-fledged XHTML/CSS design for PunBB 2, but I can't do it myself. I know programming, not markup.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Let's improve PunBB mod installation/building!

Well.. Installing a mod from a ReadMe file isn't difficult at all. And with this tool it's even more easy. So why waste energy of doing it any easier and make rooms for hundreds of bugs and an unstable system that don't work in several cases?

My opinion is that we make a tool that generates a readme file from comparing the scripts with the original. That will make more people willing to release their mods.

Re: Let's improve PunBB mod installation/building!

An alternative is to simply release hdiff's. Creating them is extremely easy. We could even modify the hdiff program to output more specialized instructions.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Let's improve PunBB mod installation/building!

Exactly, we should make it easier to understand. Because as they look now, not everybody would understand by the first look, and it also needs a graphical webbrowser. But the current readme format is so simple that everybody understands.

Re: Let's improve PunBB mod installation/building!

Maybe some simple convention on writting mods can help.
I you mod needs to add a few lines of code in viewtopic.php, maybe you can insert a include() in viewtopic.php instead of 50lines of code.
For the hooks, punbb can check id there is a hook. If there is a hook, execute the hook, if there is not a hook, execute the original code. That way you don't need to convert to classes the current punbb.

http://tinymailto.com/oliversl <-- my email after a captcha

Re: Let's improve PunBB mod installation/building!

Or just go the InvisionBoard route and create a PunBB SDK. This way, PunBB will remain the way it is. Just make the SDK (which will pretty much contain functions that act as API interfaces to PunBB).

In short, don't modify PunBB. Instead, create a SDK that enables people to interface with PunBB with ease. PunBB will achieve its goal of being fast and lightweight, and yet via the SDK be easily customizable.

Re: Let's improve PunBB mod installation/building!

The extension system will be fast. Have no doubt smile

Re: Let's improve PunBB mod installation/building!

http://www.boardmod.org

BoardMod installs mods on YaBB. Surely someone could do something similar for a simpler forum like PunBB.

17

Re: Let's improve PunBB mod installation/building!

Why bother, the next version of PunBB has a proper extension system so the problem will simply vanish.

Re: Let's improve PunBB mod installation/building!

Another thing that can help is this:
if a mod need to insert code (using an include()) at line xx in a .php file, that action can be logged in a central DB. Maybe a punres.org
So, if another mod need to add an incluide() at the same line, some sort of conflict resolution can be done at install time or at mod development time.

A warning can tell the developer that a mod is already at that line, so he can check for compatibility.
Then, the user can recive a warning when installing incompatible mods.

Just some ideas ... I know 1.3 will be a very big release, so I just look forward it.

http://tinymailto.com/oliversl <-- my email after a captcha