Image Image(
object
&$album, sting
$filename
)
|
|
Constructor for class-image
Parameters:
|
object |
&$album: |
the owning album |
|
sting |
$filename: |
the filename of the image |
int addComment(
string
$name, string
$email, string
$website, string
$comment, string
$code, string
$code_ok, string
$ip, bool
$private, bool
$anon
)
|
|
Adds a comment to the image assumes data is coming straight from GET or POST
Returns a code for the success of the comment add: 0: Bad entry 1: Marked for moderation 2: Successfully posted
Parameters:
|
string |
$name: |
Comment author name |
|
string |
$email: |
Comment author email |
|
string |
$website: |
Comment author website |
|
string |
$comment: |
body of the comment |
|
string |
$code: |
Captcha code entered |
|
string |
$code_ok: |
Captcha md5 expected |
|
string |
$ip: |
the IP address of the comment poster |
|
bool |
$private: |
set to true if the comment is for the admin only |
|
bool |
$anon: |
set to true if the poster wishes to remain anonymous |
void classSetup(
&$album,
$filename
)
|
|
Parameters:
void copyImage(
string
$newalbum
)
|
|
Copies the image to a new album, along with all metadata.
Parameters:
|
string |
$newalbum: |
the destination album |
bool deleteImage(
[bool
$clean = true]
)
|
|
Permanently delete this image (permanent: be careful!)
Returns the result of the unlink operation (whether the delete was successful)
Parameters:
|
bool |
$clean: |
whether to remove the database entry. |
Returns true if the file has changed since last time we looked
Returns the album that holds this image
Retuns the folder name of the album that holds this image
Returns the city field of the image
Returns the count of comments for the image. Comments in moderation are not counted
array getComments(
[bool
$moderated = false], [bool
$private = false], [bool
$desc = false]
)
|
|
Returns an array of comments
Parameters:
|
bool |
$moderated: |
if false, comments in moderation are ignored |
|
bool |
$private: |
if false ignores private comments |
|
bool |
$desc: |
set to true for descending order |
bool getCommentsAllowed(
)
|
|
Retuns true if comments are allowed on the image
Returns the copyright field of the image
Returns the country field of the image
Returns the credit field of the image
returns the custom data field
string getCustomImage(
int
$size, int
$width, int
$height, int
$cropw, int
$croph, int
$cropx, int
$cropy, [bool
$thumbStandin = false], string
$alt, string
$class, string
$id
)
|
|
Get a custom sized version of this image based on the parameters.
Parameters:
|
string |
$alt: |
Alt text for the url |
|
int |
$size: |
size |
|
int |
$width: |
width |
|
int |
$height: |
height |
|
int |
$cropw: |
crop width |
|
int |
$croph: |
crop height |
|
int |
$cropx: |
crop x axis |
|
int |
$cropy: |
crop y axis |
|
string |
$class: |
Optional style class |
|
string |
$id: |
Optional style id |
|
bool |
$thumbStandin: |
set true to inhibit watermarking |
Returns the unformatted date of the image
Returns the description of the image
Returns an array of EXIF data
Returns the image filename
Returns a path to the original image in the original folder.
Returns the height of the image
Returns an image page link for the image
Get the index of this image in the album, taking sorting into account.
Returns the location field of the image
Return the previous Image
Returns true if the image is set visible
string getSizedImage(
int
$size
)
|
|
Returns a path to a sized version of the image
Parameters:
|
int |
$size: |
how big an image is wanted |
Returns the sort order value of the image
Returns the state field of the image
Returns the tags of the image
string getThumb(
[
$type = 'image']
)
|
|
Get a default-sized thumbnail of this image.
Parameters:
Redefined in descendants as:
Returns the title of this image
Returns the width of the image
bool moveImage(
Album
$newalbum, [string
$newfilename = null]
)
|
|
Moves an image to a new album and/or filename (rename).
Returns true on success and false on failure.
Parameters:
|
Album |
$newalbum: |
the album to move this file to. Must be a valid Album object. |
|
string |
$newfilename: |
the new file name of the image in the specified album. |
bool renameImage(
string
$newfilename
)
|
|
Renames an image to a new filename, keeping it in the same album. Convenience for moveImage($image->album, $newfilename).
Returns true on success and false on failure.
Parameters:
|
string |
$newfilename: |
the new file name of the image file. |
void setCity(
string
$city
)
|
|
Stores the city field of the image
Parameters:
|
string |
$city: |
text for the city |
void setCommentsAllowed(
bool
$commentson
)
|
|
Sets the comments allowed flag on the image
Parameters:
|
bool |
$commentson: |
true if they are allowed |
void setCopyright(
string
$copyright
)
|
|
Stores the text for the copyright field of the image
Parameters:
|
string |
$copyright: |
text for the copyright field |
void setCountry(
string
$country
)
|
|
Stores the country field of the image
Parameters:
|
string |
$country: |
text for the country filed |
void setCredit(
string
$credit
)
|
|
Stores the credit field of the image
Parameters:
|
string |
$credit: |
text for the credit field |
void setCustomData(
string
$val
)
|
|
Sets the custom data field
Parameters:
|
string |
$val: |
the value to be put in custom_data |
void setDateTime(
string
$datetime
)
|
|
Stores the date of the image
Parameters:
|
string |
$datetime: |
the date |
void setDesc(
string
$desc
)
|
|
Stores the description of the image
Parameters:
|
string |
$desc: |
text for the description |
void setLocation(
string
$location
)
|
|
Stores the location field of the image
Parameters:
|
string |
$location: |
text for the location |
void setShow(
bool
$show
)
|
|
Sets the visibility of the image
Parameters:
void setSortOrder(
int
$sortorder
)
|
|
Sets the sort order value of the image
Parameters:
|
int |
$sortorder: |
the order the images should appear in |
void setState(
string
$state
)
|
|
Stores the state field of the image
Parameters:
|
string |
$state: |
text for the state |
void setTags(
string
$tags
)
|
|
Sets the tags of the image
Parameters:
|
string |
$tags: |
the tag string |
void setTitle(
string
$title
)
|
|
Stores the title of this image
Parameters:
|
string |
$title: |
text for the title |
Update this object's values for width and height. Uses lazy evaluation.
Redefined in descendants as: