Introduction   Getting Started   Upgrading   Function Reference   Changelog   Support and Feedback

get_post_attachments

Usage: array get_post_attachments (int postid [, bool override_perms])
Purpose: Returns information on a post's attachments.
Availability: IPB SDK 1.5

Returns information on post postid's attachments.

If the post postid does not exist, or has no attachments FALSE will be returned.

If override_perms is set to TRUE, then the function will return unapproved attachments too.

Information will be returned in the following array structure:

Array
(
    [0] => Array
        (
            [attach_id] => 1
            [attach_ext] => jpg
            [attach_file] => av_88.jpg
            [attach_location] => post-1-1097166834.jpg
            [attach_thumb_location] => post-1-1097166834_thumb.jpg
            [attach_thumb_width] => 87
            [attach_thumb_height] => 100
            [attach_is_image] => 1
            [attach_hits] => 45
            [attach_date] => 1097166834
            [attach_temp] => 0
            [attach_pid] => 829
            [attach_post_key] => da359602f54b6e50d49657be0132505c
            [attach_msg] => 0
            [attach_member_id] => 1
            [attach_approved] => 1
            [attach_filesize] => 13839
        )

    [1] => Array
        (
            [attach_id] => 2
            [attach_ext] => jpg
            [attach_file] => bagpuss.jpg
            [attach_location] => post-1-1097166846.jpg
            [attach_thumb_location] => post-1-1097166846_thumb.jpg
            [attach_thumb_width] => 100
            [attach_thumb_height] => 82
            [attach_is_image] => 1
            [attach_hits] => 39
            [attach_date] => 1097166846
            [attach_temp] => 0
            [attach_pid] => 829
            [attach_post_key] => da359602f54b6e50d49657be0132505c
            [attach_msg] => 0
            [attach_member_id] => 1
            [attach_approved] => 1
            [attach_filesize] => 8481
        )

)

See Also: get_topic_info


User Contributed Notes

There are currently no user contributed notes for this page.

Documentation Generated at Sat, 16 Apr 2005 07:36:35 -0700
Find the latest version at http://ipbsdk.sourceforge.net