News:

Wondering if this will always be free?  See why free is better.

Main Menu

Coppermine Userpics

Started by JayBachatero, September 07, 2006, 12:40:32 AM

Previous topic - Next topic

JayBachatero

Delete the ModSettings.php~ file.  The one with the ~.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Trashcan

Ok, almost there!  so far, the modifications have worked.  I am looking at the config portion and it is asking for the prefix for thumbnails.  Once again, forgive my "ID10t" error, but what is this refering to?

Trashcan

nevermind, I got it.

Many thanks for the support on this one!

Trashcan

ouch, new issue and not sure where to look

I have a user who gets someone elses pictures showing up under their profile.

so user X get's user Y's pictures

I did not see right off hand where to look or modify this

JayBachatero

Check if the id of the members match on coppermine and the forum.  What I mean is check if ID x on the forum belong to id x on the gallery.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Trashcan

Quote from: Jay The Code Monkey on September 14, 2006, 12:58:46 PM
Check if the id of the members match on coppermine and the forum.  What I mean is check if ID x on the forum belong to id x on the gallery.

the users user names match, but I can't confirm that the passwords match.

I have a test account that I use in both spots coppermine and smf and I get no user pics in smf.  If I log in as my admin account, the right pics show up

JayBachatero

I mean the id not user name.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Trashcan

Quote from: Jay The Code Monkey on September 14, 2006, 01:07:32 PM
I mean the id not user name.

Ah, sorry.  I see what you are talking about.  So the ID's need to match?  I can change those, or should change them if necessary in which area, smf or coppermine?

Trashcan

where can I verify their id's?  I think I saw once area in myphpadmin, but I hate trying to figure out anything in there by hunt and peck.  How can I verify they match in a fairly easy place?

JayBachatero

No, no need to edit.  I just want to know if they match.  I think I might have to take another approach into this and change the query.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Trashcan

Quote from: Jay The Code Monkey on September 14, 2006, 02:43:48 PM
No, no need to edit.  I just want to know if they match.  I think I might have to take another approach into this and change the query.

It appears they do NOT match.  I can look at the url for the link to the profile in each area (smf and coppermine) and the id# does not match.

JayBachatero

Ok I found a way that it works.  I'll update the package in a bit.

In Profile.php
Code (find) Select

// Select the images
$requestImages = db_query("
SELECT pid, filepath, filename, owner_id, owner_name
FROM {$modSettings[cpgPrefix]}_pictures
WHERE owner_id = $memID
AND approved = 'YES'
$extensions
ORDER BY pid DESC
LIMIT $modSettings[cpgMaxPictures]", __FILE__, __LINE__);


Code (replace) Select

// Set the $ouserName
$ownerName = $context['member']['username'];

// Select the images
$requestImages = db_query("
SELECT pid, filepath, filename, owner_id, owner_name
FROM {$modSettings[cpgPrefix]}_pictures
WHERE owner_name = '$ownerName'
AND approved = 'YES'
$extensions
ORDER BY pid DESC
LIMIT $modSettings[cpgMaxPictures]", __FILE__, __LINE__);
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Trashcan

I got it to work, but had to modify this line

FROM {$modSettings[cpgPrefix]}pictures

Trashcan

#73
ttt

JayBachatero

Change
FROM {$modSettings[cpgPrefix]}pictures

to
FROM {$modSettings['cpgPrefix']}pictures
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Trashcan

Quote from: Jay The Code Monkey on September 15, 2006, 12:22:14 PM
Change
FROM {$modSettings[cpgPrefix]}pictures

to
FROM {$modSettings['cpgPrefix']}pictures

you are da man!!! 8)
Thank you so much for helping me get this sorted out!

JayBachatero

Everything working fine then now?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Trashcan

Quote from: Jay The Code Monkey on September 15, 2006, 12:40:58 PM
Everything working fine then now?

Yes, perfectly.  Nothing in the error logs, users have pictures in their profile as they should
Thanks again!

taucher

Quote from: Knat on September 12, 2006, 10:07:39 AM
Quote from: Jay The Code Monkey on September 12, 2006, 09:42:44 AM
Here you go.

Profile working  ;) - Pictures not showing  :(

Thanks anyway  :)
I have the same Problem. Editet every file from hand, cpg and smf are in the same database, all settings are made, but no images are shown. hm. what could be the misstake? also there are no messages in the error logs.

JayBachatero

Are the settings correct in Admin > Features and Options?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Advertisement: