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

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.

Nibbler

Doesn't this solve the problem ?

Quote
CODE: QUICKFIX FOR PEOPLE WANTING TO USE CPG BETA 1.4.1
(SAME NOTE AS RELEASE 1.6.0)
========================================
The Coppermine Dev's have (in what I would would say was a logical move) changed some of the internal database structure, and replaced a few fields with generic fields.  So instead of user web site, you have a few placeholder fields you can define into anything you want.  This of course breaks a bit of my code and stops CpmFetch from working.  I am going to work out a permanent solution, but for the short term, if you really want to use CPG BETA 1.4.1 (and the dev's would appreciate you doing so, so would I) you must edit the top of the cpmfetch_dao.php file.  There are two sections around line 54 and line 59.  You need to comment out the one at line 54, and uncomment the one at line 59.  Comment it by placing /* before it and */ after it.  Uncomment by removing the same from the other section.

dlkbailey

I just tried to get this script to work on my site. I uploaded it and followed the instructions. When I tried to run the cftest.php all of the tests pass but I get the following at the bottom of the page where it tries to display thumbnails:
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /mounted-storage/home8/sub001/sc14959-TCLB/LN/cpmfetch/cpmfetch_dao.php on line 710

Can anyone tell me what is wrong.

Sasse

Thx Nibbler!
This alsmost works! I don't get an error now.
But it won't show the thumbs either.

The testpage now displays 6 "Images" with author and views, but: Instead of Thumbs there is only a text "One of the last photos submitted".
If you click on them, you get to the actual image, but the thumbs are not being displayed. It's a bit strange.

I figured out the problem, but I don't know how to fix it.
A script generates a wrong url for the thumbs. The domain is missing:  http://albums/....
How can I fix this?

pelhrimak

CpmFetch Install test page
Thank you for using CpmFetch 1.6.2

A series of checks is displayed below... These will help you determine where a problem is if one occurs. Mostly they will help me when you ask for help... but I strongly encourage you to try to fix it yourself - that leaves me more time for improvements. Some of them are purely informational.

Tests:
5 You set your partial URL to / 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 kryton 2.6.10 #1 Fri Dec 31 06:35:26 CET 2004 i686 INFO
40 WebServer = Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.3.11 mod_ssl/2.8.9 OpenSSL/0.9.6c DAV/1.0.3 INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /home/pete/photos.pelhrim.cz INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/pete/photos.pelhrim.cz/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
[u]Nezn-Bámý sloupec 'u.user_website' v field list
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/pete/photos.pelhrim.cz/cpmfetch/cpmfetch_dao.php on line 710[/u]



If you do not see thumbnails, or get more warnings then something is pretty wrong. As long as you are using standard prefixes in Coppermine, you should see everything. If you are not using standard prefixes, then you need to adjust them by editing the first three variables in the cpmfetch.php file.

If everything looks good, and you get everything else working, I recommend removing this file, or making it non-executable. No need to allow access into a phpinfo tag if you dont have to.
For further help and in general more information, please see the help pages for CoppermineFetch.

tgelston

Here is the code


$objCpm->cpm_viewRandomMediaFrom(1,1,"album=67");
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=64");
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=60");
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=59");
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=58");


First three albums each show one random picture.   The remaining albums do not.  I have checked and double checked. Yes I have albums with those IDs.   You can see several of the albums here http://gelstoncafe.com/gallery/index.php?cat=5&page=1


I trying to create a randomized timeline of sorts on this page
http://gelstoncafe.com/index.php?section=fiona

I appreciate any help anyone can provide.

Thanks,
Tobias

metamog

I get the same error as reply#661

"Unknown column..."


CPG 1.43 (security patched).

CPMfetch 1.62


metamog

Quote from: tgelston on February 28, 2006, 03:27:00 AM
See this message to fix the unknow column error.

- http://forum.coppermine-gallery.net/index.php?topic=19528.msg131918#msg131918



I've followed this instructions. Still having problems:  "Fatal error: Call to a member function getRandomImageFrom() on a non-object in..."

Morgan

fwe77

Sorry for my bad English!  :-\

Problem - cpm_viewRandomMedia - only one album is indicated!

Version - copperminefetch-1.6.2, CPG 1.4.3!

cftest.php :

5 You set your partial URL to /bilder 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 cigar 2.6.11.4-21.9-smp #1 SMP Fri Aug 19 11:58:59 UTC 2005 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /home/www/domain/www.domain.de/htdocs INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/www/domain/www.domain.de/htdocs/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS


Also some pictures are represented, but by only one album! I tried it also with its own php - file!

<?
error_reporting(E_ALL);
ini_set('display_errors',1);
include "cpmfetch.php";
$objCpm = new cpm('/bilder');
$objCpm->cpm_viewRandomMedia (1,4,"");
$objCpm->cpm_close();
?>



Only album 24 is indicated! No errors and warnings will be displayed.  :-\ For further information I am available gladly!

Many Thanx. Frank.

n3n

Hi Vuud, I was wondering, is it possible to give a search query to cpmfetch ? So that it would only
return images with a specific title..

dropmachine

 >:( >:( >:( >:(


So is this issue with Line 710 Fixed or not? I can't get a straight answer out of anybody, and it seems nobody is posting anything that works.


Getting pretty frustrated....

metamog

This 710 line is fixed but I get another error as stated in a reply above (Fatal error...).


Morgan

Quote from: dropmachine on March 02, 2006, 01:51:08 AM
>:( >:( >:( >:(


So is this issue with Line 710 Fixed or not? I can't get a straight answer out of anybody, and it seems nobody is posting anything that works.


Getting pretty frustrated....

Enc0der

Hi

I'm having some problems with the options of CpmFetch...
What I want to display on my website is a random picture, that will link to that specific picture. This is works fine.
But, I also want to put just below that picture, a "From album: %a", and I want the album name to be a LINK to that album..

my current code is:

$objCpm = new cpm('/gallery');
$options = array( 'subtitle' => Album: %a');
$objCpm->cpm_viewRandomMedia(1,1,$options);
$objCpm->cpm_close();


But the subtitle is, of course, not a link..

I know there is an option called 'subtitlelink', but it changes both my image link and my subtitle link..  :-\

Is it possible to link the image to it's image-view (displayimage-1913.html, for example), and the subtitle to the album page (thumbnails-121.html) ?





Edit: Another problem is that the link doesn't use the SEF URL's..


thanks!

dropmachine

Quote from: metamog on March 02, 2006, 11:34:27 AM
This 710 line is fixed but I get another error as stated in a reply above (Fatal error...).


Morgan


Can you tell me what the fix is? I have yet to figur eit out.

Thanks very much!

metamog

Dropmachine:      inside the CpmFetch zip-file there is a file (I think it was "readme") that describes the problem:

It sais "edit the file cpmfetch_dao.php" in the lines: "This is for CPG versions prior to 1.4" and "This is for CPG v 1.4.1 beta 1"


Inside cpmfetch_dao.php      You should move  the    "/*"    and     "*/"   (start & end of code) between these two areas of text/code (if you are using a coppermine version above 1.4). (I think it was described: comment & uncomment with "code terms").


(I don't know anything about code, and my english is quite bad. I hope I make myself clear with these "common terms")


Morgan



Quote from: dropmachine on March 03, 2006, 03:19:47 PM
Can you tell me what the fix is? I have yet to figur eit out.

Thanks very much!

jgsketch

I've read through some documents and have not found an answer to my question. I have a rating script that has its own page. I was unable to get this script to run exclusively on my main page without the catlist and alblist, so I thought I could create a new index page just for the rating script and use cpmfetch to get the data.

Can cpmfetch get other type of data that was not orginaly part of coppermine or grab the anycontent file. My site is www.ratemyscrapbook.net. Thanks

Joachim Müller

anycontent.php can be included on another page using PHP's include or require command unless it contains particular coppermine stuff.

jgsketch

Thanks for the sugestion. My anycontent page does contain coppermine functions in it. So it was unable to load. "Fatal error: Call to undefined function: get_pic_data()". That is why I'm hoping cpmfetch will work with this page.

Joachim Müller

CpmFetch doesn't use coppermine's functions, but functions of it's own.

vuud

Quote from: jgsketch on March 07, 2006, 03:11:49 AM
I've read through some documents and have not found an answer to my question. I have a rating script that has its own page. I was unable to get this script to run exclusively on my main page without the catlist and alblist, so I thought I could create a new index page just for the rating script and use cpmfetch to get the data.

Can cpmfetch get other type of data that was not orginaly part of coppermine or grab the anycontent file. My site is www.ratemyscrapbook.net. Thanks

Like what for example?

Vuud

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