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

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

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

ZakRhino

1. Include what version of coppermine you are using
2. A link to your website and gallery
3. A link to an example of the problem (if possible)
4. how computer savvy you are (newbie, intermediate, damn good)
5. what kind of web server you are running on (if known)
6. Include the syntax of the command you are using.


1. Coppermine 1.4.0
2. http://www.furry-muscle.org/Galleries/  Warning Contest of Galleries or X or higer
3. http://www.furry-muscle.org/cpmfetch/cftest.php
4. Intermediate
5. Don't know
6. Got me :P But in the cfteses you see where it should show the images it don't and get this messages 
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /furhome/zak/public_html/cpmfetch/cpmfetch_dao.php on line 710

Have no idea what up.

vuud

Quote from: ZakRhino on December 11, 2005, 01:41:50 PM
1. Include what version of coppermine you are using
2. A link to your website and gallery
3. A link to an example of the problem (if possible)
4. how computer savvy you are (newbie, intermediate, damn good)
5. what kind of web server you are running on (if known)
6. Include the syntax of the command you are using.


1. Coppermine 1.4.0
2. http://www.furry-muscle.org/Galleries/  Warning Contest of Galleries or X or higer
3. http://www.furry-muscle.org/cpmfetch/cftest.php
4. Intermediate
5. Don't know
6. Got me :P But in the cfteses you see where it should show the images it don't and get this messages 
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /furhome/zak/public_html/cpmfetch/cpmfetch_dao.php on line 710

Have no idea what up.


Now I have seen everything... Someone who read the instuctions on what to post.  Holy cow.  Its a friggin Xmass miracle!!!! :D

Okay, your problem is listed in the release notes that came with cpmfetch (at least if you are using a recent version).  You need to comment out one thing in cpmfetch_dao.php and uncomment one thing.

The instuctions are in the release notes, which are also online here
http://www.fistfullofcode.com/projects/copperminefetch/downloads/releasenote_1.6.2.txt

Sorry about the word wrapping in the browser... i should do something with that.

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

ZakRhino

Happy friggin Xmass then! ;) Well now that I got it to work and thanks a many any idea how I can make a simple boarder around the image in my webpage? http://www.furry-muscle.org/index2.php Website link ^_^ BTW, MERRY CHRISTMAS!

vuud

Quote from: ZakRhino on December 11, 2005, 10:20:03 PM
Happy friggin Xmass then! ;) Well now that I got it to work and thanks a many any idea how I can make a simple boarder around the image in my webpage? http://www.furry-muscle.org/index2.php Website link ^_^ BTW, MERRY CHRISTMAS!

Do it with css or including attibutes...

here is the CSS example

http://www.fistfullofcode.com/projects/copperminefetch/tips.php
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

ZakRhino

Quote from: vuud on December 12, 2005, 02:41:35 AM
Do it with css or including attibutes...

here is the CSS example

http://www.fistfullofcode.com/projects/copperminefetch/tips.php


I see your example but can't understand it, sorry :( Well not the CSS but the code below it.


This is my code and how I apply it.

   <div align="center" class="RandomImageBorder"><?php
                        include "./CopperMineFetch/cpmfetch.php";
                        $objCpm = new cpm("/Galleries");
                        $objCpm->cpm_viewRandomMedia(1,1);
                        $objCpm->cpm_close();
                        ?></div>


then my CSS
.RandomImageBorder {
  border-style:solid;
  border-width:5px;
  border-color: #394048;
  margin: 2px;}

My question is how do I apply just the image?

I don't understand this code here
cpm_viewRandomMediaFromAlbum(2,2,17,array("tablestyle" => "test1","imagestyle" => "test1"));
I mean what is this in? A different file?

vuud

Quote from: ZakRhino on December 12, 2005, 09:47:39 PM

I see your example but can't understand it, sorry :( Well not the CSS but the code below it.


This is my code and how I apply it.

   <div align="center" class="RandomImageBorder"><?php
                        include "./CopperMineFetch/cpmfetch.php";
                        $objCpm = new cpm("/Galleries");
                        $objCpm->cpm_viewRandomMedia(1,1);
                        $objCpm->cpm_close();
                        ?></div>


then my CSS
.RandomImageBorder {
  border-style:solid;
  border-width:5px;
  border-color: #394048;
  margin: 2px;}

My question is how do I apply just the image?

I don't understand this code here
cpm_viewRandomMediaFromAlbum(2,2,17,array("tablestyle" => "test1","imagestyle" => "test1"));
I mean what is this in? A different file?

What about like so?

* Remove the div
* Add the alignment to the RandomImageBorder CSS Entry

<?php
   include "./CopperMineFetch/cpmfetch.php";
   $objCpm = new cpm("/Galleries");
   $objCpm->cpm_viewRandomMedia(1,1,array("tablestyle" => "test1","imagestyle" => "RandomImageBorder"));
   $objCpm->cpm_close();
?>


For each image tag it produces it will include class="RandomImageBorder"

That should do ya

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

ZakRhino

Quote from: vuud on December 12, 2005, 10:30:32 PM
What about like so?

* Remove the div
* Add the alignment to the RandomImageBorder CSS Entry

<?php
   include "./CopperMineFetch/cpmfetch.php";
   $objCpm = new cpm("/Galleries");
   $objCpm->cpm_viewRandomMedia(1,1,array("tablestyle" => "test1","imagestyle" => "RandomImageBorder"));
   $objCpm->cpm_close();
?>


For each image tag it produces it will include class="RandomImageBorder"

That should do ya


Thanks alot, but one more question what does test1 in the code me? It does not display or anything. ???

vuud

Quote from: ZakRhino on December 13, 2005, 12:30:11 AM

Thanks alot, but one more question what does test1 in the code me? It does not display or anything. ???

Ah sorry... that sets the table html tag to have class="test1".  So for you it does nothing.

I should have removed it... it means nothing to you unless you want to add test1 to you stylesheet

Hope its all better
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

bibendum

Hi

After installation, cftest was successfull execpt that no images was displayed.

When i'm trying to create php page with this code :

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


I get theses errors :

ERROR: Path to Coppermine incorrect. (/home2/galerie//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home2/l/laurent/www/cpmfetch/cpmfetch.php on line 770


You can see that i have two slash in the first error, just before include.

What's wrong ?

Thanks for your help

Laurent

vuud

Quote from: bibendum on December 14, 2005, 11:14:35 PM
Hi

After installation, cftest was successfull execpt that no images was displayed.

When i'm trying to create php page with this code :

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


I get theses errors :

ERROR: Path to Coppermine incorrect. (/home2/galerie//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home2/l/laurent/www/cpmfetch/cpmfetch.php on line 770


You can see that i have two slash in the first error, just before include.

What's wrong ?

Thanks for your help

Laurent


Can you post or PM me a link to your cftest.php page?


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

toxicfritz

i have the same problem test page has no errors and no pictures

1. version of coppermine 1.4.2
2. website http://hot-rain.ca/cmcforum/index.php and gallery http://www.hot-rain.ca/cmcgallery/
3. problem http://www.hot-rain.ca/cmcgallery/cpmfetch/cftest.php
4. Inbetween newbie, intermediate
5. Apache/1.3.34 (Unix) taken from line 40 of cftest.php
6. code used for image block
echo '<div align="right">';
include "../cmcgallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cmcgallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
echo '</div>';

same thing nothing no error no image

vuud

Quote from: toxicfritz on December 15, 2005, 06:21:00 AM
i have the same problem test page has no errors and no pictures

1. version of coppermine 1.4.2
2. website http://hot-rain.ca/cmcforum/index.php and gallery http://www.hot-rain.ca/cmcgallery/
3. problem http://www.hot-rain.ca/cmcgallery/cpmfetch/cftest.php
4. Inbetween newbie, intermediate
5. Apache/1.3.34 (Unix) taken from line 40 of cftest.php
6. code used for image block
echo '<div align="right">';
include "../cmcgallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cmcgallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
echo '</div>';

same thing nothing no error no image


If you are bridging cpg with something, this is expected.    This has been talked about much in this thread and the embedding cpmfetch thread.

Try going into cpg's admin panel and creating a few users. 

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

kev@num

hi sorry, this is a bit of a newbie question!! i've installed  coppermine 1.6.2 on linux/apache and have got the test code to work as follows:



<?php
//kev gallery test
include "/home/domain/www.*****.com/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>


i've the manuals and searched on this site but can't figure out how to show ALL of an album in particular (album 85), say with each row having 4 colums! is this possible?

i think i've gota use the source= code which i found in the instructions but i'm not sure how to use it!!


<?php
//kev gallery test
include "/home/domain/www.*****.com/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$source = "album=85";
$objCpm->cpm_close();
?>


any help would be very much appreciated, thanks in advance :)
kev.

vuud

Quote from: kev@num on December 15, 2005, 08:53:58 PM
hi sorry, this is a bit of a newbie question!! i've installed  coppermine 1.6.2 on linux/apache and have got the test code to work as follows:



<?php
//kev gallery test
include "/home/domain/www.*****.com/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>


i've the manuals and searched on this site but can't figure out how to show ALL of an album in particular (album 85), say with each row having 4 colums! is this possible?

i think i've gota use the source= code which i found in the instructions but i'm not sure how to use it!!


<?php
//kev gallery test
include "/home/domain/www.*****.com/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$source = "album=85";
$objCpm->cpm_close();
?>


any help would be very much appreciated, thanks in advance :)
kev.


Yeah, I don't think its documented anywhere.  If you want to do all of an album you need to request a combination of rows and columns that exceed the total number of images in the album.

$objCpm->cpm_viewLastAddedMediaFrom ("album=85",1000,4);

That will get the first 4000 last added images and show them in 4 image rows, going down as far as it needs to.  It will not generate empty rows so don't worry about requesting too many.

If you have more than 4000 in the album, up that number a bit.







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

kev@num

thanks very much for your reply, sorry to be a pain... but i've tried it, and with the displayerrors=on at the top of my page but when i use this code it doesn't display anypictures at all: (or any errors)

<?php
//kev gallery test
include "/home/domain/*****/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$objCpm->cpm_viewLastAddedMediaFrom ("album=85",1000,4);
$objCpm->cpm_close();
?>



i've tried changing the quotes around album to be single quotes, and i've tried change the 1000 down to 10 incase the request was taking too long.. but nothing is fetched from the gallery, do you have anymore ideas or am i just putting your extra line of code in the wrong place?
thanks again, your help is much appreciated!!! :)
kev

vuud

Quote from: kev@num on December 15, 2005, 11:23:54 PM
thanks very much for your reply, sorry to be a pain... but i've tried it, and with the displayerrors=on at the top of my page but when i use this code it doesn't display anypictures at all: (or any errors)

<?php
//kev gallery test
include "/home/domain/*****/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$objCpm->cpm_viewLastAddedMediaFrom ("album=85",1000,4);
$objCpm->cpm_close();
?>



i've tried changing the quotes around album to be single quotes, and i've tried change the 1000 down to 10 incase the request was taking too long.. but nothing is fetched from the gallery, do you have anymore ideas or am i just putting your extra line of code in the wrong place?
thanks again, your help is much appreciated!!! :)
kev


Are you sure that this album exists?

Is it a private or restricted album?

Were you getting images before?

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

kev@num

yeh it's a public gallery, i can view it when i'm not logged in.. here's a bit of the url from the gallery i'm looking at in coppermine which i would like to fetch:

http://www.****.com/galleries/displayimage.php?album=85&pos=2
(has lots of photos in which i can look at)

i got ur test script to work, and i got this to work:
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);

but when i alter the code, to your suggestion it doesn't fetch any photos or give any errors..
thanks again for helping!!!
kev :)

bibendum

Quote from: vuud on December 15, 2005, 03:03:34 AM
Can you post or PM me a link to your cftest.php page?




Mp was posted, did you received ?

Thanks Vuud

vuud

Quote from: kev@num on December 16, 2005, 12:42:19 PM
yeh it's a public gallery, i can view it when i'm not logged in.. here's a bit of the url from the gallery i'm looking at in coppermine which i would like to fetch:

http://www.****.com/galleries/displayimage.php?album=85&pos=2
(has lots of photos in which i can look at)

i got ur test script to work, and i got this to work:
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);

but when i alter the code, to your suggestion it doesn't fetch any photos or give any errors..
thanks again for helping!!!
kev :)

PM me the actual site.  I am not convinced the category or album you are going after is correct :)

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

kev@num

hi Vuud. thanks again mate, i've sent you a PM with the details of the site!

:)