Advertisement:

Author Topic: [Fixed] Coppermine Random Images & cpmfetch  (Read 26472 times)

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
[Fixed] Coppermine Random Images & cpmfetch
« 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.
« Last Edit: February 25, 2006, 09:37:01 PM by Goosemoose »

Offline kegobeer

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,994
  • Gender: Male
  • I am ninja!
    • The Kazebeer Family Website
Re: Coppermine Random Images & cpmfetch
« Reply #1 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.
"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")

Offline kegobeer

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,994
  • Gender: Male
  • I am ninja!
    • The Kazebeer Family Website
Re: Coppermine Random Images & cpmfetch
« Reply #2 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.
"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")

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Coppermine Random Images & cpmfetch
« Reply #3 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.

Offline kegobeer

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,994
  • Gender: Male
  • I am ninja!
    • The Kazebeer Family Website
Re: Coppermine Random Images & cpmfetch
« Reply #4 on: February 25, 2006, 09:19:00 PM »
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")

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Coppermine Random Images & cpmfetch
« Reply #5 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:

Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";

to:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. "rfc_members AS u ";


change:
Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
u.user_id

to:
Code: [Select]
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!

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Coppermine Random Images & cpmfetch
« Reply #6 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?

Offline kegobeer

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,994
  • Gender: Male
  • I am ninja!
    • The Kazebeer Family Website
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #7 on: February 25, 2006, 09:49:30 PM »
"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")

Offline vuud

  • Newbie
  • *
  • Posts: 4
  • cpmfetch.fistfullofcode.com:random images from CPG
    • Fist Full Of Code
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #8 on: February 27, 2006, 11:11:01 AM »
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.




Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #9 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.

Offline KittieFind

  • Newbie
  • *
  • Posts: 9
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #10 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

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #11 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 on the home page.

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #12 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?

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #13 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.

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #14 on: April 18, 2006, 08:07:42 AM »
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

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #15 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.

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #16 on: April 26, 2006, 01:06:50 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:

Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";

to:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. "rfc_members AS u ";


change:
Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
u.user_id

to:
Code: [Select]
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



Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #17 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.

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #18 on: April 27, 2006, 08:01:20 AM »
:( oh no this looks kinda tricky

I'll go check it out, thanks again

Offline MIKESS.COM

  • Semi-Newbie
  • *
  • Posts: 24
  • Gender: Male
  • Mikess.com
    • Tandiono.com
Re: [Fixed] Coppermine Random Images & cpmfetch
« Reply #19 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 [nofollow]


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