MyBB Community Forums

Full Version: What function or object parses attachments?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Greetings everbody,

Currently I am coding a news script for my website and I was wondering, what object or function parses attachment code? ([attachment=1] for example). I know that MyCode, Html and Smileys are parsed by the postParser, but I couldn't find a method or function that would do the same for attachments. Can somebody please help me to fin it?

Thanks a lot in advance!
I may be wrong, but I assume it's in postParser as well - as it is content in a post.
I tried out but it seems that it doesn't Sad I have set my options array (argument to the parse_message()) all values to "true" but still nothing, so I assume that there is another method or function that does it. Sad
Look in inc/functions_post.php, the function is: get_post_attachments
Thanks a lot Dennis!
However I have a small question, the function asks for two parameters:
* @param int The ID of the item.
* @param array The post or item passed by reference.

I am not sure what are they, the first one is a thread ID, post ID or? And the second one is an array containing the post's message?

Thanks a lot for help!
Hmm bump, I guess :p
Done! Thanks a lot, and sorry for the stupid second question :p
do you mind posting your solution?