Prototype Image
ACTIONS | FUNCTIONS | MACROS | SKINS | TEMPLATES | TYPE.PROPERTIES

Actions
delete_action
delete action
edit_action
edit action
main_action
main action
 
Functions
checkAccess(action, usr, level)
permission check (called by hopobject.onRequest())
checkDelete(usr, level)
check if user is allowed to delete an image
checkEdit(usr, level)
check if user is allowed to edit an image
constructor(creator)
constructor function for image objects
createThumbnail(rawimage, dir)
function creates a thumbnail of this image does nothing if the image uploaded is smaller than 100x100px
dumpToZip(z)
dump an image to a zip file passed as argument
evalImg(param, modifier)
function checks if new Image-parameters are correct ...
getFile()
return the image file on disk
getPopupUrl()
return the call to the client-side popup-script for image-object
getUrl()
return the url of the image
save(rawimage, dir, maxWidth, maxHeight)
save image as file on local disk but before check if image should be resized
 
Macros
Image.alias
macro rendering alias of image
Image.alttext
macro rendering alternate text of image
Image.code
render the code for embedding this image
Image.deletelink
render a link to delete action
Image.editlink
render a link to image-edit
Image.filesize
macro rendering filesize
Image.gallery
macro renders the name of the gallery this image belongs to
Image.height
macro renders the height of the image
Image.replacelink
render a link to delete action calls image.deletelink_macro, but only if the layout in path is the one this image belongs to
Image.show
render the image-tag (link to main action if image is a thumbnail)
Image.url
macro renders the url to this image
Image.width
macro renders the width of the image
 
Skins
edit.skin
request.topic, response.action
main.skin
mgrlistitem.skin
preview.skin
 


type.properties
_db = antville
_table = AV_IMAGE
_id = IMAGE_ID
_prototype = IMAGE_PROTOTYPE
_parent = parent, site.images

##
## object references
##
site              = object(Site)
site.local        = IMAGE_F_SITE
site.foreign      = SITE_ID

layout            = object(Layout)
layout.local      = IMAGE_F_LAYOUT
layout.foreign    = LAYOUT_ID

parent            = object(Image)
parent.local      = IMAGE_F_IMAGE_PARENT
parent.foreign    = IMAGE_ID

thumbnail         = object(Image)
thumbnail.local   = IMAGE_F_IMAGE_THUMB
thumbnail.foreign = IMAGE_ID

creator           = object(User)
creator.local     = IMAGE_F_USER_CREATOR
creator.foreign   = USER_ID

modifier          = object(User)
modifier.local    = IMAGE_F_USER_MODIFIER
modifier.foreign  = USER_ID

##
## primitive properties
##
alias       = IMAGE_ALIAS
topic       = IMAGE_TOPIC
filename    = IMAGE_FILENAME
fileext     = IMAGE_FILEEXT
width       = IMAGE_WIDTH
height      = IMAGE_HEIGHT
alttext     = IMAGE_ALTTEXT
filesize    = IMAGE_FILESIZE
createtime  = IMAGE_CREATETIME
modifytime  = IMAGE_MODIFYTIME