Menu

Image proxying for esoTalk with camo

At The Chunk, we recently enabled SSL (thanks CloudFlare!) However, there were a few issues with mixed content, and the most prevalent of these are the forums, which run a heavily customized version of esoTalk.

Documentation for camo was not easy to come by, but we eventually managed to get it working. Here's how we did it:

Clone and configure camo. This part should not be especially difficult.

Proxy camo behind nginx. This too is pretty trivial.

Now we can modify esoTalk. Images are handled by the BBCode plugin, so we will need to modify its parser. Open BBCode's plugin.php file and look for ETPlugin_BBCode::handler_format_format(). Replace $sender->content = preg_replace("/\[img\](.*?)\[\/img\]/i", $replacement, $sender->content); with this: