I think the easiest way to get a post to look exactly like postbit would be to create a postbit object the same way it's done in showthread.php. If you don't want to do that, then you probably have to look at the code in includes/class_postbit.php to see how it works. In the case of attachments it's not bbcode (as the OP was suggesting). There's a function in class_postbit.php called process_attachments that creates an attachment object and calls a function (also called process_attachments) that does a lot of stuff (it's in packages/vbattach/attach.php). You may be able to use that code without using the postbit class if you make your own $post array that contains whatever process_attachments needs to do it's work.
I know that's probably confusing. I guess the short answer is that there's no short answer.
|