Cheetah
|
Public Member Functions | |
__construct (&$aModule) | |
actionHome () | |
actionGetSiteAvatars ($iPage) | |
actionSetSiteAvatar ($sImg) | |
actionSetAvatar ($iProfileId, $sImg) | |
actionSetAvatarCouple ($iProfileId, $sImg) | |
_setAvatar ($iProfileId, $sImg, $isSetAvatarForCouple=false) | |
actionRemoveAvatar ($iProfileId, $sImg) | |
actionMemberThumb ($iProfileId) | |
actionAdministration () | |
serviceSetImageForCropping ($iProfileId, $sOrigPath) | |
serviceMakeAvatarFromImage ($sImg) | |
serviceMakeAvatarFromImageUrl ($sImgUrl) | |
serviceMakeAvatarFromSharedPhotoAuto ($iSharedPhotoId) | |
serviceCropTool ($aParams) | |
serviceDeleteProfileAvatars ($iProfileId) | |
serviceJoin ($iMemID, $sStatusText) | |
serviceGetSiteAvatars ($iPage) | |
serviceManageAvatars ($iProfileId, $isAddJsCss=false) | |
serviceGetMyAvatars ($iProfileId) | |
serviceGetWallPost ($aEvent) | |
serviceGetWallData () | |
onEventCreate ($iEntryId) | |
onEventChanged ($iProfileId, $iEntryId, $iCoupleProfileId=0, $isTryToSuspend=true) | |
onEventDeleted ($iEntryId, $aDataEntry=array()) | |
isAllowedAdd ($isPerformAction=false) | |
isAllowedEdit ($aDataEntry, $isPerformAction=false) | |
isAllowedDelete (&$aDataEntry, $isPerformAction=false) | |
isAdmin () | |
_defineActions () | |
_removeAvatar ($iProfileId, $iAvatar) | |
_addAvatar ($sFullPath, $isMove=false, $isUpdateProfile=true) | |
_resizeImage ($sImageSrc, $sImageDst, $iWidth, $iHeight, $bSquareResize=false, $bJpegOutput=true) | |
_uploadImage ($iProfileId=0) | |
_makeAvatarFromSharedPhoto ($iSharedPhotoId) | |
_cropAvatar () | |
![]() | |
__construct ($aModule) | |
isLogged () | |
getUserId () | |
getUserPassword () | |
getTitleKey ($sUri) | |
serviceGetBaseUrl () | |
Public Attributes | |
$_iProfileId | |
$_aAllowedExt | |
![]() | |
$_aModule | |
$_oDb | |
$_oTemplate | |
$_oConfig | |
Additional Inherited Members | |
![]() | |
static | getInstance ($sClassName) |
static | getTitle ($sUri) |
Avatar module by Cheetah
This module allow user to crop avatar image from any photo. This is default module and Cheetah can not work properly without this module. 'Avatar' field in Profiles table is used to store current user avatar id. Avatar id is used to store avatar image, so it is easy to get avarat image if you know avatar id. You can get avatar image directly, using defines in include.php file. Refer to include.php file for all defines descriptions.
Example of using this module to get avatar images:
include_once (CH_DIRECTORY_PATH_MODULES . 'cheetah/avatar/include.php') echo CH_AVA_URL_USER_AVATARS . $aProfile['Avatar'] . CH_AVA_EXT; // avatar image echo CH_AVA_URL_USER_AVATARS . $aProfile['Avatar'] . 'i'. CH_AVA_EXT; // avatar icon
Profile's Wall: 'add avatar' and 'change avatar' events are displayed on profile's wall
Spy: no spy activity
Memberships/ACL: avatar upload - CH_AVATAR_UPLOAD avatar edit any - CH_AVATAR_EDIT_ANY avatar delete any - CH_AVATAR_DELETE_ANY
Service methods:
Set image for cropping.
Crop image html
Delete all profile's avatars
After join redirection
Site avatars html
My avatars html
make avatar from particular image, also it makes the image square
make avatar from image url, also it makes the image square
Get image from photos module and make avbatar from it, also it makes it square
Alerts: Alerts type/unit - 'ch_avatar' The following alerts are rised
add - new avatar is added $iObjectId - avatar id $iSenderId - avatar's owner
change - avatar was changed $iObjectId - avatar id $iSenderId - avatar's owner
delete - avatar was deleted $iObjectId - avatar id $iSenderId - avatar's owner
Definition at line 125 of file ChAvaModule.php.
ChAvaModule::__construct | ( | & | $aModule | ) |
Definition at line 135 of file ChAvaModule.php.
Definition at line 775 of file ChAvaModule.php.
ChAvaModule::_cropAvatar | ( | ) |
Definition at line 884 of file ChAvaModule.php.
ChAvaModule::_defineActions | ( | ) |
Definition at line 744 of file ChAvaModule.php.
ChAvaModule::_makeAvatarFromSharedPhoto | ( | $iSharedPhotoId | ) |
Definition at line 871 of file ChAvaModule.php.
ChAvaModule::_removeAvatar | ( | $iProfileId, | |
$iAvatar | |||
) |
Definition at line 751 of file ChAvaModule.php.
ChAvaModule::_resizeImage | ( | $sImageSrc, | |
$sImageDst, | |||
$iWidth, | |||
$iHeight, | |||
$bSquareResize = false , |
|||
$bJpegOutput = true |
|||
) |
Definition at line 822 of file ChAvaModule.php.
ChAvaModule::_setAvatar | ( | $iProfileId, | |
$sImg, | |||
$isSetAvatarForCouple = false |
|||
) |
Definition at line 235 of file ChAvaModule.php.
ChAvaModule::_uploadImage | ( | $iProfileId = 0 | ) |
Definition at line 833 of file ChAvaModule.php.
ChAvaModule::actionAdministration | ( | ) |
Definition at line 307 of file ChAvaModule.php.
ChAvaModule::actionGetSiteAvatars | ( | $iPage | ) |
Definition at line 195 of file ChAvaModule.php.
ChAvaModule::actionHome | ( | ) |
Definition at line 142 of file ChAvaModule.php.
ChAvaModule::actionMemberThumb | ( | $iProfileId | ) |
Definition at line 302 of file ChAvaModule.php.
ChAvaModule::actionRemoveAvatar | ( | $iProfileId, | |
$sImg | |||
) |
Definition at line 274 of file ChAvaModule.php.
ChAvaModule::actionSetAvatar | ( | $iProfileId, | |
$sImg | |||
) |
Definition at line 225 of file ChAvaModule.php.
ChAvaModule::actionSetAvatarCouple | ( | $iProfileId, | |
$sImg | |||
) |
Definition at line 230 of file ChAvaModule.php.
ChAvaModule::actionSetSiteAvatar | ( | $sImg | ) |
Definition at line 201 of file ChAvaModule.php.
ChAvaModule::isAdmin | ( | ) |
Definition at line 739 of file ChAvaModule.php.
ChAvaModule::isAllowedAdd | ( | $isPerformAction = false | ) |
Definition at line 714 of file ChAvaModule.php.
ChAvaModule::isAllowedDelete | ( | & | $aDataEntry, |
$isPerformAction = false |
|||
) |
Definition at line 731 of file ChAvaModule.php.
ChAvaModule::isAllowedEdit | ( | $aDataEntry, | |
$isPerformAction = false |
|||
) |
Definition at line 723 of file ChAvaModule.php.
ChAvaModule::onEventChanged | ( | $iProfileId, | |
$iEntryId, | |||
$iCoupleProfileId = 0 , |
|||
$isTryToSuspend = true |
|||
) |
Definition at line 688 of file ChAvaModule.php.
ChAvaModule::onEventCreate | ( | $iEntryId | ) |
Definition at line 682 of file ChAvaModule.php.
ChAvaModule::onEventDeleted | ( | $iEntryId, | |
$aDataEntry = array() |
|||
) |
Definition at line 704 of file ChAvaModule.php.
ChAvaModule::serviceCropTool | ( | $aParams | ) |
Returns crop image html, it consists of image for cropping, cropping preview and descriptions
$aParams | dir_image - image path url_image - image url |
Definition at line 440 of file ChAvaModule.php.
ChAvaModule::serviceDeleteProfileAvatars | ( | $iProfileId | ) |
Delete all profile's avatars
$iProfileId | - profile ID to delete avatar for |
Definition at line 466 of file ChAvaModule.php.
ChAvaModule::serviceGetMyAvatars | ( | $iProfileId | ) |
My avatars html
$iProfileId | - profile's ID to display avatars for |
Definition at line 573 of file ChAvaModule.php.
ChAvaModule::serviceGetSiteAvatars | ( | $iPage | ) |
Site avatars html
$iPage | - current page in site avatars |
Definition at line 509 of file ChAvaModule.php.
ChAvaModule::serviceGetWallData | ( | ) |
Register 'add avatar' and 'change avatar' events for wall @returm array of parameters
Definition at line 660 of file ChAvaModule.php.
ChAvaModule::serviceGetWallPost | ( | $aEvent | ) |
Html to display on profile wall, when user uploads new avatar
$aEvent | - wall event parameters |
Definition at line 626 of file ChAvaModule.php.
ChAvaModule::serviceJoin | ( | $iMemID, | |
$sStatusText | |||
) |
After join redirection This serice automatically log in joined user and redirects him to avatar copping page
$iMemID | - joined profile ID |
$sStatusText | - status text to display at the top of page, like 'join success' |
Definition at line 489 of file ChAvaModule.php.
ChAvaModule::serviceMakeAvatarFromImage | ( | $sImg | ) |
make avatar from particular image, also it makes it square
$sImg | path to the image |
Definition at line 373 of file ChAvaModule.php.
ChAvaModule::serviceMakeAvatarFromImageUrl | ( | $sImgUrl | ) |
make avatar from image url, also it makes it square
$sImg | url to the image |
Definition at line 399 of file ChAvaModule.php.
ChAvaModule::serviceMakeAvatarFromSharedPhotoAuto | ( | $iSharedPhotoId | ) |
get image from photos module and make avatar from it also it makes it square
$iSharedPhotoId | photo id from photos module |
Definition at line 421 of file ChAvaModule.php.
ChAvaModule::serviceManageAvatars | ( | $iProfileId, | |
$isAddJsCss = false |
|||
) |
Definition at line 555 of file ChAvaModule.php.
ChAvaModule::serviceSetImageForCropping | ( | $iProfileId, | |
$sOrigPath | |||
) |
Set image for cropping. You can point image for cropping and then redirect to avatar module page, your image will be ready for cropping. You can use it in your module, if you want allow users to set any image from your module as avatar.
$iProfileId | - profile id to set avatar for |
$sOrigPath | - image path |
Definition at line 359 of file ChAvaModule.php.
ChAvaModule::$_aAllowedExt |
Definition at line 128 of file ChAvaModule.php.
ChAvaModule::$_iProfileId |
Definition at line 127 of file ChAvaModule.php.