I’ve spent a couple of weeks trying various approaches to the last big chunk of Smartfeed, generating the feed itself. For much of that time I was mired in confusion on how to integrate an external feed into the extensions framework. I think I finally figured out an approach that will work and it will simplify things. Meanwhile I was diverted with other issues, such as how to not use an include file for constants. The solution seems to be to build these into the extension’s main object when it is constructed. A lot of things require rethinking with the new architecture.
Anyhow, what I am likely to do is collapse smartfeed_url.php and smartfeed.php (as they were called in the modification) into a single program. Since the two programs share a lot of similar code, it gives me the opportunity to move the shared code into functions. I was using a 3rd party library (the Universal Feed Creator) to create the feed. Now it looks like I will simplify the approach and simply use phpBB’s template system, with a switch based on the feed type (Atom, RSS 1.0 and RSS 2.0). Now that I am over this major bottleneck, I think the rest of the development will proceed in a fairly straightforward manner.