added a comment - - edited
This not finished. In HQ we decided to implement a one-way synchronisation process instead of the current copy-only functionality. The following remain to be done:
1. Make external entries read-only
2. Copy feed's modified date to post.timemodified
3. Change fetch_external*() to sync_external*() in blog/lib.php
4. Make external blog URL read-only after creation
5. When deleting external blog, delete related blog entries
6. When creating external blog, validate returned XML, not just valid HTTP response and content-type, but valid RSS/ATOM feed
7. On the external blog listing page, add a column with validation results (green tick / red cross)
Details of the synchronisation process:
$feed = load_feed items();
$time = earliest_timemodified_in_feed($feed);
$entries = get_blog_entries_equal_or_after_time($time);
foreach ($entries as $entry) {
if entry not in feed, delete it
if entry->timemodified != matching_feed_item->timemodified, update it
}
Thanks to Martin for the pseudocode
Todo:
1. New table for external blogs: blog_external [id | userid | name | URL]
2. New admin settings: externalblogcrontime, maxexternalblogsperuser, useexternalblogs
3. Implement simple code (using magpie) for fetching and copying external blog posts
4. Implement user interface for managing external blogs
5. Use tag API for associating tags with external blogs and automatically tagging imported posts