CpmFetch Announcements from FistFullOfCode.com [The exact Center of the Internet] ---------------------------------------------------------------- * * * Dev release 1.9.9 is ONLINE now * * * [ Past returns do not guarentee future results. ] ( get it at http://cpmfetch.fistfullofcode.com ) IMPORTANT: The config file has changed dramatically - you must overwrite your old config file and re-run the install program. INSTALLING THE DEV RELEASES - Put the cpmfetch folder inside your CPG folder - Run the install.php script, which generates your cpmfetch_config.php file - You need to pass the relative or full path to the configuration file now, instead of the partial url to your gallery. See the bottom of this file for more information The differences between 1.9.8 and 1.9.9 are: * Config file has changed dramatically - YOU MUST RUN THE INSTALL PROGRAM!!!! * Made website URL a variable in install script for future change * The install will now detect when you actual need to re-run it during an upgrade. Gives a force option to allow you to reinstall anyway. * Added BMP to list of types that may have a thumbnail to display (list is now: jpg, jpeg, gif, png, bmp) * Fixed a nasty SQL inefficency in default bridged code (thx Jerx) * Fixed some internal inefficency's in formatting (thx Jerx) * Installer improved in a few new ways. The differences between 1.9.7 and 1.9.8 are: * Fixed problem with passworded albums not being blocked / allowed as they should be. [thx SNo0py] * Fixed problem with default bridged sql code (Thx FlyingMongoose) * DAO Added in cpm_getConfigEntry($_keyName) --- These may not be complete in thier implementation --- --- Also, the would require a bit more explaination --- * Added in cpm_getAlbumListFrom ($source, $rows, $columns, $options="") * DAO Added in getAlbumListFrom ($source) * Added in cpm_getCategoryList ($options="") * DAO Added in getCategoryListFrom($source="") The differences between 1.9.6 and 1.9.7 are: * Bugfix: A large number of % tags were fixed. * Bugfix: Problem that would eliminate anonymous (owner_id = 0) photos from selections [thx SNo0py] * Relinked User and Photo tables via LEFT JOIN [thx SNo0py] * Code Beautification: Captialized all SQL keywords in queries (AS, WHERE, FROM, Etc...) * Mmmm... cpm_viewLastUpdatedAlbumsFrom($source, $rows, $columns, $options="") - which may or may not work, depending... test before use. The differences bewtween 1.9.5 and 1.9.6 are: * Changed cpmfetch_dao to not give error on no results when it tries to get the path info * Changed install.php program so it will not try to display images if config failed * Fixed(?) problem with install not being under CPG and creating a relative path correctly * Fixed bug introduced in new processing of descriptions, titles, etc. (Bug reported by Funster - thanks) * Changed a number of calls so $source is the first parameter so it linguistically flows. For any, insert "" instead of a source. - cpm_viewRandomMediaFrom($source,$rows, $columns, $options="") - cpm_viewLastAddedMediaFrom($source, $rows, $columns, $options="") - cpm_getAlbumListFrom ($source, $rows, $columns, $options="") * CFRSSGET - Recoded to use cpmfetch.php instead of cpmfetch_dao.php * Some code beutification in cpmfetch_dao * Fixed error generated when no results were found * Bugfix: cpm_viewRandomTopRatedMediaFrom Throwing warning when you have less pictures than requested * Bugfix: getRandomMostViewedMediaFrom Throwing warning when you have less pictures than requested * Remapped parameters for H,I,L,O from CPG 1.3 database fields to the userProfile1,2,3,4 * Bugfix: fixed problem with personal galleries not being included in many functions because of the new SQL routines. Works now. * cpm_listMediaAddedOverLastDays : Changed linking to use cpg url from config file * cpm_showCategoriesUpdatedOverLastDays : Changed linking to use cpg url from config file * cpm_showAlbumsUpdatedOverLastDays : Changed linking to use cpg url from config file The differences bewtween 1.9.4 and 1.9.5 are: * Changed install problem links to the new location of the support forum * Reduced functionality for bridged versions (replacement SQL code) * Fixed bug that returned COPPERMINE_VERSION_STABLE instead of COPPERMINE_VERSION * Added in %1, %2, %3, %4 to represent the photos custom fields in each photo (last additions to depreciated % option array method) * Added a.visibility as aVisibility, a.pos as aPos, a.category as aCategory, a.thumb as aThumb, a.keyword as aKeyword to be returned with picture data. (CPG 1.4.x +) * Added c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb to data returning pictures in the data rows (CPG 1.4.x +) * When returning data, three new fields are added to the rows (This is to save people the trouble of calling getImageToUse...): fullPathToThumb fullPathToNormal fullPathToFull * The subtitle and alttag will also be passed back as part of the dataset as: cpmSubtitle cpmAlttag * Due to the lack of one character abbreviations for subtitles, anything that generates based on a template is now moving to a format involving {{tag}} and fully descriptive tags. The older % based tags are depreciated and will go away in the future. This is a sample list for what is returned with pictures: pFilepath pFilename pAid pFilesize pTitle pCaption pOwner_name pOwnerId pCtime pHits pPid pPic_Rating pVotes pWidth pHeight pUser1 pUser2 pUser3 pUser4 cName cDescription cPos cParent cThumb uUser_lastvisit uUser_regdate uUser_email uUser_profile1 uUser_profile2 uUser_profile3 uUser_profile4 uUser_profile5 uUser_profile6 aAid aTitle aDescription aVisibility aPos aCategory aThumb aKeyword fullPathToThumb fullPathToNormal fullPathToFull cpmSubtitle D,S,V,w from the old format can still be called in the new method as: D : {{pCtimeAgo}} : Formatted Picture time - as in how old S : {{pFilesizeKB}} : Filesize in Kilobytes V : {{pPic_RatingStars}} : Number of stars given to picture w : {{pCtimeFormatted}} : Formatted picture creation date * "linktemplate" added to the options array. This allows you to set up exactly what the link will be formatted like. This allows for you to link to other than the CPG gallery. This is new, and allows you to screw the links up all on your own. "linktemplate" => "t_blackbearcar.php?carid={{pAid}}" or using the old way (bad): "linktemplate" => "t_blackbearcar.php?carid=%a" The only differences between 1.9.3 and 1.9.4 are: * Fixed some code that would cause debug prints to trigger in non-debug more resulting in blockquotes appearing in the page. * Fixed a transition problem with the date format not reading from the config file * Moved templated SQL code into the config file (preparing to support bridge) * More code cleanup in the dao module The only differences between 1.9.2 detailed below and 1.9.3 are: * Fixed cfig_random.php calls to cfimageget.php * Fixed cfrssget.php bugs with new system * Fixed rss_lastadded.php bugs with new system Fixed in 1.9.2 * Fixed cfimageget.php so it would actually work. Needs some touch up. Fixed in 1.9.1 * Fixed bug in thumbnail path generation during install * Changed output test to be 4 images wide instead of 6 What's new in 1.9.0 * Massive refactoring of all code * Changed: Call to cpm( ) * Removed: cpm_init() Removed: cpm_setDebugMode( ) Replaced with cpm_debugMode($bool = "") Set it with true or false. Not setting returns current setting Removed setPhotoPrefix from cpm_dao continue to use cpm_setMediaPrefixes - although you should not need it now that settings are drawn from the database Removed setDateFormatString continue to use cpm_setDateFormat or set it in the config file Removed setFilter continute to use cpm_setFilter or use the config file entry for it Removed setPrivateLockOn continue to use cpm_unlock_private ($bool="") or use config file entry for it Removed: cpm_OverridePathToCoppermine, cpm_OverrideUrlToCoppermine, cpm_OverridePathToAlbums they should not be needed any more under the new design (I think) Fixed: Outputted HTML is spaced and hard line feeds inserted to make it more readable. Fixed: Always uses full domain name and path for images. Double slashes gone. Added: Config file option for cfUseExistingDBConnection - when set to "true" will use an existing dbconnection if it exists and will not close any connection (even if it created it) when cpmfetch exits. PHP will close any open handles anyway - this will allow for embedded work (inside a forum) to not create new db connections. ---------------------------- THIS IS A DEVELOPMENT VERSION - THE FIRST OF ITS GENERATION (2.0) so it may be more prone to bugs - yet also has a shorter lifespan. So support for this particular version will be done in one thread on the forum. So it can be deleted after. http://coppermine-gallery.net/forum/index.php?topic=35432.0 IMPORTANT: This is also geared toward CPG 1.4.x and better. Folks running 1.3.x will need to comment out and comment in the indicated lines in cpmfetch_dao.php Open in a text editor and look around line 36 or so. Installing and running (install.php) ------------------------------------------------------ Installation: Take the entire cpmfetch folder and copy onto your webserver into the Coppermine Photo Gallery directory. So if your gallery is located in /photos, you should now have a directory named /photos/cpmfetch Next, the webserver needs to be able to write to the file named cpmfetch_config.php - so you will need to perform a chmod on this file, either through an ftp program or through the command line. The exact rights needed will vary by webserver, and there may be other ways to do this. The easiest way would be to assign all rights to the file (chmod 777). After that, connect to the install script via a web browser http://www.yourdomainhere.com/cpgdirectoryname/cpmfetch/install.php After that you are done. Installing to a different location ------------------------------------------------------- Well, basically do the same thing as above, but put the cpmfetch folder where you really want it. When you run the install, it will fail to find the CPG config file and will prompt you for a location. The path you enter is relative to your current location. So if CPG was up one folder and called photos you would enter ../photos/cpmfetch/cpmfetch_config.php If it was up two levels and called photos you would enter ../../photos/cpmfetch/cpmfetch_config.php That should do it. Running: -------------------------------------- CpmFetch 2.0 varies from the older version in a few respects: * You no longer need to provide the path to CPG in the new statement, now it is a path to the cpmfetch_config.php file. * Settings are retrieved from CPG itself * Otherwise, all the calls are handled the same, so you should only have to change your include and cpmfetch constructor if you have existing pages. So if you had this before: cpm_viewRandomMedia(3,3); $objCpm->cpm_close(); ?> You would now have something like: cpm_viewRandomMedia(3,3); $objCpm->cpm_close(); ?> Note that the new cpm parameter is the relative, or full path to the config file The config file (cpmfetch_config.php): --------------------------------------------- This is where you can change the behavior of your cpmfetch installation. The things you can change and alter are in the top part of the script, the rest should be left alone. Really. What is shown is a default value and a description, all commented out. To enable an override, uncomment and change the value. If you re-run the install, your changes will be wiped out. This is the way it is for now - I plan on saving them in a future version of an install script. DOCBOOK DOCUMENTATION CONTINUES See it here... updated daily (scratch that)... updated whenever I have time http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html -------------------------------------------------------------- Sign up for email notifications at http://cpmfetch.fistfullofcode.com This will get you: * Emails for new releases and development releases * Notifications of new tutorials and online help * Security notification (if we ever have one) * Email addresses held closely - no spam, not shared ------------------------------------------------------------- Thanks! Bill@fistfullofcode.com