PHPFSPOT main class
this class contains the most functions which will to the major work for phpfspot.
Located in /phpfspot.class.php (line 36)
list of available, not-selected, tags
phpfspot configuration
SQLite database handle to phpfspot database
SQLite database handle to f-spot database
full tag - list
Smarty template engine
class constructor ($cfg, $db, $cfg_db, $tmpl, $db_ver)
this function will be called on class construct and will check requirements, loads configuration, open databases and start the user session
add tag to users session variable
this function will add the specified to users current tag selection. if a date search has been made before it will be now cleared
check if specified MIME type is supported
create phpfspot own sqlite database
this function creates phpfspots own sqlite database if it does not exist yet. this own is used to store some necessary informations (md5 sum's, ...).
cleanup phpfspot own database
When photos are getting delete from F-Spot, there will remain remain some residues in phpfspot own database. This function will try to wipe them out.
create thumbnails for the requested width
this function creates image thumbnails of $orig_image stored as $thumb_image. It will check if the image is in a supported format, if necessary rotate the image (based on EXIF orientation meta headers) and re-sizing.
remove tag to users session variable
this function removes the specified tag from users current tag selection
generates thumbnails
This function generates JPEG thumbnails from provided F-Spot photo indize and its alternative versions.
all available tags and tag cloud
this function outputs all available tags (time ordered) and in addition output them as tag cloud (tags which have many photos will appears more then others)
output export page
retrive F-Spot database version
this function will return the F-Spot database version number It is stored within the sqlite3 database in the table meta
returns stored md5 sum for a specific photo
this function queries the phpfspot database for a stored MD5 checksum of the specified photo. It also takes care of the requested photo version - original or alternative photo.
return the next to be shown slide show image
this function returns the URL of the next image in the slideshow sequence.
returns aligned photo names
this function returns aligned (length) names for a specific photo. If the length of the name exceeds $limit the name will bei shrinked (...).
return all photo according selection
this function returns all photos based on the tag-selection, tag- or date-search. the tag-search also has to take care of AND and OR conjunctions
return the previous to be shown slide show image
this function returns the URL of the previous image in the slideshow sequence.
output RSS feed
output all selected tags
this function output all tags which have been selected by the user. the selected tags are stored in the session-variable $_SESSION['selected_tags']
output calendar matrix
return the current photo
current selected photo version
this function returns the current selected photo version from the session variables.
get database version
this function queries the meta table and returns the current database version.
returns latest available photo version
this function returns the latested available version for the requested photo.
return all exif meta data from the file
return mime info
this function tries to find out the correct mime-type for the provided file.
returns the number of photos which are tagged with $tag_id
get all photo details from F-Spot database
this function queries the F-Spot database for all available details of the requested photo. It returns them as a object.
Furthermore it takes care of the photo version to be requested. If photo version is not yet, it queries information for the original photo.
get photo rating level
this function will return the integer-based rating level of a photo. This can only be done, if the F-Spot database is at a specific version. If rating value can not be found, zero will be returned indicating no rating value is available.
get photo versions
this function returns an array of all available alterntaive versions of the provided photo id. has alternative photo versions available
get photo version name
this function returns the name of the version identified by the photo-id and version-id.
get random photo
this function will get all photos from the fspot database and randomly return ONE entry
saddly there is yet no sqlite3 function which returns the bulk result in array, so we have to fill up our own here.
get random photo tag photo
this function will get all photos tagged with the requested tag from the fspot database and randomly return ONE entry
saddly there is yet no sqlite3 function which returns the bulk result in array, so we have to fill up our own here.
get rate-search bars
this function will return the rating-bars for the search field.
return tag-name by tag-idx
this function returns the tag-name for the requested tag specified by tag-idx.
returns the full path to a thumbnail
returns the value for the autocomplete tag-search
validates provided date
this function validates if the provided date contains a valid date and will return true if it is.
check for invalid version of photo
this function validates the provided photo-id and version-id
parse the provided URI and will returned the requested chunk
reset date search
if any date search has taken place, reset it now.
reset name search
if any name search has taken place, reset it now
reset single photo
if a specific photo was requested (external link) unset the session variable now
reset rate search
if any rate search has taken place, reset it now.
reset tag selection
if there is any tag selection, it will be deleted now
reset tag search
if any tag search has taken place, reset it now
store current tag condition
this function stores the current tag condition (AND or OR) in the users session variables
show - generate html output
this function can be called after the constructor has prepared everyhing. it will load the index.tpl smarty template. if necessary it will registere pre-selects (photo index, photo, tag search, date search) into users session.
show credit template
control HTML ouput for a single photo
this function provides all the necessary information for the single photo template.
control HTML ouput for photo index
this function provides all the necessary information for the photo index template.
create on-the-fly images with text within
photo version select list
this function returns a HTML select list (drop down) to select a alternative photo version of the original photo.
returns a select-dropdown box to select photo index sort parameters
invoke tag & date search
this function will return all matching tags and store them in the session variable selected_tags. furthermore it also handles the date search. getPhotoSelection() will then only return the matching photos.
translate f-spoth photo path
as the full-qualified path recorded in the f-spot database is usally not the same as on the webserver, this function will replace the path with that one specified in the cfg
updates sort order in session variable
this function is invoked by RPC and will sort the requested sort order in the session variable.
update photo version in session variable
this function is invoked by RPC and will set the requested photo version in the session variable.
tells the client browser what to do
this function is getting called via AJAX by the client browsers. it will tell them what they have to do next. This is necessary for directly jumping into photo index or single photo view when the are requested with specific URLs
output error text
Documentation generated on Sat, 30 May 2009 10:14:35 +0200 by phpDocumentor 1.4.2