Customizing SMF > Modifications and Packages
Coppermine Userpics
JayBachatero:
Link to Mod
Rate this Mod
This mod will add the last x amount of images that a user has uploaded to their Coppermine Gallery.
http://www.kevmundial.com/board/index.php?action=profile;u=3141
WARNING: You must have Coppermine installed in the same database as SMF. You can get it to work on another database by altering the $modSettings['cpgPrefix'] on the Profile.php file.
Don't show private albums - Thanks for markd for posting the query.
In Profile.php find
--- Code: --- // 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__);
--- End code ---
Replace with
--- Code: --- // Select the images
$requestImages = db_query("
SELECT p.pid, p.filepath, p.filename, p.owner_id, p.owner_name
FROM ({$modSettings['cpgPrefix']}pictures AS p, {$modSettings['cpgPrefix']}albums AS a)
WHERE owner_id = $memID
AND a.aid = p.pictures.aid
AND a.visibility = 0
AND approved = 'YES'
$extensions
ORDER BY pid DESC
LIMIT $modSettings[cpgMaxPictures]", __FILE__, __LINE__);
--- End code ---
Saku:
I get an error when I click on the profile link
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND approved = 'YES'
AND (filename LIKE '%.jpg' OR filename LIKE '%.gif' OR ' at line 4
Fichier: smf/Sources/Profile.php
Ligne: 1585
JayBachatero:
Did you fill out the information as mentioned before?
Dazzler:
hi jay.. sorry to be a pain in the ass...
i am being stupid.. but what do you mean my coppermine prefix? which part of my coppermine do i need to put in that section..
Thanks dude
Daz
kegobeer:
Does your SMF forum and Coppermine gallery share the same database?
Navigation
[0] Message Index
[#] Next page
Go to full version