cpmCpmFetch allows you to easily access and display information from your Coppermine Photo Gallery (CPG) in a variety of ways. CpmFetch respects the privacy settings in your gallery and will not display images the public would not be allowed to see normally.
By using CpmFetch you can access:
CpmFetch will also return just data so that you can use it to query the database, then format the output to your specific needs.
CpmFetch is NOT a modification to CPG - you do not need to worry about it interfering with future CPG upgrades, or breaking your existing gallery.
Located in /cpmfetch.php (line 50)
cpm_dao | --cpm
void
cpm_viewLastAddedMediaFrom
( $source, int $rows, int $columns, [array $options = ""], int $catid)
void
cpm_viewLastAddedMediaFromCategory
(int $rows, int $columns, int $catid, [array $options = ""])
void
cpm_viewRandomMediaFrom
( $source, int $rows, int $columns, [array $options = ""], int $sources)
void
cpm_viewRandomMostViewedMediaFrom
(string $source, int $rows, int $columns, [array $options = ""])
void
cpm_viewRandomTopRatedMediaFrom
(string $source, int $rows, int $columns, [array $options = ""])
mixed
$optionHash
= array() (line 63)
This contains the option array that is submitted by the user.
It should be cleared out between calls that use it.
mixed
$returntype
= "print" (line 77)
Tracks the current returntype. Default is "print"
mixed
$styleHash
= array() (line 71)
This contains the style information from the option array that is submitted by the user.
It is cleared out between calls that use it.
mixed
$VERSION
= "@@@RELEASEVERSION@@@" (line 56)
This is the version number of this release of CpmFetch
Inherited from cpm_dao
cpm_dao::$cfCfg
cpm_dao::$cfDefaultComments
cpm_dao::$dbconnection
cpm_dao::$filetypefilter
cpm_dao::$lastSQLErrorMessage
cpm_dao::$lastSQLRowsReturned
cpm_dao::$privacyfilter
cpm_dao::$resultArray
cpm_dao::$sqlPostSelect
cpm_dao::$sqlSelect
cpm_dao::$sqlTableSelect
cpm_dao::$sqlUserDataLink
Constructor cpm (line 92)
Creates the CpmFetch object
The function creates and initializes the CpmFetch system. You need to pass it the filename and path to your configuration file. Typically this is cpmfetch_config.php, but you are allowed to have multiple config files, so it may be different.
addDescriptionsToResultSet (line 1688)
clearOptions (line 1857)
cpm_close (line 105)
Closes down open database connections and cleans up
This will insure that any open database connections are closed if CpmFetch opened them. In a forum environment, you may need to ommit this call. This should be safe as PHP will clean up open connections on its own. But you should use it unless you have a problem with it.
cpm_formatStats (line 379)
Outputs stats based on a format submitted
The format is specified by placeholders indicated by percent signs '%'. If you actually want a percent sign you will need to put two percent signs in a row '%%'. The most up to date list for supported placeholders can be found in the coppermine_dao formatStats function. But the main ones are:
cpm_getAlbumListFrom (line 609)
Generates a list of Albums based
cpm_getCategoryList (line 637)
cpm_getMediaCount (line 212)
Returns number of items in the gallery, including private entries
Returns value of items in the gallery as a return value. Does not output directly to the screen. This is the same as cpm_listMediaCount() with the returntype set to html.
cpm_getMediaCountAddedInLast (line 258)
Returns number of items in the gallery for a time range
The results include private entries added in the number of days specified by the $numberOfDays
cpm_getMediaCountAddedSince (line 228)
Returns number of items in the gallery, including private entries added since the date provided by the timestamp parameter
Returns number of items in the gallery added since the timestamp.
cpm_getMediaCountForAlbum (line 355)
Returns number representing the number of items in an album, including private entries
Does not Supports returnType,
cpm_getVersion (line 127)
Return the version of CpmFetch you are running.
cpm_listMediaAddedOverLastDays (line 1216)
Displays a list of category, album and count over past days. Supports the setReturnType option.
cpm_listMediaCount (line 182)
Gets the number of items in the gallery.
Prints the value directly to output, but now Supports returnType for print and html. This function will include all media, even media protected as private.
cpm_listMediaCountForAlbum (line 326)
Displays number representing the number of items in an album, including private entries.
By Default prints the number directly to output. Supports returnType for print and html
cpm_listMediaCountFrom (line 295)
Returns number of items in the gallery, including private entries, as defined by source or source = "" for everything
Returns value of items in the gallery By Default prints the number directly to output. Supports returnType for print and html
cpm_setReturnType (line 150)
Sets how most functions will handle returning information
This sets the output from any calls made after this. Output can be selected by setting this function with:
cpm_showAlbumsUpdatedOverLastDays (line 1128)
Displays a list of albums with thumbnails and count over past days
Supports the setReturnType option.
cpm_showCategoriesUpdatedOverLastDays (line 1040)
Displays a list of albums with icons and count over past days
This function does not currently use the stylehash functionality. Supports the setReturnType option.
cpm_viewLastAddedMedia (line 416)
Displays images of last added media
This will generate a table and populate it with the last added media and style it based on entries in the style hash. The number of photos returned matches the number of rows multiplied by the number of columns. Supports the setReturnType option.
cpm_viewLastAddedMediaFrom (line 532)
Displays images of last added media for a specific category
This will generate a table and populate it with the last added media and style it based on entries in the style hash. The number of photos returned matches the number of rows multiplied by the number of columns. Supports the setReturnType option.
cpm_viewLastAddedMediaFromAlbum (line 455)
Displays images of last added media for a specific album
This will generate a table and populate it with the last added media and style it based on entries in the style hash. The number of photos returned matches the number of rows multiplied by the number of columns. Supports the setReturnType option.
cpm_viewLastAddedMediaFromCategory (line 494)
Displays images of last added media for a specific category
This will generate a table and populate it with the last added media and style it based on entries in the style hash. The number of photos returned matches the number of rows multiplied by the number of columns. Supports the setReturnType option.
cpm_viewLastCommentedImages (line 870)
Displays last comments with images
This will generate a table and populate it with the last commented images The number of photos returned matches the number of rows multiplied by the number of columns. Supports the setReturnType option. This acts like many others excet you now have two new subtitle and title options %C - Which is the comment itself, and %a - which is the author of the comment.
cpm_viewLastUpdatedAlbumsFrom (line 673)
This (in thoery returns the last updated albums and the last photo added to them
cpm_viewMediaByPid (line 828)
Selects one media item by the CPG pid (Picture Id)
cpm_viewMostVotedMediaFrom (line 936)
cpm_viewRandomMedia (line 798)
Displays random images from database
This will generate a table and populate it with the random media and style it based on entries in the style hash. The number of photos returned matches the number of rows multiplied by the number of columns. Supports the setReturnType option.
cpm_viewRandomMediaFrom (line 571)
Displays random images from specific album or category
This will generate a table and populate it with random media from the combination of categories and albums specified and style it based on entries in the style hash. The number of photos returned matches the number of rows multiplied by the number of columns. Supports the setReturnType option.
cpm_viewRandomMediaFromAlbum (line 716)
Displays random images from specific album
This will generate a table and populate it with random media from one album and style it based on entries in the style hash. The number of photos returned matches the number of rows multiplied by the number of columns. Supports the setReturnType option.
cpm_viewRandomMediaFromCategory (line 757)
Displays random images from specific category
This will generate a table and populate it with random media from one category and style it based on entries in the style hash. The number of photos returned matches the number of rows multiplied by the number of columns. Supports the setReturnType option.
cpm_viewRandomMostViewedMediaFrom (line 970)
cpm_viewRandomTopRatedMediaFrom (line 1003)
cpm_viewTopRatedMediaFrom (line 901)
createTable (line 1302)
Creates a table to display images
This is an internal helper function to construct tables to hold the images.
debugPrint (line 117)
Used for printing debug information. If will output the parameter directly, preceeding it with a newline, then inside HTML blockquote tag, followed by a newline.
getOption (line 1807)
getOptionAttributes (line 1840)
getPrefixToUse (line 1657)
htmlTagAHREF (line 1476)
htmlTagIMG (line 1611)
htmlTagTABLE (line 1379)
htmlTagTABLE_END (line 1397)
htmlTagTD (line 1443)
htmlTagTH (line 1426)
htmlTagTR (line 1404)
htmlTagTR_END (line 1419)
insertOptionAttributes (line 1820)
loadOptions (line 1766)
Sets the member $optionHash with user submission
Inherited From cpm_dao
cpm_dao::cpm_dao()
cpm_dao::addPathInfo()
cpm_dao::cpm_debugMode()
cpm_dao::cpm_getConfigEntry()
cpm_dao::cpm_setDateFormat()
cpm_dao::cpm_setFilter()
cpm_dao::cpm_setMediaPrefixes()
cpm_dao::cpm_unlock_private()
cpm_dao::createDescription()
cpm_dao::createlink()
cpm_dao::createOldFormatDescription()
cpm_dao::dbConnect()
cpm_dao::dbDisconnect()
cpm_dao::dbExecuteSql()
cpm_dao::debugPrint()
cpm_dao::destroy()
cpm_dao::formatStats()
cpm_dao::getAlbumCount()
cpm_dao::getAlbumListFrom()
cpm_dao::getCategoryCount()
cpm_dao::getCategoryListFrom()
cpm_dao::getCommentCount()
cpm_dao::getdefaultimagename()
cpm_dao::getImageToUse()
cpm_dao::getLastAddedMediaFrom()
cpm_dao::getLastImagesWithComments()
cpm_dao::getLastUpdatedAlbumsFrom()
cpm_dao::getMediaAddedSince()
cpm_dao::getMediaAddedToCategoriesSince()
cpm_dao::getMediaByPid()
cpm_dao::getMediaCount()
cpm_dao::getMediaCountAddedSince()
cpm_dao::getMediaCountForAlbum()
cpm_dao::getMediaCountFrom()
cpm_dao::getMostVotedMediaFrom()
cpm_dao::getRandomImageFrom()
cpm_dao::getRandomMostViewedMediaFrom()
cpm_dao::getRandomSeed()
cpm_dao::getRandomTopRatedMediaFrom()
cpm_dao::getTopRatedMediaFrom()
cpm_dao::getViewcount()
cpm_dao::makeSourceSql()
cpm_dao::urlEncodeImagePath()
Documentation generated on Fri, 22 Jun 2007 10:16:57 -0400 by phpDocumentor 1.3.0