CpmFetch 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/cpmfetch.php (line 50)
cpm_dao | --cpm
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.
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.
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:
Generates a list of Albums based
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
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.
Returns number representing the number of items in an album, including private entries
Does not Supports returnType,
Return the version of CpmFetch you are running.
Displays a list of category, album and count over past days. Supports the setReturnType option.
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
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:
Displays a list of albums with thumbnails and count over past days
Supports the setReturnType option.
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.
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.
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.
This (in thoery returns the last updated albums and the last photo added to them
Selects one media item by the CPG pid (Picture Id)
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.
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.
Inherited From cpm_dao
cpm_dao::cpm_debugMode()
cpm_dao::cpm_setDateFormat()
cpm_dao::cpm_setFilter()
cpm_dao::cpm_unlock_private()
cpm_dao::formatStats()
cpm_dao::getAlbumCount()
cpm_dao::getCategoryCount()
cpm_dao::getCommentCount()
cpm_dao::getViewcount()
Documentation generated on Tue, 10 Apr 2007 23:00:32 -0400 by phpDocumentor 1.3.0