for a userid return images that can be seen by that userid (using buddy mod) for a userid return images that can be seen by that userid (using buddy mod)
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

for a userid return images that can be seen by that userid (using buddy mod)

Started by giorgio79, February 18, 2007, 07:55:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

giorgio79

Hello vuud,

I would like to use cpmfetch to show albums on a social networking site member profile pages...On each member page I would show their albums in the albums section.

I am trying to display on the external social network profile the album thumbnails, and the name of their creator as would be shown on the album pages of cpm. The same way as albums can be seen on the cpm installation such as this:

www.mysite.com/my_coppermine_album/index.php?cat=110055  (userid goes here)

Would it be possible to pass to cpmfetch the userid of the member profile page, and the userid of the currently browsing individual (whether member browsing is a buddy of the member whose profile is being looked at ?) and then give back the albums that the browsing individual can see?

I am thinking of sg like this

cpmfetch ( profile_useri_d, showalbums, browsing_user_id)

Cheers,

Gyuri






giorgio79

I am getting closer :)

started to read up on the entire forum and found this

http://forum.coppermine-gallery.net/index.php?topic=39671.0


as I understand this would allow me to display the album thumb for a given user, I just have to plugin the user_id into "cat=user_id"
$objCpm->cpm_getAlbumListFrom(2,2,"cat=5");


giorgio79

Hello,

I have been trying the following code

  include "./cpmfetch.php";
  $objCpm = new cpm();
//  $objCpm->cpm_unlockPrivate(true);
  $options = array( 'subtitle' => '%t'  );
  $objCpm->cpm_getAlbumListFrom("user=giorgio",2,4,$options);
  $objCpm->cpm_close();

I commented out unlockPrivate as I am getting the error message:
Fatal error: Call to undefined function: cpm_unlockprivate() in /path_to_my_album/cpmfetch/test.php on line 5

What I notice is that getAlbumListFrom does not return the album index thumb but the second picture.

Also, for some reason the above code is displaying 3 times the same output image.

Has anyone had these issues?

giorgio79

Also, when I try to plugin a cat instead of the owner like this

  include "./cpmfetch.php";
  $objCpm = new cpm();
//  $objCpm->cpm_unlockPrivate(true);
  $options = array( 'subtitle' => '%t'  );
  $objCpm->cpm_getAlbumListFrom("cat=110055",2,4,$options);
  $objCpm->cpm_close();

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 '( a.category=110055 ) AND ((a.visibility = 0 OR a.visibility IS NULL) AND (a.al' at line 1
SELECT 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, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb, a.aid AS aAid, a.title AS aTitle, a.description AS aDescription, a.visibility as aVisibility, a.pos as aPos, a.category as aCategory, a.thumb as aThumb, a.keyword as aKeyword FROM coppermine_pictures AS p, coppermine_albums AS a LEFT JOIN coppermine_categories AS c ON a.category = c.cid WHERE 1 AND p.approved='YES' ( a.category=110055 ) AND ((a.visibility = 0 OR a.visibility IS NULL) AND (a.alb_password IS NULL OR a.alb_password = "")) GROUP BY a.aid ORDER BY a.aid DESC


Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/mactest/public_html/test/album/cpmfetch/cpmfetch_dao.php on line 1020[code]
[/code]

vuud

Quote from: giorgio79 on February 18, 2007, 02:06:46 PM
Also, when I try to plugin a cat instead of the owner like this

  include "./cpmfetch.php";
  $objCpm = new cpm();
//  $objCpm->cpm_unlockPrivate(true);
  $options = array( 'subtitle' => '%t'  );
  $objCpm->cpm_getAlbumListFrom("cat=110055",2,4,$options);
  $objCpm->cpm_close();

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 '( a.category=110055 ) AND ((a.visibility = 0 OR a.visibility IS NULL) AND (a.al' at line 1
SELECT 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, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb, a.aid AS aAid, a.title AS aTitle, a.description AS aDescription, a.visibility as aVisibility, a.pos as aPos, a.category as aCategory, a.thumb as aThumb, a.keyword as aKeyword FROM coppermine_pictures AS p, coppermine_albums AS a LEFT JOIN coppermine_categories AS c ON a.category = c.cid WHERE 1 AND p.approved='YES' ( a.category=110055 ) AND ((a.visibility = 0 OR a.visibility IS NULL) AND (a.alb_password IS NULL OR a.alb_password = "")) GROUP BY a.aid ORDER BY a.aid DESC


Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/mactest/public_html/test/album/cpmfetch/cpmfetch_dao.php on line 1020[code]
[/code]


Ah, yes - there is a SQL bug in 1.9.8 which is fixed in 1.9.9, which is going to be posted today.





Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

giorgio79

Thank you vuud ( I hope I am spelling your name right, please let me know if it should be capital like Vuud)!

I appreciate your time and effort!


jaiak

Hello!

Sorry for the rescue this post, I have installed the cpmfetch 2.0 and coppermine 1.4.10 in powweb.com server.

I have merger phpBB 2.0.22 and coppermine 1.4.10

I have in my index the cpmfetch work ok with the last comments, the last thumbnails, etc. But I can't show the last titles of my albums added in my gallery. I want show the titles in text mode. Can you help me?

Regards from spain anda thanks in Advance!

Joachim Müller

You haven't "rescued" this thread, but you're trying to hijack it. Don't!
Quote from: jaiak on January 29, 2008, 03:11:41 AM
I have installed the cpmfetch 2.0 and coppermine 1.4.10 in powweb.com server.
That's silly. Most recent stable release is cpg1.4.14. Upgrade. Stay out of this thread! Locking.