The function to directly insert media into a post is already there. Currently the XFMG bbcode only allows you to insert your own media. It should also be possible to insert media uploaded by others into a post. At least the media that is in categories and public albums. This would be much easier than going to XFMG, browsing to the entry, copying the share bbcode and pasting it into the thread.