XF 2.1 Modifying a post's content from bbcode

Arantor

Well-known member
Been trying to make sense of how this might work, and I'm not sure it's doable without extending the renderer class (not even sure it's doable then) - I'm newish to XF's internals, not new to PHP.

My use case: I want to add some markup automatically to the foot of a post (every post) based on bbcode inside the post. I have several uses in mind for this, but the first one that comes to mind is having a superset of the URL bbcode to log each of the URLs linked in a post and provide a summary at the end. Also, footnotes are a usecase I have in mind.

I can see that the renderWhatever function receives the bbcode, its parameters, plus the entity being rendered in 2.1 but it looks like you can't do it from the bbcode handler itself to amend the message body or attach to the bottom of the AST for the post. (This is sensible, but it would be handy)

Alternatively, is there somewhere further up the stack I should be looking? It's a bit late but I just realised, maybe I can use XFCP with XF\SubContainer\BbCode? Would that work for what I'm trying to do? (I'm trying to package my things as plugins and not core-hack.)

Sorry for rambling, it's late and I don't know if I'm making any sense.
 
Back
Top Bottom