Interesting topic.
I admire your patience, vuud, and thanks for the software. I'm running IPB 2.1.4, Coppermine 1.4.3, and CPMfetch 1.6.2. I initially had problems with only getting a few pictures pulled from several of my categories, but after reading this topic, it was most likely the bridge to IPB. And indeed, it was. The relevant table name is ibf_members; the field is "id". So, I just renamed your query appropriately, like in the phpbb examples previously given. Works great. Find and replaced all ten instances. I get my latest pictures now.
The problem is I get three copies of them, usually. Someone else had this same problem a couple of months ago, but as I recall it was never addressed.
More info, as you request:
Running apace 1.3.3, PHP 4.4.1. Links: My gallery is
www.harmonyforever.com/cpg143/. Example page displaying problem is this:
www.harmonyforever.com/recent_fanart.php. While this is meant to be a plugin to my CMS (Subdreamer), this is not inside subdreamer yet. (interestingly enough, though, it works fine there--as in it displays all of these same images; but just multiple copies of them). Running this code:
<?
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
require_once "./cpmfetch/cpmfetch.php";
$pict = new cpm("/cpg143");
$pict->cpm_unlock_private(false);
$pict->cpm_setDebugMode(true);
$last_source = "cat=2,3,11,8,9,10";
$pict->cpm_viewRandomTopRatedMediaFrom("cat=3", 4, 3, 12);
$pict->cpm_close();
?>
This is the code generating the above "recent_fanart.php" page. As you can see, no errors are being generated.
As for my technical ability; i'd say fairly advanced. I'm comfortable with myql, and php. I just can't see why it's pulling duplicate copies of the images once I find and replace the u.user_id sql query with the ibf one. This is what I changed line 94, I believe it is, of the dao file to:
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u, ibf_members AS ibf ";
I use ibf.id where the u.user_id was before.
I hope this is the info you need!
ETA: Here is my cpmtest file, too.
www.harmonyforever.com/cpmfetch/cftest.php It's interesting to note that while it pulls pictures, it does not pull the views of those pictures. It's not pulling duplicate versions, either.
Since I have over a 1000 possible members to upload pictures, I have to integrate this with my IPB database; the trick of just slapping a few members into coppermine isn't feasible.