BBCode - Add content to first post?

RobParker

Well-known member
I'm not sure if this is possible but there'd be quite a lot of use cases if it were.

Is it possible to create a bbcode where anything inside it is automatically added to the first post in the thread.

e.g. You have a massive thread but 200 posts in there's an important post or an update or something (not necessarily from the thread creator or a mod). If you could add this to any post in the thread

Code:
[firstpost]This content will appear at end of first post[/firstpost]

Is that even technically possible?
 
Yes but wouldn't be trivial. I suspect the easiest way would be to extend preparePost in XenForo_Model_Post, and when the
$post['isFirst'] is true, go through the entire thread and extract the [firstpost] content, then append it to that post (e.g. in $post['firstPostExtra']).
 
Back
Top Bottom