class vB5_Frontend_Controller_Uploader extends vB5_Frontend_Controller

Properties

protected $vboptions vboptions * from vB5_Frontend_Controller
protected $api
protected $upload_handler

Methods

__construct()

No description

sendAsJson($data)

No description

showMsgPage(string $title, string $msg) deprecated

Show a simple and clear message page which contains no widget

toSeoFriendly(string $str)

Replaces special characters in a given string with dashes to make the string SEO friendly Note: This is really restrictive. If it can be helped, leave it to core's vB_String::getUrlIdent.

boolean
handleErrorsForAjax(mixed $result, mixed $return)

Handle errors that are returned by API for use in JSON AJAX responses.

verifyPostRequest()

Checks if this is a POST request

outputPage($html, $exit = true)

Any final processing, and then output the page

parseBbCodeForPreview($rawText, $options = array())

No description

addAttachments(mixed $data)

Adds attachment information so attachments can be created in one call

string
encodeFlashMessage(string $phrase)

Generates a signed message to pass to the following page, so that the message can be displayed briefly to the user (flashed).

actionGetUploader()

No description

actionUrl()

Fetches an image from a URL and adds it as an attachment.

actionUploadLogoUrl()

Uploads an image and sets it as the logo in one step

actionUploadFile()

Uploads a file.

actionUploadPhoto()

Uploads a photo. Returns an edit block and the photo URL.

actionUploadLogo()

This method uploads an image and sets it as the logo in one step *

actionSetlogo()

This method sets an uploaded image as the logo*

actionCKEditorInsertImage()

No description

actionUpload()

This method uploads an image as filedata and returns an array of useful information including the filedataid and links to the image and the thumbnail *

actionUploadProfilepicture()

This sets a profile picture *

actionUploadSGIcon()

This sets a sgocial group/blog picture (when changed from the sidebar, NOT the admin settings page)

actionSaveAttachmentSetting()

No description

actionFetchFiledataid()

No description

Details

at line 19
__construct()

sendAsJson($data)

Parameters

$data

showMsgPage(string $title, string $msg) deprecated

deprecated

Show a simple and clear message page which contains no widget

Parameters

string $title Page title. HTML will be escaped.
string $msg Message to display. HTML is allowed and the caller must make sure it's valid.

protected toSeoFriendly(string $str)

Replaces special characters in a given string with dashes to make the string SEO friendly Note: This is really restrictive. If it can be helped, leave it to core's vB_String::getUrlIdent.

Parameters

string $str The string to be converted

protected boolean handleErrorsForAjax(mixed $result, mixed $return)

Handle errors that are returned by API for use in JSON AJAX responses.

Parameters

mixed $result The result array to populate errors into. It will contain error phrase ids.
mixed $return The returned object by the API call.

Return Value

boolean true errors are found, false, otherwise.

protected verifyPostRequest()

Checks if this is a POST request

protected outputPage($html, $exit = true)

Any final processing, and then output the page

Parameters

$html
$exit

protected parseBbCodeForPreview($rawText, $options = array())

Parameters

$rawText
$options

protected addAttachments(mixed $data)

Adds attachment information so attachments can be created in one call

This will modify the $data array to add data under the keys 'attachments' for added attachments & 'removeattachments' for attachments requested for removal.

Parameters

mixed $data array of node data for insert

protected sendAsJsonAndCloseConnection($data)

Parameters

$data

protected string encodeFlashMessage(string $phrase)

Generates a signed message to pass to the following page, so that the message can be displayed briefly to the user (flashed).

Parameters

string $phrase The phrase key for the message to display

Return Value

string The signed value that should be passed as a query parameter using the format flashmsg=

at line 25
actionGetUploader()

at line 44
actionUrl()

Fetches an image from a URL and adds it as an attachment.

Used by: (not necessarily an exhaustive list) Content entry UI attachments panel, when uploading from a URL Content entry UI "image" button in toolbar, when fetching and saving as a local attachment Uploading a profile image / avatar, when uploading from a URL Uploading a signature pic, when uploading from a URL Uploading a group image, when uploading from a URL Uploading a site logo in sitebuilder, when uploading from a URL

at line 76
actionUploadLogoUrl()

Uploads an image and sets it as the logo in one step

at line 110
actionUploadFile()

Uploads a file.

at line 148
actionUploadPhoto()

Uploads a photo. Returns an edit block and the photo URL.

This method uploads an image and sets it as the logo in one step *

This method sets an uploaded image as the logo*

at line 267
actionCKEditorInsertImage()

at line 288
actionUpload()

This method uploads an image as filedata and returns an array of useful information including the filedataid and links to the image and the thumbnail *

at line 317
actionUploadProfilepicture()

This sets a profile picture *

at line 355
actionUploadSGIcon()

This sets a sgocial group/blog picture (when changed from the sidebar, NOT the admin settings page)

at line 417
actionSaveAttachmentSetting()

at line 491
actionFetchFiledataid()