CpmFetch 1.4 On... Displaying data and images from CPG on your website - Page 29 CpmFetch 1.4 On... Displaying data and images from CPG on your website - Page 29
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

CpmFetch 1.4 On... Displaying data and images from CPG on your website

Started by vuud, July 08, 2005, 06:43:10 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

vuud

Quote from: benseth on December 31, 2005, 02:06:22 AM
I updated my CPG and Cpmfethch comes up with this

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site12/fst/var/www/html/cpmfetch/cpmfetch_dao.php on line 710

I predict you will soon read the release notes that can with cpmfetch, and furthermore - all will become clear

Happy new year all
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

imrich

Quote from: imrich on December 28, 2005, 05:16:25 PM
I understand what you are saying about the database. If I was better at db work, I would volunteer to help, but I'm not! ;)

If you run cftest.php, Under the test thumbnail grid, 'Views' always shows 0.  Even on my test installation which does not have any phpbb installed.  I noticed that the code had %V instead of %v, I tried to change it to %v, but it didn't seem to work. However, I didn't do much more testing than that.



I found why cftest.php wasn't displaying the number of views in thumbnail test grid.

find this code in cftest.php

"subtitle" => "%o<br>%V views",


change the %V to %h like this:


"subtitle" => "%o<br>%h views",


After reading the documentation, I found that %V is the current rating in the number of stars, not the number of views!

Happy New Year! :)

benseth

I did what the release notes had and now i get

You have an error in your SQL syntax near 'FROM cpg143_pictures as p, cpg143_albums as a, cpg143_users AS u where p.aid =' at line 1
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site12/fst/var/www/html/cpmfetch/cpmfetch_dao.php on line 713

vuud

Quote from: benseth on January 02, 2006, 10:41:42 AM
I did what the release notes had and now i get

You have an error in your SQL syntax near 'FROM cpg143_pictures as p, cpg143_albums as a, cpg143_users AS u where p.aid =' at line 1
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site12/fst/var/www/html/cpmfetch/cpmfetch_dao.php on line 713

Please be sure you did not accidentally muck up the SQL statement and that you removed the comments from around it fully and such.

I don't think a SQL Syntax error would be caused by any changes to the database and such

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

Zanelli

Okay I'm not sure how posting here works, but I've got a big problem.

Seen I've just got hold of CpmFetch I don't really know much about it and would like some help setting it up.

I've installed it and got the test file working with my CPG.

The problem is that I have my CPG briged with my PHPBB board and the little info I got from searching says there's a big problem with this, but I don't know if this has been solved or not?

n3n

Hi Vuud, I got it to work. Dont know how I did it, but it works.

Only problem i have is that im getting only 3 images shown.

Any idea what the problem could be ?

vuud

Quote from: Zanelli on January 02, 2006, 06:26:34 PM
Okay I'm not sure how posting here works, but I've got a big problem.

Seen I've just got hold of CpmFetch I don't really know much about it and would like some help setting it up.

I've installed it and got the test file working with my CPG.

The problem is that I have my CPG briged with my PHPBB board and the little info I got from searching says there's a big problem with this, but I don't know if this has been solved or not?

Yes, you need to create users in cpmfetch... dummy users.  Someone posted information on linking to phpbb somewhere here, but I have not tried it.

You should be able to find lots of posts on this here.
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

vuud

Quote from: n3n on January 03, 2006, 12:44:23 AM
Hi Vuud, I got it to work. Dont know how I did it, but it works.

Only problem i have is that im getting only 3 images shown.

Any idea what the problem could be ?

How many did you expect?
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

benseth

Is it supposed to  be like this?

        var $topPercentForTopRated = 10;
/*
   var $topPercentForMostViewed = 25;
*/


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

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

imrich

Quote from: Zanelli on January 02, 2006, 06:26:34 PM
Okay I'm not sure how posting here works, but I've got a big problem.

Seen I've just got hold of CpmFetch I don't really know much about it and would like some help setting it up.

I've installed it and got the test file working with my CPG.

The problem is that I have my CPG briged with my PHPBB board and the little info I got from searching says there's a big problem with this, but I don't know if this has been solved or not?

Zanelli,

You can try this: http://forum.coppermine-gallery.net/index.php?topic=19564.msg117615#msg117615

This is what I did to get cpmfetch working with phpbb and it seems to be working well.

If you get it working also, let us know so we can get more validation on this 'work around' method.

Zanelli

Quote from: vuud on January 03, 2006, 04:57:03 AM
Yes, you need to create users in cpmfetch... dummy users.  Someone posted information on linking to phpbb somewhere here, but I have not tried it.

You should be able to find lots of posts on this here.


I have over 300 members I don't really want to do that.

imrich

Quote from: Zanelli on January 03, 2006, 03:48:22 PM
I have over 300 members I don't really want to do that.

Zanelli, Try this, It works great with phpbb. I use it as documented in the post which I mentioned before.

This is an excerpt from the previous post to get phpbb 2.0.18 (or 2.0.19) to work with CPMFetch 1.6.2

open cpmfetch.dao.php and find line:


$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";

change it to the following:


$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";


note! If your phpbb database tables have a different prefix than 'phpbb_' then change the phpbb_users as needed to use the same prefix as your phpbb database tables use.

THEN, find every occurance of

u.user_id


and change it to


phpbb.user_id


Save cpmfetch_dao.php and then try cftest.php.

I left out a lot of details which were in my original post. See it for those details.

sigepjedi

Trying to install the latest version and i get the following:

QuoteUnknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in cpmfetch_dao.php on line 710


NiklasT

I have the same problem as sigepjedi - the script does not work!
Is there no solution?!

Joachim Müller

reporting things like "the script doesn't work" is just silly and not helpful at all. Read the docs that come with it and that are available online as well - they should tell you what you need to do if you actually need support (i.e. what you need to post). Reading this thread might help as well. Don't be lazy and expect people to say something like "got problems with the script - I'll fix them for you". After all, you're looking for support on a great free add-on script that the author has spent countless hours on; it works flawlessly for thousands. Probably a PEBKAC issue.

vuud

Quote from: sigepjedi on January 03, 2006, 09:44:43 PM
Trying to install the latest version and i get the following:
 


The releasenotes that came with it have notes on this very topic...

The forum has about a dozen entries in it that covers this topic...

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

vuud

Quote from: benseth on January 03, 2006, 05:18:54 AM
Is it supposed to  be like this?

        var $topPercentForTopRated = 10;
/*
   var $topPercentForMostViewed = 25;
*/


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

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



Try removing the /* and */ from the second one...   I know it says its for beta, but it still counts
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

vuud

Quote from: NiklasT on January 04, 2006, 10:50:57 AM
I have the same problem as sigepjedi - the script does not work!
Is there no solution?!


Stay in school?

Check the release notes also for instructions
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

JoeyE

Quote from: vuud on December 28, 2005, 08:14:25 AM
Strange... can you tell me where you saw that owner or author was a valid tag for the source block?




I actually figured out what I was doing wrong. Below is my corrected fix for my WP2.0 author.php page: http://viscomcreatives.org/?author=12

<?php
  
include "./cpmfetch/cpmfetch.php";
  
$authgal $curauth->display_name;     // Returns author name for $Source
  
$objCpm = new cpm('/photo');
  
$objCpm->cpm_viewRandomMediaFrom(3,4,"owner=$authgal");
  
$objCpm->cpm_close();
?>


Now my question is:
Which variable would work best to add an if statement so that users with no albums will echo a 'No Album Available' string?  For example:

if ($thisguysalbum != '') {
  // add cpfetch stuff to obtain galleries
}
  echo "No Album Available";


Any suggestions?

n3n

Quote from: vuud on January 03, 2006, 04:58:12 AM
How many did you expect?

Well im using the following code:

<?php
include "./cpmfetch.php";
$objCpm = new cpm("/flix");
$objCpm->cpm_viewLastAddedMedia(1,5);
$objCpm->cpm_close();
?>

So I'm supposed to get 5 images back right ? Im only getting 3 images, and always the same images.