joomla/joomla-cms — pull request #2256 by Bakual (2013-10-15 13:10:40+00:00)
Title: Decouple com_contact from com_content

This PR moves the contact query out from the com_content models into a new content plugin and thus finally decouples com_contact from com_content.

The plugin will search for a contact for a given user and adds the `contactid` and the profile page `contact_link` to the item.

This approach should be backward compatible with existing templates, as they are currently reading the `contactid` and create the link to the profile page.

The nice thing with this approach is that if a template is updated and uses the new `contact_link`, it will be possible for other extensions to provide plugins which link the author to their own profile pages.

There are some other nice sideeffect:
- Database queries in the com_content models are simpler and less likely to break. We struggled with this contact join several times already in the past, ranging from dropped items (no contact for an author) to duplicated ones (multiple contacts per author especially with multilanguage).
- Contact query is not run when it's not used on a site. Simply disable the plugin.
- It should be possible to uninstall com_contact now without breaking the site. However I wouldn't put my hand into a fire for this :)