class CommunityPhotosController extends CommunityBaseController


Located at : UKNOWVA_ROOT/components/com_community/controllers/photos.php

Properties

$_modelInstances from CommunityBaseController
$_libraryInstances from CommunityBaseController
$_viewInstances from CommunityBaseController
$_name from CommunityBaseController
$my from CommunityBaseController

Methods

__construct(array $config = array())

Constructor.

string
__toString()

Magic method to convert the object to a string gracefully.

from JObject
mixed
def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

from JObject
mixed
get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

from JObject
array
getProperties(boolean $public = true)

Returns an associative array of object properties.

from JObject
string
getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

from JObject
array
getErrors()

Return all errors, if any.

from JObject
mixed
set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

from JObject
boolean
setProperties(mixed $properties)

Set the object properties based on a named array/hash.

from JObject
void
setError(string $error)

Add an error message.

from JObject
string
toString() deprecated

No description

from JObject
static void
addModelPath(mixed $path, string $prefix = '')

Adds to the stack of model paths in LIFO order.

static mixed
getInstance(string $prefix, array $config = array())

Method to get a singleton controller instance.

addViewPath(mixed $path)

Add one or more view paths to the controller's stack, in LIFO order.

boolean
authorize(string $task) deprecated

Authorisation check

boolean
authorise(string $task)

Authorisation check

display()

Default task in photos controller

mixed
execute(string $task = '')

Execute a request

object
getModel(string $name = '', string $prefix = '', array $config = array())

Return the model object, responsible for all db manipulation. Singleton

string
getName()

Method to get the controller name

string
getTask()

Get the last task that is being performed or was most recently performed.

array
getTasks()

Gets the available tasks in the controller.

object
getView($viewName = 'frontpage', string $prefix = '', $viewType = '')

Return the view object, which will output the final html. The view object is a singleton

boolean
redirect()

Redirects the browser or returns false if no redirect is set.

registerDefaultTask(string $method)

Register the default task to perform if a mapping is not found.

registerTask(string $task, string $method)

Register (map) a task to a method in the class.

unregisterTask(string $task)

Unregister (unmap) a task in the class.

void
setAccessControl(string $section, string $value = null) deprecated

Sets the access control levels.

string
setMessage(string $text, string $type = 'message')

Sets the internal message that is passed with a redirect

setRedirect(string $url, string $msg = null, string $type = null)

Set a URL for browser redirection.

CommunityBaseController($config = array())

No description

_notify($cmd, $from, $to, $subject, $body, $template = '', $params = '')

Deprecated since 1.8.x

ajaxBlockUnregister()

A guest trying to use registered-only part of the system via ajax. Display a link to register

blockUserAccess()

Block user access to the controller method.

blockUnregister($uri = null)

No description

loadHelper($name)

No description

getLibrary($name = '', $prefix = '', $config = array())

No description

executeMobile($task = '')

No description

executeAjax($method, $ajaxArg)

Execute ajax request

ajaxBlock()

restrict blocked user to access owner details

ajaxRestrictBlockAdmin()

restrict user to block community admin

cacheClean($cacheId)

No description

regen()

No description

editPhotoWall($wallId)

No description

ajaxSaveOrdering($ordering, $albumId)

No description

jsonupload()

No description

ajaxLinkToProfile($photoId)

Allows user to link to the current photo as their profile picture

ajaxAddPhotoTag($photoId, $userId, $posX, $posY, $w, $h)

No description

ajaxRemovePhotoTag($photoId, $userId)

No description

ajaxDisplayCreator($photoid)

Deprecated since 2.0.x Use ajaxSwitchPhotoTrigger instead.

ajaxRemoveFeatured($albumId)

No description

ajaxAddFeatured($albumId)

No description

reportPhoto($link, $message, $id)

Method is called from the reporting library. Function calls should be registered here.

unpublishPhoto($photoId)

No description

deletePhoto($photoId)

Deprecated since 1.8.x

ajaxSetDefaultPhoto($albumId, $photoId)

No description

ajaxRemoveAlbum($id, $currentTask)

Ajax method to display remove an album notice

ajaxConfirmRemovePhoto($photoId, $action = '', $updatePlayList = 1)

No description

ajaxRemovePhoto($photoId, $action = '')

No description

showWallContents($photoId)

Populate the wall area in photos with wall/comments content

ajaxSaveCaption($photoId, $caption, $needAddScript = true)

Ajax method to save the caption of a photo

ajaxSaveAlbumDesc(int $albumId, string $description, boolean $needAddScript = true)

Since 2.4 Ajax method to save the album description

ajaxSwitchPhotoTrigger($photoId)

Trigger any necessary items that needs to be changed when the photo is changed.

ajaxUpdateCounter($albumId)

No description

ajaxGetAlbumURL($albumId, $groupId = '')

Get Album URL and Reload Browser to Album page

ajaxGotoOldUpload($albumId, $groupId = '')

Goto Conventional Photo Upload Page if browser only supports html4

ajaxCreateAlbum($albumName, $groupId)

Create new album for the photos

ajaxShowThumbnail($albumId = '')

No description

ajaxUploadPhoto($albumId = '', $groupId = '')

Photo Upload Popup

ajaxRemoveWall($wallId)

No description

ajaxAlbumRemoveWall($wallId)

No description

editalbumWall()

No description

ajaxAlbumSaveWall($message, $uniqueId, $appId = null)

Ajax function to save a new wall entry

ajaxSaveWall($message, $uniqueId, $appId = null)

Ajax function to save a new wall entry

myphotos()

Alias method that calls the display task in photos controller

newalbum()

Create new album for the photos

album()

Display all photos from the current album

photo()

Displays the photo

editAlbum()

Method to edit an album

removealbum()

Controller method to remove an album

showimage($showPhoto = true)

Generates a resized image of the photo

uploader()

No description

checkPhotoAccess()

No description

type
ajaxPreview()

Preview a photo upload

multiUpload()

No description

upload()

No description

ajaxAddPhotoHits($photoId)

Deprecated since 2.0.x Use ajaxSwitchPhotoTrigger instead.

ajaxRotatePhoto($photoId, $orientation)

No description

ajaxUploadAvatar($type, $id)

No description

changeAvatar()

No description

ajaxUpdateThumbnail($type, $id, $sourceX, $sourceY, $width, $height)

No description

app()

Full application view

Details

in JController at line 292
JObject __construct(array $config = array())

Constructor.

Parameters

array $config An optional associative array of configuration settings. Recognized key values include 'name', 'defaulttask', 'modelpath', and 'view_path' (this list is not meant to be comprehensive).

Return Value

JObject

in JObject at line 56
string __toString()

Magic method to convert the object to a string gracefully.

Return Value

string The classname.

in JObject at line 70
mixed def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed

in JObject at line 88
mixed get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed The value of the property.

See also

getProperties()

in JObject at line 107
array getProperties(boolean $public = true)

Returns an associative array of object properties.

Parameters

boolean $public If true, returns only the public properties.

Return Value

array

See also

get()

in JObject at line 133
string getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

Parameters

integer $i Option error index.
boolean $toString Indicates if JError objects should return their error message.

Return Value

string Error message

in JObject at line 165
array getErrors()

Return all errors, if any.

Return Value

array Array of error messages or JErrors.

in JObject at line 180
mixed set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.

in JObject at line 198
boolean setProperties(mixed $properties)

Set the object properties based on a named array/hash.

Parameters

mixed $properties Either an associative array or another object.

Return Value

boolean

See also

set()

in JObject at line 222
void setError(string $error)

Add an error message.

Parameters

string $error Error message.

Return Value

void

in JObject at line 235
string toString() deprecated

deprecated 12.1 Use magic method __toString()

Return Value

string

See also

__toString()

in JController at line 156
static void addModelPath(mixed $path, string $prefix = '')

Adds to the stack of model paths in LIFO order.

Parameters

mixed $path The directory (string), or list of directories (array) to add.
string $prefix A prefix for models

Return Value

void

in JController at line 212
static mixed getInstance(string $prefix, array $config = array())

Method to get a singleton controller instance.

Parameters

string $prefix The prefix for the controller.
array $config An array of optional constructor options.

Return Value

mixed JController derivative class or JException on error.

in JController at line 427
JController addViewPath(mixed $path)

Add one or more view paths to the controller's stack, in LIFO order.

Parameters

mixed $path The directory (string) or list of directories (array) to add.

Return Value

JController This object to support chaining.

in JController at line 445
boolean authorize(string $task) deprecated

deprecated 12.1 Use JAuthorise

Authorisation check

Parameters

string $task The ACO Section Value to check access on

Return Value

boolean True if authorised

in JController at line 461
boolean authorise(string $task)

Authorisation check

Parameters

string $task The ACO Section Value to check access on.

Return Value

boolean True if authorised

at line 1667
JController display()

Default task in photos controller

Return Value

JController A JController object to support chaining.

mixed execute(string $task = '')

Execute a request

Parameters

string $task The task to perform. If no matching task is found, the '__default' task is executed, if defined.

Return Value

mixed The value returned by the called method, false in error case.

object getModel(string $name = '', string $prefix = '', array $config = array())

Return the model object, responsible for all db manipulation. Singleton

Parameters

string $name The model name. Optional.
string $prefix The class prefix. Optional.
array $config Configuration array for model. Optional.

Return Value

object The model.

string getName()

Method to get the controller name

The dispatcher name is set by default parsed using the classname, or it can be set by passing a $config['name'] in the class constructor

Return Value

string The name of the dispatcher

in JController at line 761
string getTask()

Get the last task that is being performed or was most recently performed.

Return Value

string The task that is being performed or was most recently performed.

in JController at line 772
array getTasks()

Gets the available tasks in the controller.

Return Value

array Array[i] of task names.

object getView($viewName = 'frontpage', string $prefix = '', $viewType = '')

Return the view object, which will output the final html. The view object is a singleton

Parameters

$viewName
string $prefix The class prefix. Optional.
$viewType

Return Value

object Reference to the view or an error.

in JController at line 857
boolean redirect()

Redirects the browser or returns false if no redirect is set.

Return Value

boolean False if no redirect exists.

in JController at line 875
JController registerDefaultTask(string $method)

Register the default task to perform if a mapping is not found.

Parameters

string $method The name of the method in the derived class to perform if a named task is not found.

Return Value

JController A JController object to support chaining.

in JController at line 891
JController registerTask(string $task, string $method)

Register (map) a task to a method in the class.

Parameters

string $task The task.
string $method The name of the method in the derived class to perform for this task.

Return Value

JController A JController object to support chaining.

in JController at line 908
JController unregisterTask(string $task)

Unregister (unmap) a task in the class.

Parameters

string $task The task.

Return Value

JController This object to support chaining.

in JController at line 958
void setAccessControl(string $section, string $value = null) deprecated

deprecated 12.1 Use JAccess

Sets the access control levels.

Parameters

string $section The ACO section (eg, the component).
string $value The ACO section value (if using a constant value).

Return Value

void

See also

Jaccess

in JController at line 973
string setMessage(string $text, string $type = 'message')

Sets the internal message that is passed with a redirect

Parameters

string $text Message to display on redirect.
string $type Message type (since 11.1). Optional, defaults to 'message'.

Return Value

string Previous message

in JController at line 1013
JController setRedirect(string $url, string $msg = null, string $type = null)

Set a URL for browser redirection.

Parameters

string $url URL to redirect to.
string $msg Message to display on redirect. Optional, defaults to value set internally by controller, if any.
string $type Message type. Optional, defaults to 'message' or the type set by a previous call to setMessage.

Return Value

JController This object to support chaining.

CommunityBaseController($config = array())

Parameters

$config

_notify($cmd, $from, $to, $subject, $body, $template = '', $params = '')

Deprecated since 1.8.x

Parameters

$cmd
$from
$to
$subject
$body
$template
$params

ajaxBlockUnregister()

A guest trying to use registered-only part of the system via ajax. Display a link to register

blockUserAccess()

Block user access to the controller method.

blockUnregister($uri = null)

Parameters

$uri

loadHelper($name)

Parameters

$name

getLibrary($name = '', $prefix = '', $config = array())

Parameters

$name
$prefix
$config

executeMobile($task = '')

Parameters

$task

executeAjax($method, $ajaxArg)

Execute ajax request

Parameters

$method
$ajaxArg

ajaxBlock()

restrict blocked user to access owner details

ajaxRestrictBlockAdmin()

restrict user to block community admin

cacheClean($cacheId)

Parameters

$cacheId

at line 15
regen()

at line 86
editPhotoWall($wallId)

Parameters

$wallId

at line 98
ajaxSaveOrdering($ordering, $albumId)

Parameters

$ordering
$albumId

at line 139
jsonupload()

at line 331
ajaxLinkToProfile($photoId)

Allows user to link to the current photo as their profile picture

Parameters

$photoId

at line 354
ajaxAddPhotoTag($photoId, $userId, $posX, $posY, $w, $h)

Parameters

$photoId
$userId
$posX
$posY
$w
$h

at line 453
ajaxRemovePhotoTag($photoId, $userId)

Parameters

$photoId
$userId

at line 491
ajaxDisplayCreator($photoid)

Deprecated since 2.0.x Use ajaxSwitchPhotoTrigger instead.

Parameters

$photoid

at line 511
ajaxRemoveFeatured($albumId)

Parameters

$albumId

at line 553
ajaxAddFeatured($albumId)

Parameters

$albumId

at line 606
reportPhoto($link, $message, $id)

Method is called from the reporting library. Function calls should be registered here.

return String Message that will be displayed to user upon submission.

Parameters

$link
$message
$id

at line 633
unpublishPhoto($photoId)

Parameters

$photoId

at line 645
deletePhoto($photoId)

Deprecated since 1.8.x

Parameters

$photoId

at line 666
ajaxSetDefaultPhoto($albumId, $photoId)

Parameters

$albumId
$photoId

at line 705
ajaxRemoveAlbum($id, $currentTask)

Ajax method to display remove an album notice

Parameters

$id
$currentTask

at line 741
ajaxConfirmRemovePhoto($photoId, $action = '', $updatePlayList = 1)

Parameters

$photoId
$action
$updatePlayList

at line 781
ajaxRemovePhoto($photoId, $action = '')

Parameters

$photoId
$action

at line 843
showWallContents($photoId)

Populate the wall area in photos with wall/comments content

Parameters

$photoId

at line 877
ajaxSaveCaption($photoId, $caption, $needAddScript = true)

Ajax method to save the caption of a photo

Parameters

$photoId
$caption
$needAddScript

at line 930
ajaxSaveAlbumDesc(int $albumId, string $description, boolean $needAddScript = true)

Since 2.4 Ajax method to save the album description

Parameters

int $albumId The album id
string $description The album description to save
boolean $needAddScript If true then will update textarea in web browser

at line 969
ajaxSwitchPhotoTrigger($photoId)

Trigger any necessary items that needs to be changed when the photo is changed.

Parameters

$photoId

at line 1046
ajaxUpdateCounter($albumId)

Parameters

$albumId

at line 1083
ajaxGetAlbumURL($albumId, $groupId = '')

Get Album URL and Reload Browser to Album page

Parameters

$albumId
$groupId

at line 1100
ajaxGotoOldUpload($albumId, $groupId = '')

Goto Conventional Photo Upload Page if browser only supports html4

Parameters

$albumId
$groupId

at line 1122
ajaxCreateAlbum($albumName, $groupId)

Create new album for the photos

Parameters

$albumName
$groupId

at line 1220
ajaxShowThumbnail($albumId = '')

Parameters

$albumId

at line 1246
ajaxUploadPhoto($albumId = '', $groupId = '')

Photo Upload Popup

Parameters

$albumId
$groupId

at line 1336
ajaxRemoveWall($wallId)

Parameters

$wallId

at line 1381
ajaxAlbumRemoveWall($wallId)

Parameters

$wallId

at line 1414
editalbumWall()

at line 1424
ajaxAlbumSaveWall($message, $uniqueId, $appId = null)

Ajax function to save a new wall entry

Parameters

$message
$uniqueId
$appId

at line 1531
ajaxSaveWall($message, $uniqueId, $appId = null)

Ajax function to save a new wall entry

Parameters

$message
$uniqueId
$appId

at line 1683
myphotos()

Alias method that calls the display task in photos controller

at line 1701
newalbum()

Create new album for the photos

at line 1783
album()

Display all photos from the current album

at line 1800
photo()

Displays the photo

at line 1817
editAlbum()

Method to edit an album

at line 1886
removealbum()

Controller method to remove an album

at line 1957
showimage($showPhoto = true)

Generates a resized image of the photo

Parameters

$showPhoto

at line 2018
uploader()

at line 2084
checkPhotoAccess()

at line 2156
type ajaxPreview()

Preview a photo upload

Return Value

type

at line 2315
multiUpload()

at line 2321
upload()

at line 2722
ajaxAddPhotoHits($photoId)

Deprecated since 2.0.x Use ajaxSwitchPhotoTrigger instead.

Parameters

$photoId

at line 2735
ajaxRotatePhoto($photoId, $orientation)

Parameters

$photoId
$orientation

at line 2849
ajaxUploadAvatar($type, $id)

Parameters

$type
$id

at line 2906
changeAvatar()

at line 3023
ajaxUpdateThumbnail($type, $id, $sourceX, $sourceY, $width, $height)

Parameters

$type
$id
$sourceX
$sourceY
$width
$height

at line 3063
app()

Full application view