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

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 5 Guests are viewing this topic.

jgsketch

QuoteLike what for example?

Vuud

For example, I would like to get this page www.ratemyscrapbook.net/rateme.php to show on a seperate mainpage that is not part of coppermine.

lordprodigy

I get an error :( Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource ..... cpmfetch_dao.php on line 710
Anyone any ideas? Thanks a lot!

mikeyc

guess I should went through the last 3 pages
line 710 fixed.


lordprodigy: look at lines 55-65 in the dao file you will find these lines

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


switch these   /* */  to the opposite one and it will fix it.

webseamstress

Hello,
I have a somewhat convoluted situation.

Just upgraded to Cpmfetch 1.6.2, and the cpm_viewRandomMediaFromAlbum displays from albums 1-20, but nothing over 20. Same with any calls that limit the displayed images to an album only.

To make it more interesting, cpm_viewRandomMedia call that I'm using in another place shows everything fine, including random media from albums with ids over 20.

I'm testing this on the cftest.php page too - random media works fine, as soon as I limit it to one album only, it stops working on the high album numbers. The setup worked fine with the old version of fetch (not sure which one, installed it about 1 1/2 years ago)

Any ideas? Help is much appreciated.
(I shouldn't post the link to the site - I'm a webdesigner for an agency, and some of the model images are a bit... bare :-)  )

Specs:
Cpmfetch 1.6.2
Cpg: 1.3.2

test page info-
No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux 2.4.21-27.0.4.ELsmp
40 WebServer = Apache Web Server INFO
45 PHP Version = 4.4.1 INFO
55 DOCUMENT_ROOT: XXXXX (correct) INFO
60 C_DOCUMENT_ROOT: Not found INFO
70 SCRIPT_FILENAME: /home/usacut2/public_html/girls/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file

PS.
Once this issue is solved, I'm looking into limiting the display of random images to one per album too, i.e. if there are 4 thumbnails displayed, each should belong to a different album. If anyone has any ideas, that would be great. I'm not a programmer and this project is geting my eyes crossed...)

webseamstress

Regarding my previous post (images from high number albums not displaying) - ack! never mind.
I just realized that for some reason a large number of (high#) albums on that website are suspended by being made private... so the photos were not displaying. /*hanging head in shame*/. Works fine otherwise...

If anyone has a suggestion regarding #2, the display of only one image per album from multiple albums, please do let me know...
Appreciated!

inca

When I run de cpmfetch/cftest.php i get this error:
I have search this forum but i didn't found a solution.

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

Kind Regards.
Inca

Teasy

Hi out there,

After two hours of forum reading I didn't find a solution for my problem (please forgive me if I was too sketchy) It's A problem posted  a few times before.
E.g. http://forum.coppermine-gallery.net/index.php?topic=19564.msg131230#msg131230

My Problem is: Everything seems to work fine, even the thumbs do not appear in none of my files. The reason is, that the path to the thumbs is wrong (src="//albums/). But I have no idea how to fix this double slash.

http://pp.mousekingdom.com/Fetch/cpmfetch/ClickMagiqueFetch1x1-01.php or
http://pp.mousekingdom.com/Fetch/cpmfetch/cftest.php

Thank you in advance for a little help   ::)


Ahoi,
Stefan.

lordprodigy


gmc

Quote from: inca on March 11, 2006, 05:42:27 PM
When I run de cpmfetch/cftest.php i get this error:
I have search this forum but i didn't found a solution.

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

Kind Regards.
Inca

Was having same problem...  CPMFetch 1.6.2 with CPG 1.4.3.  Running on Apache server.
Was trying to make crossing into a subdomain work... but put that aside for the moment when I ran into this...

Gallery is at:  http://gallery.skymasters.org
cftest is at:   http://gallery.skymasters.org/cpmfetch/cftest.php  (same domain)
          and:   http://www.skymasters.org/cpmfetch/cftest.php   (attempting to cross subdomain - failing test 10 - bypassed setting $GOODTOTRY to false to continue...)

BOTH were receiving error message: 
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/skymasters/www/gallery/cpmfetch/cpmfetch_dao.php on line 710

Saw post below from mickeyc about pre/post CPG 1.4 code in DAO file - which DID ELIMINATE the error messages...
BUT still no images in either case...

Suggestions welcome...
Thanks in advance!
Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

pcboy123

hello i just installed this... but i get an error!! :

these are the results:

Tests:

5 You set your partial URL to /monica/gallery/ PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux frost.securenet-server.net 2.4.21-37.0.1.ELsmp #1 SMP Thu Jan 19 14:12:32 EST 2006 i686 INFO
40 WebServer = Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a PHP-CGI/0.1b INFO
45 PHP Version = 5.0.4 INFO
55 DOCUMENT_ROOT: /home/xmex/public_html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/xmex/public_html/monica/gallery/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS


Trying to display some images:

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery

this is the Error:

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/xmex/public_html/monica/gallery/cpmfetch/cpmfetch_dao.php on line 710


what did i do wrong??

gmc

Quote from: pcboy123 on March 13, 2006, 09:46:05 PM
hello i just installed this... but i get an error!! :

(..deleted..)


this is the Error:

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/xmex/public_html/monica/gallery/cpmfetch/cpmfetch_dao.php on line 710


what did i do wrong??

See the post just below yours where I described the same problem... and referenced the solution below - see post 682 from mikeyc for the solution...  A change needed in the cpmfetch_dao.php file when using CPG 1.4.x....

Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

pcboy123

thanks that fixed it for me now...
i have a problem i just created a new .php file with this code

<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>



but i get this error:

Warning: main(./cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /home/xmex/public_html/monica/gallery/cpmfetch/gallery.php on line 2

Warning: main(./cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /home/xmex/public_html/monica/gallery/cpmfetch/gallery.php on line 2

Warning: main() [function.include]: Failed opening './cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xmex/public_html/monica/gallery/cpmfetch/gallery.php on line 2

Fatal error: Class 'cpm' not found in /home/xmex/public_html/monica/gallery/cpmfetch/gallery.php on line 3


here's the dir. to my Gallery is
Example: http://subdomain.mysite/pcboy123/gallery/
the dir to CPM FETCH is:
http://subdomain.mysite/pcboy123/gallery/cpmfetch/

how do i config. it?

thanks for the help GMC

blackwelldunn

Hello,
I have searched through these forums and can't find a solution to my problem and am wondering if anyone could direct me to one. I would like to randomly display images that are a result of a keyword search.
I did come across one thread "View Media by Keyword" but it doesn't seem to work, or I'm just not implementing it correctly. Any help would be appreciated
Cheers

gmc

OK... lets try this again...

A new install of CpmFetch... trying the simple case first - in same subdomain as the gallery... Using cftest.php, all tests passing - but no images produced...

Statement:

$objCpm->cpm_viewRandomMedia(2,3,$styleguide); 

Produces in output source code:

<table  >
<tr>

</tr>
<tr>

</tr>

</table>


No other diagnostic messages produced...
The cftest.php script is unchanged except for the required variable (set to '/")... It already has the suggested diagnostics on.
Suggestions?

http://gallery.skymasters.org/cpmfetch/cftest.php - is test script.
http://gallery.skymasters.org - is the gallery

Thanks!
Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

pcboy123

Quote from: gmc on March 17, 2006, 09:45:39 PM
OK... lets try this again...

A new install of CpmFetch... trying the simple case first - in same subdomain as the gallery... Using cftest.php, all tests passing - but no images produced...

Statement:

$objCpm->cpm_viewRandomMedia(2,3,$styleguide); 

Produces in output source code:

<table  >
<tr>

</tr>
<tr>

</tr>

</table>


No other diagnostic messages produced...
The cftest.php script is unchanged except for the required variable (set to '/")... It already has the suggested diagnostics on.
Suggestions?

http://gallery.skymasters.org/cpmfetch/cftest.php - is test script.
http://gallery.skymasters.org - is the gallery

Thanks!
Greg

Greg they way i fixed that was
i add 2 dots (..) instead of one..
so it should look somthing like this

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("../gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

it worked for me i had the same problem u did...


gmc

Quote from: pcboy123 on March 17, 2006, 10:29:51 PM
Greg they way i fixed that was
i add 2 dots (..) instead of one..
so it should look somthing like this

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("../gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

it worked for me i had the same problem u did...

Thanks for the suggestion... didn't seem to work for me - my gallery is in the root of subdomain - yours was one level down...  Changing that resulted in errors trying to find coppermine config file...

Other ideas anyone?
Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

n3n

Hi vuud,

Do you have any idea when and if you are going to add a "media by keyword" string ?
I think it would be usefull for alot of people :D


Cheers !

vuud

Quote from: n3n on March 18, 2006, 12:16:34 PM
Hi vuud,

Do you have any idea when and if you are going to add a "media by keyword" string ?
I think it would be usefull for alot of people :D


Cheers !

No idea when that will happen - but I did add it to the list.  Someone had posted a hack to provide single keywords I believe...  That will most likely be the basis for the addition (although expanded to cover multiple words).

I've been overrun lately, so the installer has been delayed...   I've got a long list of changes and improvements though.   Much happening

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

n3n


gmc

In the absence of replies to my questions... I've been trying additional tests to resolve my issues... Running out of ideas and could use some help please...
Have CPMFETCH on two different sites - and different issues occurring:
Both galleries are 1.4.3 of CPG, with CPG installed at the root of a subdomain.
CPMFetch is at 1.6.2...
Webserver is Apache

Issue 1:  Images not displayed - a table with no image or link data is created:
  Gallery at:  http://gallery.skymasters.org
  Test script at:  http://gallery.skymasters.org/cpmfetch/cftest.php   (provided script)
              and :  http://gallery.skymasters.org/testcpmfetch.php

testcpmfetch.php contains:

Auto Generated:
<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>




Issue 2:  Different site - same ISP, same setup, same versions...
  Table created and populated - links correct, but image tag URLs incorrect:
  Gallery at:  http://gallery.gmcdesign.com
  Test script at:  http://gallery.gmcdesign.org/cpmfetch/cftest.php   (provided script)
              and :  http://gallery.gmcdesign.org/testcpmfetch.php       (contains generated and corrected (static) table as well...)

   The img source being produced is:  <img  src="//albums/pictures/flowers/thumb_d05_4793.jpg"
   whether executed from cpmfetch directory or subdomain root...
   //albums is of course not valid - either /albums or albums would work from subdomain root - and  ../albums or equivalent from cpmfetch directory...

testcpmfetch.php contains:

Auto Generated:
<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>

<p>
Corrected:
<table  >
<tr>
<td><a href="/displayimage.php?pos=-308"  ><img  src="/albums/airshows/2005thunder/thumb_d05_4711.jpg" alt="d05_4711.jpg" title="d05_4711.jpg"  /></a><br /></td>
...

 

Issue 3:  Same site as issue 2 - attempting access across subdomains...
  Table created and populated - links and image tag URLs incorrect:
  Gallery at:  http://gallery.gmcdesign.com
  Test script at:  http://www.gmcdesign.org/testcpmfetch.php       (contains generated and corrected table as well...)

   Corrected links using call to function  cpm_OverrideUrlToCoppermine("http://gallery.gmcdesign.com/")
   The img source being produced is:  <img  src="/../gallery//albums/pictures/landscapes/thumb_d05_6533.jpg"
   Attempted using function cpm_OverridePathToCoppermine to change this - but this had no effect  (the manual in doc folder lists the two override functions, but provides no descriptions.)

Auto Generated:
<?php
include "../gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/../gallery');
$objCpm->cpm_OverrideUrlToCoppermine("http://gallery.gmcdesign.com/");
$objCpm->cpm_setDebugMode('true');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>



Suggestions for any and all of these are welcome for what I am doing wrong...
I could get around Issues 2 and 3 by capturing the output buffer in php and editing the links... but seems I shouldn't have to do that... For the first issue, there is nothing to capture and edit...

Thanks for your time...
Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money