Not a bug WYSIWYG ignores non-standard BBCodes


Well-known member
Be aware, this is after a long day of laziness and is most likely rambling.

This is something I probably should have noticed during the development of BBCM, however, I didn't. See the following thread for how this discussion came about: His attempt is to build a proxy for the img tag so that mixed content warnings on a fully https system. His proxy (thanks to some guidance from xfrocks and I) is working on posted threads. However, on every sub-class of the system it directly extends XenForo_BbCode_Formatter_Base directly. This skips the possibility for the system to allow modifications of the img code.

Although, I noticed in WYSIWYG the class, the img BBCode isn't even defined. The system inherits the possibility to display the system, so in theory, shouldn't it also inherit non-standard codes? My proposed solution was to extend both XenForo_BbCode_Formatter_Base and XenForo_BbCode_Formatter_Wysiwyg within his listener to gain the desired effect.


XenForo developer
Staff member
No issue there. You always have to extend the class that's being loaded, the last in the chain -- what you're wanting is roughly like extending one of our abstract classes. This just happens to be a case where the base class isn't abstract.

What you're doing (by extending both classes) is correct.


Well-known member
That's what I had figured, but when my brain isn't "all there" in the right mind set, rambling comes out. I guess I now know a few more BB Code options to manage in future releases... =/ (BTW, I think I'm a little obsessed with them...)