TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 523
  • Total: 523

Random photos from coppermine

Started by carver, September 22, 2005, 01:32:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ashari

Hey guys, I have a huge problem. I got my cpmfetch to work, in that I am able to see pictures from my gallery. However, the problem is that it is only calling pictures from ONE particular album in my gallery when I use this:

print "<center>";
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(4,1, array("imagesize" => "Thumb","windowtarget" => "_new","subtitle" => "Member: %o - %c "));
$objCpm->cpm_close();
print "</center>";

I have tried to add "cat=1" after stipulating the rows and columns of pictures, but that just produces an error. Seems this thing is only calling pictures from a particular album uploaded by the admin, and refuses to touch the users album even though they are not private. Can someone please help a frustrated person out? I would greatly appreciate it.  :-\

blink

I used this instead of Random media cpm_viewLastAddedMedia

ashari

thanx blink, but it still won't touch users albums. anything else? anybody? :-\

blink

here is my code, you can change the amount of thumbs to show.  It sound like a coppermine permissions issue though.
Quoteprint "<CENTER>";

include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');

$objCpm->cpm_viewLastAddedMedia (1,8,array("imagesize" => "Thumb","imageheight" => "75","imagewidth" => "75","windowtarget" => "_new","alttag" =>"From Album: %a Added: %w"));
$objCpm->cpm_close();
print "</center>";

guvenck

I have SMF1.1RC2, Tinyportal 0.8.6, Coppermine 1.4.5 and cpmfetch 1.6.2.
I am trying to display a random photo on my site in a phpblock, but before that, the cftest.php gives me following error:

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/mydomain.com/httpdocs/gallery/cpmfetch/cpmfetch_dao.php on line 710

Anyone had this error? What may be wrong?

guvenck

Answering my own question, maybe it might help to other people:

You need to comment OUT the line

// This is for CPG versions prior to 1.4
/* 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, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
*/

and UNcomment the line right below it:

// This is for CPG v 1.4.1 beta 1   

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';

in your cpmfetch_dao.php.

akulion

Added to block code index under "c" as "coppermine: Random images block"

psi0

does anyone have this error?

Fatal error: Cannot instantiate non-existent class: cpm in /projects/smfteste/Sources/Load.php(1607) : eval()'d code(34) : eval()'d code on line 4

I look in this topic and found that we have include coppermine.php

But where are coppermine.php?

Thanks

guvenck

coppermine.php was included with older versions of cpmfetch. Newer versions have cpmfetch.php, you may need to change the filename to cpmfetch.php.

marinelife

Does anyone have a way to do this with just PHP or java code instead of installing more software

This website is proudly hosted on Crocweb Cloud Website Hosting.