If post content is encrypted/decrypted before being sent to/received from the database using a key that is not stored in the database, a person who only has (full) access to the database (which might be on completely different server) does not automatically also have access to the key.
I think you're a little bit caught up in the semantics of using the word "database" rather than "server" in this case. In order for a post to be displayable in the browser without the manual input of a decryption key, the decryption key will need to be stored either on disk or in the database (which is the same thing, really, as databases are files too).
In my opinion, if your security mechanism can be defeated in its entirety if someone gets the most basic of exploits running on your site (the c99 shell being a very common example that should immediately trigger PTSD flashbacks for anyone old enough to have been running a forum in the early 2000s), then the security mechanism is useless and you are only wasting your server's resources by using it.
This is why you don't use MD5 for hashing passwords anymore. If you have the option of using only plaintext or MD5, then there's no point in you using MD5 since it offers about as much security as storing the password in plaintext.
If a piece of security can be bypassed by the most basic exploit, then I consider it to be equal to no security. A hashed password (with a good hashing mechanism) is at least going to take some major effort to bypass, so it's as close to perfect security as we can get in today's day and age.
If the data stored in the database also does not allow to gain access to that key I don't see a way how this person could decrypt the data unless there are (unknown) attack vectors that would allow access to the key by manipulating the DB (eg. using a PHP callback, etc.).
You just defeated your own point there. Although it may not be as easy with XenForo storing merely class loading instructions rather than actual PHP code directly in the database, there are still plenty of ways for a malicious attacker with DB access to gain access to your files as well, thus defeating the encryption of posts.
This is the first line in my previous post, and I stand by it:
Encrypting a post is pointless in every single scenario except for a case where two members want to share content privately and they have exchanged the decryption key outside of your forum.
Fillip