IP.Board  3.3.0
plugin_msg Class Reference
Inheritance diagram for plugin_msg:
class_attach

Public Member Functions

 attachmentRemovalCleanup ($attachment)
 canBulkRemove ($attach_rel_ids=array())
 canRemove ($attachment)
 getAttachmentData ($attach_id)
 getSettings ()
 getSpaceAllowance ($post_key='', $member_id='')
 postUploadProcess ($post_key, $rel_id, $args=array())
 renderAttachment ($attach_ids, $rel_ids=array(), $attach_post_key=0)

Data Fields

 $module = 'msg'

Member Function Documentation

attachmentRemovalCleanup ( attachment)

Recounts number of attachments for the articles row

Parameters:
arrayAttachment data
Returns:
boolean
canBulkRemove ( attach_rel_ids = array())

Determines if you have permission for bulk attachment removal Returns TRUE or FALSE IT really does

Parameters:
arrayIds to check against
Returns:
boolean
canRemove ( attachment)

Determines if you can remove this attachment Returns TRUE or FALSE IT really does

Parameters:
arrayAttachment data
Returns:
boolean
getAttachmentData ( attach_id)

Checks the attachment and checks for download / show perms

Parameters:
integerAttachment id
Returns:
array Attachment data

Returns an array of settings: 'siu_thumb' = Allow thumbnail creation? 'siu_height' = Height of the generated thumbnail in pixels 'siu_width' = Width of the generated thumbnail in pixels 'upload_dir' = Base upload directory (must be a full path)

You can omit any of these settings and IPB will use the default settings (which are the ones entered into the ACP for post thumbnails)

Returns:
boolean
getSpaceAllowance ( post_key = '',
member_id = '' 
)

Returns an array of the allowed upload sizes in bytes. Return 'space_allowed' as -1 to not allow uploads. Return 'space_allowed' as 0 to allow unlimited uploads Return 'max_single_upload' as 0 to not set a limit

Parameters:
stringMD5 post key
idMember ID
Returns:
array [ 'space_used', 'space_left', 'space_allowed', 'max_single_upload' ]
postUploadProcess ( post_key,
rel_id,
args = array() 
)

Recounts number of attachments for the articles row

Parameters:
stringPost key
integerRelated ID
arrayArguments for query
Returns:
array Returns count of items found
renderAttachment ( attach_ids,
rel_ids = array(),
attach_post_key = 0 
)

Check the attachment and make sure its OK to display

Parameters:
arrayArray of ids
arrayArray of relationship ids
Returns:
array Attachment data

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables