Ok, I just started browsing to see what you guys were up to, and I don't think you know what you want to do yet...
If you want it to be compatible with phpBB2, phpBB3, and phpBB2 CH Mod, IMHO it would be the best to code the main areas from scratch. Otherwise I really do not see it working without major changes for each version.
The way I would code it in that case would be to keep phpBB integration functions separate from the core KB functions.
For example...(don't give much thought to the file and function naming schemes I use, files are just named as what they are doing right now)
1. Someone submits a new article...
2. Submit.php takes in the info and sends it to a function called insert_db() in functions.php
3. Since this board is running phpBB3 it takes the "generic" information we wanted to insert and formats it to fit the phpBB3 format(kinda hard to explain what I mean here, but it just inserts the info the way you would in phpBB3)
4.Done inserting, and brings them to the article page.
Where it actually inserts the db info the insert_db() function(of course the db function would be much bigger than just insert, probably a class, but I just want a simple example) it does a check to see what kind of board it is on, and then takes the generic style info it is supposed to insert and formats it to fit that board's version.
The same kind of thing would be used for login, and any other area where it needs to interact with the phpBB core.
The only things the user would have to do to add this mod other than inserting tables and uploading files would be a few edits to add the link in the header, and a few edits to add the checkboxes and stuff in the search section so they can pick if they want to search within the KB or not.
Oh, and it could use the integrated search section as well. I don't know the db structure of the search table, but at most you would have to add a column saying that something was found in the KB. But I do not know how the searches do their business, I have never checked out the code or db tables for myself.
It is kinda hard to explain, and I am pretty bad at explaining things, but I hope you get what I mean.