Sugestion - Hook system like on vB 3.5

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
multigl
Registered User
Posts: 6
Joined: Fri Apr 09, 2004 3:13 am

Re: Sugestion - Hook system like on vB 3.5

Post by multigl »

Acyd Burn wrote: I think some are confusing a plugin/event system and an installer/code changer. SMF for example does not have a real plugin system but rather having a very trimmed down version of easymod (it is the same approach though they are using very plain xml files) and changing the files on the system. A plugin system is not changing files, the code is meant to hook into pre-defined code locations to change or overwrite/inherit existing methods/code or add to it.

For 3.2 (previously 3.0.x) an event system is planned and already mostly finished (it has been done by naderman and DavidMJ as a community coding project). But this system is using hooks within the code and is not meant as supporting MOD installations or similar things - it is meant for admins to create automatic events (do this and this if this and this is true).

If a real plugin system (not changing code) for mods or a package manager (changing code) is integrated within the next version highly depends on how MODX develops and once the more in-depth planning for 3.2 started.
one of the issues I ran into is the complexity of a truly agnostic plugin system that required little or no change to any phpbb core files; in order to do this, I turned to the more object oriented-ness of php5. I eagerly await seeing how it would tackled in a php4/5 friendly way.
Kail
Registered User
Posts: 35
Joined: Tue Jul 22, 2003 2:45 pm

Re: Sugestion - Hook system like on vB 3.5

Post by Kail »

Having used Drupal extensively a hook system is something I would favor over manually editing code, any day! The #1 advantage being not having to mess with the codebase since hooks make updating easier and the #2 you can toggle functions on the fly and "throttle" your site when there's a lot of traffic.

I can't really see the advantages of the MOD approach except perhaps a bit performance saving considering you do not need hook code, but hook-based modules can be throttled so this argument is dead. There's really not much reason NOT TO implement hook except of course time, but it's definitely a direction phpBB should go in the future.
Styles/template designer
Former phpBB Team member
http://www.phpbb-se.com" target="_blank - phpBB på svenska!
User avatar
Acyd Burn
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You
Contact:

Re: Sugestion - Hook system like on vB 3.5

Post by Acyd Burn »

It is not only time, but if you provide hooks or events you are always limiting what the mod author can do, since apart from being able to change and interact with everything you are now bound to the few code locations where you are able to inject.

Furthermore this also leads to another approach in how you code and layout (code-wise) your software. Drupal is a completely different system and can in no way being compared with phpBB (and if this is becoming a comparitive topic i will lock it).

Image
Kail
Registered User
Posts: 35
Joined: Tue Jul 22, 2003 2:45 pm

Re: Sugestion - Hook system like on vB 3.5

Post by Kail »

I consider that a minor disadvantage, or no disadvantage at all if the application is designed with it in mind. It will on the other hand require an API. You have a great deal of freedom developing modules for Drupal, see the docs at api.drupal.org

I agree Drupal is different but I can't see why phpBB can't turn into a lightweight modularized message board system the same way Drupal is a lightweight CMS. It's a direction I believe phpBB should take. I am rather tired of having to maintain heavily modified phpBB installs where more or less poorly coded MODs turn the whole application into a Swiss cheese... I do it because I've had customers who have wanted MODded boards but it's not a good idea, and becomes extremely clumsy and hard to maintain.
Styles/template designer
Former phpBB Team member
http://www.phpbb-se.com" target="_blank - phpBB på svenska!
Kail
Registered User
Posts: 35
Joined: Tue Jul 22, 2003 2:45 pm

Re: Sugestion - Hook system like on vB 3.5

Post by Kail »

Thinking more about it, one doesn't exclude the other. People can still mod their boards as much they like, but the framework should be there IMO for a modular setup of code. I'm sure some people would still use EasyMOD for changes that affect how the API works, but the features of 95% of all MODs today could be achieved using an API and hooks alone. I know Nuttzy has invested a lot of time in EasyMOD but it should not stop phpBB from considering technically better and more elegant ways to do the same thing.
Styles/template designer
Former phpBB Team member
http://www.phpbb-se.com" target="_blank - phpBB på svenska!
User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: Sugestion - Hook system like on vB 3.5

Post by naderman »

The main difference between phpBB and Drupal is that phpBB is only a forum system. plugins for a CMS like Drupal generally don't need to modify Drupal behaviour the way some MODs modify phpBB behaviour. A prime example is the Categories Hierarchy MOD for phpBB2. It alters phpBB's internal architecture so much that a lot of other things have to be altered as well. A lot of internal functions would simply stop working. You cannot do this kind of stuff with plugins in Drupal, you would have to publish a fork if you want to do such deep changes to the core system itself.
Kail
Registered User
Posts: 35
Joined: Tue Jul 22, 2003 2:45 pm

Re: Sugestion - Hook system like on vB 3.5

Post by Kail »

Well this is not because it can't be done due to the way a message board works but due to the way phpBB was designed some five-six years ago. I understand this discussion is highly hypothetical and I don't expect many people would consider it feasible to recode phpBB's code base to such an extent that would be necessary to support the kind of modularity I am talking about. However I am sure it can be done and categories can be implemented through hooks if the core system is modular enough and has a well-designed API that it uses.

I just really don't consider code patches a working solution long-term. It's better to do a lot of work once to save a lot of time in the future.
Styles/template designer
Former phpBB Team member
http://www.phpbb-se.com" target="_blank - phpBB på svenska!
User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: Sugestion - Hook system like on vB 3.5

Post by naderman »

Kail wrote: Well this is not because it can't be done due to the way a message board works but due to the way phpBB was designed some five-six years ago. I understand this discussion is highly hypothetical and I don't expect many people would consider it feasible to recode phpBB's code base to such an extent that would be necessary to support the kind of modularity I am talking about. However I am sure it can be done and categories can be implemented through hooks if the core system is modular enough and has a well-designed API that it uses.

I just really don't consider code patches a working solution long-term. It's better to do a lot of work once to save a lot of time in the future.
Try to reread what I said. I wrote it's impossible to make big changes to the basic system itself in Drupal. While you can modify nearly everything you cannot modify the system itself.

A new major version number implies a major rewrite. We don't have such an API in phpBB3 and this won't change for phpBB3, what will happen in phpBB4 is unknown so far, anything is possible for that version (however that's probably still going to take quite a few years ;-)).
Kail
Registered User
Posts: 35
Joined: Tue Jul 22, 2003 2:45 pm

Re: Sugestion - Hook system like on vB 3.5

Post by Kail »

Well of course you can't change the system itself, that's obvious. Read "Brains in a Vat" by Hillary Putnam for a more philosophical debate on what we know and can do given certain conditions.

My point, which you also seemed to miss, was creating a system and an API flexible enough you can do 95% of what you want using modules and hooks. The rest will require changes to the system itself but if hooks sort 95% of what people need to do it will mean major improvements for the majority of users.

Reason I'm writing this is because there's a slight chance I might influence people and get someone thinking. That someone might agree with me, might be more interested in programming and be better at it than I am and fork phpBB and start work on something like this because I know it's needed if phpBB is to remain the best open source forum system.

I love phpBB3, I just think things could be made even better. I'm just another visionary. :)
Styles/template designer
Former phpBB Team member
http://www.phpbb-se.com" target="_blank - phpBB på svenska!
balding_ape
Registered User
Posts: 64
Joined: Thu Dec 09, 2004 6:59 pm

Re: Sugestion - Hook system like on vB 3.5

Post by balding_ape »

I'd really like to see a more "plugin-ish" mod system, as well. I've used EasyMOD, and it's really not all that easy. It's not hard compared to coding it myself, but it's not easy compared to uploading a folder and clicking a button in the ACP. That's the level of ease I'd like to see, at least with some mods.

I'm certainly not trying to complain about the current method of integrating mods, but there are better ways, and I would like to add my voice to that of those noting that improved mod integration is a welcome enhancement.
I like to get in with the code and install MODs by hand, and change the code to fit my requirements. EasyMOD Complience for MODs is getting better and for some people its a great additional tool that you can use if you find installing MODs hard.

I'm sure that the EasyMOD team plan to release a version that will work on Olympus as well. I have used it on clients boards and it isn't that bad, it does the job quite efficently. Granted you may have to edit some code to get it to work fully but the same goes for the vB system.

All in all i think its a bad idea and i for one would not approve of it going into the phpBB codebase
You may like to do so, but to assume that you are representative of most phpBB admins is not wise. It's unfortunate that you also seem to devalue the functional desires of others. Being able to install mods with a single click hardly precludes you from being able to do the same thing you're doing now, and editing the code yourself. But it would make life much easier for those of us with less interest in the specific code in our phpBB forum and more interest in integrating functionality that we want.
Post Reply