phpDocumentor attachment
[ class tree: attachment ] [ index: attachment ] [ all elements ]

Class: attachment

Source Location: /lib/attachment.inc.php

Class attachment

Class Overview

Located in /lib/attachment.inc.php [line 11]

ipbwi
   |
   --attachment
Author(s):
  • Matthias Reuter ($LastChangedBy: matthias $)
Information Tags:
Version:  $LastChangedDate: 2009-01-21 23:25:02 +0000 (Mi, 21 Jan 2009) $
Copyright:  2007-2008 IPBWI development team
Link:  http://ipbwi.com/examples/attachment.php
Since:  2.0
License:  GNU General Public License

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From ipbwi

ipbwi::$DB
ipbwi::$ips

Inherited From ipbwi

ipbwi::addSystemMessage()
adds a system message
ipbwi::date()
Returns textual/timestamp offsetted date by board and by member offset and DST setting.
ipbwi::getBoardVar()
gets the requested board-var
ipbwi::getLibLang()
gets the language-var from actual requested native language-bit
ipbwi::info()
informations about the current IPBWI and PHP installation
ipbwi::makeSafe()
filtering html-strings, e.g. for db-queries
ipbwi::printSystemMessages()
prints system messages
ipbwi::properXHTML()
filtering HTML strings
ipbwi::setLang()
Set's current SDK language
ipbwi::updateSession()
Update Member Session Informations

Inherited From ipbwi

ipbwi::DEV_TEAM
ipbwi::PROJECT_LEADER
ipbwi::TITLE
ipbwi::VERSION
ipbwi::WEBSITE

[ Top ]
Property Summary
mixed   $hash  

[ Top ]
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

[ Top ]
Properties
mixed   $hash = false [line 17]
API Tags:
Access:  public


[ Top ]
Methods
getList  [line 259]

  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:  
  1.  $ipbwi->attachment->getList(12,array('type' => 'forum','start' => 10'limit' => 20));
  2.  $ipbwi->attachment->getList(array(20,104,55)array('type' => 'topic'),true);

[ Top ]
info  [line 130]

  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:  
  1.  $ipbwi->attachment->info(12,array('type' => 'post','ipbwiLink' => ipbwi_WEB_URL.'examples/attachment.php?id=%id%'));
  2.  $ipbwi->attachment->info(12,array('type' => 'post','ipbwiLink' => ipbwi_WEB_URL.'examples/attachment.php?id=%id%&hash=%hash%'));
  3.  $ipbwi->attachment->info(array(20,104,55)array('type' => 'msg'),true);

Redefinition of:
ipbwi::info()
informations about the current IPBWI and PHP installation

[ Top ]
load  [line 282]

  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:  
  1.  $ipbwi->attachment->load(10,true);

[ Top ]

Documentation generated on Mon, 02 Mar 2009 23:50:31 +0100 by phpDocumentor 1.4.0