Why not run a script that accesses the WP API (which someone just recently posted in the extras) and then write the posts / comments either to an XML file or to custom database tables within ModX (or a cloud storage / DB service - although that would be an extra http request). Then, run a cron job once a day to update the XML files / custom DB tables / cloud storage. The cron job script could check for posts / comments that have been added or modified since the last time the script ran and then update only those.
When users want to post comments, those comments would get posted directly to the WP database via the API, and then they would show up a day later after the cron job runs (assuming you run the cron job once a day).
The nice thing about this approach (in theory, haven’t implemented it yet) is that you could easily aggregate data from multiple blogs. In my situation, I have 7 current chapters of an organization, each of which will have their own blog. I need to be able to aggregate this data and present in different ways (by chapter, by category, etc.)
I’ve thought about alot of different approaches and this seems like the best way. I’d be open to ideas though if anyone else has input. The main advantages as I see it are as follows:
1. Let’s say I have 50 chapters. I have to deal with user permissions for 50 users plus a single point of failure for 50 blogs (all the data stored on one DB server).
2. The entire WP backend is geared towards managing posts, comments, etc and its very simple to use / setup.
3. The users blog could double as their own site with whatever theme they want to use and whatever domain they want as well as integrating with ModX.
4. The aggregated data could easily be accessed by multiple sites (Our organization has a number of interconnected sites that we’re working on)
I’m currently doing something similar with Google Calendar. Using the Zend GData library I get all the upcoming events within a certain date range and bring them into ModX as resource objects. The script loops through all the public calendars in our organization’s account and then creates a container for each calendar with the events as children. The script also sets an unpublish date (along with a number of other TV’s) identifying when the event is over and automatically deletes the object once the event has ended.
I’m actually just in the process of creating a context for each chapter and changing the script so that it places events under the appropriate context.
The cron job runs once daily and updates existing events as well as creating any new events. I also made a "LockContent" variable in case users add additional info / formatting to the event in ModX - if the LockContent TV is set to "Yes" it won’t update the content field.
Here’s the site (still very much a work in progres).