1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug WYSIWYG ignores non-standard BBCodes

Discussion in 'Resolved Bug Reports' started by Jeremy, Dec 6, 2011.

  1. Jeremy

    Jeremy XenForo Moderator Staff 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: http://xenforo.com/community/threads/modify-img-bbcode.24264. 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.
     
  2. Mike

    Mike 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.
     
  3. Jeremy

    Jeremy XenForo Moderator Staff 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...)
     

Share This Page