Extending XenForo_Html_Renderer_BbCode, what event to listen to ?


Formerly allewreK

I would like to redefine a method in the XenForo_Html_Renderer_BbCode class.

What event do I have to listen to (in code event listener)?

Best regards.

Chris D

XenForo developer
Staff member
Almost any class...

From the details of the event:

Called when instantiating a class. This event can be used to extend the class that will be instantiated dynamically. Note that not all classes that are to be instantiated will call this but many will.

Chris D

XenForo developer
Staff member
It does work. I did a quick test before I suggested it as I wasn't sure myself it would work or not. :)

I was able to overwrite and extend a couple of functions no problem


Well-known member
I can confirm you that I correctly extended the class XenForo_Html_Renderer_BbCode.
It works, the class BbCode_TextWrapper doesn't like to be extended. It took me some time to figure it out, that it was entirely not possible :D I am very thankful to the great community here where experienced developers help out beginners.