IP.Board  3.3.0
gallery_media Class Reference

Public Member Functions

 __construct (ipsRegistry $registry)
 allow ()
 allowedExtensions ()
 buildThumbs ($image, $opts=array())
 canUseFlashPlayer ($image)
 getMimeType ($ext)
 getPlayerHtml ($image, $playerOptions=array(), $opt=0)
 getThumb ($image, $opts=array())
 isAllowedExtension ($ext)

Protected Member Functions

 _checkCodec ($file)

Protected Attributes

 $_ext = array( 'flv' => 1, 'f4v' => 1, 'mp4' => 1, 'mov' => 1, 'm4a' => 1, 'm4v' => 1, '3gp' => 1, 'avi' => 0, 'wmv' => 0, 'mpg' => 1, 'mpeg' => 1, 'mkv' => 0, 'swf' => 1 )
 $_mtypes
 $cache
 $DB
 $lang
 $member
 $registry
 $request
 $settings

Constructor & Destructor Documentation

__construct ( ipsRegistry registry)

Constructor

public

Parameters:
ipsRegistry$registry
Returns:
void

Member Function Documentation

_checkCodec ( file) [protected]

Checks to see if it's a h264 movie

allow ( )

Allow media within gallery?

Returns:
boolean

Return an array of allowed extensions

Returns:
array
buildThumbs ( image,
opts = array() 
)

Build media thumbnails

public

Since:
2.1
Parameters:
arrayImage data
boolAdd watermark
Returns:
bool
canUseFlashPlayer ( image)

Can use flash player

Returns:
array
getMimeType ( ext)

Return a mime type

Returns:
array
getPlayerHtml ( image,
playerOptions = array(),
opt = 0 
)

Returns HTML for the player

Parameters:
array$image
arrayArray of player options (size, width)
int$opt
getThumb ( image,
opts = array() 
)

Get thumbnail

Parameters:
mixed$image
Returns:
string
isAllowedExtension ( ext)

Can use flash player

Returns:
array

Field Documentation

$_mtypes [protected]
Initial value:
 array( 'flv'  => 'video/x-flv',
                                                                'f4v'  => 'video/x-flv',
                                                                'mp4'  => 'video/mp4',
                                                                'mov'  => 'video/quicktime',
                                                                'm4a'  => 'audio/mp4a-latm',
                                                                'm4v'  => 'video/x-m4v',
                                                                '3gp'  => 'video/3gpp',
                                                                'avi'  => 'video/x-msvideo',
                                                                'wmv'  => 'video/x-ms-wmv',
                                                                'mpg'  => 'video/mpeg',
                                                                'mpeg' => 'video/mpeg',
                                                                'mkv'  => 'video/x-matroska',
                                                                'swf'  => 'application/x-shockwave-flash'
                                                                )

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