Class: attachment
Source Location: /lib/attachment.inc.php
Class attachment
Inherited Properties, Constants, and Methods
Method Summary
| array |
getList() |
get's all available informations about attachments either from a list of forums, topics, posts or private messages |
| array |
info() |
get's all available informations about attachments |
| file |
load() |
loads and views an attachment |
Methods
array getList(
mixed
$IDs, [array
$settings = array()], [bool
$bypassPerms = false]
)
|
|
get's all available informations about attachments either from a list of forums, topics, posts or private messages
Parameters:
|
mixed |
$IDs: |
IDs of the requested forums, topics, posts or PMs. Deliver them as array or single integer. |
|
array |
$settings: |
array with different settings for this function The following settings are supported: - string $settings[start]: For performance purposes, you are able to set a start parameter to set a section of the attachment list. This is used for forum-attachment-list only.
- string $settings[limit]: For performance purposes, you are able to set a limit parameter to set a section of the attachment list. This is used for forum-attachment-list only.
- string $settings[ipbwiLink]: If you want to use IPBWI for attachment-downloading, you are able to define the attachment-link here. The var %id% is required and will be replaced with the attachment-ID.
- string $settings[type]: Define which type your IDs are, choose between post or msg
|
|
bool |
$bypassPerms: |
set to true, to ignore permissions |
API Tags:
| Return: | attachment-informations in an array |
| Access: | public |
Information Tags:
| Author: | Matthias Reuter |
| Since: | 2.0 |
| Sample: | $ipbwi->attachment->getList(12,array('type' => 'forum','start' => 10, 'limit' => 20));
|
array info(
mixed
$IDs, [array
$settings = array()], [bool
$bypassPerms = false]
)
|
|
get's all available informations about attachments
Parameters:
|
mixed |
$IDs: |
relIDs (post or msg IDs) of the requested attachments. Deliver them as array or single integer. |
|
array |
$settings: |
array with different settings for this function The following settings are supported: - string $settings[ipbwiLink]: If you want to use IPBWI for attachment-downloading, you are able to define the attachment-link here. The var %id% is required and will be replaced with the attachment-ID. The var %hash% is optional and will be replaced with current hash key for deeplink protection.
- string $settings[type]: Define which type your IDs are, choose between post or msg
|
|
bool |
$bypassPerms: |
set to true, to ignore permissions |
API Tags:
| Return: | attachment-informations in an array |
| Access: | public |
Information Tags:
| Author: | Matthias Reuter |
| Since: | 2.0 |
| Sample: | $ipbwi->attachment->info(12,array('type' => 'post','ipbwiLink' => ipbwi_WEB_URL. 'examples/attachment.php?id=%id%'));
$ipbwi->attachment->info(12,array('type' => 'post','ipbwiLink' => ipbwi_WEB_URL. 'examples/attachment.php?id=%id%&hash=%hash%'));
$ipbwi->attachment->info(array(20,104,55), array('type' => 'msg'),true);
|
Redefinition of:
- ipbwi::info()
- informations about the current IPBWI and PHP installation
file load(
int
$attachID, [bool
$bypassPerms = false]
)
|
|
loads and views an attachment
Parameters:
|
int |
$attachID: |
ID of the attachment |
|
bool |
$bypassPerms: |
set to true, to ignore permissions |
API Tags:
| Return: | returns attachment-file to the browser |
| Access: | public |
Information Tags:
| Author: | Matthias Reuter |
| Since: | 2.0 |
| Sample: |
|
|
|