News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[Fixed] Coppermine Random Images & cpmfetch

Started by Goosemoose, February 25, 2006, 09:02:08 PM

Previous topic - Next topic

Goosemoose

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.

kegobeer

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.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

kegobeer

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.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Goosemoose

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.

kegobeer

Thanks for the clarification.  I'm sure vuud will appreciate the help fixing the bridging issues.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Goosemoose

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!

Goosemoose

kegobeer, where do you want me to post this on the coppermine forum since I can't start a new thread in that area?

kegobeer

"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

vuud

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.




Goosemoose

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.

KittieFind

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

Goosemoose

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 on the home page.

perplexed

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?

Goosemoose

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.

perplexed

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

Goosemoose

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.

perplexed

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



Goosemoose

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.


MIKESS.COM

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 [nofollow]


Anyone please kindly help me. Thanks
Tandiono.com [nofollow] | Mikess.com [nofollow] | WebsiteForum.net [nofollow] | AudioForum.net [nofollow] | ToysForum.net [nofollow] | GadgetForum.net [nofollow] | ClickBankForum.net [nofollow] | ForumBoards.net [nofollow] | VerySoon.net [nofollow] | ClickBanks.net [nofollow]

Advertisement: