MyBB Community Forums

Full Version: Hook for parse_message_pre?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all.

I'm adding some unique code plugins, namely GeSHi highlighting for code snippets, and I can't get MyBB and GeSHi to work together happily. The problem is that GeSHi has its own built in character-escape function, which I had to bypass. But then, parts of the code are still being escaped even to the point of double escaping as you can see here (also note the HTML smilie code in there):[Image: index.php?action=dlattach;topic=102.0;attach=27;image]

So in looking around, I figured out how you got the [code|php] blocks to skip being escaped or mangled by smilies. However, there's no hook for this location/event! I could modify and fix that, sure, but then no one else can run my script.

Could you add a parse_message_pre hook callback (called before smilies and character escaping) so that we can protect our own slightly parser-unfriendly sections? I would greatly appreciate it.
Reference URL's