Class FlexUpload

Description

PHP-Class for easy implementation of FlexUpload in your own scripts

Located in /www/class.flexupload.inc.php (line 42)


	
			
Variable Summary
 integer $_height
 String $_locale
 integer $_maxFiles
 integer $_maxFileSize
 string $_noFlashMsg
 String $_pathToSWF
 String $_postURL
 integer $_width
Method Summary
 FlexUpload FlexUpload (String $postURL, [String $pathToSWF = ''], [String $width = 500], [String $height = 300], [String $maxFileSize = 2097152], [String $maxFiles = 100], [String $fileExtensions = '*.gif;*.jpg;*.jpeg;*.png'], [String $locale = ''])
 String getHTML ([Boolean $useSWFObject = true], [String $divId = 'flexupload'], [Boolean $includeSWFObject = true])
 void printHTML ([Boolean $useSWFObject = true], [String $divId = 'flexupload'], [Boolean $includeSWFObject = true])
 void setFileExtensions (String $fe)
 void setHeight (integer $h)
 void setLocale (integer $l)
 void setMaxFiles (integer $mf)
 void setMaxFileSize (integer $mfs)
 void setNoFlashMessage (string $msg)
 void setPathToSWF (String $path)
 void setPathToSWFObject (string $path)
 void setPostURL (String $postURL)
 void setWidth (integer $w)
Variables
String $_fileExtensions (line 77)

allowed file extensions

  • access: private
integer $_height (line 98)

the height of the flash movie

  • access: private
String $_locale (line 84)

the locale

  • access: private
integer $_maxFiles (line 70)

maximal allowed files

  • access: private
integer $_maxFileSize (line 63)

maximal allowed filesize

  • access: private
string $_noFlashMsg = '<p>You may not have everything you need to use Flexupload.<br />Please install or update "Flash Player" which is available for free at the <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Adobe website</a>.<br />Please also make sure you have JavaScript enabled.</p>' (line 105)

message to show when using SWFObject an Flash-Plugin is missing or wrong version

  • access: private
String $_pathToSWF (line 56)

the path to flexupload.swf

  • access: private
string $_pathToSWFObject = 'js/' (line 112)

path to the SWFObject Script

  • access: private
String $_postURL (line 49)

the url to the upload script

  • access: private
integer $_width (line 91)

the width of the flash movie

  • access: private
Methods
Constructor FlexUpload (line 126)

Constructor

FlexUpload FlexUpload (String $postURL, [String $pathToSWF = ''], [String $width = 500], [String $height = 300], [String $maxFileSize = 2097152], [String $maxFiles = 100], [String $fileExtensions = '*.gif;*.jpg;*.jpeg;*.png'], [String $locale = ''])
getHTML (line 278)

get the HTML code for implementing flexupload

see printHTML

  • return: the html code for the application
String getHTML ([Boolean $useSWFObject = true], [String $divId = 'flexupload'], [Boolean $includeSWFObject = true])
  • Boolean $useSWFObject: Use the SWFObject script for output (recommended)
  • String $divId: a unique id for the SWFObject <div>-Tag
  • Boolean $includeSWFObject: Include the swfobject.js in the code (if you don't set this to true you have to manually include swfobject.js) Also note: if you have more than one flexupload in one page you should include the javascript in the first one only!
printHTML (line 318)

prints the HTML code for flexupload to screen

see getHTML

void printHTML ([Boolean $useSWFObject = true], [String $divId = 'flexupload'], [Boolean $includeSWFObject = true])
  • Boolean $useSWFObject: Use the SWFObject script for output (recommended)
  • String $divId: a unique id for the SWFObject <div>-Tag
  • Boolean $includeSWFObject: Include the swfobject.js in the code (if you don't set this to true you have to manually include swfobject.js) Also note: if you have more than one flexupload in one page you should include the javascript in the first one only!
setFileExtensions (line 223)

set the allowed file extensions separated by semicolons (;)

set to empty string for all files

default is "*.gif;*.jpg;*.jpeg;*.png"

void setFileExtensions (String $fe)
  • String $fe
setHeight (line 186)

set the height of the application

the applet automatically scales to this height

default is 300

void setHeight (integer $h)
  • integer $h
setLocale (line 238)

set the language file for the application

e.g "locale/de.xml" or "http://www.example.com/flexupload/locale/de.xml" set en empty string to use the default locale (english)

default is ""

void setLocale (integer $l)
  • integer $l
setMaxFiles (line 210)

set the maximum of files to upload at once

set this to -1 for no limit

default is 100

void setMaxFiles (integer $mf)
  • integer $mf
setMaxFileSize (line 197)

set the maximum filesize (in bytes) allowed to upload

default is 2MB (2097152 bytes)

void setMaxFileSize (integer $mfs)
  • integer $mfs
setNoFlashMessage (line 250)

set the message to show when using SWFObject an flash plugin is not installed or wrong version

default is "You may not have everything you need ..."

void setNoFlashMessage (string $msg)
  • string $msg
setPathToSWF (line 160)

set the path to the SWF file

Give an absolute or relative path to flexupload.swf or an empty string if flexupload.swf is in the same directory like the php-file using this class.

default is empty string

void setPathToSWF (String $path)
  • String $path
setPathToSWFObject (line 262)

set the path to the SWFObject JavaScript script

default is "js/"

void setPathToSWFObject (string $path)
  • string $path
setPostURL (line 146)

set the postURL parameter

the postURL have to be a full url incl. protocol e.g. "http://localhost/upload.php"

void setPostURL (String $postURL)
  • String $postURL
setWidth (line 173)

set the width of the application

the applet automatically scales to this width

default is 500

void setWidth (integer $w)
  • integer $w

Documentation generated on Mon, 18 Jun 2007 21:42:50 +0200 by phpDocumentor 1.3.0RC3