Here’s another teaser about an upcoming offering from the phpBB Doctor: our MOD Compatibility Engineâ„¢ or MOD CE. This system is built off of the foundation provided by our MOD Managerâ„¢ mentioned in a prior post. This system is designed to check to see if a collection of MODs are compatible with each other, meaning it checks to see whether they can all be installed at the same time.
If you manage more than one phpBB board, or even if you only manage one but it is heavily modified, you will probably recognize the value of this system. There are several challenges in running a modified board. The first is managing / merging code from different MODs that may or may not be compatible with each other. The second major challenge is upgrading your board when updates to the core phpBB code are released. In some cases an update from the phpBB Group can break a MOD, so wouldn’t it be nice to know that? Wouldn’t it be nice to be able to apply the “fast” upgrade process of overwriting your board and then reapplying your MODs all at once?
Our MOD CE is the first step towards solving these issues, and it’s built on the foundation provided by the MOD Managerâ„¢. The core purpose of this system is to allow someone to select a set of MODs from the phpBB Doctor catalog and then run a check to see if all of the selected MODs can be installed together. This system does a series of checks on the selected set of MODs, and returns a report that identifies potential conflicts. It should be noted that this is only a potential list; it is possible that an identified conflict is not, in fact, an issue. But there are limits to what can be done to review program code with a program.
The first step is quite easy… finding the common files that are shared across one or more MODs. If there are no common files, then there should not be any conflicts. For example, let’s consider a package of MODs named MOD 1, MOD2, and MOD 3. MOD 1 alters memberlist.php, MOD 2 alters index.php, and MOD 3 alters viewtopic.php. Clearly there are no conflicts, and all three MODs can be installed on the same board.
Now suppose that MOD 1, 2, and 3 all modify index.php in some way. The next step in the compatibility check is to see which lines of code are included in FIND commands. If there are no conflicts in the FIND commands, then the assumption is made that there is no conflict with installing the set of MODs. Our MOD CE is smart enough to detect overlapping FIND operations during this process, so if one MOD looks for line 10 – 12, and the next MOD looks for line 11 – 13, then this will be detected as a potential conflict.
The reason for looking for overlapping FIND targets is simple. If the FIND operations don’t match (or overlap) then the subsequent operations (like adding or replacing) will be performed on different areas of the code, and therefore should be compatible. For example, we have two very simple MODs in the phpBB Doctor catalog that all modify index_body.tpl. One of them makes the forum icon clickable, and the other makes the “view online” icon clickable. While they both modify the same file, they do not modify the same code, so they are compatible with each other.
Finally, if there are FIND commands that potentially conflict between the 3 MODs the next step is to see what is actually done after those FINDs. If there are any REPLACE operations (in-line or otherwise) then a flag is raised. Any ADD operations (before or after) are not considered conflicts.
This system is not guaranteed to be 100% foolproof. It may highlight potential conflicts when, in fact, there aren’t any. But we believe it represents a quantum leap forward in MOD management in that you can quickly and easily check to see if a collection of smaller MODs can be combined into one larger one.
And that, coincidentally, is the purpose of the next custom feature to be offered by the phpBB Doctor, our MOD Package Builderâ„¢. Details on that in a future post.