"new" module system?

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
User avatar
Registered User
Posts: 1518
Joined: Wed Jul 04, 2001 8:10 am
Location: Around the corner

Re: "new" module system?

Post by dhn »

Uchiha Nick wrote: what do you mean with that? last time i checked a forum is a community oO
A misinterpretation a lot of people have. A forum alone does not make a community. It is just a tool. A community is an abstract concept, a group of people that come together to communicate.
Registered User
Posts: 542
Joined: Tue Oct 08, 2002 5:13 pm
Location: Bling bling.

Re: "new" module system?

Post by Pit »

Roberdin wrote: Do you realise how slow such a system would be?

You want to do anything, and it would have to check for external files, query them, etc.
I've been thinking about this recently.

It's not quite as bad as you suggest, because the relevant files could be loaded at runtime and interact with a hooks system so that they are notified when certain things are done/functions are called. The hook system would have to be notified about each specific event every time that event takes place, though; this could have an impact on performance if lots of events occur in a single script execution.

An alternative I have thought about is "tagged" code; specially formatted comments that indicate insertion points for functions/methods wanting to be called before/after specific events. This has major disadvantages, of course: if it were to be an automatic system, it would require files to be writeable by the webserver

This idea isn't much more than a very limited version of EasyMOD, though the difficulties are a bit different. EasyMOD can have problems finding where to insert/replace code when the relevant code has been altered by a previous MOD. This idea does not suffer that difficulty; it does, however, suffer from a difficulty in that code from seperate modules still runs a risk of having conflicting effects.
User avatar
Registered User
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm

Re: "new" module system?

Post by psoTFX »

The events system was to be a hook based implementation with a twist ... though it's unlikely it'll debut "fully" in 3.0 (rather 3.2). However a system which uses hooks (trigger points which lead to an event if you like) is not a strictly "modular" system ... it depends on you creating a series of trigger points ... no trigger point, no modularity.

The only way to create a "proper" modular system is (AFAIK) to create a series of data flows rather than discrete trigger points. For example you'd have a "posting" flow. Modules would then register into that flow and be called sequentially. The problem you have here is defining where each module is called. Clever code could automatically (or through time based optimisation I guess) determine where in the flow a specific module would "best" go. For example you don't want the bbcode parsing to occur before authentication. A "cheap" solution is to break the flow into sections; authentication, pre-parse, parse, post-process, etc.

This of course all sounds great but there are issues as suggested by Pit. Of course who knows what the future may bring.
Registered User
Posts: 40
Joined: Fri Jan 30, 2004 2:43 pm
Location: Kiev, Ukraine

Re: "new" module system?

Post by friendly-art »

There is a modular system developed for Minerva Project (although it is based on phpBB 2.0.x). It allows drag and drop installation of various modules like knowledge base, photoalbum, etc.

Of course this could be ported to phpBB 3.
Post Reply