UNA
|
Public Member Functions | |
isAvailable () | |
isInstalled () | |
getNameJsInstanceUploader () | |
getIdContainerResult () | |
getIdContainerUploadInProgress () | |
getIdContainerPopup () | |
getIdContainerErrors () | |
handleUploads ($iProfileId, $mixedFiles, $isMultiple=true, $iContentId=false, $bPrivate=true) | |
getUploadErrorMessages ($sFormat='HTML') | |
getUploaderButton ($aParams=array()) | |
getUploaderJsParams () | |
getUploaderJs ($mixedGhostTemplate, $isMultiple=true, $aParams=array(), $bDynamic=false) | |
addCssJs ($bDynamic=false) | |
addJs ($mixedFile) | |
addCss ($mixedFile) | |
getUploaderButtonTitle ($mixed=false) | |
getUploaderForm ($isMultiple=true, $iContentId=false, $isPrivate=true) | |
getGhosts ($iProfileId, $sFormat, $sImagesTranscoder=false, $iContentId=false) | |
getGhostsWithOrder ($iProfileId, $sFormat, $sImagesTranscoder=false, $iContentId=false) | |
reorderGhosts ($iProfileId, $sFormat, $aGhosts, $iContentId=false) | |
deleteGhost ($iFileId, $iProfileId) | |
deleteGhostsForProfile ($iProfileId, $iContentId=false) | |
appendUploadErrorMessage ($s) | |
Static Public Member Functions | |
static | getObjectInstance ($sObject, $sStorageObject, $sResultContainerId, $oTemplate=false) |
Protected Member Functions | |
__construct ($aObject, $sStorageObject, $sUniqId, $oTemplate) | |
cleanUploadErrorMessages () | |
getRestrictionsText () | |
getMaxUploadFileSize () | |
getAcceptedFilesExtensions () | |
getGhostTemplateVars ($aFile, $iProfileId, $iContentId, $oStorage, $oImagesTranscoder) | |
isUseTranscoderForPreview ($oImagesTranscoder, $aFile) | |
isAdmin ($iContentId=0) | |
Uploaders are disigned to work as form field in forms.
To add file to any form, use the following form field array:
Available uploaders:
Uploaded files are showed as "nested" forms. You can pass nested form in 'ghost_template' parameter. If you don't pass anything in 'ghost_template' parameter, then only file id is passed upon form submission. The nested form can be declared using the different ways:
Array is automatically modified to add necessary form attributes to work as nested form, file id field is added automatically as hidden input as well.
All 3 variants can have the following replace markers to substitute with real values:
|
protected |
constructor
Reimplemented in BxAdsUploaderHTML5, BxAdsUploaderHTML5Attach, BxAdsUploaderRecordVideo, BxAdsUploaderRecordVideoAttach, BxAlbumsUploaderCrop, BxAlbumsUploaderHTML5, BxAlbumsUploaderRecordVideo, BxBaseCmtsUploaderHTML5, BxBaseModFilesUploaderHTML5, BxBaseModGroupsUploaderCoverCrop, BxBaseModGroupsUploaderPictureCrop, BxBaseModProfileUploaderCoverCrop, BxBaseModProfileUploaderPictureCrop, BxBaseModTextUploaderHTML5, BxBaseModTextUploaderHTML5Attach, BxBaseModTextUploaderRecordVideo, BxBaseModTextUploaderRecordVideoAttach, BxBaseStudioBuilderPageUploaderHTML5, BxBaseStudioSettingsUploaderHTML5, BxBaseStudioUploaderCropCover, BxBaseUploaderCrop, BxBaseUploaderHTML5, BxBaseUploaderRecordVideo, BxBaseUploaderSimple, BxClssUploaderHTML5, BxClssUploaderHTML5Attach, BxClssUploaderRecordVideo, BxClssUploaderRecordVideoAttach, BxCnlUploaderCoverCrop, BxCnlUploaderPictureCrop, BxCoursesUploaderCoverCrop, BxCoursesUploaderPictureCrop, BxEventsUploaderCoverCrop, BxEventsUploaderPictureCrop, BxFilesUploaderHTML5, BxForumUploaderHTML5, BxForumUploaderHTML5Attach, BxForumUploaderRecordVideo, BxForumUploaderRecordVideoAttach, BxGlsrUploaderHTML5, BxGroupsUploaderCoverCrop, BxGroupsUploaderPictureCrop, BxJobsUploaderCoverCrop, BxJobsUploaderPictureCrop, BxMarketUploaderHTML5, BxOrgsUploaderCoverCrop, BxOrgsUploaderPictureCrop, BxPersonsUploaderCoverCrop, BxPersonsUploaderPictureCrop, BxPhotosUploaderHTML5, BxPostsUploaderHTML5, BxPostsUploaderHTML5Attach, BxPostsUploaderRecordVideo, BxPostsUploaderRecordVideoAttach, BxReviewsUploaderHTML5, BxReviewsUploaderHTML5Attach, BxReviewsUploaderRecordVideo, BxReviewsUploaderRecordVideoAttach, BxSpacesUploaderCoverCrop, BxSpacesUploaderPictureCrop, BxStrmUploaderHTML5, BxTasksUploaderHTML5, BxTasksUploaderHTML5Attach, BxTasksUploaderRecordVideo, BxTasksUploaderRecordVideoAttach, BxTemplCmtsUploaderHTML5, BxTemplStudioBuilderPageUploaderHTML5, BxTemplStudioSettingsUploaderHTML5, BxTemplStudioUploaderCropCover, BxTemplUploaderCrop, BxTemplUploaderHTML5, BxTemplUploaderRecordVideo, BxTimelineUploaderHTML5Attach, BxTimelineUploaderRecordVideoAttach, BxVideosUploaderHTML5, and BxVideosUploaderRecordVideo.
BxDolUploader::addCssJs | ( | $bDynamic = false | ) |
add necessary js, css files and js translations
Reimplemented in BxBaseUploaderCrop, and BxBaseUploaderRecordVideo.
BxDolUploader::deleteGhost | ( | $iFileId, | |
$iProfileId ) |
Delete file by file id, usually ghost file
Reimplemented in BxBaseStudioSettingsUploaderHTML5.
BxDolUploader::deleteGhostsForProfile | ( | $iProfileId, | |
$iContentId = false ) |
Delete all ghosts files for the specified profile
Reimplemented in BxBaseModProfileUploaderCoverCrop, and BxBaseModProfileUploaderPictureCrop.
BxDolUploader::getGhosts | ( | $iProfileId, | |
$sFormat, | |||
$sImagesTranscoder = false, | |||
$iContentId = false ) |
Display uploaded, but not saved files - ghosts
$iProfileId | - profile id to get orphaned files from |
$sFormat | - output format, only 'json' output formt is supported |
$sImagesTranscoder | - transcoder object for files preview for images and videos, false by default - no preview |
$iContentId | - content id to get orphaned files from, false by default |
Reimplemented in BxBaseModProfileUploaderCoverCrop, BxBaseModProfileUploaderPictureCrop, and BxBaseStudioSettingsUploaderHTML5.
BxDolUploader::getUploaderButton | ( | $aParams = array() | ) |
BxDolUploader::getUploaderButtonTitle | ( | $mixed = false | ) |
Get uploader button title
Reimplemented in BxBaseUploaderCrop, BxBaseUploaderHTML5, BxBaseUploaderRecordVideo, and BxBaseUploaderSimple.
BxDolUploader::getUploaderForm | ( | $isMultiple = true, | |
$iContentId = false, | |||
$isPrivate = true ) |
Show uploader form.
Reimplemented in BxBaseUploaderCrop, BxBaseUploaderHTML5, and BxBaseUploaderSimple.
BxDolUploader::getUploaderJs | ( | $mixedGhostTemplate, | |
$isMultiple = true, | |||
$aParams = array(), | |||
$bDynamic = false ) |
Show uploader JS.
Reimplemented in BxBaseUploaderRecordVideo, and BxTimelineUploaderHTML5Attach.
BxDolUploader::handleUploads | ( | $iProfileId, | |
$mixedFiles, | |||
$isMultiple = true, | |||
$iContentId = false, | |||
$bPrivate = true ) |
Handle uploads here.
$mixedFiles | as usual $_FILES['some_name'] array, but maybe some other params depending on the uploader |
Reimplemented in BxBaseStudioSettingsUploaderHTML5, BxBaseUploaderCrop, BxBaseUploaderHTML5, and BxBaseUploaderRecordVideo.
BxDolUploader::isAvailable | ( | ) |
Is uploader available?
BxDolUploader::isInstalled | ( | ) |
Are required php modules installed for this uploader ?
BxDolUploader::reorderGhosts | ( | $iProfileId, | |
$sFormat, | |||
$aGhosts, | |||
$iContentId = false ) |
Reorder uploaded ghosts.
$iProfileId | - profile id to get orphaned files from |
$sFormat | - output format, only 'json' output formt is supported |
$aGhosts | - an array of ordered ghosts' IDs. |
$iContentId | - content id to order orphaned files for, false by default |