Currently, I'm working to make the next version modular. In this paradigm, only the most basic functionality is in the core and the rest is done through modules. There will also be a common library to make coding modules as easy as possible.
The main advantage to this modular system is that it makes it easy for anybody to create modules without delving deep into the code. This will also make it possible to code most of a module in any programming or scripting language and to not be limited by cross-platform concerns (modules can be dependent on a platform, but the main program won't be).
This is all preliminary, but some basic modules will probably ship with R3R, and third-party modules will be available.
Creating a module is easy; just create a module and place it in the modules directory. You should give all files and non-local identifiers unique names.
Then you just alter loadModules.php so that your module will be loaded at startup.
Use the registerModule
function to register a module. The first argument is your module's name and the second is its description. The registration of modules will be important once a module manager is built.
R3R is an RSS 3.0 reader. But using modules, it should be easy to make modules for handling other syndication formats. To do this, two functions are provided. The first is registerMimeTypeHandler
, which takes two arguments—the MIME type that you can handle and the function which processes the data (which is passed as the argument).
This way, multiple modules can handle the same MIME type, and the same module can handle multiple MIME types (use with caution). Hence, you need to call the nextMimeTypeHandler
function, after you process the data but before your function returns. This function takes one argument—the MIME type to handle. Be warned that not calling this function may result in not all of the user's modules being used.