Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: Goosemoose on February 25, 2006, 09:02:08 PM

Title: [Fixed] Coppermine Random Images & cpmfetch
Post by: Goosemoose on February 25, 2006, 09:02:08 PM
Note: Solution found, scroll down!

Has anyone gotten cpmfetch to work with the SMF bridged version of coppermine? It only shows the admins album no matter what. This is occuring because the coppermine user table is empty except for the admin since the users exist in smf's table. Anyone have any ideas on getting it to work right? The answer on the coppermine forum is that they aren't going to work on this problem.
Title: Re: Coppermine Random Images & cpmfetch
Post by: kegobeer on February 25, 2006, 09:09:27 PM
Where did vuud say that, exactly?  He did open up a new thread about bridging issues; doesn't make sense to do that if you didn't want to hear about those types of problems.
Title: Re: Coppermine Random Images & cpmfetch
Post by: kegobeer on February 25, 2006, 09:11:00 PM
And to clarify, vuud is not on the Coppermine development team, he created the CPMFetch mod.  I don't want people thinking that the Coppermine team is refusing to help.
Title: Re: Coppermine Random Images & cpmfetch
Post by: Goosemoose on February 25, 2006, 09:17:28 PM
I actually am almost done fixing up cpmfetch_dao.php so it works. I already have most of the functions working :) I'll post the updated version when I get it done.

I'm sorry I didn't want to make it sound like vuud or anyone else was refusing to work on the problem. The problem has been discussed with phpbb and smf on several of the threads for months, with no solution. It's actually only a few lines to fix it. I'll post it soon.
Title: Re: Coppermine Random Images & cpmfetch
Post by: kegobeer on February 25, 2006, 09:19:00 PM
Thanks for the clarification.  I'm sure vuud will appreciate the help fixing the bridging issues.
Title: Re: Coppermine Random Images & cpmfetch
Post by: Goosemoose on February 25, 2006, 09:34:55 PM
Ok all done :) Please test this out and let me know if anyone has any problems. I'll post this on the coppermine forum too.

The main difference is that once you bridge coppermine you are now using the smf user table. So it was only logical to change the cpmfetch_dao.php to use the smf user table instead of coppermines. I've attached my file so If you're using the latest cpmfetch you can just replace the file, with the exception of the one change you must do manually, and that is to replace the rfc_ below with your SMF table prefix. Here are all the changes though so updates can be made when later versions of cpmfetch are released.

The main changes I did were

You MUST change the rfc_ to your prefix even in the attached file:


$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";


to:

$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. "rfc_members AS u ";



change:

var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';


to:

var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.lastLogin AS uUser_lastvisit, u.dateRegistered AS uUser_regdate, u.emailAddress AS uUser_email';


change all instances (quick find/replace will do) of:

u.user_id


to:

u.ID_MEMBER



That should be it. Let me know if you have any problems :) Now to get it to work properly in mambo without breaking my bridge login!
Title: Re: Coppermine Random Images & cpmfetch
Post by: Goosemoose on February 25, 2006, 09:35:34 PM
kegobeer, where do you want me to post this on the coppermine forum since I can't start a new thread in that area?
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: kegobeer on February 25, 2006, 09:49:30 PM
http://coppermine-gallery.net/forum/index.php?topic=26735.msg123193#msg123193

Seems like the most appropriate place.
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: vuud on February 27, 2006, 11:11:01 AM
Quote from: Goosemoose on February 25, 2006, 09:02:08 PM
Note: Solution found, scroll down!

Has anyone gotten cpmfetch to work with the SMF bridged version of coppermine? It only shows the admins album no matter what. This is occuring because the coppermine user table is empty except for the admin since the users exist in smf's table. Anyone have any ideas on getting it to work right? The answer on the coppermine forum is that they aren't going to work on this problem.

Whoa...  First off the next release I have fixes, or at least allieviates the problems with all bridges.

Second, I have been very very busy lately so have not been able to keep cpmfetch at the top of my list with many other real life events happening.

For future generations:  cpmfetch 1.7 on up takes out any need to make this mod.



Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: Goosemoose on February 27, 2006, 12:40:12 PM
Ok, I'll leave it up until then. I got cpmfetch to return images with links to joomla integrated pages now too. You can check it out on my site http://www.goosemoose.com click on photo albums.
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: KittieFind on March 06, 2006, 12:14:28 AM
Thankyou very much for this fix! I was trying to get onto the coppermine forums to find help because I have coppermine and smf bridged but I was getting errors left and right. But, their forums are down (their site is all down) so I figured I will see if smf would have the answers and once again you guys got it right! This was my final mod before my new site is to be published and I have been hanging on this all day. Thanks again! :D
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: Goosemoose on March 06, 2006, 12:16:42 AM
I'm glad to help :) I made a few adjustments to make it works with Joomla/Mambo as well, I'm not sure if you are using these. You can see my random images here http://www.goosemoose.com (http://www.goosemoose.com) on the home page.
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: perplexed on April 17, 2006, 08:56:06 PM
I finally found this thread and I think it might answer a few problems.

When I click on my gallery menu link in joomla, the only album I see is the admin's, when I tried to add random modules for coppermine it didnt display anything so I gave up.

I am using copperminevis as it was the only way I could get coppermine integrated at all

So am I still able to use the codes/instructions posted in goosemoose's post - 5th post down - as it looks like the code has been struckthrough?
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: Goosemoose on April 17, 2006, 10:02:41 PM
Yes you can still use it :) At some point a new version of cpmfetch was going to be released. But I am using cpmfetch with copperminevis as well.

Also, make sure to read the copperminevis forum about a security vulnerability and fix I found.
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: perplexed on April 18, 2006, 08:07:42 AM
Quote from: Goosemoose on April 17, 2006, 10:02:41 PM
Yes you can still use it :) At some point a new version of cpmfetch was going to be released. But I am using cpmfetch with copperminevis as well.

Also, make sure to read the copperminevis forum about a security vulnerability and fix I found.
yes I saw that, but I cant get the fix to work without parse errors :(  I'm still looking into it and posted on his forum
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: Goosemoose on April 18, 2006, 09:26:34 PM
Ignore the fix that I listed. He had someone else post a fix further down. For some reason the fix I posted only works on certain servers.
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: perplexed on April 26, 2006, 01:06:50 PM
Quote from: Goosemoose on February 25, 2006, 09:34:55 PM
Ok all done :) Please test this out and let me know if anyone has any problems. I'll post this on the coppermine forum too.

The main difference is that once you bridge coppermine you are now using the smf user table. So it was only logical to change the cpmfetch_dao.php to use the smf user table instead of coppermines. I've attached my file so If you're using the latest cpmfetch you can just replace the file, with the exception of the one change you must do manually, and that is to replace the rfc_ below with your SMF table prefix. Here are all the changes though so updates can be made when later versions of cpmfetch are released.

The main changes I did were

You MUST change the rfc_ to your prefix even in the attached file:


$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";


to:

$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. "rfc_members AS u ";



change:

var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';


to:

var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.lastLogin AS uUser_lastvisit, u.dateRegistered AS uUser_regdate, u.emailAddress AS uUser_email';


change all instances (quick find/replace will do) of:

u.user_id


to:

u.ID_MEMBER



That should be it. Let me know if you have any problems :) Now to get it to work properly in mambo without breaking my bridge login!


ok I'm back... with questions :)

Where do I find this cpmfetch_dao.php file?  I am using c/mine 1.4.3 and Vis

I dont know what this 'the rfc_ below' is and what SMF table prefix do I use, there is more than one right?

Sorry if it sounds dumb but I dont want to mess this up, thanks for your help


Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: Goosemoose on April 26, 2006, 08:46:13 PM
cpmfetch is a coppermine add on you will need to download and install. Do a quick google search to get the site and the instructions.

rfc_ is my smf table prefix. The default is smf_ and is probably what yours is.
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: perplexed on April 27, 2006, 08:01:20 AM
:( oh no this looks kinda tricky

I'll go check it out, thanks again
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: MIKESS.COM on August 13, 2006, 04:24:42 PM
Im having problem after with cpmfetch bridge with smf 1.1 RC2,

I replace the cpmfetch_dao.php with Goosemoose code :

and the test result is :
http://www.friendsterforum.com/gallery/cpmfetch/cftest.php


Anyone please kindly help me. Thanks
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: Goosemoose on August 13, 2006, 04:33:51 PM
You used friend_copp1.rfc_members , you need to change rfc to whatever your table is. I use rfc, you probably use smf or another prefix.
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: MIKESS.COM on August 13, 2006, 04:56:14 PM
Quote from: Goosemoose on August 13, 2006, 04:33:51 PM
You used friend_copp1.rfc_members , you need to change rfc to whatever your table is. I use rfc, you probably use smf or another prefix.

Thanks for the quick reply :)

I try to change the rfc_ to smf_ and cpg_ but still it fail.. Is there anyway where i could check on the prefix?
Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: vuud on August 13, 2006, 07:55:13 PM
Quote from: kontol on August 13, 2006, 04:56:14 PM
Quote from: Goosemoose on August 13, 2006, 04:33:51 PM
You used friend_copp1.rfc_members , you need to change rfc to whatever your table is. I use rfc, you probably use smf or another prefix.

Thanks for the quick reply :)

I try to change the rfc_ to smf_ and cpg_ but still it fail.. Is there anyway where i could check on the prefix?


Hallooo all,

Just as a quick update - the 1.7 release is on the way once again.  In the meantime I have built a house (a lot of the construction), got married, planted a garden, moved and sold a condo.  Anyway...

I posted version 1.6.3 which will allow cpmfetch to work with bridged installations with only a slight depreciation in functionality - you can't pull the name of the person that posted the picture.

But in the meantime you can use it without modifications.

The 1.7 development series is addressing the bridged options, smf will most likely be the first, since I use SMF (non-bridged) so its easy for me.

As for a timeline on 1.7 releasing something...  Soon.  Well, within a month.  Basically its already been rewriten to get all the info out of the coppermine database on install.  I need to rewrite the installer I wrote and then the first 1.7.1 will be released.

Oh, I am phasing out support for cpg 1.3.x

Okay, I am off now... have a nice day all.






Title: Re: [Fixed] Coppermine Random Images & cpmfetch
Post by: snork13 on August 18, 2006, 08:15:55 PM
Quote from: vuud on August 13, 2006, 07:55:13 PM
Quote from: kontol on August 13, 2006, 04:56:14 PM
Quote from: Goosemoose on August 13, 2006, 04:33:51 PM
You used friend_copp1.rfc_members , you need to change rfc to whatever your table is. I use rfc, you probably use smf or another prefix.

Thanks for the quick reply :)

I try to change the rfc_ to smf_ and cpg_ but still it fail.. Is there anyway where i could check on the prefix?


Hallooo all,

Just as a quick update - the 1.7 release is on the way once again.  In the meantime I have built a house (a lot of the construction), got married, planted a garden, moved and sold a condo.  Anyway...

I posted version 1.6.3 which will allow cpmfetch to work with bridged installations with only a slight depreciation in functionality - you can't pull the name of the person that posted the picture.

But in the meantime you can use it without modifications.

The 1.7 development series is addressing the bridged options, smf will most likely be the first, since I use SMF (non-bridged) so its easy for me.

As for a timeline on 1.7 releasing something...  Soon.  Well, within a month.  Basically its already been rewriten to get all the info out of the coppermine database on install.  I need to rewrite the installer I wrote and then the first 1.7.1 will be released.

Oh, I am phasing out support for cpg 1.3.x

Okay, I am off now... have a nice day all.








wow you have been busy ;D I understand...anyway i had this working with the bridge way back when don't know how i missed this topic :'( cant' wait for the update. i'd like to package something up with this