Go to the source code of this file.
Namespaces | |
| namespace | KERNEL |
Functions | |
| cutstring ($str, $length, $allow_cut_word=true, $extra_length=0, $ending="") | |
| is_image ($fileName) | |
| get_image_list ($fileList, $allowed=false) | |
| get_image_color_depth ($img) | |
| get_image_thumbnail_url ($file, $context=null) | |
| create_thumbnail ($file, $thumbWidth, $title= '') | |
| image_search ($file, $filePathList) | |
| get_current_index ($imageList, $fileIndex) | |
| has_next_image ($imageList, $index) | |
| has_previous_image ($imageList, $index) | |
| get_next_image_index ($imageList, $index) | |
| get_previous_image_index ($imageList, $index) | |
| display_link_to_previous_image ($imageList, $fileList, $current) | |
| display_link_to_next_image ($imageList, $fileList, $current) | |
| has_next_page ($imageList, $page) | |
| has_previous_page ($imageList, $page) | |
| get_offset ($page) | |
| get_page_number ($offset) | |
| display_thumbnails ($imageList, $fileList, $page, $thumbnailWidth, $colWidth, $numberOfCols, $numberOfRows) | |
Variables | |
| $allowedImageTypes = 'jpg|png|gif|jpeg|bmp' | |
| create_thumbnail | ( | $ | file, | |
| $ | thumbWidth, | |||
| $ | title = '' | |||
| ) |
create thumbnails end return html code to display it
this function could be modified to use any other method to create thumbnails
| file | (string) image name | |
| thumbWidth | (int) width for thumbnails | |
| title | (string) long description of the image |
Definition at line 171 of file image.lib.php.
| cutstring | ( | $ | str, | |
| $ | length, | |||
| $ | allow_cut_word = true, |
|||
| $ | extra_length = 0, |
|||
| $ | ending = "" | |||
| ) |
cut string allowing word integrity preservation
TODO : move to a more accurate library
| string | (string) string | |
| length | (int) length of the resulting string | |
| allow_cut_word | (boolean) allow word cutting default : true | |
| extra_length | (int) allow extra length to the string to preserve word integrity | |
| ending | (string) append the given string at the end of the cutted one |
Definition at line 49 of file image.lib.php.
| display_link_to_next_image | ( | $ | imageList, | |
| $ | fileList, | |||
| $ | current | |||
| ) |
display link and thumbnail of next image TODO : see if this function can be merge with display_link_to_previous_image
| imageList | (array) list of image indices | |
| fileList | (array) list of files in the current directory | |
| current | (int) index of current image in imageList curDirPath thumbnailWidth |
Definition at line 377 of file image.lib.php.
| display_link_to_previous_image | ( | $ | imageList, | |
| $ | fileList, | |||
| $ | current | |||
| ) |
display link and thumbnail of previous image TODO : see if this function can be merge with display_link_to_next_image
| imageList | (array) list of image indices | |
| fileList | (array) list of files in the current directory | |
| current | (int) index of current image in imageList curDirPath thumbnailWidth |
Definition at line 315 of file image.lib.php.
| display_thumbnails | ( | $ | imageList, | |
| $ | fileList, | |||
| $ | page, | |||
| $ | thumbnailWidth, | |||
| $ | colWidth, | |||
| $ | numberOfCols, | |||
| $ | numberOfRows | |||
| ) |
display a page of thumbnails
| imageList | (array) list containing all image file names | |
| fileList | (array) file properties | |
| page | (int) current page number | |
| thumbnailWidth | (int) width of thumbnails | |
| colWidth | (int) width of columns | |
| numberOfCols | (int) number of columns | |
| numberOfRows | (int) number of rows curDirPath |
Definition at line 523 of file image.lib.php.
| get_current_index | ( | $ | imageList, | |
| $ | fileIndex | |||
| ) |
get the index of the current image in imageList from its index in fileList
| imageList | (array) list of index of image files in the current directory | |
| fileIndex | (array) index of image in fileList |
Definition at line 230 of file image.lib.php.
| get_image_color_depth | ( | $ | img | ) |
get image color depth from image info
| img | (string) path to image file |
Definition at line 141 of file image.lib.php.
| get_image_list | ( | $ | fileList, | |
| $ | allowed = false | |||
| ) |
get image list from fileList
| fileList | (array) list of files in the current directory | |
| allowed | (bool) true if current user is allowed to view invisible images |
Definition at line 114 of file image.lib.php.
| get_image_thumbnail_url | ( | $ | file, | |
| $ | context = null | |||
| ) |
Definition at line 147 of file image.lib.php.
| get_next_image_index | ( | $ | imageList, | |
| $ | index | |||
| ) |
return the index of the next image in imageList
| imageList | (array) list of image indices | |
| index | (int) index of current image in imageList |
Definition at line 279 of file image.lib.php.
| get_offset | ( | $ | page | ) |
return the index of the first image of the given page in imageList
| page | (int) number of the page |
Definition at line 476 of file image.lib.php.
| get_page_number | ( | $ | offset | ) |
return the number of the page on which the image is located
| offset | (int) index of the image in imageList |
Definition at line 500 of file image.lib.php.
| get_previous_image_index | ( | $ | imageList, | |
| $ | index | |||
| ) |
return the index of the previous image in imageList
| imageList | (array) list of image indices | |
| index | (int) index of current image in imageList |
Definition at line 295 of file image.lib.php.
| has_next_image | ( | $ | imageList, | |
| $ | index | |||
| ) |
return true if there one or more image after the current image in imageList
| imageList | (array) list of image indices | |
| index | (int) index of current image in imageList |
Definition at line 252 of file image.lib.php.
| has_next_page | ( | $ | imageList, | |
| $ | page | |||
| ) |
return true if there are one or more pages left to display after the current one
| imageList | (array) list of image indices | |
| page | (int) number of current page |
Definition at line 441 of file image.lib.php.
| has_previous_image | ( | $ | imageList, | |
| $ | index | |||
| ) |
return true if there one or more image before the current image in imageList
| imageList | (array) list of image indices | |
| index | (int) index of current image in imageList |
Definition at line 266 of file image.lib.php.
| has_previous_page | ( | $ | imageList, | |
| $ | page | |||
| ) |
return true if there one or more pages left to display before the current one
| imageList | (array) list of image indices | |
| index | (int) index of current image in imageList |
Definition at line 464 of file image.lib.php.
| image_search | ( | $ | file, | |
| $ | filePathList | |||
| ) |
Definition at line 203 of file image.lib.php.
| is_image | ( | $ | fileName | ) |
identifies images (i.e. if file extension is an allowed image extension)
| string | (string) file name |
Definition at line 90 of file image.lib.php.
| $allowedImageTypes = 'jpg|png|gif|jpeg|bmp' |
allowedImageTypes
Definition at line 32 of file image.lib.php.
1.6.3