Version 2.0.0 STABLE has been posted. This makes 1.6.4 very very very old Version 2.0.0 STABLE has been posted. This makes 1.6.4 very very very old
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Version 2.0.0 STABLE has been posted. This makes 1.6.4 very very very old

Started by vuud, December 27, 2006, 05:50:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vuud






From 1.9.10 to 1.9.12 the following changes have been made
-----------------------------------------------------------------

IMPORTANT:  There is a change in how CpmFetch is internally storing information.  If you do not do any custom coding or anything, then you do not need to read this.  Otherwise, you should know that in it's links now, it is not storing the full URL.  It is only storing from inside the cpg directory on down.  For example, if you are getting a dataset back and parsing it yourself, inside of getting a full URL to your gallery, you will only get "albums/whatever/somepic.jpg".  This may break things for you.

To add on the full URL, simply add  $cpmObj->cpm_getConfigEntry('cpg_url') which will return http://www.domainname.com/cpg/ - or whatever your site is.

WHY?  This was done for two reasons 1) allow a better fix for encoding album names, 2) reduce overall memory usage in very large data sets.


Also in this version:

* Fixed usage of an old tag internally in the GITU function

* Fix: uninitialized array in keyword check (bug report by balafre)

* Installer to check feed directory to make sure it is writeable ( is_writeable to check feed.xml )

* Added output of total pictures in gallery to install program  - will not display images if none found.  (inspired by solidsnake)

* Fix: Not handling all encoding.  Was not encoding paths before.



==============================================================

The differences between 1.9.10 and 1.9.11 are:

* Added two new parameters to the $source entry.
   keyword=a,b,c,d
   text=a,b,c,d

Both take a comma delimited list of words.  words in keywords match any picture who's keyword field has any of those words.  Words in text match the keyword field, the title field and the caption field.  You can use them together.

The behavior in this function is sort wierd.  Searches for cat, album OR'd together.  The keywords and text searches are OR'd together.  The owner is grouped by itself but the three groups are AND'ed together.

So

$source = "cat=5,3:album=10,12:owner=vuud:keyword=alice,bob:text=bicycle"

Get pictures that are

category 5 or category 3 or album 10 or album 12 AND owner vuud AND (keywords like alice or keywords like bob or titles like bicycle or keywords like bicycle or descriptions like bicycle)

Get it?

Here is is in english:  Show any pictures from categories 5 or 3 or albums 10 or 12 that are owner by Vuud and that have the keywords alice or bob or titles with bicycle or descriptions like bicycle.

SECURITY WARNING:
Before you get any ideas about letting site visitors enter in their own keywords and pumping them into mysql through cpmfetch, be aware:  CpmFetch was not designed with user input in mind.  I do some simple checks like mysql_escape_string and checks for numerics and such, but I have not given it tons of thought.  If you do want to do this then you may want to look through the code, or get someone else to do it for you.  Report any percieved insecurities to me.  When I have time, I will spend more time analyzing possible attack vectors.
END WARNING















I have posted dev release 1.9.10.  This has some nice changes. 

But there are two important things to note:

IMPORTANT #1

For some reason on my download page, it is not shown as the last dev release.  It is listed toward the bottom of the page.  Download it from there or by clicking one of these links:

http://cpmfetch.fistfullofcode.com/projects/copperminefetch/downloads/copperminefetch-1.9.1-dev.tar.gz
http://cpmfetch.fistfullofcode.com/projects/copperminefetch/downloads/copperminefetch-1.9.1-dev.zip

IMPORTANT #2

In version 1.9.9 I made a change to the configuration file that requires you to remove or overwrite your cpmfetch_config.php and re-run the install.php.  After that, you should always run it, and it will tell you if you need to continue or not.  I will be setting a check into cpmfetch that will not let you execute if your config is older than the last marked config change.  So if you have a config from 1.9.8, it WILL NOT WORK (not even a chance) with 1.9.9 and up.

Here are the most recent changes:

* * * Dev release 1.9.10 is ONLINE now * * *
[ Run!!!! For the love of all thats holy RUN!!!!!! ]

The differences between 1.9.9 and 1.9.10 are:

* All internal results are passed as an associative array now.  The SQL resultset is freed soon after it completes.

* Added an early exit from makeSourceSql when no source was asked for

* Removed the "database closing" notification that crept in there during testing

-- The importance of the following, is that without the left join added,
photos that were not part of an album or category would not be counted or queried.
This rectifys this situation.
* getMediaCount converted to left join, sql call altered a bit
* getMediaCountFrom converted to left join
* getMediaCountForAlbum converted to left join
* getMediaCountAddedSince converted to left join
* getViewcount converted to left join
* getMediaByPid converted to left join

Problem with viewTopRatedRandomMedia and running out of memory in large databases... line 962 is where the array is duplicated
The problem lies in the large amount of results coming down and the duplication of that array in 962

* Change addPathInfo to use less memory

* Changed some code to return empty arrays instead of errors

* Added $objCpm->sqlPostSelect to support inserting a no-cache SQL directive.  Should only be used for benchmarking.

* Added benchmarking.php utility script to the basic installed files.  Useful for timing calls.

* cfrssget should not autoset your cpg's char set

* Removed some accumulating cruft from archive

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.



















We are another step closer to a release!

* * * Dev release 1.9.8 is ONLINE now * * *
[ Humppa is the rock on which I shall build my empire ]

( get it at http://cpmfetch.fistfullofcode.com )
The code, not the humppa

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.











* * * Dev release 1.9.6 is ONLINE now * * *

See following post for 1.9.6 changes from 1.9.5
[ Mars (Still) Needs Women ]

( get it at http://cpmfetch.fistfullofcode.com )

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 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:

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

You would now have something like:

<?php
include "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
$objCpm->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.


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://forum.coppermine-gallery.net/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.












Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

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
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco