Documentation

GalleryManager extends GalleryLibrary
in package

Gallery

Class to manage the gallery of the CMS

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Cloudrexx Development Team info@cloudrexx.com

version
1.1.0
subpackage

module_gallery

Table of Contents

Properties

$_objTpl  : mixed
$arrSettings  : mixed
$importFiles  : mixed
$intLangId  : mixed
$intMaxEntries  : mixed
$strErrMessage  : mixed
$strImagePath  : mixed
$strImageWebPath  : mixed
$strImportPath  : mixed
$strOkMessage  : mixed
$strPageTitle  : mixed
$strThumbnailPath  : mixed
$strThumbnailWebPath  : mixed
$allowedImageExtensions  : array<string|int, mixed>
$allowedImageLabels  : array<string|int, mixed>
$allowedImageTypes  : array<string|int, mixed>
$sql  : mixed
$act  : mixed

Methods

__construct()  : mixed
Constructor -> Create the menu and copy the template
_getSize()  : int
Get filesize
_getType()  : string
Get filetype
activateCategory()  : mixed
Activates or inactivates a category
activatePicture()  : mixed
Activate / Inactivate a picture
changeCategoryOfPicture()  : mixed
Changes the Category of an Image
checkImages()  : mixed
Checks if the file is still there, removes dead links
createImages_JPG_GIF_PNG()  : mixed
Create an Image
deleteCategory()  : mixed
Delete a Category
deleteComment()  : mixed
Delete a comment of a picture
deleteImage()  : mixed
Deletes an Image from the database
deleteImportPicture()  : mixed
Delete selected pictures
deleteVote()  : mixed
Delete a voting of a picture
editCategory()  : mixed
Shows the "Edit-Category"-Form
fileExists()  : mixed
getCategoryNameByLang()  : bool|array<string|int, mixed>
Get the Category Name by Language
getPage()  : mixed
Determine the page to display and call the appropriate methods
getSettings()  : mixed
Gets the gallery settings
importFromFolder()  : mixed
Import selected pictures from folder
importPicture()  : mixed
import Pictures (requires chmod 777 in folder gallery_import)
insertCategory()  : mixed
Inserts a new category into the database
insertImage()  : mixed
Insert image into the database
movePicture()  : mixed
Move pictures from gallery_import to gallery
newCategory()  : mixed
Shows the 'Insert new category'-Form
overview()  : mixed
Shows the overview of the gallery
reloadAllValidate()  : mixed
Reload the validation page / Validated a picture / delete a picture
reloadSingleValidate()  : mixed
Reload the validation page / Validated a picture / delete a picture
resetPicture()  : mixed
Reset the picture and move it back to the validation part
rotatePicture()  : mixed
Rotates an image clockwise by 90�
saveCategorySorting()  : mixed
Saves the category sorting
saveImagesSorting()  : mixed
Saves the image sorting
saveSettings()  : mixed
Save the settings for the gallery
setCategoryImage()  : mixed
Define an images as "category-image". This image will be shown in the category-selection.
showCategoryDetails()  : mixed
Shows the category-details-page
showEditComment()  : mixed
Edit a comment of a picture
showEditPicture()  : mixed
Shows the edit-form for a picture
showSettings()  : mixed
Shows the settings-page
showSubCategories()  : bool
Show the Sub Categories
showUploadForm()  : mixed
Shows the UploadForm
showValidateForm()  : mixed
Shows the validation-page
updateCategory()  : mixed
Updates an category in the database
updateComment()  : mixed
Save all changes done to a comment
updatePicture()  : mixed
Updates the name of a picture
uploadFinished()  : mixed
Upload the submitted images
checkAccess()  : int
Check access
checkCategoryAccess()  : bool
Check the access to the category with the given ID
getGroupLists()  : array<string|int, mixed>
Returns an array of strings containing dropdown menu options with existing (but not assigned) and assigned access groups for the category with the given ID.
parseCategoryDropdown()  : mixed
Parse a category dropdown recursively. If you want nothing selected, you should pass -1 for the selected value.
setNavigation()  : mixed
updateAccessId()  : mixed
Save the last access id

Properties

$allowedImageExtensions

protected static array<string|int, mixed> $allowedImageExtensions = array('gif', 'jpg', 'jpeg', 'png', 'webp')

List of file endings to allow

$allowedImageLabels

protected array<string|int, mixed> $allowedImageLabels = array('GIF', 'JPG', 'PNG', 'WEBP')

List of filetypes to show to the user

$allowedImageTypes

protected array<string|int, mixed> $allowedImageTypes = array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_WEBP)

List of IMAGETYPE_... constants

Methods

__construct()

Constructor -> Create the menu and copy the template

public __construct() : mixed
Tags
global

array

global

\Cx\Core\Html\Sigma

global

InitCMS

_getSize()

Get filesize

public _getSize(string $strFile) : int
Parameters
$strFile : string
Return values
int

$intSize: Size of the file

_getType()

Get filetype

public _getType(string $strFile) : string
Parameters
$strFile : string
Return values
string

$strType: Type of the file

activateCategory()

Activates or inactivates a category

public activateCategory(int $intCategoryId[, mixed $act = NULL ]) : mixed
Parameters
$intCategoryId : int
$act : mixed = NULL
Tags
global

ADONewConnection

activatePicture()

Activate / Inactivate a picture

public activatePicture(int $intImageId[, mixed $act = NULL ]) : mixed
Parameters
$intImageId : int
$act : mixed = NULL
Tags
global

ADONewConnection

changeCategoryOfPicture()

Changes the Category of an Image

public changeCategoryOfPicture(int $intImageId, int $intNewCatId) : mixed
Parameters
$intImageId : int
$intNewCatId : int
Tags
global

ADONewConnection

global

array

checkImages()

Checks if the file is still there, removes dead links

public checkImages() : mixed
Tags
global

ADONewConnection

createImages_JPG_GIF_PNG()

Create an Image

public createImages_JPG_GIF_PNG(mixed $strPathOld, mixed $strPathNew, mixed $strFileOld, mixed $strFileNew, mixed $intNewWidth, mixed $intNewHeight, mixed $intQuality) : mixed
Parameters
$strPathOld : mixed
$strPathNew : mixed
$strFileOld : mixed
$strFileNew : mixed
$intNewWidth : mixed
$intNewHeight : mixed
$intQuality : mixed

deleteCategory()

Delete a Category

public deleteCategory(int $intCategoryId) : mixed
Parameters
$intCategoryId : int
Tags
global

ADONewConnection

global

array

global

array

deleteComment()

Delete a comment of a picture

public deleteComment(mixed $intComId) : mixed
Parameters
$intComId : mixed
Tags
global

ADONewConnection

global

array

deleteImage()

Deletes an Image from the database

public deleteImage(mixed $intImageId) : mixed
Parameters
$intImageId : mixed
Tags
global

ADONewConnection

global

array

deleteVote()

Delete a voting of a picture

public deleteVote(mixed $intVoteId) : mixed
Parameters
$intVoteId : mixed
Tags
global

ADONewConnection

global

array

editCategory()

Shows the "Edit-Category"-Form

public editCategory(int $intCategoryId) : mixed
Parameters
$intCategoryId : int
Tags
global

ADONewConnection

global

array

fileExists()

public static fileExists(mixed $fileName[, mixed $caseSensitive = true ]) : mixed
Parameters
$fileName : mixed
$caseSensitive : mixed = true

getCategoryNameByLang()

Get the Category Name by Language

public getCategoryNameByLang() : bool|array<string|int, mixed>
Tags
global

ADONewConnection $objDatabase

Return values
bool|array<string|int, mixed>

getPage()

Determine the page to display and call the appropriate methods

public getPage() : mixed
Tags
global

\Cx\Core\Html\Sigma

global

array

getSettings()

Gets the gallery settings

public getSettings() : mixed
Tags
global

ADONewConnection

importFromFolder()

Import selected pictures from folder

public importFromFolder() : mixed

importPicture()

import Pictures (requires chmod 777 in folder gallery_import)

public importPicture() : mixed
Tags
global

array

global

array

insertCategory()

Inserts a new category into the database

public insertCategory() : mixed
Tags
global

ADONewConnection

global

array

global

array

insertImage()

Insert image into the database

public static insertImage(mixed $objGallery, string $strImagePath, int $imageName) : mixed
Parameters
$objGallery : mixed
$strImagePath : string
$imageName : int
Tags
global

ADONewConnection

global

array

movePicture()

Move pictures from gallery_import to gallery

public movePicture(string $strFile) : mixed
Parameters
$strFile : string

newCategory()

Shows the 'Insert new category'-Form

public newCategory() : mixed
Tags
global

ADONewConnection

global

array

overview()

Shows the overview of the gallery

public overview() : mixed
Tags
global

ADONewConnection

global

array

global

array

global

integer

reloadAllValidate()

Reload the validation page / Validated a picture / delete a picture

public reloadAllValidate() : mixed
Tags
global

ADONewConnection

global

array

global

array

reloadSingleValidate()

Reload the validation page / Validated a picture / delete a picture

public reloadSingleValidate() : mixed
Tags
global

ADONewConnection

global

array

global

array

resetPicture()

Reset the picture and move it back to the validation part

public resetPicture(int $intImageId) : mixed
Parameters
$intImageId : int
Tags
global

ADONewConnection

global

array

global

array

rotatePicture()

Rotates an image clockwise by 90�

public rotatePicture(mixed $intImageId) : mixed
Parameters
$intImageId : mixed
Tags
global

ADONewConnection

global

array

global

array

saveCategorySorting()

Saves the category sorting

public saveCategorySorting() : mixed
Tags
global

ADONewConnection

global

array

saveImagesSorting()

Saves the image sorting

public saveImagesSorting() : mixed
Tags
global

ADONewConnection

global

array

saveSettings()

Save the settings for the gallery

public saveSettings() : mixed
Tags
global

ADONewConnection

global

array

setCategoryImage()

Define an images as "category-image". This image will be shown in the category-selection.

public setCategoryImage(int $intImgId) : mixed
Parameters
$intImgId : int
Tags
global

ADONewConnection

showCategoryDetails()

Shows the category-details-page

public showCategoryDetails(mixed $intCatId) : mixed
Parameters
$intCatId : mixed
Tags
global

ADONewConnection

global

array

global

array

showEditComment()

Edit a comment of a picture

public showEditComment(mixed $intCommentId) : mixed
Parameters
$intCommentId : mixed
Tags
global

ADONewConnection

global

array

showEditPicture()

Shows the edit-form for a picture

public showEditPicture() : mixed
Tags
global

ADONewConnection

global

array

global

array

showSettings()

Shows the settings-page

public showSettings() : mixed
Tags
global

ADONewConnection

global

array

showSubCategories()

Show the Sub Categories

public showSubCategories(int $parentId, array<string|int, mixed> $arrCategoryName, array<string|int, mixed> $arrImageCount, array<string|int, mixed> $arrImageSize, string $subCategorySpace) : bool
Parameters
$parentId : int
$arrCategoryName : array<string|int, mixed>
$arrImageCount : array<string|int, mixed>
$arrImageSize : array<string|int, mixed>
$subCategorySpace : string
Tags
global

ADONewConnection $objDatabase

Return values
bool

showUploadForm()

Shows the UploadForm

public showUploadForm() : mixed
Tags
global

ADONewConnection

global

array

showValidateForm()

Shows the validation-page

public showValidateForm() : mixed
Tags
global

array

global

ADONewConnection

global

array

updateCategory()

Updates an category in the database

public updateCategory(mixed $categoryId) : mixed
Parameters
$categoryId : mixed
Tags
global

ADONewConnection

global

array

global

array

updateComment()

Save all changes done to a comment

public updateComment() : mixed
Tags
global

ADONewConnection

global

array

updatePicture()

Updates the name of a picture

public updatePicture() : mixed
Tags
global

ADONewConnection

global

array

global

array

uploadFinished()

Upload the submitted images

public static uploadFinished(string $tempPath, mixed $tempWebPath, array<string|int, mixed> $paths, int $uploadId, mixed $fileInfos, mixed $response) : mixed
Parameters
$tempPath : string
$tempWebPath : mixed
$paths : array<string|int, mixed>
$uploadId : int
$fileInfos : mixed
$response : mixed
Tags
global

ADONewConnection

global

array

global

array

checkAccess()

Check access

private checkAccess(int $access_id) : int
Parameters
$access_id : int
Return values
int

checkCategoryAccess()

Check the access to the category with the given ID

private checkCategoryAccess(int $id) : bool
Parameters
$id : int
Return values
bool

getGroupLists()

Returns an array of strings containing dropdown menu options with existing (but not assigned) and assigned access groups for the category with the given ID.

private getGroupLists(int $id[, string $type = "frontend" ]) : array<string|int, mixed>
Parameters
$id : int
$type : string = "frontend"
Return values
array<string|int, mixed>

parseCategoryDropdown()

Parse a category dropdown recursively. If you want nothing selected, you should pass -1 for the selected value.

private parseCategoryDropdown([int $selected = -1 ][, int $disabled = false ][, mixed $name = "showCategories" ][, mixed $parent_id = 0 ][, mixed $level = 0 ][, mixed $parseSubCategories = true ]) : mixed
Parameters
$selected : int = -1
$disabled : int = false
$name : mixed = "showCategories"
$parent_id : mixed = 0
$level : mixed = 0
$parseSubCategories : mixed = true

updateAccessId()

Save the last access id

private updateAccessId(intval $id) : mixed
Parameters
$id : intval

        
On this page

Search results