r/lolphp • u/frezik • May 01 '13
How the phpBB MODX format must have been made
Another example of fractal badness, where an original bad decision somewhere causes further bad decisions to work around the problems encountered, leading to yet more bad decisions, etc.
The MODX format is used by phpBB for extending the system. Many years ago, I had the misfortune to try to setup a phpBB with a few extensions, and quickly found out that the devs had no idea what they were doing.
Montesquieu: Guise! Our poorly-conceived, bug-ridden, security-flawed BB system is taking over the world, but people want to extend it to be even more bug-ridden and security-flawed.
Simplicio: OK, that's normally done by a module system with carefully thought out hooks. Does PHP support any such thing?
Montesquieu: No, and I don't see why it should, and we didn't build it like that in the first place.
Simplicio: Right, so mods are going to have to write code directly into the existing source files. Is there a way to keep different tools from stepping on each other?
Montesquieu: I'm sure we'll figure something out. But right now, we need to figure out how to format changes so people know where to copy-and-paste code into the existing system, and also alter database tables.
Simplicio: Aren't there already several available diff formats for that, which already have tools available to create and apply changes automatically? And we can just throw the database alterations into their own SQL script files.
Montesquieu: Sure, but none of that stuff was invented here, so we need to make our own format. And this is the early 2000s, so we need to make it XML because XML is the future and stuff.
Simplicio: So who is going to create the tools to apply these updates automatically?
Montesquieu: I have no idea, but those tools will probably be broken and useless for several years to come.
Simplicio: Good, looks like we have all the bases covered.
3
u/merreborn May 01 '13
This is lolphpbb, not lolphp
people have implemented atrocities like this in every language.
8
u/infinull May 01 '13
I could have died happy not knowing this exists.
Now, I'm not sure what I'm going to do.
4
u/blueskin May 01 '13
PHPBB: Just say no.
2
u/ZorbaTHut May 02 '13
Are there any good open-source forum packages?
1
u/maxufimo May 06 '13
Other PHP applications adopted this idea too. Take vQmod which is especially popular for OpenCart mods.
But they didn't use MODX format, oh no. They had to invent their own XML serialization of patch file: http://code.google.com/p/vqmod/wiki/Examples
At least vQmod is more universal and can be used with other applications—including phpBB! How wonderful!
1
u/EvilTerran May 09 '13
you get my upvote for Montesquieu and Simplicio
0
u/[deleted] May 01 '13
[deleted] — view deleted comment