Community Framework 2.1 introduces a new edit history. It allows you to easily save older versions of your content. You only have to tell the system when it should save a new version and how to revert to an older version. Everything else, such as generating the differences and bulk reverting are automatically provided for you. You only need an object type, two PHP classes and a small modification to your “update” function, as well as your templates.
Now you have to call EditHistoryManager::getInstance()->add($objectType, $objectID, $currentMessageText, $currentUserID, $currentUsername, $reason); whenever the content is edited:
And EditHistoryManager::getInstance()->delete($objectType, $objectIDs); whenever content is removed.
The edit history will be ready now, but you really should provide a link for the user to view it! You can create the link like this: