forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: vuud on July 08, 2005, 06:43:10 am

Title: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 08, 2005, 06:43:10 am
Note: Stable release attached here / dev versions available at the homepage.

http://cpmfetch.fistfullofcode.com (http://cpmfetch.fistfullofcode.com) - latest info, news, development versions, tips, etc

This is a PHP object that allows you to easily display random or latest images from your coppermine gallery on external php and html pages.  It is being actively supported and developed by me.  Its simple, but I am also trying to make it as feature rich as I can without achieving bloat.  You can draw images (random or otherwise) from the entire gallery, a specific category or a single album.


:D Notifications of new releases

I added a sign up to my site for email notifications of new updates to cpmfetch.

http://www.fistfullofcode.com/projects/copperminefetch/index.php (http://www.fistfullofcode.com/projects/copperminefetch/index.php)

A little ways down the page there is a signup entry.


 ??? What is this all about

Basically It takes criteria and returns tables containing thumbnails based on a row col combination you specify.  You tell it what kind of random images you want, in how many columns by how many rows (1 x 1 being a single image).  It gets the images and gives you back HTML code that displays them all.

 ??? What about private albums?  This library will not display any images that are not viewable by the world or are not in an approved state.  If you request the number of images in the gallery, it will count the private images in the number it returns. 

 ??? Reporting Problems?  Make sure you have the newest version!  Message me on this board or contact me via my website www.fistfullofcode.com (http://www.fistfullofcode.com).  Do me a favor and:


Also, try adding this to the top of your php page.  It will cause more errors and warnings to be displayed.

Code: [Select]
<?php 
error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on
?>

 ??? What if its close to what you need, but not quite?.  Contact me and let me know what you think it needs.  I won't quarentee anything, but if it sounds reasonable I will probably do it.

 ??? Can I control the HTML it generates?  Currently you can control the tables and images it gives back via css settings and passing the css class to the object.  Future plans include adding titles and such.  Examples of CSS control are on the website (some are pretty cool)

Aside from images, it can also returns other data such as (note: the album names are links)

Since Friday, December 10 2004 we've added about 355 images
Category nameAlbumNew count
Haley - The early years (1999-2002)2000 Haley - the second year17 new 
  1999 Haley - the first year  69 new 
  2001 Haley - the third year   30 new
Haley, Christi and meOur furry friends 18 new
  May 2003 - Beckett Trip15 new
  Misc - Just don't fit anywhere11 new
     

More examples and downloads are here:
http://www.fistfullofcode.com/projects/copperminefetch/ (http://www.fistfullofcode.com/projects/copperminefetch/)

Among the functions so far are stuff like this...  Many more have been added, so see the web site

Functions that return images

Functions that return textual statistics

Functions that return gallery level images and text

Functions that control this program and its behavior


Brief explanation of some of the above parameters

$albumid - is always the numerical id of the album
$catid - is always the numerical if of the category
$source - this is a new way of specifying albums and categories at the same time
$rows,$columns - the combination determine how many total to show and in what orientaion
$columns - how many columns of images to show
$options - this is an array of options (covered below)
$format - text to display interspersed with placeholders for variables



Some features are:


(http://www.fistfullofcode.com/projects/copperminefetch/css_example_2.jpg)

Example of usage:

The HTML version of the library only allows for one image to be retrieved at a time via an img tag.  To do this you simply point the image tag at the php page supplied and away you go.

Code: [Select]
img src="/cfimageget.php?category=7"
(http://www.fistfullofcode.com/php-lib/cpmfetch/cfimageget.php?category=7)
The above image was served up from my gallery via an img tag .


The following code shows how you would get 3 random images in a column from album #7
Code: [Select]
<?php 
include "../php-lib/cpmfetch/coppermine.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMediaFromAlbum(1,3,7); 
$objCpm->cpm_close(); 
?>


A more intricate example passing some CSS info for the table is

Code: [Select]
<?php 
$options 
= array(
"tableStyle" => "photoclip",
"rowStyle" => "photoclip",
"cellStyle" => "photoclip",
"linkStyle" => "photoclip",
"altTag" => "One of the last photos submitted",
"imageStyle" => "photoclip",
                
"imagesize" => "int") ;

$objCpm->cpm_viewLastAddedMedia(4,2,$options); 
?>


 ??? Boy I am impressed!  I want to send you things... money, gifts, girls, etc... how can I do this?  Well, tell you what... the Coppermine people have put probably at least 2000x more work into Coppermine.  Why not send something to them instead. http://forum.coppermine-gallery.net/index.php?topic=14227.0 (http://forum.coppermine-gallery.net/index.php?topic=14227.0) You could also always send a  donation to the www.eff.org (http://www.eff.org) instead. 

 ??? Whats coming up in the near future for this?  Well, basically I got it about as far as I think it will go...  for the basics anyway.  I am sure more features will be added on soon, and such - but can't say what they will be.  There is a lot there - and I am always open for suggestions.

Any advice, comments, request for something new in it, etc... pass them on, please

http://cpmfetch.fistfullofcode.com (http://cpmfetch.fistfullofcode.com)

See the readme.html enclosed for information, etc - or available online in the docs section of the website.  Toward the bottom a list will show you what has been added to new development versions since the stable.

The version attached below is the latest stable version.  However, there are always development versions available at the web site shown above... those should always work, and sometimes have neat new features added.   I only post the latest stable version here and remove old ones - sometimes I even forget to do that.  If you need an older version or want to make sure you have the latest, see the web site.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on July 08, 2005, 07:46:01 am
??? Boy I am impressed!  I want to send you things... money, gifts, girls, etc... how can I do this?  Well, tell you what... the Coppermine people have put probably at least 2000x more work into Coppermine.  Why not send something to them instead.  I tried finding a link on the site to send you too... couldn't - if you can't either, send a donation to the www.eff.org (http://www.eff.org) instead. 

This is the thread you have been looking for: We need your help (http://forum.coppermine-gallery.net/index.php?topic=14227.0)  ;)



Great work! We (the coppermine dev team) want to thank you very much for the superb tool (and the support you're providing for it). CpmFetch is the one and only tool we recommend using to display coppermine content on non-coppermine pages.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: freesouljah on July 08, 2005, 03:05:31 pm
and it's easy to use/institute  8)

keep up the good work!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 08, 2005, 03:58:15 pm

This is the thread you have been looking for: We need your help (http://forum.coppermine-gallery.net/index.php?topic=14227.0)  ;)



Great work! We (the coppermine dev team) want to thank you very much for the superb tool (and the support you're providing for it). CpmFetch is the one and only tool we recommend using to display coppermine content on non-coppermine pages.

Thanks, that means a lot to me!  That and the few emails I get from users just to say thanks makes it (mostly) worthwhile. :D   CPG 1.4 looks really nice - I will be upgrading at some point soon - but have already tested CpmFetch against the beta releases (so it will still work).

Take care all!





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fogpeople on July 08, 2005, 07:27:55 pm
This is a continuation from the locked thread, here's the quick backstory:

+ Trying to make CPMFetch work as a background random image puller AND post stats about said image on a page
+ Vuud posted some code to help the background image pull
+ Code no workee (I suspect user[me] error)

Here's the code suggested:

Code: [Select]
Here is how you can use 1.3.9 or better to accomplish this:  The comments are inserted for educational purposes

Code:
<?php

// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');

// This gets an assocative array of the 1 random image from anywhere public in the album
$data $objCpm->cpm_viewRandomMediaFrom (11"");

// This gets the image to display...
$imagename $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");

print 
"<img src='$imagename'>";

?>


You have to take the next step and figure out how to get $imagename into your background tag Smiley

I took this code and made it into a file (random.php), then used an include on the page to do the pull.  That looks like this:

Code: [Select]
<body background="<?php include 'random.php'?>" bgcolor="#000000" >
And voila'!  The error I get:

Fatal error: Call to a member function on a non-object in /home/fogpeopl/public_html/test/random.php on line 4

Is it me?  :-\\

-michael
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 08, 2005, 08:43:17 pm

And voila'!  The error I get:

Fatal error: Call to a member function on a non-object in /home/fogpeopl/public_html/test/random.php on line 4

Is it me?  :-\\

-michael

Well, lets call it at "its a little of both of us".  You still need to start the object and close it after which I did not include because I do it on top and bottom of all my page.  but I should have included them for people not used to objects.

Anyway, before it add in

$objCpm = new cpmfetch( ** your partial url goes here **);

and after it add in

$objCpm->close();

Sorry about ommitting that stuff, its standard for anything you do with cpmfetch so it just slipped my mind.  Mia Culpa

Let us know how it works out

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fogpeople on July 08, 2005, 09:27:55 pm
Whoops, yeah that was my bad.  Got the open and close in now. 

When I use this code:
Code: [Select]
include "../cpmfetch/coppermine.php";

//        $objCpm = new cpmfetch("/bg");
$objCpm = new cpm("/bg");

// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');

// This gets an assocative array of the 1 random image from anywhere public in the album
$data = $objCpm->cpm_viewRandomMediaFrom (1, 1, "");

// This gets the image to display...
$imagename = $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");

print "'$imagename'";

$objCpm->cpm_close();

I get a page but no image, this is my source tag:
Code: [Select]
<body background="'/bg/images/'" bgcolor="#000000" >

When I use THIS code:
Code: [Select]
include "../cpmfetch/coppermine.php";

$objCpm = new cpmfetch("/bg");
// $objCpm = new cpm("/bg");

// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');

// This gets an assocative array of the 1 random image from anywhere public in the album
$data = $objCpm->cpm_viewRandomMediaFrom (1, 1, "");

// This gets the image to display...
$imagename = $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");

print "'$imagename'";

$objCpm->cpm_close();

I get this error message:

Fatal error: Cannot instantiate non-existent class: cpmfetch in /home/fogpeopl/public_html/test/random.php on line 4

It's close... so very close.  I uploaded 1.4 today, so that should be working right.  Any ideas?

MUCH thanks btw, this is helping a lot
-michael
Title: Thanks for ur advice on the other thread vuud
Post by: marian on July 08, 2005, 09:36:52 pm
You set me on the right track and, after making the change u suggested and another I got all passes on cftest, but this was followed by the error message:
Trying to display some images:
ERROR: Path to Coppermine incorrect. (/home/bymnews/public_html//include/config.inc.php)

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

Fatal error: Call to a member function on a non-object in /home/bymnews/public_html/copperminefetch/cpmfetch/cpmfetch.php on line 737

I looked at cpmfetch.php but the answer to the problem doesn't seem to be there, though I figured it's something to do with the domain name????
Ur advice will be appreciated.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 08, 2005, 09:50:23 pm
Hah, what a pair we make...

Yes it should be $objCpm = new cpm("/bg");  not new cpmFetch(...

If you uploaded 1.4, you need remove the coppermine.php and coppermine_dao.php from your web server
And change your include below to go for cpmfetch.php instead of coppermine.php

try that and then post back... I am going away tomorrow and would like to wrap this problem up before then.

You also need to do some PHP to get it into your background tag...  something like this, after you do the other stuff.  And you can remove the other print you had in your code.

<body background="<?php print $imagename; ?>" bgcolor="#000000" >

Whoops, yeah that was my bad.  Got the open and close in now. 

When I use this code:
Code: [Select]
include "../cpmfetch/coppermine.php";

//        $objCpm = new cpmfetch("/bg");
$objCpm = new cpm("/bg");

// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');

// This gets an assocative array of the 1 random image from anywhere public in the album
$data = $objCpm->cpm_viewRandomMediaFrom (1, 1, "");

// This gets the image to display...
$imagename = $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");

print "'$imagename'";

$objCpm->cpm_close();

I get a page but no image, this is my source tag:
Code: [Select]
<body background="'/bg/images/'" bgcolor="#000000" >
It's close... so very close.  I uploaded 1.4 today, so that should be working right.  Any ideas?

MUCH thanks btw, this is helping a lot
-michael
Title: Re: Thanks for ur advice on the other thread vuud
Post by: vuud on July 08, 2005, 09:53:27 pm
You set me on the right track and, after making the change u suggested and another I got all passes on cftest, but this was followed by the error message:
Trying to display some images:
ERROR: Path to Coppermine incorrect. (/home/bymnews/public_html//include/config.inc.php)

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

Fatal error: Call to a member function on a non-object in /home/bymnews/public_html/copperminefetch/cpmfetch/cpmfetch.php on line 737

I looked at cpmfetch.php but the answer to the problem doesn't seem to be there, though I figured it's something to do with the domain name????
Ur advice will be appreciated.

Can you point me to the cftest.php page?  PM me if you do not want it posted publically...

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: smoke10010 on July 08, 2005, 10:34:21 pm
I've been wracking my brain around cpmfetch for hours and i've got the basics down I think. unfortunately I'm not so adept at css which I should be learning. All i'd like to do is put everything into nice organized tables which I believe I can achieve through stylesheets

here's the layout I'm looking for if someone could at least tell me if it's possible then I'll keep at it.

|--------------------------------------------------
| Thumbnail | description  | rating    |
|---------------------------------------------------
|                         hits |uploaded by|
---------------------------------------------------
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fogpeople on July 08, 2005, 10:55:08 pm
Hah, what a pair we make...

You flatter me by comparison.  ;)

Made all the changes, and I am WORKING!  Thanks much for the help with that.

I think that was the hard part.  What I'd like to do now is display the image owner's name somewhere else on the page.  I assume it's just another print statement, but is the owner name attached to a variable in CPMFetch? 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 08, 2005, 11:42:47 pm
Hah, what a pair we make...

You flatter me by comparison.  ;)

Made all the changes, and I am WORKING!  Thanks much for the help with that.

I think that was the hard part.  What I'd like to do now is display the image owner's name somewhere else on the page.  I assume it's just another print statement, but is the owner name attached to a variable in CPMFetch? 


Sure is my enthusiastic friend!

I'd recommend inserting a:

    print "<PRE>";
    print_r($data[0]);
   print "</PRE>";

Somewhere after you get the random image... that will display a list of what is included in there... there is an awful lot of cool data that you can take advantage of.  This is temopary so you can see whats in there... you need the PRE tag so it stays formatted in HTML.

Best of luck!







Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 08, 2005, 11:46:17 pm
I've been wracking my brain around cpmfetch for hours and i've got the basics down I think. unfortunately I'm not so adept at css which I should be learning. All i'd like to do is put everything into nice organized tables which I believe I can achieve through stylesheets

here's the layout I'm looking for if someone could at least tell me if it's possible then I'll keep at it.

|--------------------------------------------------
| Thumbnail | description  | rating    |
|---------------------------------------------------
|                         hits |uploaded by|
---------------------------------------------------

The thumbnail will be large and square, while description and rating will be much shorter... Maybe I am not envisioning it.

I have no idea if its possible via CSS with the tables CpmFetch returns, but you can always do something like what fogpeople there is doing and get the data back and build a table with it.

The thing with the default tables cpmfetch returns is that it only iterates a subtitle once, so its all on one like.

When you get it working, post an example and code if you are willing... someone else can benefit from it also then :)





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: smoke10010 on July 09, 2005, 12:33:45 am

The thumbnail will be large and square, while description and rating will be much shorter... Maybe I am not envisioning it.

I have no idea if its possible via CSS with the tables CpmFetch returns, but you can always do something like what fogpeople there is doing and get the data back and build a table with it.

The thing with the default tables cpmfetch returns is that it only iterates a subtitle once, so its all on one like.

When you get it working, post an example and code if you are willing... someone else can benefit from it also then :)








yeah if i can get it up then i'll post it for sure.. i think i might have figured something out.. but i guess 1 thing is how do i  get the subtitles to post to the right of the thumb instead of under
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: smoke10010 on July 09, 2005, 12:41:09 am
also when i use the subtitle function with

cpm_viewRandomTopRatedMediaFrom i get an error and the page doesn't load

Parse error: parse error, unexpected T_DOUBLE_ARROW in /home/tpimp/public_html/updates.php on line 355
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fogpeople on July 09, 2005, 12:48:47 am
I'd recommend inserting a:

    print "<PRE>";
    print_r($data[0]);
   print "</PRE>";

Somewhere after you get the random image... that will display a list of what is included in there... there is an awful lot of cool

Frickin' awesome.  So I tried changing the data line to this:
Code: [Select]
print $imagename[pOwner_Name];And I get a "/" displayed... do I need to change the original code in the include?
(this is very abridged, I did try to declare a variable and add the Owner_Name entry to the original function first  :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 09, 2005, 01:01:55 am
I'd recommend inserting a:

    print "<PRE>";
    print_r($data[0]);
   print "</PRE>";

Somewhere after you get the random image... that will display a list of what is included in there... there is an awful lot of cool

Frickin' awesome.  So I tried changing the data line to this:
Code: [Select]
print $imagename[pOwner_Name];And I get a "/" displayed... do I need to change the original code in the include?
(this is very abridged, I did try to declare a variable and add the Owner_Name entry to the original function first  :)

Here is the short short version of what all this means.  This is really PHP stuff, but I feel happy today - so what the heck.

After you get the random images (or what have you) the $data variable holds a list, even if you only want one picture, its still a list - just a list with 1 item in it.

Okay, computers start counting at 0 - not at one like us people.  So when you say $data[0] - that says on the list ($data) give me row 0 - which to the computer is the first.

With me so far?

Now, each item on the list is data about an image.  so $data[0] the first row on the list, is really made up of another list of things.  This list is called an associative array - that is a fancy way of saying that instead of having each item in this list be found by a number (like $data) we are going to give each entry a name or KEY.  So each KEY then points at an item on the list.

Confused yet?

So, if you want to get the owner name (pOwner_name) (which you my young padawan have successfully found - except Name is not capitalized) from the first image in the list of images ($data) you need to say something like:

Show me from the first image on my list, the entry for 'pOwner_name'

which translates to

$ownername = $data[0]['pOwner_name'];

This is similar to how we got the image name before and assigned it to imagename.

Just remember they are lists with lists.

Hope this helps, cause otherwise I have to refer you to a php book or something...

Php.net has some good page in the manual there if you are interested.

From here you should understand how to get any of the information out of there that you want!












Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fogpeople on July 09, 2005, 01:14:50 am
$ownername = $data[0]['pOwner_name'];
From here you should understand how to get any of the information out of there that you want!

Lightbulb time for me.

Would you believe me if I told you I had that config at one point (minus the lowercase "n" of course) as I tried to work it out?  Honest! 

Well your help has truly been a gift today.  I'm mostly a "tweaker" of code, so those little syntax things get every dang time.  But I genuflect upon your gratitude today!!

-m
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 09, 2005, 02:55:21 am

No problem... PM me the site when you get that working... I'd love to see it in action.

love the concept of changing the background :D



$ownername = $data[0]['pOwner_name'];
From here you should understand how to get any of the information out of there that you want!

Lightbulb time for me.

Would you believe me if I told you I had that config at one point (minus the lowercase "n" of course) as I tried to work it out?  Honest! 

Well your help has truly been a gift today.  I'm mostly a "tweaker" of code, so those little syntax things get every dang time.  But I genuflect upon your gratitude today!!

-m

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mikedown on July 09, 2005, 11:03:22 am
guys i have trouble with this one... i can get the random images to run in my .html site
i already fixed the test and everything works great even saw the thumbnails in the test page

im having trouble with step 4

Step 4. Add a few calls into a test page.
Into a .php page (or one that is executed as one) in the same directory that contains your CoppermineFetch directory , add the following php statements.

Note: This example assumes that you have the Coppermine Photo Gallery installed into a directory named "gallery" right off the root of your websites. So if you were to go to a web browser and enter http://www.yourwebsite.com/gallery - you would get Coppermine.

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

The lines above do this:
This includes the cpmfetch program objects.
This creates the cpmfetch object - you include the partial URL to your coppermine install.
This one of many calls you can make to the program. This displays 6 random images in 3 rows x 3 columns.
This line closes the database connections the object has.
In a real page, you could have the first two lines at the top of your file, the close at the bottom and any number of calls in between.


anyone can help me? i can figure this one out
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 09, 2005, 03:11:24 pm

If you are including them on HTML pages, you need to do it in a PHP and include that file.  See the other thread in the cpmfetch forum for SSI... there is an example.

Also since 1.4 (if you installed that) the coppermine.php is called cpmfetch.php... I have not updated the doc's yet as they are being completely re-written.







guys i have trouble with this one... i can get the random images to run in my .html site
i already fixed the test and everything works great even saw the thumbnails in the test page

im having trouble with step 4

Step 4. Add a few calls into a test page.
Into a .php page (or one that is executed as one) in the same directory that contains your CoppermineFetch directory , add the following php statements.

Note: This example assumes that you have the Coppermine Photo Gallery installed into a directory named "gallery" right off the root of your websites. So if you were to go to a web browser and enter http://www.yourwebsite.com/gallery - you would get Coppermine.

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

The lines above do this:
This includes the cpmfetch program objects.
This creates the cpmfetch object - you include the partial URL to your coppermine install.
This one of many calls you can make to the program. This displays 6 random images in 3 rows x 3 columns.
This line closes the database connections the object has.
In a real page, you could have the first two lines at the top of your file, the close at the bottom and any number of calls in between.


anyone can help me? i can figure this one out

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mrmike987 on July 09, 2005, 05:49:56 pm
Does anyone here know how to add     <?php $objCpm->cpm_viewLastAddedMedia(1,2)  ?>
to a block in phpnuke?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mikedown on July 10, 2005, 04:28:56 am
i did what was in the other thrend and this is the message that showed up

this is what i placed in my .php file
Code: [Select]
<?php 
include "gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia(4,2); 
$objCpm->cpm_close(); 
?>

i was trying to open the .php file with this code...
Code: [Select]
<iframe src="http://www.reefphilippines.com/gallery/cpmfetch/randomimages.php" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"" height="200" width="600" scrolling="no"></iframe>
and this is what it displayed..

Warning: main(gallery/cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 2

Warning: main(gallery/cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 2

Warning: main(): Failed opening 'gallery/cpmfetch/cpmfetch.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 2

Fatal error: Cannot instantiate non-existent class: cpm in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 3


im sooo lost with step 4 pls help me out this is a great program but i can get the final steps....

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 11, 2005, 12:51:08 am

If the randomimage thing is in the cpmfetch directory, try this include instead.

include "./cpmfetch.php";


i did what was in the other thrend and this is the message that showed up

this is what i placed in my .php file
Code: [Select]
<?php 
include "gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia(4,2); 
$objCpm->cpm_close(); 
?>

i was trying to open the .php file with this code...
Code: [Select]
<iframe src="http://www.reefphilippines.com/gallery/cpmfetch/randomimages.php" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"" height="200" width="600" scrolling="no"></iframe>
and this is what it displayed..

Warning: main(gallery/cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 2

Warning: main(gallery/cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 2

Warning: main(): Failed opening 'gallery/cpmfetch/cpmfetch.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 2

Fatal error: Cannot instantiate non-existent class: cpm in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 3


im sooo lost with step 4 pls help me out this is a great program but i can get the final steps....


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 11, 2005, 12:52:01 am
Does anyone here know how to add     <?php $objCpm->cpm_viewLastAddedMedia(1,2)  ?>
to a block in phpnuke?

There is a thread for that sort of thing... gotta keep the place clean ya know

http://forum.coppermine-gallery.net/index.php?topic=19528.0
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daethian on July 12, 2005, 08:51:27 am
Okay I'm sure this is something simple but I have no idea what I'm doing!  I want to use cpmfetch to show random images on my xoops set up.  I installed it and ran the test and I got pass/info and no errors.   I made the custom block but no images will show up in it.  I just want one image. 

Code: [Select]
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();

I also tried

Code: [Select]
include "./coppermine/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();

I'm an intermediate user
my test set up is http://foreverpurple.com/xoopstest/index.php
my gallery is http://foreverpurple.com/gallery/index.php
version is 1.3.2
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 12, 2005, 03:45:34 pm
Okay I'm sure this is something simple but I have no idea what I'm doing!  I want to use cpmfetch to show random images on my xoops set up.  I installed it and ran the test and I got pass/info and no errors.   I made the custom block but no images will show up in it.  I just want one image. 

Code: [Select]
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();

I also tried

Code: [Select]
include "./coppermine/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();

I'm an intermediate user
my test set up is http://foreverpurple.com/xoopstest/index.php
my gallery is http://foreverpurple.com/gallery/index.php
version is 1.3.2


I guess Xoop is some sort of framework?  Like Nuke or e101?  Where in xoop are you inserting the code?  Where ever you put it has to be able to execute PHP otherwise it will not work.  Check that and then post back to the board about embedding in other programs ...  also in the cpmfetch child board here.

Thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daethian on July 12, 2005, 10:37:49 pm
Yes its like Nukeportal.

The custom module I created  has an option to use 'php script'  I'm also fairly certain it should work because someone from XOOPS sent me here to get this program from you.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 13, 2005, 03:29:48 am
Yes its like Nukeportal.

The custom module I created  has an option to use 'php script'  I'm also fairly certain it should work because someone from XOOPS sent me here to get this program from you.

I'd be simply thrilled if you posted to the other forum

http://forum.coppermine-gallery.net/index.php?topic=19528.0

I will check out Xoops and respond in that forum
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: xmystique on July 13, 2005, 06:40:31 am
would i be able to use this to put a random image block onto the sidebar of an existing gallery template?

for instance, i am using the grey satin template. instead of having the "Random Image" block in the {GALLERY} section, could i move it over to the sidebar under where all the navigational links {MAIN_MENU} is located?

would i just use a php include in the "template.html" file? or is this not possible at all?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 13, 2005, 07:38:49 am
would i be able to use this to put a random image block onto the sidebar of an existing gallery template?

for instance, i am using the grey satin template. instead of having the "Random Image" block in the {GALLERY} section, could i move it over to the sidebar under where all the navigational links {MAIN_MENU} is located?

would i just use a php include in the "template.html" file? or is this not possible at all?

Sorry, if I yell at one person I have to yell at them all.

This post belongs thus-in:
http://forum.coppermine-gallery.net/index.php?topic=19528.0


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mikedown on July 13, 2005, 01:58:44 pm
thanks vuud! your code works great! :)
can i mod the random images so when i click the random image it opens a new browser for the image?
target="_blank" kinda thing?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: xmystique on July 13, 2005, 03:32:18 pm
i apologize, i looked at the other thread you mentioned, and noticed that someone had a question very similar to mine that was never answered. i assumed i wouldnt be using CPIMAGEGET for this since you mention under "bad uses" that using it on the same page as the gallery itself is no good, which is exactly what i want to do.

i have checked out cftest.php and there are no problems. http://www.seventhstranger.net/gallery/cpmfetch/cftest.php
i created a new file with the given code and it works fine : http://www.seventhstranger.net/gallery/cpmfetch/random.php

however, when i try to include the random.php file into my template.html, nothing comes up. (i am trying to put the "random image" feature in my sidebar along with the navigation) It's not messing up my template, the gallery template still works fine, however the php include isnt working, it just shows nothing.

am i supposed to put this include in a different file? is there another magical way to include my random.php file into my gallery template?

EDIT: well i just tried to include the random.php file into another html file other than template.html and it worked fine: http://www.seventhstranger.net/gallery/whatever.html

so is this just impossible to use in the template at all? or am i completely missing something?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 13, 2005, 04:49:43 pm
i apologize, i looked at the other thread you mentioned, and noticed that someone had a question very similar to mine that was never answered. i assumed i wouldnt be using CPIMAGEGET for this since you mention under "bad uses" that using it on the same page as the gallery itself is no good, which is exactly what i want to do.

i have checked out cftest.php and there are no problems. http://www.seventhstranger.net/gallery/cpmfetch/cftest.php
i created a new file with the given code and it works fine : http://www.seventhstranger.net/gallery/cpmfetch/random.php

however, when i try to include the random.php file into my template.html, nothing comes up. (i am trying to put the "random image" feature in my sidebar along with the navigation) It's not messing up my template, the gallery template still works fine, however the php include isnt working, it just shows nothing.

am i supposed to put this include in a different file? is there another magical way to include my random.php file into my gallery template?

EDIT: well i just tried to include the random.php file into another html file other than template.html and it worked fine: http://www.seventhstranger.net/gallery/whatever.html

so is this just impossible to use in the template at all? or am i completely missing something?


Sorry for the confusion... the thread I referred you to is for embedding in into templates and such, not specifically using cfimageget or any particular type.

I know this would be possible via cfimageget as you would just need to call it in a img src tag... but that is not the best.  I have to check the templates to see if you can execute PHP in them...  if you can, this is doable, if not then its gonna be more complicated.  I'll poke at mine a little later and see how it works...  I did my own theme awhile back, but forget how all that comes together.  I'll post into the other thread the results.

Later

Title: A newbie's experience
Post by: marian on July 13, 2005, 05:06:41 pm
I'm not really a newbie, it's just that I don't have time to really learn php, so stay in a state of not really understanding instructions. I guess I'm not alone in that, so I thought I'd post something about how I, with vuud's help, discovered what I should be doing.
During the course of various goes at trying to sort it, I had coppermine fetch installed in the root directory and in public_html. It didn't work at all when installed in the root directory.
When trying to sort out cftest.php I made a lot of mistakes and got in a complete muddle, so I uninstalled everything to do with CMF, from the server and my laptop, and started again. This time I intended to change one thing at a time in cftest and try it to see what FAILS remained, before going on to the next change. To my amazement, having just put the partial URL /photos in line 5, I was rewarded by images. So DO NOT change anything in cftest except line 5 (the file gives a newbie the impression that you need to change to the partial URL in several places, but you dont) and DO NOT put the partial URL as /public_html/photos even though copperminefetch is in public html; the name of your coppermine directory is all that is neededl.
I still had probs when I tried to get a test php file to work, even though I tried putting it in various directories I kept getting an error message "cannot open string ............  does not exist" Then I found a post that told someone else to try just using include "./cpmfetch.php" and it worked instantly.
Hope this helps some people.

 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hooligan on July 13, 2005, 07:02:43 pm
I don't know where to post this question, so I'll post it here.

Got Cpmfetch working in a test htm page, by adding a couple of line to my .htaccess:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

and the following to an htm file:

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

$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);

$objCpm->cpm_close();
?>

But what I'd like to be able to do is have the Album display on the htm page just the way it does in cpg. Possible with fetch? Or is there another way?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 13, 2005, 07:11:02 pm
I don't know where to post this question, so I'll post it here.

Got Cpmfetch working in a test htm page, by adding a couple of line to my .htaccess:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

and the following to an htm file:

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

$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);

$objCpm->cpm_close();
?>

But what I'd like to be able to do is have the Album display on the htm page just the way it does in cpg. Possible with fetch? Or is there another way?

Wow, so basically you just convinced the web server that all you html pages are really PHP pages.  Interesting approach.

You can also serve cpmfetch information up via the SSI in apache - which would allow you to probably get away with the XBITHACk on....

Check out this thread... it has an example.  You should not have too much trouble with it.

http://forum.coppermine-gallery.net/index.php?topic=18547.0

I am going to add your approach to the docs though...  :)


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mrmike987 on July 14, 2005, 01:10:03 am
From old forum:

$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,4,array("subtitle" => "The gallery was last updated:<br>%w","imagelink" => "album", cellattributes" => array("align"=>"center")));

Will align the contents of the TD tag
----------------------------------------------------------------
Gives error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 14, 2005, 02:09:25 am
From old forum:

$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,4,array("subtitle" => "The gallery was last updated:<br>%w","imagelink" => "album", cellattributes" => array("align"=>"center")));

Will align the contents of the TD tag
----------------------------------------------------------------
Gives error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'


Parse errors almost always mean you did something wrong.  I would have caught something like that before shipping code.

In this case... you are missing a quote before cellattributes.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on July 14, 2005, 09:49:56 am
Got Cpmfetch working in a test htm page, by adding a couple of line to my .htaccess:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
Your webhost won't be happy if you do this, I used a similar approach before on my personal page. My webhost notified me of some drawbacks and changed the policy for .htaccess files. Not a recommended method, has impact on server performance and security.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mikedown on July 14, 2005, 03:11:14 pm
sorry to double post but...

can i mod the random images so when i click the random image it opens a new browser for the image?
target="_blank" kinda thing
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 14, 2005, 03:26:17 pm
sorry to double post but...

can i mod the random images so when i click the random image it opens a new browser for the image?
target="_blank" kinda thing

Its inthe documentation

http://www.fistfullofcode.com/projects/copperminefetch/docs/readme.html#optionsarray
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fogpeople on July 15, 2005, 02:48:12 am
Hey all,

I took this offline with vuud but we weren't able to get this working, so I'm opening up my dilemma in hopes someone will point out what it is I'm mucking up here.

So, thanks to vuud, I managed to make an include file that pulls a random image and give me the file path and image name as a variable I include as the background of a page.  It ALSO pulls the image owner's username and stores that as a variable I use to print out on the page, so you can see a credit of whom has uploaded the random image. So far so good.

What I'd like to do now is simple use the owner's username ($ownername) in a query to the cpg133_users table to also pull their home page data.  This way I can ultimately include a link to their homepage along with their author credit. 

To that end, since I've got the username, I made an additional query in my include script:

Code: [Select]
$linky = mysql_connect("localhost", "xxxxxxxx", "xxxxxxxx");
mysql_select_db("xxxxxxxx", $linky);
$getweb = mysql_query("SELECT * FROM cp133_users WHERE user_name=$ownername", $linky);
$row = mysql_fetch_array($getweb, MYSQL_ASSOC);
$website = $row['user_website'];

Then, on whatever page includes the script, I just add this:
Code: [Select]
print $ownername;
print $website;

Ownername prints fine, but the $webstie does not, and fails me with this:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fogpeopl/public_html/random.php on line 22

Line 22 is the $row line.  So, I'm connecting alright, I'm not sure if the query is working, but it's definitely munging something up between the query and massaging the results.  I realize this is almost entirely a PHP syntax issue, but since many of you have probably successfully queried the users table I thought I'd see if anyone else has had any unusual problems doing so.  I could use the help as I've tried every possible option I can think of and am relatively sure my code is correct.

Thanks!!!!
-michael
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on July 15, 2005, 02:56:01 am
You need single quotes around the $ownername in the query. Without them, MySQL looks for a field with the name of the user, the quotes indicate you are trying to match a literal value.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hooligan on July 15, 2005, 07:10:19 am
Got Cpmfetch working in a test htm page, by adding a couple of line to my .htaccess:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
Your webhost won't be happy if you do this, I used a similar approach before on my personal page. My webhost notified me of some drawbacks and changed the policy for .htaccess files. Not a recommended method, has impact on server performance and security.

<thud>

Can you provide any more detail?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fogpeople on July 15, 2005, 08:37:13 am
You need single quotes around the $ownername in the query. Without them, MySQL looks for a field with the name of the user, the quotes indicate you are trying to match a literal value.

Well, I did try this:

Code: [Select]
$linky = mysql_connect("localhost", "xxxxxxxx", "xxxxxxxx");
mysql_select_db("xxxxxxxx", $linky);
$getweb = mysql_query("SELECT * FROM 'cp133_users' WHERE user_name='$ownername'", $linky);
$row = mysql_fetch_array($getweb, MYSQL_ASSOC);
$website = $row['user_website'];

And another syntactical variation suggested by vuud which also include single quotes (I believe it was ' . $ownername . ' or some such.
All of which yield me this big fat goose egg:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fogpeopl/public_html/random.php on line 22

Frankly I'm stumped.  I'm no PHP whiz kid by a long shot, but I wonder if the query is failing because it thinks the comparitive text isn't text for some reason?  This is definitely a case where I wouldn't mind getting totally schooled by an ace  :)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on July 15, 2005, 02:20:00 pm
Let's add some debug code

Code: [Select]
$linky = mysql_connect("localhost", "xxxxxxxx", "xxxxxxxx");
var_dump($linky);
$db = mysql_select_db("xxxxxxxx", $linky);
var_dump($db);
var_dump("SELECT * FROM cp133_users WHERE user_name='$ownername'");
$getweb = mysql_query("SELECT * FROM cp133_users WHERE user_name='$ownername'", $linky);
var_dump($getweb);
var_dump(mysql_error());
var_dump(mysql_num_rows($getweb));
$row = mysql_fetch_array($getweb, MYSQL_ASSOC);
$website = $row['user_website'];

That should catch just about anything.

Also don't put single quotes around the table name, that's sure to screw up the query. Use backticks or nothing.
Title: SOLVED! ... Displaying data and images from CPG on your website
Post by: fogpeople on July 15, 2005, 05:42:10 pm
Let's add some debug code

aHA!

I stand humbled before you.

Problem?  the table name is "cpg133_users" NOT "cp133_users".  I only looked at it about 5,000 times too.

I smother you and vuud with gratitude and add all of this to the meager knowledgebase that is my brain.

I'll be able to launch in no time now...thanks!
-michael
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: michiel on July 17, 2005, 07:00:25 pm
I earlier posted the following question:
Quote
I would like to include on my frontpage only the latest added pic (full size) , but no albums and other thumbnails..Albums would be approached through a link on the frontpage. How should I do this?


Gaugau answered:
Quote
alblist and catlist has to remain in "the content of the main page" no matter what. Create a splash page using cpmFetch with only your last added pics, and send your users to this splash page before they're sent anywhere else (i.e. to the actual coppermine page).

I have installed cpmfetch, and technically, it works (http://www.dwaalgasten.nl/Foto/cpg1.3.3/cpg133/test.php). But the pic is still small, and I would like it to be fullsize. Compare: http://www.apparentlynothing.com/. Is there a way to achieve this? Thanks!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 18, 2005, 06:49:27 am
I earlier posted the following question:
Quote
I would like to include on my frontpage only the latest added pic (full size) , but no albums and other thumbnails..Albums would be approached through a link on the frontpage. How should I do this?


Gaugau answered:
Quote
alblist and catlist has to remain in "the content of the main page" no matter what. Create a splash page using cpmFetch with only your last added pics, and send your users to this splash page before they're sent anywhere else (i.e. to the actual coppermine page).

I have installed cpmfetch, and technically, it works (http://www.dwaalgasten.nl/Foto/cpg1.3.3/cpg133/test.php). But the pic is still small, and I would like it to be fullsize. Compare: http://www.apparentlynothing.com/. Is there a way to achieve this? Thanks!


The default for cpmfetch is to display thumbnails, but have hope... you can tell it to do different...

These two pages in the almost done new docs explain it...

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: michiel on July 18, 2005, 07:41:07 pm
thanks vuud; that manual will prove to be very useful. Thanks to the manual I have been able to vary the size of the pic, great. I am almost where I want to be. I would like to a) align the pic in the middle, rather than on the left, and b) add the background colour I use elsewehere on my website. From your manual, I understand this should be possible. However,  I am familiar with CSS, but know nothing about PHP. Can you give me a hint how I can change or include such variables (or CSS codes) in the PHP code? Thanks!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 18, 2005, 09:07:12 pm
thanks vuud; that manual will prove to be very useful. Thanks to the manual I have been able to vary the size of the pic, great. I am almost where I want to be. I would like to a) align the pic in the middle, rather than on the left, and b) add the background colour I use elsewehere on my website. From your manual, I understand this should be possible. However,  I am familiar with CSS, but know nothing about PHP. Can you give me a hint how I can change or include such variables (or CSS codes) in the PHP code? Thanks!

The easiest way is to define the CSS in your page, and then pass on the tags to cpmfetch for its table.

The section of the manual I forwarded has those listed...
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html

The ones with style in the name.....   like "cellstyle" => "photobox" will insert class="photobox" into all of the TD tags.  There are other ones there too


Title: Who ever was requesting the number of images added since a date...
Post by: vuud on July 20, 2005, 07:49:13 am

I forgot about it, but its already in there.

Assuming you have the objCpm already created, you just need to provide a timestamp.

$objCpm->cpm_getMediaCountAddedSince($timestamp);

voila
Title: Dev version 1.5.1
Post by: vuud on July 20, 2005, 08:59:46 am

CpmFetch Announcements from FistFullOfCode.com
[The exact Center of the Internet]
----------------------------------------------------------------

* * * Development release 1.5.1 is ONLINE now * * *
[ code named:  Freaky Turkey ]

( get it at http://cpmfetch.fistfullofcode.com )

I have posted a new development release online.  Updating to this is purely up to you... 
If there is something you like here, go ahead.  If not stick with what you have.  If you think
you have a bug now, upgrade to this before reporting it (or else)



WHATS NEW

* DocBook documentation almost done
* Select photos by owner name (via owner= in source statement)
* Added %e  to display owners E-Mail
* Added %H  to display owners web site (Home page)
* Added %I  to display owners Interests
* Added %l  to display owners last visit (lower case L)
* Added %L  to display owners location
* Added %O  to display owners occupation
* Added %r to display owners registration date
* Internal refactoring of cpmfetch_dao

DOCBOOK DOCUMENTATION ALMOST DONE
This will replace the existing readme based documentation.  That will no longer be updated, as of
whenever I last updated it.  While the Docbook version is not 100% done, it does contain all
the old versions info and more.  Some is not formatted yet, but technically its in there.

See it here... updated daily
http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html


SELECT PHOTOS BY OWNER NAME (VIA owner= IN SOURCE STATEMENT)
More information on doing this is available in the new, mostly finsihed docs.
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch05s02.html

The new thing is that you can use owner= in addition to album= and cat=


SUBTITLE AND ALT TAG PLACEHOLDERS GALORE
User fogpeople mentioned to me that there is all this other data in here that I am ignoring, so I
went ahead and added in calls to get all that too.  Here are the new chunks of information you
can add into your subtitles and alt tags.

* Added %e  to display owners E-Mail
* Added %H  to display owners web site (Home page)
* Added %I  to display owners Interests
* Added %l  to display owners last visit (lower case L)
* Added %L  to display owners location
* Added %O  to display owners occupation
* Added %r to display owners registration date

INTERNAL REFACTORING OF CPMFETCH_DAO
Basically I removed a lot of redundant code... reducing the size of the file
by 5.1KB and 145 lines of SQL code.  What does this mean to you?  Well,
any function that ends with FromAlbum or FromCategory or does not have
any from (such as getRandomMedia) all call the same function in the backend -
the ones I added that use the $source statement (they all end in FROM).
It's been nagging me for awhile, so why not just go ahead and do it.


A WORD ABOUT DEV RELEASES
====================================
Typically development releases are done in software when new features are added... New features sometimes
introduce bugs (software errors) that the testing we do here misses.  If this happens, it is usually something
strange.  The dev releases here are generally very stable.  Changes sometimes even make the program
more stable, which adding new features.

Overall, In most circumstances, if your random thumbnail is not working for a few minutes when you upgrade
you are going to be okay.  If a dev release has something you like, give it a try.  I always have all the older versions up
for download so you can go back if it breaks.

If you do have a problem, PLEASE let me know.  That way I can fix it.  If I don't know about it, it could be
a long time before it gets fixed.

--------------------------------------------------------------
Sign up for email notifications at http://cpmfetch.fistfullofcode.com
This will get you:
* Emails for new releases and development releases
* Notifications of new tutorials and online help
* Security notification (if we ever have one)
* Email addresses held closely - no spam, not shared
-------------------------------------------------------------------------------------------------------
Thanks!

Bill@fistfullofcode.com
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hamsterpants on July 20, 2005, 01:27:05 pm
Please can someone let me know why:
The following works:
      <?php
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("/photoalbum");
         $objCpm->cpm_viewRandomMedia(5,1);
         $objCpm->cpm_close();
      ?>

and the following doesn't:

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

Not sure I understand how this works, but all I need this function for is to display the most voted pics.
Thanks in advance
Dill
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 20, 2005, 03:33:39 pm
Please can someone let me know why:
The following works:
      <?php
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("/photoalbum");
         $objCpm->cpm_viewRandomMedia(5,1);
         $objCpm->cpm_close();
      ?>

and the following doesn't:

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

Not sure I understand how this works, but all I need this function for is to display the most voted pics.
Thanks in advance
Dill

Pants of hamster,

Try this call instead:
$objCpm->cpm_viewRandomMostViewedMediaFrom("",5,1);

The call you are trying does not exist.

See: http://www.fistfullofcode.com/projects/copperminefetch/manual/ch05s02.html
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: sinbinner on July 21, 2005, 04:53:01 am
Would anyone be willling to give me a little help please?  I have smf 1.0.5, coppermine 1.3.3 and copperminefetch 1.4.1. Everything is installed and working properly. I used the <img src="/cfimageget.php?album=3"/> to pull a random image from a specified album to my forum index. What I want to do is pull 5 images at once from that specified album. The pictures are for a customized car website and would like to display the customized car of the week in a block on the forum index. Or display one image at a time with the option to click a next or previous button for more images from the album. My php skills suck so I'm fumbling in the dark on this.  My directory structure is setup as following.
root/cgp133/albums
root/forums/cpmfetch
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 21, 2005, 05:12:03 am
Would anyone be willling to give me a little help please?  I have smf 1.0.5, coppermine 1.3.3 and copperminefetch 1.4.1. Everything is installed and working properly. I used the <img src="/cfimageget.php?album=3"/> to pull a random image from a specified album to my forum index. What I want to do is pull 5 images at once from that specified album. The pictures are for a customized car website and would like to display the customized car of the week in a block on the forum index. Or display one image at a time with the option to click a next or previous button for more images from the album. My php skills suck so I'm fumbling in the dark on this.  My directory structure is setup as following.
root/cgp133/albums
root/forums/cpmfetch


The best you can do using cfimageget is the 5 photos at a time.  Yes, it can be done.  See this in the docs for how to do it.

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch09s03.html

You can end up with double images though - since each call is completely different from the others.

Otherwise your next best hope is to work the normal PHP into the forum template.  I did that with my SMF forums.  Once you do that you can get five images. 

There are a few examples in the docs for the php you would need to do... not sure of your forum layout though.  If you want me to just do it for you, see the list of organizations you can donate to in the docs... prove you made a donation and I will go ahead and do it all. 

Otherwise try the php route (getting that into the template - its all cut and paste almost, so php is not really required, just reading of the docs and trying it) and let me know where you get stuck

Vuud




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hamsterpants on July 21, 2005, 11:42:46 am
Thanks very much VUUD  :) perfect except on the forum. I have used that function in the my customer site header and the function works on the hime page /index.php and on the photoalbum /photoalbum, but when I go to the forum /forum, I get the following error, which I am sure it has to do with the way I am referencing the code, but my php is not that good. I have included the error below and also the code I use for including the images:

Error:
====
Warning: main(./cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/mystaffi/public_html/_header.php on line 28

Warning: main(./cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/mystaffi/public_html/_header.php on line 28

Warning: main(./cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/mystaffi/public_html/_header.php on line 28

Warning: main(): Failed opening './cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mystaffi/public_html/_header.php on line 28

Fatal error: Cannot instantiate non-existent class: cpm in /home/mystaffi/public_html/_header.php on line 29

Code:
===

      <?
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("/photoalbum");
         #$objCpm->cpm_viewRandomMedia(5,1);
         #$objCpm->cpm_viewMostVotedMedia(1,1);
         $objCpm->cpm_viewRandomMostViewedMediaFrom("",5,1);
         $objCpm->cpm_close();
      ?>    
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 21, 2005, 06:39:46 pm
Thanks very much VUUD  :) perfect except on the forum. I have used that function in the my customer site header and the function works on the hime page /index.php and on the photoalbum /photoalbum, but when I go to the forum /forum, I get the following error, which I am sure it has to do with the way I am referencing the code, but my php is not that good. I have included the error below and also the code I use for including the images:

Error:
====
Warning: main(./cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/mystaffi/public_html/_header.php on line 28

Warning: main(./cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/mystaffi/public_html/_header.php on line 28

Warning: main(./cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/mystaffi/public_html/_header.php on line 28

Warning: main(): Failed opening './cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mystaffi/public_html/_header.php on line 28

Fatal error: Cannot instantiate non-existent class: cpm in /home/mystaffi/public_html/_header.php on line 29

Code:
===

      <?
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("/photoalbum");
         #$objCpm->cpm_viewRandomMedia(5,1);
         #$objCpm->cpm_viewMostVotedMedia(1,1);
         $objCpm->cpm_viewRandomMostViewedMediaFrom("",5,1);
         $objCpm->cpm_close();
      ?>    


I suspect your problem is in this statement:

include "./cpmfetch/cpmfetch.php";

The program that is running has to be able to find it.  The line above has . / cpmfetch, which means look in a directory inside this directory named cpmfetch.  So unless you installed cpmfetch inside your /forum directory, it would not work.

You need to change it to look for where you installed it.

include "../cpmfetch/cpmfetch.php";

The two dots tell it to go up one directory, then into cpmfetch... 

Thats probably your problem


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: sinbinner on July 22, 2005, 05:42:47 am

The best you can do using cfimageget is the 5 photos at a time.  Yes, it can be done.  See this in the docs for how to do it.

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch09s03.html

You can end up with double images though - since each call is completely different from the others.

Otherwise your next best hope is to work the normal PHP into the forum template.  I did that with my SMF forums.  Once you do that you can get five images. 

There are a few examples in the docs for the php you would need to do... not sure of your forum layout though.  If you want me to just do it for you, see the list of organizations you can donate to in the docs... prove you made a donation and I will go ahead and do it all. 

Otherwise try the php route (getting that into the template - its all cut and paste almost, so php is not really required, just reading of the docs and trying it) and let me know where you get stuck

Vuud

If I wasn't so dang broke I'd be more than happy to make a donation to you Vuud lol. As for doing it for me thanks, but I want to learn how to do this kind of stuff and that won't help me. I'll read thru the docs again and try to see if I can make sense of what I need to do. Where would be the best place to post any questions I have about this for you? Here in this forum or somewhere else? I saw how to do the five images using cfimageget, but like you said you'll get double images. If there were a large amount of pic's in the album that wouldn't be too much of a problem. But with probably no more than 5 pic's of the car each week that won't work too well.

Thanks for your help,
sinbinner
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 22, 2005, 06:38:06 am

The best you can do using cfimageget is the 5 photos at a time.  Yes, it can be done.  See this in the docs for how to do it.

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch09s03.html

You can end up with double images though - since each call is completely different from the others.

Otherwise your next best hope is to work the normal PHP into the forum template.  I did that with my SMF forums.  Once you do that you can get five images. 






There are a few examples in the docs for the php you would need to do... not sure of your forum layout though.  If you want me to just do it for you, see the list of organizations you can donate to in the docs... prove you made a donation and I will go ahead and do it all. 

Otherwise try the php route (getting that into the template - its all cut and paste almost, so php is not really required, just reading of the docs and trying it) and let me know where you get stuck

Vuud

If I wasn't so dang broke I'd be more than happy to make a donation to you Vuud lol. As for doing it for me thanks, but I want to learn how to do this kind of stuff and that won't help me. I'll read thru the docs again and try to see if I can make sense of what I need to do. Where would be the best place to post any questions I have about this for you? Here in this forum or somewhere else? I saw how to do the five images using cfimageget, but like you said you'll get double images. If there were a large amount of pic's in the album that wouldn't be too much of a problem. But with probably no more than 5 pic's of the car each week that won't work too well.

Thanks for your help,
sinbinner

I feel foremost I need to clarify your statement for others... I was not asking for a donation to me, but to one of a few select charitable organizations.  Just want to clarify that for future readers.  I don't want your money.  Well, I want you to give your money away to someone else anyway :)

As for your problem...  Here is what I did with SMF 1.0.3 (which is not that old)

In my index.template.php file in the templates directory area  (whatever template you are using, edit the one in that folder), I added in this code.  You have to change the include to match your installation maybe.  This would work if cpmfetch was right off the root of the web site.

echo '<div align="right">';
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photos");
$objCpm->cpm_viewRandomMedia(1,5);
$objCpm->cpm_close();
echo '</div>';

Otherwise it was pretty easy.  Hope the broke thing works out for you... I don't personally buy anything for myself really, grow a lot of my own food, but business is slow - so I can feel your pain.  Unless of course you are broke cause you spend on all sort of non-essentials - then you deserve your pain - whahahahahahahah ;)


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: sinbinner on July 22, 2005, 07:39:49 am
LMAO no I'm broke because I'm working on starting my own home business. Sorry for the misunderstanding with the money thing. As for the script you just posted. I went back and went thru the doc's again and had just come up with that same script lol. It was working great only thing I wasn't sure of was where to place it in my files, but again you solved that one for me. I played around with the array options too. After some trial and error I got it to work. Really is very nice software. Here's the site I'm building for a friend. It's just a test site added on to my website until I'm done. Thanks for the help.  Test Website (http://mdmcustomgraphics.com/ptcruiser/forums)

Sinbinner
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hamsterpants on July 22, 2005, 11:46:40 am
Hi Vuud,

Thanks for the help, thats what I suspected, but no matter what I tried I could not get it to include the images when I was in the forum section. I even tried adding the full path i.e. http://www.mystaffie.com/cpmfetch/cpmfetch.php, with no success. What I have done is copy the cpmfetch dir into the forum dir, so now I have a copy in the root and in forum. Do think this is an ok solution or should I continue trying to get it to work with the single copy in the root.

Thanks
Dill
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hamsterpants on July 22, 2005, 11:54:14 am
sorry wanted to also ask. I get the images to be nicluded now in the forum section, but get a waring:

Warning: Missing argument 4 for cpm_viewmostvotedmediafrom() in /home/mystaffi/public_html/forum/cpmfetch/cpmfetch.php on line 840

The code that I am useing to include the pics looks as follows:

      <?php 
      
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("/photoalbum");
         #$objCpm->cpm_viewRandomMedia(5,1);
         #$objCpm->cpm_viewMostVotedMedia(1,1);
         $objCpm->cpm_viewMostVotedMediaFrom("",5,1);
         $objCpm->cpm_close();
      ?>

Thanks in advance.
Dill
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 22, 2005, 05:03:53 pm
sorry wanted to also ask. I get the images to be nicluded now in the forum section, but get a waring:

Warning: Missing argument 4 for cpm_viewmostvotedmediafrom() in /home/mystaffi/public_html/forum/cpmfetch/cpmfetch.php on line 840

The code that I am useing to include the pics looks as follows:

      <?php 
      
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("/photoalbum");
         #$objCpm->cpm_viewRandomMedia(5,1);
         #$objCpm->cpm_viewMostVotedMedia(1,1);
         $objCpm->cpm_viewMostVotedMediaFrom("",5,1);
         $objCpm->cpm_close();
      ?>

Thanks in advance.
Dill

Whoops.  Thats technically a bug on my part.  I fixed it so the next dev version will have it so that one is not required.

Basically its looking for the options array, which should be optional.  But I forgot to make it that way.

Just change to this (Extra quotes at the end)

$objCpm->cpm_viewMostVotedMediaFrom("",5,1,"");

That should get rid of the error... sorry about that.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chupa2k on July 23, 2005, 06:06:37 pm
Hey All ,
Listen at http://www.toaster.co.il/main/mytoaster.php?id=3 for example i got the cpmfetch workin displayin 3 random images in a row on the left side
all is great BUT....
that link is also accesseble at http://aloni.toaster.co.il and it cannot find the path http://aloni.toaster.co.il/community/gallery for displaying the images .
What im saying is , How can i specify hardcoded the url for the coppermine in the cpmfetch as in http://www.toaster.co.il/community/gallery format and not from the http_header ?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 24, 2005, 05:09:26 am
Hey All ,
Listen at http://www.toaster.co.il/main/mytoaster.php?id=3 for example i got the cpmfetch workin displayin 3 random images in a row on the left side
all is great BUT....
that link is also accesseble at http://aloni.toaster.co.il and it cannot find the path http://aloni.toaster.co.il/community/gallery for displaying the images .
What im saying is , How can i specify hardcoded the url for the coppermine in the cpmfetch as in http://www.toaster.co.il/community/gallery format and not from the http_header ?

I peeked at the site and it seems to be working fine... is this still an issue?  If so, I did not understand the question :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chupa2k on July 24, 2005, 10:41:13 pm
Well what i ment is that according to the cpmfetch code if i surf to http://aloni.toaster.co.il/community/gallery i will reach the gallery , But thats not the case .. aloni.toaster.co.il is a htaccess virtual subdomain that directs to http://www.toaster.co.il/main/mytoaster.php file directly dues not having the correct path to the coppermine and bringing broken images coz it cannot find http://aloni.toaster.co.il/community/gallery....
Can i specify a URL for the cpmfetch to display the images from there ? hardcoded ???
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 24, 2005, 11:47:22 pm
Well what i ment is that according to the cpmfetch code if i surf to http://aloni.toaster.co.il/community/gallery i will reach the gallery , But thats not the case .. aloni.toaster.co.il is a htaccess virtual subdomain that directs to http://www.toaster.co.il/main/mytoaster.php file directly dues not having the correct path to the coppermine and bringing broken images coz it cannot find http://aloni.toaster.co.il/community/gallery....
Can i specify a URL for the cpmfetch to display the images from there ? hardcoded ???

You can try playing with cpm_OverrideUrlToCoppermine($newpath_)... not sure if it does the domain name, but you can try it.

Simply call it

$objCpm->cpm_OverrideUrlToCoppermine($newpath_);.

After you create the objCpm and before you make your call to it.

You milage may vary... its not documented cause I keep forgetting what that function does
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on July 25, 2005, 04:52:06 am
Understand nothing ... too many variables, doc very hard to understand when you don't speak english ... and

Trying to display some images:

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

Code: [Select]
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/euroclub/17-07-05_LetsDance/thumb_20050717-euroclub_25.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/templiers/14-02-04_Lovenight/thumb_081.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/reservoir/23-03-05_Ganesh-ATF-Belladonne/thumb_20050323-rezervoirkaffe_53.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/salles_concerts/zenith/16-11-04_IsabelleBoulay/thumb_20041116_Zenith-34.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/bidule/22-07-05_DePassage/thumb_20050722-bidule_07.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/chesters/08-10-04_DJ_LFK/thumb_20041008_Chesters-04.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841

HTML tables > I'm working on a site I want to validate XHTML 1.0 strict ... dead for me.

What a pity, I feel a powerful stuff, but for newbies like me, it's hell.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2005, 05:58:25 am
Understand nothing ... too many variables, doc very hard to understand when you don't speak english ... and

Trying to display some images:

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

Code: [Select]
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/euroclub/17-07-05_LetsDance/thumb_20050717-euroclub_25.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/templiers/14-02-04_Lovenight/thumb_081.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/reservoir/23-03-05_Ganesh-ATF-Belladonne/thumb_20050323-rezervoirkaffe_53.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/salles_concerts/zenith/16-11-04_IsabelleBoulay/thumb_20041116_Zenith-34.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/bidule/22-07-05_DePassage/thumb_20050722-bidule_07.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/chesters/08-10-04_DJ_LFK/thumb_20041008_Chesters-04.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841

HTML tables > I'm working on a site I want to validate XHTML 1.0 strict ... dead for me.

What a pity, I feel a powerful stuff, but for newbies like me, it's hell.


I apologize for not translating the docs, I only know english. 

Can you point me at the url for the cftest page?  Possibly what version of cpmfetch you are using?  What web server?  What version of PHP?




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chupa2k on July 25, 2005, 08:37:40 am
Ok so what i need todo is put

$objCpm->cpm_OverrideUrlToCoppermine(http://www.toaster.co.il/community/gallery/);.

 ?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chupa2k on July 25, 2005, 09:26:09 am
Well with a bit of Machine Head and some help from you vuud everything works great .
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on July 25, 2005, 11:52:10 am
Understand nothing ... too many variables, doc very hard to understand when you don't speak english ... and

Trying to display some images:

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

Code: [Select]
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/euroclub/17-07-05_LetsDance/thumb_20050717-euroclub_25.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/templiers/14-02-04_Lovenight/thumb_081.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/reservoir/23-03-05_Ganesh-ATF-Belladonne/thumb_20050323-rezervoirkaffe_53.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/salles_concerts/zenith/16-11-04_IsabelleBoulay/thumb_20041116_Zenith-34.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/bidule/22-07-05_DePassage/thumb_20050722-bidule_07.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/chesters/08-10-04_DJ_LFK/thumb_20041008_Chesters-04.jpg

Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841

HTML tables > I'm working on a site I want to validate XHTML 1.0 strict ... dead for me.

What a pity, I feel a powerful stuff, but for newbies like me, it's hell.


I apologize for not translating the docs, I only know english.  

Can you point me at the url for the cftest page?  Possibly what version of cpmfetch you are using?  What web server?  What version of PHP?







Actually CPG server is very very slow (92 sec for 16 queries ...) hoping you can read.

url is http://www.sortons.net/cpmfetch/cftest.php

I'm using CPM FETCH 1.4, I have read step by step your guide line.

Linux Server, PHP/4.3.10

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 26, 2005, 06:07:25 am
Well with a bit of Machine Head and some help from you vuud everything works great .

So the previous post you did worked?  If so, I will document what that function does... :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 26, 2005, 06:15:51 am
Actually CPG server is very very slow (92 sec for 16 queries ...) hoping you can read.

I'm using CPM FETCH 1.4, I have read step by step your guide line.
Linux Server, PHP/4.3.10

Radinou,

You win a cookie for stumping me.  The errors you are getting on line 841 do not seem possible.  So please PM me an email address I can mail you a special test version of cpmfetch_dao to get some more information out of.  I did some checking and I can't come up with any reason you would have this happen.

Thanks and sorry for the confusion...

Vuud
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on July 26, 2005, 07:01:53 am
I had a similar error. The problem probably comes from the fact that the thumbnail and intermediate prefix are hard-coded into cpmFetch (instead of being pulled from the config as I suggested way back in an older thread that deals with cpmFetch) - you probably have one that differs from the default. Use the search and replace "thumb_" in the code with the prefix you have chosen. I'm currently looking into some other issues as well, will post my results as soon as I'm done.
My suggestion for future versions: as you're reluctant to add a query to the core of cpmFetch that looks settings up from coppermine's config table, I suggest adding a routine that caches those settings, or writes them into a setup file that get's included by cpmFetch. There's way too much hard-coded stuff in cpmFetch (e.g. the name of the albums folder as well). Another drawback is the use of tables with a fixed number of columns for the results, I'd rather have block elements with the float attribute set accordingly, will work for all screen resolutions without nasty white space. As I said above: I'll post my suggested code changes once I'm done with the hack.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 26, 2005, 03:00:26 pm
I had a similar error. The problem probably comes from the fact that the thumbnail and intermediate prefix are hard-coded into cpmFetch (instead of being pulled from the config as I suggested way back in an older thread that deals with cpmFetch) - you probably have one that differs from the default. Use the search and replace "thumb_" in the code with the prefix you have chosen. I'm currently looking into some other issues as well, will post my results as soon as I'm done.
My suggestion for future versions: as you're reluctant to add a query to the core of cpmFetch that looks settings up from coppermine's config table, I suggest adding a routine that caches those settings, or writes them into a setup file that get's included by cpmFetch. There's way too much hard-coded stuff in cpmFetch (e.g. the name of the albums folder as well). Another drawback is the use of tables with a fixed number of columns for the results, I'd rather have block elements with the float attribute set accordingly, will work for all screen resolutions without nasty white space. As I said above: I'll post my suggested code changes once I'm done with the hack.

If you are in fact, not using the default prefixes, check the cpmfetch.php file...  the first lines of actual code in there define what the prefixes are, so please avoid a search and replace!!  Who knows what evil that may wrought.

I'd love to hear the list of suggestions... I am not sure what you mean about the fixed table width... its requested by the user in the row, column entry...

Any ideas why the fileinfo() call does not return a 'dirname' index?

His PHP is like 4.3.x

Vuud




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: sublime on July 26, 2005, 08:03:29 pm
vuud,

I apologize if I am off-topic, but I have the following problem and would really appreciate some help:

I get the following error on my second instance of calling cpmfetch on my home page:

Code: [Select]
Fatal error: Call to undefined function: cpm_viewrandomtopratedmediafrom() in /home/ramoswa/public_html/waramos/home.php on line 242

My first call of cpmfetch works and is as follows:

Code: [Select]
<?php
include_once("/home/ramoswa/www/waramos/cpmfetch/coppermine.php");
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,57,array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
$objCpm->cpm_close();
?>


I'm having trouble with the second call to cpmfetch on my home page. The code is as follows:

Code: [Select]
<?php
require_once("/home/ramoswa/www/waramos/cpmfetch/coppermine.php");
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomTopRatedMediaFrom("","1","1",array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
$objCpm->cpm_close();
?>

I'm trying to get different random photos according to specific needs on one page. The first php code works to bring up a random photo from a specific album. The second one is trying to call a random photo of the toprated from all albums.  It seems that I cannot get a second random image using anything else but the
"viewwRandomMediaFromAlbum" function. Anything else I try, I get a "Call to Undefined Function" error.

You can view the page by going to:
http://www.waramos.com/test.php  (http://www.waramos.com/test.php) to see what I'm talking about.

Thanks!!  

~Sub
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: cannedfool on July 27, 2005, 01:13:49 am
hey can anyone help me

im running coppermine and smf (latest on both) and am trying to use the latest cpmfetch, when i run the test file i get mysql errors in the cpmfetch_deo.php file

see  http://www.uhcc.co.uk/cpmfetch/cftest.php

hope some1 can help
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 27, 2005, 03:55:55 am
vuud,

I apologize if I am off-topic, but I have the following problem and would really appreciate some help:

I get the following error on my second instance of calling cpmfetch on my home page:

Code: [Select]
Fatal error: Call to undefined function: cpm_viewrandomtopratedmediafrom() in /home/ramoswa/public_html/waramos/home.php on line 242

My first call of cpmfetch works and is as follows:

Code: [Select]
<?php
include_once("/home/ramoswa/www/waramos/cpmfetch/coppermine.php");
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,57,array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
$objCpm->cpm_close();
?>


I'm having trouble with the second call to cpmfetch on my home page. The code is as follows:

Code: [Select]
<?php
require_once("/home/ramoswa/www/waramos/cpmfetch/coppermine.php");
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomTopRatedMediaFrom("","1","1",array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
$objCpm->cpm_close();
?>

I'm trying to get different random photos according to specific needs on one page. The first php code works to bring up a random photo from a specific album. The second one is trying to call a random photo of the toprated from all albums.  It seems that I cannot get a second random image using anything else but the
"viewwRandomMediaFromAlbum" function. Anything else I try, I get a "Call to Undefined Function" error.

You can view the page by going to:
http://www.waramos.com/test.php  (http://www.waramos.com/test.php) to see what I'm talking about.

Thanks!! 

~Sub

Off topic?  No way - its more on topic than some posts! 

First off, don't open and close twice...  In all of my pages I have the open at the top and the close at the bottom.  Then I stick in calls throughout the page as needed.

So...

At the top of the page:
Code: [Select]
<?php
require_once("/home/ramoswa/www/waramos/cpmfetch/coppermine.php");
$objCpm = new cpm('/');
?>



At the the bottom of the page:
Code: [Select]
<?php
$objCpm
->cpm_close();
?>


The reason is that you are establishing the database connection twice!  Connecting is the most time consuming of all operations on a server.  Putting cpmfetch's open at the top starts the code, but it does not make a DB connection until you call for photos... then it keeps it till you close.  So having them is no harm really.

Otherwise, download the latest version 1.4.something and try that.  All your includes will now point to cpmfetch.php and NOT coppermine.php

Make those changes and let me know if it fixes the problem



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 27, 2005, 06:16:40 am
hey can anyone help me

im running coppermine and smf (latest on both) and am trying to use the latest cpmfetch, when i run the test file i get mysql errors in the cpmfetch_deo.php file

see  http://www.uhcc.co.uk/cpmfetch/cftest.php

hope some1 can help

Thank you for posting an example page... I appreciate it. 

Okay, the problem is in your version of php... its a bit older, but within what CPG supports, so I want mine to do the same.  I may have the issues worked out - or at least a stab at them

Try downloading development version 1.5.3 from my web site
http://cpmfetch.fistfullofcode.com

Let me know how that works out.  Even if you plan on upgrading PHP, please try this first.  If it bombs, let me know and I will check it again - but it will be progress.  I am almost sure of that.

Thanks

Vuud





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: cannedfool on July 27, 2005, 03:43:10 pm
worked  m8 thanks alot.

not sure if they are meant to but my images look grainy..

http://www.uhcc.co.uk/cpmfetch/cftest.php

thanks :)

edit: it looks fine on my site (http://www.uhcc.co.uk/home.php - bottom right)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: sublime on July 27, 2005, 04:48:24 pm
vuud,

You are the man!!  ;D

It works like a champ now! Thank you so much for your time and help with this!!

~Sub
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: sublime on July 27, 2005, 05:30:37 pm
vuud,

One other thing, I'm using the code you gave me to try and pull a random photo from my toprated.  It seems to be randomly choosing an image (Rated or NOT) from my entire gallery.  I am using Coppermine 1.4.1 and the latest cpmfetch.

Here's the code I'm using:

Code: [Select]
<?php
$objCpm
->cpm_viewRandomTopRatedMediaFrom("",1,1,array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
 
?>


You can go to my site at www.waramos.com/home.php  (http://www.waramos.com/home.php) to see what I'm talking about. The random photos in question is the one next to the "Your Opinion Counts!" section on the front page.

Any ideas? Thanks again!

~Sub
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 27, 2005, 08:21:24 pm
worked  m8 thanks alot.

not sure if they are meant to but my images look grainy..

http://www.uhcc.co.uk/cpmfetch/cftest.php

thanks :)

edit: it looks fine on my site (http://www.uhcc.co.uk/home.php - bottom right)


Ick...   Yeah, I have the test page resize to 150 wide for neatness (they are all the same).  So, its just the browser scaling up an image.  Everything is normal. 

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 27, 2005, 08:28:31 pm
vuud,

One other thing, I'm using the code you gave me to try and pull a random photo from my toprated.  It seems to be randomly choosing an image (Rated or NOT) from my entire gallery.  I am using Coppermine 1.4.1 and the latest cpmfetch.

Here's the code I'm using:

Code: [Select]
<?php
$objCpm
->cpm_viewRandomTopRatedMediaFrom("",1,1,array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
 
?>


You can go to my site at www.waramos.com/home.php  (http://www.waramos.com/home.php) to see what I'm talking about. The random photos in question is the one next to the "Your Opinion Counts!" section on the front page.

Any ideas? Thanks again!

~Sub


This feature was pretty tricky to implement... and even now, even after having the hand of vuud code it... it still is strange.  What happens is that cpmfetch does this when you call that feature.

1) Gets the total count for the area (album or category) you selected
2) Decides on a percentage to grab (25% is coded in there right now)
3) Grabs 25% of the entries in order of rating.
4) Randomly selects from that group

So you can see how if you have only a few images in there with ratings, say 5 out of 100, it would cause a problem.  The code will grab 25 out of the 100.

Your best bet may be to lower the threshold by editing cpmfetch_dao.php

Somewhere around line 50 (depending on the version you are running)

var $topPercentForMostViewed = 25;

Change the 25 to 5 or something

I will code into the next release an easier way to change it.  Having people edit the source is not a good thing.

Let me know if that answers your issue...  The random from top rated was a very icky thing. 

Vuud




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Anna on July 27, 2005, 10:54:14 pm
I'm new to this and I am a tad bit confused.

How can I display the list of albums from a certain category?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 28, 2005, 01:05:35 am
I'm new to this and I am a tad bit confused.

How can I display the list of albums from a certain category?

Interesting... that one has never come up before.

I don't think there is a way to list the albums in the a group of categories.  Be a neat feature though

CpmFetch has been mostly for retrieving stats and images.  I can probably add that to one of the upcoming dev releases maybe



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on July 28, 2005, 01:09:57 am
I'm crying, nothing works with me.

Fed up with this app' : great for all, but not for me :)

Keep up the work :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 28, 2005, 05:16:55 am
I'm crying, nothing works with me.

Fed up with this app' : great for all, but not for me :)

Keep up the work :)

Sorry to hear that... my last post regarding your problem and asking for you to PM me an email address I can send a test version too went unanswered.  I tried to support you, but if you want out... less for me to worry about. 

I think you may win something as the first person we did not get working with it... mostly because you would not help me help you probably.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on July 28, 2005, 06:12:39 am
don't worry, look at Rod's karma: it's not your fault nor the fault of cpmFetch, but a classical PEBCAK case imo. ;D
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 28, 2005, 03:12:06 pm
don't worry, look at Rod's karma: it's not your fault nor the fault of cpmFetch, but a classical PEBCAK case imo. ;D


Too bad, your thumbnail prefix solution was probably it...  The dirindex thing threw me off, but I traced it through and thats a symptom of it.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: sublime on July 28, 2005, 03:37:21 pm
vuud,

Tried to change the value of var $topPercentForMostViewed = 25;
 to a lower number (started at 5) and still no effect.  

I guess I should just waited until more of my photos are rated?

Thanks again vuud! cmpfetch is awesome!!   8)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 28, 2005, 07:23:07 pm
vuud,

Tried to change the value of var $topPercentForMostViewed = 25;
 to a lower number (started at 5) and still no effect. 

I guess I should just waited until more of my photos are rated?

Thanks again vuud! cmpfetch is awesome!!   8)


Depending on how may photos versus how many rated the 5 may need to be lower.  At 5 it basically means that if you have a 100 photos, it will use the top 5 (5% of 100 is 5) rated ones to randomly pick from.

Of course the whole thing could be screwed up anyway...  :)




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on July 28, 2005, 09:20:45 pm
don't worry, look at Rod's karma: it's not your fault nor the fault of cpmFetch, but a classical PEBCAK case imo. ;D

Thanx Gaugau :)

What's a pity you have in your hands a great app, and use it very bad.

Like someone who has the money to drive a ferrari, but rather a 2CV.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on July 28, 2005, 09:31:25 pm
Anyway ...

for many dev', it's more important to dev inutile plugin rather have a tableless CPG : it's true : PunBB, Nucleus, DotClear, and all "NEW APPs" have understood the power of CSS and XHTML, not you ... ok ok ... it's more important to integrate very loud functions to read flash, it's important to sort images by date (used by ... 1 ? 2 ? 3 ? 10 persons), it's not important to reduce requests, so important you have to buy a dedicated server ... yes. I'm proud to have my negative Karma : because you have a very old vision of the WEB. It's not my fault. I have given you a 90% tableless interface, but you were not interested ... in five years, maybe Coppermine will be the only app' on the web using table, clicking 10 pages to see only One picture ... no soucy !!! My problem is I'm designer, not coder ...

To vuud, I think like Gaugau you think me very dumb ... but I KNOW I have changed the prefix (thumb_ > tn_) ... but it doesnt' work. I'm not english, but I KNOW read it. Anyway to answer of this suggestion

Quote
I'm new to this and I am a tad bit confused.

How can I display the list of albums from a certain category?


Interesting... that one has never come up before.

I don't think there is a way to list the albums in the a group of categories.  Be a neat feature though

CpmFetch has been mostly for retrieving stats and images.  I can probably add that to one of the upcoming dev releases maybe

Imagine you have several pubs ... each pub has xxxx albums. Displaying each "good" album of each pub could be a cool idea. Or of course, displaying all the category "pub" when you are on the pub's page.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 28, 2005, 10:21:43 pm

First off, if you have a problem with CPG take it to one of the other forums, this is not the place for the your vision does not match mine so it sucks discussion.  I am sorely tempted to delete you post from here because it does actually no good whatsoever.  Thats all I am gonna say on that topic.  There are boards here for that sort of thing.  Further posts along those lines in this section will be deleted

As for this:

To vuud, I think like Gaugau you think me very dumb ... but I KNOW I have changed the prefix (thumb_ > tn_) ... but it doesnt' work. I'm not english, but I KNOW read it.

Well thanks for letting me know just after you post negative remarks about my code.  Great.  Wonderful.  Endearing.  I don't think your dumb, you just did not 1) Let us know you tried the thumbnails and 2) Did not follow my request for an email address to send a new version too.

Okay, you changed the thumbnail prefix, I will look up the cftest.php you submitted before.and see what else I can do...




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on July 28, 2005, 11:55:47 pm
As there is no index.htm / php on the cpmfetch dir, you can download the files to see where is it's "wrong" ...
http://www.sortons.net/cpmfetch/
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 29, 2005, 01:17:23 am
As there is no index.htm / php on the cpmfetch dir, you can download the files to see where is it's "wrong" ...
http://www.sortons.net/cpmfetch/

That does not work.  PHP is recognized by the server, and executed when called.  If I was able to just download a php file, then that would mean your server was incredibly misconfigured.

Make a copy of your cpmfetch.php to a file named cpmfetch.php.html so I can look at that please.

Thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on July 29, 2005, 01:20:52 am
Done :)

Server seems to be OK ... but if you have ideas to configure it better, I take :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 29, 2005, 02:23:43 am
Done :)

Server seems to be OK ... but if you have ideas to configure it better, I take :)

Hey,

You did the wrong file...  cfig_random.php  NOT cpmfetch.php...

But the server executed the PHP in it anyway so ...

copy cpmfetch.php to cpmfetch.php.txt

It should not execute that anyway


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on July 29, 2005, 03:08:20 am
Done (bis)

:)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on July 29, 2005, 03:13:54 am
Like the Song of Danny Elfman for the last film of Tim Burton, about Augustus Gloop

"A miracle has taken place, a miracle has taken place"

I have renamed in .txt ... reupload the 2 files (php and txt) ... and ... !!!!!!!!!! It works !

I have not the logic in php/mysql ... and with this, I understand less :)

Now learn how to USE it ...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 29, 2005, 06:03:11 am

Your crazy... ;)  Adding the text file does nothing. 

What happened was that you did not upload the changed file with the thumb_ versus tn_ before.  I looked at the cftest.php when I posted last and it was going after your files with thumb_ not tn_ ... I wanted to see the cpmfetch.php file to make sure that was the case.

In any case, I am glad it is working for you


Like the Song of Danny Elfman for the last film of Tim Burton, about Augustus Gloop

"A miracle has taken place, a miracle has taken place"

I have renamed in .txt ... reupload the 2 files (php and txt) ... and ... !!!!!!!!!! It works !

I have not the logic in php/mysql ... and with this, I understand less :)

Now learn how to USE it ...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on July 29, 2005, 01:09:58 pm
I forgot to upload, indeed > Very dumb ... and yes, very crazy too ... :( don't bite me ! :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 29, 2005, 04:41:29 pm
I forgot to upload, indeed > Very dumb ... and yes, very crazy too ... :( don't bite me ! :)

No problem - I've made mistakes before that are waaaaay beyond that.  Glad its working for you now

Have a nice day
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hamsterpants on July 29, 2005, 05:59:05 pm
Hi all,

Not sure if this is a coppermine question of CMPFetch question. I want to display the top rated pictures down the side of my page in the coppermine gallary, which I have been able to do. The problem or question is how do I prevent these images showing unless the user is logged in. I currently require users to be logged in before they can view any images.

Thanks in advance
Dill
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hamsterpants on July 29, 2005, 06:19:07 pm
another question, can you use fmpfetch to get images from a coppermin installation on another domain? Sorry if this has allready been answered, I did search, I promise, please point me to the post

Thanks
Dill
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 29, 2005, 06:52:26 pm
another question, can you use fmpfetch to get images from a coppermin installation on another domain? Sorry if this has allready been answered, I did search, I promise, please point me to the post

Thanks
Dill

Yes and no... You can use cfimageget.php to access images on another server, or if you are big with javascript, you could probably use cfrssget.php to get a bunch of images and parse the rss and display them like that.

You cannot use cfimageget directly onto another domain since it needs to have access to see what files are available on the drive.  Since CPG will not make a file named normal_ if the picture you uploaded is already the right size.

Ah well... let me know how things work out... I'd be interested if the rss thing worked for you.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 29, 2005, 06:53:27 pm
Hi all,

Not sure if this is a coppermine question of CMPFetch question. I want to display the top rated pictures down the side of my page in the coppermine gallary, which I have been able to do. The problem or question is how do I prevent these images showing unless the user is logged in. I currently require users to be logged in before they can view any images.

Thanks in advance
Dill

I'd assume you'd have to code it into your template to only do it if they are logged in... not sure how though
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 30, 2005, 06:08:35 am
another question, can you use fmpfetch to get images from a coppermin installation on another domain? Sorry if this has allready been answered, I did search, I promise, please point me to the post

Thanks
Dill

Pants of Hamster...

I've been drinking beer and mulling over my comment about using RSS feeds to show content on a different site.  I now, thanks to the magic of hops and the divine fermentation, have a new idea.

1) Create a php page on your site using the traditional cpmfetch methodologies.   Have it display whatever you want for the other site

2) Make it so that it prefixes it with    document.write("

3) Make it postfix it with    ")

4) On the other site, enter in something like

<script language="JavaScript"
        src="http://www.yourdomainname.com/phpfile.php">
</script>

In theory it should generate the html and then send it to your other web site.  In theory. 

The only problem I can think of is that the full url will not be added in.  You may have to invoke the function about overriding the url to cpg... its in the docs under functions, forget the name of it.

Let me know if this works,  a few beers and I want to know





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 30, 2005, 06:58:52 am
Well, I am going to release a new stable version in a few days.  If anyone feels up to it, please test the latest dev version from

http://cpmfetch.fistfullofcode.com

and PM if it works for you or not.

In other news, I am in need of help for the documentation aspect... if anyone feels like writing up something, example, corrections - ANYTHING for the docs, send them on over.  Full credit given.

The docs are online at the above site... they are as new as the day you look at them (I don't hold anything back).

Thanks much

Vuud
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on July 30, 2005, 07:19:16 am
2) Make it so that it prefixes it with    document.write("
3) Make it postfix it with    ")
4) On the other site, enter in something like

<script language="JavaScript"
        src="http://www.yourdomainname.com/phpfile.php">
</script>

In theory it should generate the html and then send it to your other web site.  In theory. 
Why use buggy JavaScript instead of actually pulling the content using php's include? The only thing you'll need is: your webhost on the server you're pulling from must allow url_fopen. Just try it, create a test file with this code:
Code: [Select]
<?php
include('http://mysite.tld/testpage.php');
?>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 30, 2005, 07:54:52 am
2) Make it so that it prefixes it with    document.write("
3) Make it postfix it with    ")
4) On the other site, enter in something like

<script language="JavaScript"
        src="http://www.yourdomainname.com/phpfile.php">
</script>

In theory it should generate the html and then send it to your other web site.  In theory. 
Why use buggy JavaScript instead of actually pulling the content using php's include? The only thing you'll need is: your webhost on the server you're pulling from must allow url_fopen. Just try it, create a test file with this code:
Code: [Select]
<?php
include('http://mysite.tld/testpage.php');
?>

Interesting...  I assume that will execute the php on the remote site then?  I suppose it would be a horrible security risk if it did not :)

Worth trying I'd say
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on July 30, 2005, 08:00:41 am
Details: http://www.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: reyn on July 30, 2005, 05:31:16 pm
Help required please, Running local IIS 5.1 server, php 4.3.10, Win XP Pro, MySql 4.1, cpmfetch 1.5.3
I have run cftest.php and get two Bads and an error message.

5   You set your partial URL to ../../cpg141   PASS
10   No dots in partial url   PASS
15   coppermine.php found   PASS
20   coppermine_dao.php has been removed   PASS
25   cpmfetch.php found   PASS
30   cpmfetch_dao.php found   PASS
35   Server OS = Windows NT OMEGA 5.1 build 2600   INFO
40   WebServer = Microsoft-IIS/5.1   INFO
45   PHP Version = 4.3.10   INFO
55   DOCUMENT_ROOT: Not found   BAD
60   C_DOCUMENT_ROOT: Not found   INFO
65   doc_root: Not found (IIS Servers only)   INFO
70   SCRIPT_FILENAME: Not found   BAD
75   DOCUMENT_ROOT is a good match   PASS
80   Found CPG config file   PASS

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in g:\LocalWebSites\kuckoo\cpg141\cpmfetch\cpmfetch_dao.php on line 686

Oh dear! what does all this mean?
With a little help I may yet get there.

Frank

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on July 31, 2005, 09:23:59 am
IIS is notorious for not populating all required server vars, which appears to be the case for your setup (no DOCUMENT_ROOT and no SCRIPT_FILENAME). Use phpinfo() to find out what server var holds the information that is needed. Have I ranted in this thread already that self-hosting is not recommended, especially on a non-server-OS ;)?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hamsterpants on July 31, 2005, 12:10:55 pm
Why use buggy JavaScript instead of actually pulling the content using php's include? The only thing you'll need is: your webhost on the server you're pulling from must allow url_fopen. Just try it, create a test file with this code:
Code: [Select]
<?php
include('http://mysite.tld/testpage.php');
?>

Ok Not sure if I understand, so this is what I tried.

I created a file called cmp.php in the root of the site that I want to get the images from (file contents):

<?php  
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("/photoalbum");
         #$objCpm->cpm_viewRandomMedia(5,1);
         #$objCpm->cpm_viewMostVotedMedia(1,1);
         #$objCpm->cpm_viewRandomMostVotedMediaFrom("",5,1);
         #$objCpm->cpm_viewTopRatedMediaFrom("",5,1,array("alttag" => "filename: %f, voted %V of 5 (%v votes)"));
         
         $styleguide = array(
            "linkstyle" => "topratedlink",
            "alttag" => "voted: %V",
            "subtitle" => "voted: %V",
            "imagestyle" => "topratedimg",
            "tdstyle" => "admin_menu",
            "imagesize" => 'thumb');
            
            $objCpm->cpm_setReturnType('print');
            $data = $objCpm->cpm_viewTopRatedMediaFrom ("", 5, 1, $styleguide);
            
         $objCpm->cpm_close();
         
?>

I then use a php include   include('http://www.mystaffie.com/cmp.php'); on the site that I want to display the images. It is getting the correct images but looking on the wrong domain. I have left everything as is so if you would like to have a look at what I mean:

http://www.mystaffie.com - the site I want to pull the images from
http://www.hamsterpants.com - the site I would ike to display the images on

Thanks agan for your help.

Dill
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: reyn on July 31, 2005, 05:27:54 pm
IIS is notorious for not populating all required server vars, which appears to be the case for your setup (no DOCUMENT_ROOT and no SCRIPT_FILENAME). Use phpinfo() to find out what server var holds the information that is needed. Have I ranted in this thread already that self-hosting is not recommended, especially on a non-server-OS ;)?

I should think so, definitely not the thing todo. ::) I should have mentioned that the setup is only local and used for testing before uploading. I have changed one of the BAD lines by changing SCRIPT_FILENAME to SCRIPT_NAME apparently IIS knows nothing about the former. To see if my setup has anything todo with the errors I have uploaded to my host and run cftest.php again with the same results. Is DOCUMENT_ROOT actually used to make it work? my host's phpinfo also shows no data for doc_root. Does anyone have the code working on a IIS server? My test site is http://www.kuckoo.co.uk/cpg141 

Frank
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 31, 2005, 06:08:38 pm
IIS is notorious for not populating all required server vars, which appears to be the case for your setup (no DOCUMENT_ROOT and no SCRIPT_FILENAME). Use phpinfo() to find out what server var holds the information that is needed. Have I ranted in this thread already that self-hosting is not recommended, especially on a non-server-OS ;)?

Not in this thread, but I agree with you 100%. 

One person I know fixed this by adding the DOCUMENT_ROOT into the coppermine gallery config file so it was set when cpmfetch imported it.

That aside, everytime I think I found a constant variable I can use in IIS, the next person has it completely different.

I hate IIS.  Thats just my opinion, but a desktop O/S trying to be a server is just a bad idea. 

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 31, 2005, 06:13:48 pm

Your doing great...

I am on holiday, so I don't have it in front of me, but look at the docs on my web site... in the functions section there is a function named cpm_overideUrlToCoppermine or something like that.

Call that one right after the new with the FULL url to coppermine

http://www.sitename.com/photos or something like that.

Should fix what ails you


Why use buggy JavaScript instead of actually pulling the content using php's include? The only thing you'll need is: your webhost on the server you're pulling from must allow url_fopen. Just try it, create a test file with this code:
Code: [Select]
<?php
include('http://mysite.tld/testpage.php');
?>

Ok Not sure if I understand, so this is what I tried.

I created a file called cmp.php in the root of the site that I want to get the images from (file contents):

<?php 
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("/photoalbum");
         #$objCpm->cpm_viewRandomMedia(5,1);
         #$objCpm->cpm_viewMostVotedMedia(1,1);
         #$objCpm->cpm_viewRandomMostVotedMediaFrom("",5,1);
         #$objCpm->cpm_viewTopRatedMediaFrom("",5,1,array("alttag" => "filename: %f, voted %V of 5 (%v votes)"));
         
         $styleguide = array(
            "linkstyle" => "topratedlink",
            "alttag" => "voted: %V",
            "subtitle" => "voted: %V",
            "imagestyle" => "topratedimg",
            "tdstyle" => "admin_menu",
            "imagesize" => 'thumb');
            
            $objCpm->cpm_setReturnType('print');
            $data = $objCpm->cpm_viewTopRatedMediaFrom ("", 5, 1, $styleguide);
            
         $objCpm->cpm_close();
         
?>

I then use a php include   include('http://www.mystaffie.com/cmp.php'); on the site that I want to display the images. It is getting the correct images but looking on the wrong domain. I have left everything as is so if you would like to have a look at what I mean:

http://www.mystaffie.com - the site I want to pull the images from
http://www.hamsterpants.com - the site I would ike to display the images on

Thanks agan for your help.

Dill
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hamsterpants on August 01, 2005, 10:54:02 am
Hi Vuud,

I can’t tell you how much I appreciate your help, especially while on holiday :). Anyways, when you get back from hols maybe you can give us some more help. I think it is my knowledge and understanding of PHP that is actually letting me down here. I found the function that you were talking about, but to be honest I am not sure how I need to use it. This is what I tried; almost feel embarrassed putting this up here. Anyways if you can point us in the right direction that would be great. Hope you enjoy your hols:

<?php  
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("http://www.mystaffie.com/photoalbum");
         $objCpm->cpm_OverrideUrlToCoppermine($newpath_);

         
         $styleguide = array(
            "linkstyle" => "topratedlink",
            "alttag" => "voted: %V",
            "subtitle" => "voted: %V",
            "imagestyle" => "topratedimg",
            "tdstyle" => "admin_menu",
            "imagesize" => 'thumb');
            
            $objCpm->cpm_setReturnType('print');
            $data = $objCpm->cpm_viewTopRatedMediaFrom ("", 5, 1, $styleguide);
            
         $objCpm->cpm_close();
         
?>

Thanks
Dill
EDITED ->

Wanted to add, this is the error I receive. Plus side is although it is an error it is pointing to the correct domain:

ERROR: Path to Coppermine incorrect. (/home/mystaffi/public_htmlhttp://www.mystaffie.com/photoalbum//include/config.inc.php)

Dill


Your doing great...

I am on holiday, so I don't have it in front of me, but look at the docs on my web site... in the functions section there is a function named cpm_overideUrlToCoppermine or something like that.

Call that one right after the new with the FULL url to coppermine

http://www.sitename.com/photos or something like that.

Should fix what ails you


Why use buggy JavaScript instead of actually pulling the content using php's include? The only thing you'll need is: your webhost on the server you're pulling from must allow url_fopen. Just try it, create a test file with this code:
Code: [Select]
<?php
include('http://mysite.tld/testpage.php');
?>

Ok Not sure if I understand, so this is what I tried.

I created a file called cmp.php in the root of the site that I want to get the images from (file contents):

<?php  
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("/photoalbum");
         #$objCpm->cpm_viewRandomMedia(5,1);
         #$objCpm->cpm_viewMostVotedMedia(1,1);
         #$objCpm->cpm_viewRandomMostVotedMediaFrom("",5,1);
         #$objCpm->cpm_viewTopRatedMediaFrom("",5,1,array("alttag" => "filename: %f, voted %V of 5 (%v votes)"));
         
         $styleguide = array(
            "linkstyle" => "topratedlink",
            "alttag" => "voted: %V",
            "subtitle" => "voted: %V",
            "imagestyle" => "topratedimg",
            "tdstyle" => "admin_menu",
            "imagesize" => 'thumb');
            
            $objCpm->cpm_setReturnType('print');
            $data = $objCpm->cpm_viewTopRatedMediaFrom ("", 5, 1, $styleguide);
            
         $objCpm->cpm_close();
         
?>

I then use a php include   include('http://www.mystaffie.com/cmp.php'); on the site that I want to display the images. It is getting the correct images but looking on the wrong domain. I have left everything as is so if you would like to have a look at what I mean:

http://www.mystaffie.com - the site I want to pull the images from
http://www.hamsterpants.com - the site I would ike to display the images on

Thanks agan for your help.

Dill
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 01, 2005, 04:48:37 pm
I think you mean this...

Code: [Select]

include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photoalbum");
$objCpm->cpm_OverrideUrlToCoppermine("http://www.mystaffie.com/photoalbum");

Keep the other lines that come after this part... just change the above to these settings

Hope that helps


<?php 
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("http://www.mystaffie.com/photoalbum");
         $objCpm->cpm_OverrideUrlToCoppermine($newpath_);

    ... snip...
         
?>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hamsterpants on August 01, 2005, 05:44:36 pm
Arr man I could just jump for joy, I was really excited when I saw your reply and tried it out right away, althou it didn't work fisrt time, had a quick look and noticed a "/" missing


$objCpm->cpm_OverrideUrlToCoppermine("http://www.mystaffie.com/photoalbum");
should be
$objCpm->cpm_OverrideUrlToCoppermine("http://www.mystaffie.com/photoalbum/");

But I am not complaining only mentioning it incase anyone else is interested in what I was trying to do.

Once again a HUGE big thankyou.

Dill

I think you mean this...

Code: [Select]

include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photoalbum");
$objCpm->cpm_OverrideUrlToCoppermine("http://www.mystaffie.com/photoalbum");

Keep the other lines that come after this part... just change the above to these settings

Hope that helps


<?php 
         include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm("http://www.mystaffie.com/photoalbum");
         $objCpm->cpm_OverrideUrlToCoppermine($newpath_);

    ... snip...
         
?>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 02, 2005, 12:58:20 am

Excellent - hopefully I will remember to add that to the docs! :D


Arr man I could just jump for joy, I was really excited when I saw your reply and tried it out right away, althou it didn't work fisrt time, had a quick look and noticed a "/" missing
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: anika on August 05, 2005, 02:54:18 pm
hi guys! :) im totally  new with php and i need all the help i can get

how come this code:

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

totally works great when my .php file is in the cpmfetch directory
and it doesnt work at all when i tried it in my http://www.site.com/index.php ?

and really need a big help with this one i cant figure it out i tried reading the .doc but nothing seems to work
can anyone show me what code to place when i want my pictures when click opens in a new browser?

hope you can help me owt  :)


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 05, 2005, 04:08:12 pm
Well, I was going to give you kudos for providing a link to the page with the error (which helps immensly when trying to figure out what part is not working).

I mean, picture calling a mechanic and saying "My car does not work, how much to fix it?".  Anyway I digress...

Please post a link to the cftest page, and the error you are getting and where your cpmfetch folder is installed.

Thanks

Vuud



hi guys! :) im totally  new with php and i need all the help i can get

how come this code:

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

totally works great when my .php file is in the cpmfetch directory
and it doesnt work at all when i tried it in my http://www.site.com/index.php ?

and really need a big help with this one i cant figure it out i tried reading the .doc but nothing seems to work
can anyone show me what code to place when i want my pictures when click opens in a new browser?

hope you can help me owt  :)



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: reyn on August 05, 2005, 10:54:24 pm
IIS is notorious for not populating all required server vars, which appears to be the case for your setup (no DOCUMENT_ROOT and no SCRIPT_FILENAME). Use phpinfo() to find out what server var holds the information that is needed. Have I ranted in this thread already that self-hosting is not recommended, especially on a non-server-OS ;)?

Not in this thread, but I agree with you 100%. 

One person I know fixed this by adding the DOCUMENT_ROOT into the coppermine gallery config file so it was set when cpmfetch imported it.

That aside, everytime I think I found a constant variable I can use in IIS, the next person has it completely different.

I hate IIS.  Thats just my opinion, but a desktop O/S trying to be a server is just a bad idea. 

Ok I give in, I have changed remote host to site5.com (unix/apache/php4/mysql4) I have also installed wampserver on my local machine. Now to see if it all comes together!

Frank


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: reyn on August 06, 2005, 12:23:30 am
Quote
Ok I give in, I have changed remote host to site5.com (unix/apache/php4/mysql4) I have also installed wampserver on my local machine. Now to see if it all comes together!

I have installed cpmfetch 1.4 and 1.5 just renaming the 1.4 dir to cpmfetch_14. Made the same change to cftest.php in both versions. I now have Pass on all required lines in both versions and with 1.4 I see the thumbnails (it works). With 1.5 I see no thumbs and get this error.

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

Frank
ps: I did not realise how good the program is, clicking the thumbnails and being taken to the intermediate picture in coppermine is excellent.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 06, 2005, 01:15:18 am
Quote
Ok I give in, I have changed remote host to site5.com (unix/apache/php4/mysql4) I have also installed wampserver on my local machine. Now to see if it all comes together!

I have installed cpmfetch 1.4 and 1.5 just renaming the 1.4 dir to cpmfetch_14. Made the same change to cftest.php in both versions. I now have Pass on all required lines in both versions and with 1.4 I see the thumbnails (it works). With 1.5 I see no thumbs and get this error.

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

Frank
ps: I did not realise how good the program is, clicking the thumbnails and being taken to the intermediate picture in coppermine is excellent.

I think over all you will be happier with unix hosting... I had to deal with a windows web server the other day and had a horrible time of it...  But anyway...

Make sure you have version 1.5.3 from the web site... I think there was a problem with this in one of the earlier 1.5.x series
http://www.fistfullofcode.com/projects/copperminefetch/downloads.php

If that is not it, what version of cpg are you using?

Thanks

Vuud

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: reyn on August 06, 2005, 08:06:17 am
Quote
Make sure you have version 1.5.3 from the web site... I think there was a problem with this in one of the earlier 1.5.x series
http://www.fistfullofcode.com/projects/copperminefetch/downloads.php

If that is not it, what version of cpg are you using?

I have cpmfetch 1.5.3 and Coppermine 1.4.1 Beta.  also  Apache 1.3.33
- MySQL 4.1.10a and  PHP4.3.11

Hope this helps you - to help me.

Thanks
Frank
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 06, 2005, 07:29:08 pm
Quote
Make sure you have version 1.5.3 from the web site... I think there was a problem with this in one of the earlier 1.5.x series
http://www.fistfullofcode.com/projects/copperminefetch/downloads.php

If that is not it, what version of cpg are you using?

I have cpmfetch 1.5.3 and Coppermine 1.4.1 Beta.  also  Apache 1.3.33
- MySQL 4.1.10a and  PHP4.3.11

Hope this helps you - to help me.

Thanks
Frank

Ah phooey.  I tried the beta awhile back, before adding the user web stuff... Ironically I was planning on upgrading my stuff to the beta's now so...

Give me a day or two and I should have resolution for you



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: anika on August 06, 2005, 08:00:53 pm
sorry for my newbie post..

i tried the php code in http://www.mysite.com/gallery/cpmfetch/randomimages.php
and it works great!

but when i tried it in my index page:
this is what i got when i posted the php code in the http://www.mysite.com/index.php


Warning: main(./cpmfetch.php): failed to open stream: No such file or directory in /home/nbeltran/public_html/index3.php on line 192

Warning: main(./cpmfetch.php): failed to open stream: No such file or directory in /home/nbeltran/public_html/index3.php on line 192

Warning: main(): Failed opening './cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nbeltran/public_html/index3.php on line 192

Fatal error: Cannot instantiate non-existent class: cpm in /home/nbeltran/public_html/index3.php on line 193
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 07, 2005, 02:19:45 am
sorry for my newbie post..

i tried the php code in http://www.mysite.com/gallery/cpmfetch/randomimages.php
and it works great!

but when i tried it in my index page:
this is what i got when i posted the php code in the http://www.mysite.com/index.php

Warning: main(./cpmfetch.php): failed to open stream: No such file or directory in /home/nbeltran/public_html/index3.php on line 192

Warning: main(./cpmfetch.php): failed to open stream: No such file or directory in /home/nbeltran/public_html/index3.php on line 192

Warning: main(): Failed opening './cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nbeltran/public_html/index3.php on line 192

Fatal error: Cannot instantiate non-existent class: cpm in /home/nbeltran/public_html/index3.php on line 193


Part of the code you inserted in your main page is an include statement that says "./cpmfetch.php".  That is wrong now that you are in a different directory.

If the file you are using is in the same directory the cpmfetch DIRECTORY is in...  it should be "./cpmfetch/cpmfetch.php"

If we were all still using DOS, this would not be an issue :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 07, 2005, 06:37:22 am
Quote
Make sure you have version 1.5.3 from the web site... I think there was a problem with this in one of the earlier 1.5.x series
http://www.fistfullofcode.com/projects/copperminefetch/downloads.php

If that is not it, what version of cpg are you using?

I have cpmfetch 1.5.3 and Coppermine 1.4.1 Beta.  also  Apache 1.3.33
- MySQL 4.1.10a and  PHP4.3.11

Hope this helps you - to help me.

Thanks
Frank


Frank,

I checked out the code for the beta 1.4.1 today, and the problem is that the database layout changed slightly...

I am not sure how I am going to handle this, but rest assured I will.  Its just like 1am here and I don't want to think.

But in the meantime - if you feel brave and stuff... open up cpmfetch_dao in your favorite editor and find this line

(should be around line 50)

Code: [Select]
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 replace it with

Code: [Select]
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';
The only other caveat is that you should be careful with subtitles and avoid any thing that looks like it would display:

user_website
user_location
user_interests
user_occupation

As these are handled differently under 1.4.1

THIS APPLIES TO CpmFetch 1.5.x Only.  I will fix this at some point soon (as I am moving to the beta) and will post a new version.

Hope this at least gets you working... I'd be very interested to hear of any other issues you may encounter under the beta

Thanks!

Vuud







Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: reyn on August 07, 2005, 01:55:13 pm
Quote
Frank,
The only other caveat is that you should be careful with subtitles and avoid any thing that looks like it would display:
user_website
user_location
user_interests
user_occupation
As these are handled differently under 1.4.1
THIS APPLIES TO CpmFetch 1.5.x Only.  I will fix this at some point soon (as I am moving to the beta) and will post a new version.
Hope this at least gets you working... I'd be very interested to hear of any other issues you may encounter under the beta
Thanks!
Vuud

cftest.php now works ok in cpmfetch 1.5.3 I can see and activate the thumbnails.
Now I will be a bit more adventurous and include some code in my site, if anything shows up I will post here.

I have registered with your mail service so I should get notified when you update.

Sorry to keep you up, have a nice Sunday. It's 12:53 pm here, maybe your still asleep. :)

Frank

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 07, 2005, 03:59:31 pm
Quote
Frank,
The only other caveat is that you should be careful with subtitles and avoid any thing that looks like it would display:
user_website
user_location
user_interests
user_occupation
As these are handled differently under 1.4.1
THIS APPLIES TO CpmFetch 1.5.x Only.  I will fix this at some point soon (as I am moving to the beta) and will post a new version.
Hope this at least gets you working... I'd be very interested to hear of any other issues you may encounter under the beta
Thanks!
Vuud

cftest.php now works ok in cpmfetch 1.5.3 I can see and activate the thumbnails.
Now I will be a bit more adventurous and include some code in my site, if anything shows up I will post here.

I have registered with your mail service so I should get notified when you update.

Sorry to keep you up, have a nice Sunday. It's 12:53 pm here, maybe your still asleep. :)

Frank


Absolutely... I may also make a new release with a patch and post it just and notify the list.

Whatever I do, I will make it clear on the announcement list whats up with 1.4.x compatibility

Thanks for the help

Vuud
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nanno on August 08, 2005, 09:51:46 pm
I'm trying to get cpmfetch working but don't seem to get to view the thumbnails when trying cftest
...........
Tests:
5   You set your partial URL to /coppermine   PASS
10   No dots in partial url   PASS
15   coppermine.php found   PASS
20   coppermine_dao.php has been removed   PASS
25   cpmfetch.php found   PASS
30   cpmfetch_dao.php found   PASS
35   Server OS = Linux mali.sslcatacombnetworking.com 2.4.21-15.0.3.EL #1 Tue Jun 29 18:17:52 EDT 2004 i686   INFO
40   WebServer = Apache   INFO
45   PHP Version = 4.3.10   INFO
55   DOCUMENT_ROOT: /home/knobben/public_html   INFO
60   C_DOCUMENT_ROOT: Not found   INFO
65   doc_root: Not found (IIS Servers only)   INFO
70   SCRIPT_FILENAME: /home/knobben/public_html/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
Error in getImageTouse: Extension (strtolower): .jpg File:/home/knobben/public_html/coppermine//albums/miami2003/thumb_117-1783_STG.JPG
Error in getImageTouse: Extension (strtolower): .jpg File:/home/knobben/public_html/coppermine//albums/miami2003/thumb_120-2031_IMG.JPG
..........

My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG

where can I find (and change) these settings?

greetings, Nanno
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: laetitia2382 on August 08, 2005, 11:07:32 pm
I have just discovered Coppermine Fetch. I read that it could display random photo and latest photo but can it display all the photo of an album?

I am doing a website for an association. In this website, all members of the association will havehis own page. And, in this page, I will describe first the member and after I want to add his album on the page. The album will be created first in the coppermine gallery.
So can comfetch do this?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on August 08, 2005, 11:25:19 pm
yes. Why don't you just give it a try?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: laetitia2382 on August 08, 2005, 11:51:27 pm
It's a little bit complicated because I am using Mambo. I need first to integrate coppermine with mambo and after i need to use a module to integrate the php code. That's why I need to know that cpmfetch do exactly what I want. But if you tell me that I can integrate an album in a page with cpmfetch, I will try. ;)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 09, 2005, 01:46:35 am
I'm trying to get cpmfetch working but don't seem to get to view the thumbnails when trying cftest
...........
Tests:
5   You set your partial URL to /coppermine   PASS

My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG

Edit the top of the cpmtest file and look for the line that says to change it to your directory.
Change it to /fotoalbums

The instructions are also online at: http://www.fistfullofcode.com/projects/copperminefetch/manual/ch04s02.html

If you are interested in that sort of thing

;)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 09, 2005, 01:49:00 am
It's a little bit complicated because I am using Mambo. I need first to integrate coppermine with mambo and after i need to use a module to integrate the php code. That's why I need to know that cpmfetch do exactly what I want. But if you tell me that I can integrate an album in a page with cpmfetch, I will try. ;)

Well, you can ask for photos from an album and specify a certain amount.  If you ask for too much it will only give you what is there.

Examples of what it can do are on the web site... see examples under

http://www.fistfullofcode.com/projects/copperminefetch/docs.php
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nanno on August 09, 2005, 09:06:15 am
I'm trying to get cpmfetch working but don't seem to get to view the thumbnails when trying cftest
...........
Tests:
5   You set your partial URL to /coppermine   PASS

My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG

Edit the top of the cpmtest file and look for the line that says to change it to your directory.
Change it to /fotoalbums

The instructions are also online at: http://www.fistfullofcode.com/projects/copperminefetch/manual/ch04s02.html

If you are interested in that sort of thing

;)


when i change the cftest file that way and then after running it 
(http://www.knobben.net/cpmfetch/cftest.php)
 i see

----

80 CPG Config file not found: /home/knobben/public_html/fotoalbums/include/config.inc.php FAIL

----

my cpg installation is in /home/knobben/public_html/coppermine
and my pictures are stored in /home/knobben/public_html/fotoalbums

do I need to move the pictures to /home/knobben/public_html/coppermine/fotoalbums to get cpmfetch working?
or do i have other options?

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 09, 2005, 03:02:29 pm
I'm trying to get cpmfetch working but don't seem to get to view the thumbnails when trying cftest
...........
Tests:
5   You set your partial URL to /coppermine   PASS

My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG

Edit the top of the cpmtest file and look for the line that says to change it to your directory.
Change it to /fotoalbums

The instructions are also online at: http://www.fistfullofcode.com/projects/copperminefetch/manual/ch04s02.html

If you are interested in that sort of thing

;)


when i change the cftest file that way and then after running it
(http://www.knobben.net/cpmfetch/cftest.php)
 i see

----

80 CPG Config file not found: /home/knobben/public_html/fotoalbums/include/config.inc.php FAIL

----

my cpg installation is in /home/knobben/public_html/coppermine
and my pictures are stored in /home/knobben/public_html/fotoalbums

do I need to move the pictures to /home/knobben/public_html/coppermine/fotoalbums to get cpmfetch working?
or do i have other options?



Ohhhhhhh, my bad.  I did not know you could put photos outside of the cpg folder.  Dang.  Just waking up here, check back later... I will figure something out.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: tgelston on August 09, 2005, 10:00:41 pm
Nice work on the Fetch scripts



Two questions-



How can I select a precise image from an album. I have an album of 180 pics from my latest trip - I have a 5 page journal that I want to pull in 5-10 photos on each page that correspond to the journal info. I could do this manually but I would rather use yoru script.



How can I disable the tables.   I would like just the image and link to be returned.



Thanks,

Tobias
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 09, 2005, 10:26:00 pm
Nice work on the Fetch scripts

Thanks


How can I select a precise image from an album. I have an album of 180 pics from my latest trip - I have a 5 page journal that I want to pull in 5-10 photos on each page that correspond to the journal info. I could do this manually but I would rather use yoru script.

There is a function you can call that will allow you to call a photo by PID (Photo ID Number)  See the docs here:

cpm_viewMediaByPid at

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s03.html


How can I disable the tables.   I would like just the image and link to be returned.

You would have to code a bit of php on your end, but you can use cpmfetch to get the filename and the link and put it together.

Here are some examples of extending it...

http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php

Let me know if you find an easy way to get the PID for an image :)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: tgelston on August 09, 2005, 10:39:52 pm
AH!


Quote
cpm_viewMediaByPid at

I had tried that earlier today and it didn't seem to work.  User error I guess because it just worked fine! Thanks!


Quote
You would have to code a bit of php on your end, but you can use cpmfetch to get the filename and the link and put it together.

Here are some examples of extending it...

http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php

Hmm - Don't know enough PHP to do this.  I checked out the link but did not see anything directly applicable to my question. 

I appreciate your help.

Thanks,
Tobias
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 09, 2005, 10:43:09 pm
AH!


Quote
cpm_viewMediaByPid at

I had tried that earlier today and it didn't seem to work.  User error I guess because it just worked fine! Thanks!


Quote
You would have to code a bit of php on your end, but you can use cpmfetch to get the filename and the link and put it together.

Here are some examples of extending it...

http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php

Hmm - Don't know enough PHP to do this.  I checked out the link but did not see anything directly applicable to my question. 

I appreciate your help.

Thanks,
Tobias


Alright... what do you want to do?  Just make that one image that you get by PID show up without using a table?



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: tgelston on August 09, 2005, 10:49:30 pm
Quote
Alright... what do you want to do?  Just make that one image that you get by PID show up without using a table?


Yes.   And a followup question using the array info I would like this to open in a new browser? That looks possible correct?


Thanks Again
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 09, 2005, 10:54:22 pm
Quote
Alright... what do you want to do?  Just make that one image that you get by PID show up without using a table?


Yes.   And a followup question using the array info I would like this to open in a new browser? That looks possible correct?


Thanks Again

Yeah its easy enough.  Is there a reason why you can't just have the table stuck in?  You can set whatever alignment tags you want on it...  Just wondering before I code.

Will try to whack it out later
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: tgelston on August 09, 2005, 11:01:26 pm
Quote
Yeah its easy enough.  Is there a reason why you can't just have the table stuck in?  You can set whatever alignment tags you want on it...  Just wondering before I code.

Here is what I have that I am really liking right now

Code: [Select]
$options = array( 'alttag' => '%t || %S KB' , "tablestyle" => "cssfortables", imagelink => "large", windowtarget => "_blank"  );
$objCpm->cpm_viewMediaByPid(2173,$options);

Don't worry about the table thing. .  I am a little anti table but I am fine with using them - the trade off is more than fair.

Thanks!
   
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stefan2k1 on August 12, 2005, 03:24:14 pm
Hi,

i also cant get this script working. Calling cftest.php i get:
Code: [Select]
PASS
10 No dots in partial url PASS
15 coppermine.php found PASS
20 coppermine_dao.php has been removed PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux server1.serverspace.info 2.4.27 #2 Thu Nov 25 11:59:27 CET 2004 i686 INFO
40 WebServer = Apache/1.3.29 (Debian GNU/Linux) PHP/4.4.0-0.dotdeb.0 mod_ssl/2.8.16 OpenSSL/0.9.7c mod_perl/1.29 INFO
45 PHP Version = 4.4.0-0.dotdeb.0 INFO
55 DOCUMENT_ROOT: /home/harrydbx/www.myforum.com INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/harrydbx/www.myforum.com/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
But i dont see any thumbnails. I dont get a error message...

All i see is:

Code: [Select]
Trying to display some images:

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

 

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'd recomment 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.

Any hints what could be wrong here ?

Thanks
Stefan
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: raeba on August 12, 2005, 09:25:43 pm
How do I get cpmfetch to show the actual title of the photo, rather than the filename upon mouseover?

Thanks.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 13, 2005, 02:20:55 am
How do I get cpmfetch to show the actual title of the photo, rather than the filename upon mouseover?

Thanks.


The available placeholders are here and the settings you need

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html

I think you are looking for the ALTTAG setting, since thats what most browsers key in on


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 13, 2005, 02:27:17 am
Hi,

i also cant get this script working. Calling cftest.php i get:
Code: [Select]
PASS
10 No dots in partial url PASS
15 coppermine.php found PASS
20 coppermine_dao.php has been removed PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux server1.serverspace.info 2.4.27 #2 Thu Nov 25 11:59:27 CET 2004 i686 INFO
40 WebServer = Apache/1.3.29 (Debian GNU/Linux) PHP/4.4.0-0.dotdeb.0 mod_ssl/2.8.16 OpenSSL/0.9.7c mod_perl/1.29 INFO
45 PHP Version = 4.4.0-0.dotdeb.0 INFO
55 DOCUMENT_ROOT: /home/harrydbx/www.myforum.com INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/harrydbx/www.myforum.com/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
But i dont see any thumbnails. I dont get a error message...

All i see is:

Code: [Select]
Trying to display some images:

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

 

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'd recomment 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.

Any hints what could be wrong here ?

Thanks
Stefan

Can you post or PM me the link to the cftest.php file?

Thanks

Vuud
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: reyn on August 13, 2005, 10:00:49 am
It would be nice to have a thread where sites using CpmFetch could show their ideas.
Not having much artistic flair myself  I would like to evaluate the talent of others
and maybe appropriate some for myself.  ::)

Frank
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 13, 2005, 04:13:16 pm
It would be nice to have a thread where sites using CpmFetch could show their ideas.
Not having much artistic flair myself  I would like to evaluate the talent of others
and maybe appropriate some for myself.  ::)

Frank


Hey Frank,

In one of the mailings I put out a request for submissions for this very concept.  The one response I got back was overwhelming.  If a few people think this is something they would participate in, then I will create one.  If not, then I'd hate to clutter the forum.

Good idea though...

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: raeba on August 13, 2005, 11:38:49 pm
The available placeholders are here and the settings you need

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html

I think you are looking for the ALTTAG setting, since thats what most browsers key in on

Ok, thanks, but where do I use this information. What file do I edit?  Where is the string that I change?

Thanks.

Raeba
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2005, 01:05:37 am
The available placeholders are here and the settings you need

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html

I think you are looking for the ALTTAG setting, since thats what most browsers key in on

Ok, thanks, but where do I use this information. What file do I edit?  Where is the string that I change?

Thanks.

Raeba


I took the time to write it once... I am not going to retype it  :P

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html

There is a link on the bottom for "home" that brings you to the start of the documentation.

Also, on the web site in the docs section there is a link to examples.
http://cpmfetch.fistfullofcode.com

I suggest a quick once over the docs, will probably answer many of your questions



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: raeba on August 14, 2005, 03:34:31 am
The available placeholders are here and the settings you need

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html

I think you are looking for the ALTTAG setting, since thats what most browsers key in on

Ok, thanks, but where do I use this information. What file do I edit?  Where is the string that I change?

Thanks.

Raeba


I took the time to write it once... I am not going to retype it  :P

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html

There is a link on the bottom for "home" that brings you to the start of the documentation.

Also, on the web site in the docs section there is a link to examples.
http://cpmfetch.fistfullofcode.com

I suggest a quick once over the docs, will probably answer many of your questions





Why bother writing anything then?  Or, what good is the forum if I am just told to go read the docs?  It take less bandwidth and time to just say 'crack open this particular file' and 'edit this or that.'

Anyway, don't bother replying...  It's a waste of time and resources.

UPDATE:  I asked someone else, and she told me point blank and I did it in 30 seconds.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2005, 06:09:15 am

Why bother writing anything then?  Or, what good is the forum if I am just told to go read the docs?  It take less bandwidth and time to just say 'crack open this particular file' and 'edit this or that.'

Anyway, don't bother replying...  It's a waste of time and resources.

UPDATE:  I asked someone else, and she told me point blank and I did it in 30 seconds.


Deep breaths...

I thought pointing you at the exact example in the docs would be helpful enough.  I have many many hours put into writing this, improving, supporting and spending my time getting it working on every system that comes along (An acurate figure would be difficult, but well over 100+ hours).   Now I don't mind doing that, I like giving back the open source community, but when someone cannot be bothered to even read over the written instructions, even when specifically pointed to the exact parts they need to read and they get all uppity about the support they receive from me - it really saddens me.

There are a number of people here who would agree that I spent a lot of time helping them to get their systems working with this...  People who were on a strangely configured servers, people with different subdomains, people with the beta... all legitamate problems that the docs could not help.

Quote
Or, what good is the forum if I am just told to go read the docs?  It take less bandwidth and time to just say 'crack open this particular file' and 'edit this or that.'

I guess you could rephrase it like "what good are the doc's if people are just going to show up in the forum and ask?"  It does not take less bandwidth and time to just say crack open this file and edit this... It takes me less time to point you to the EXACT place in the docs.  It takes less bandwidth as the information only has to go from my server to your web browser.  Not by me retyping it, posting it to the server and you downloading it again.  If you did read the docs, you would have learned to help yourself.  Then you could potentially help others.  Like the old proverb goes... "Build a man a fire and he is warm for a night, Set a man on fire and he is warm the rest of his life"....  Hmmm, well, it was something like that.

This forum is here to help people.  Really.  Showing you where to look is much more helpful for this sort of thing than just telling you what to do.  Now if you did read the pages and still had a question, great - post away.  That means something could be lacking in the docs and I would love to hear about it. 

If you cannot be bothered to read the exact parts of the documentation I went out of my way to point you too, then I am going to spend my free time helping the people who have actually problems, not just a sense of self entitlement.  Either that or fixing cpmfetch for CPG 1.4.1 BETA or figuring out the other three open questions that actually seem like problems.   Its times like this that make me question why I really bother.  I mean I wrote this in the beginning to solve a need I had.  Then I figured I would just polish it up a bit and put it on Coppermines forums so maybe one or two other people maybe benefit from it.  Then a few requests trickled in, a few people had questions...  Do I do it for fame?  Do I get paid for this?  Do I feel some deep seated need be attain alpha geek status?  Nope.  I do not get money, my page actually says if you prove a donation to a non-profit from my list you will get extra help - Do I get fame?  Lol... 

Nope, I do it purely because I feel a sort of responsibility for what I hath wrought - and because once in a while someone goes out of thier way to drop me an e-mail and say "Hey, thanks for the script - works good" without needing help.  I deal with the bugs, but its the one thank you I get once in a while that makes it worth continuing.  Although I do also appreciate the "love the script" even when it does come with a question.

There, I feel better - well, not really.  Hope you do too.

Well enjoy the script, sign up for the mailing list, sign up for the mailing list if you want notifications on new versions and bug fixes. 

Vuud
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: reyn on August 14, 2005, 11:50:32 am
It would be nice for anyone using CpmFetch to list their site for others to see the way it is being used, my test site using  cpg1.4.1  is at http://kuckoo.co.uk I have just started using it on the Home page for a random picture. Please note the photo's are not the best example of my work and are just for test purposes. I intend to change all the static pictures to use CpmFetch.
By the way vuud, we really do appreciate your help.
Frank
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on August 14, 2005, 01:00:34 pm
Vuud an idea (but very hard to realize maybe for you :))

Instead of replying of newbies like me (we are a lot of to not understand some things :)) ... why don't you create a mini-admin with all options CPmFetch is able to do, and you only copy/paste the code ?

I know, it seems to be impossible, because there are too many options ... but ... whynot ?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2005, 03:10:58 pm
Vuud an idea (but very hard to realize maybe for you :))

Instead of replying of newbies like me (we are a lot of to not understand some things :)) ... why don't you create a mini-admin with all options CPmFetch is able to do, and you only copy/paste the code ?

I know, it seems to be impossible, because there are too many options ... but ... whynot ?

Hey Radinou,

I am not sure I understand what you are asking...  Have you seen the example page off the doc's part of the web site? 

http://www.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php

Yes, its formatted terribly, and "prettying" it up is on my list of things to do... but its a long list.

Take a look there...  its examples, with the code to make them happen.  Basically, its the pages I test new functions on - so most of the time its working.  Some also do not have code - but if you see one that interests you, let me know and I will go back and make the code more visable.

If this is not what you are thinking, please let me know... and we'll figure it out

Thanks!





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2005, 03:16:16 pm
It would be nice for anyone using CpmFetch to list their site for others to see the way it is being used, my test site using  cpg1.4.1  is at http://kuckoo.co.uk I have just started using it on the Home page for a random picture. Please note the photo's are not the best example of my work and are just for test purposes. I intend to change all the static pictures to use CpmFetch.
By the way vuud, we really do appreciate your help.
Frank

Okay, two's enough for me.  I am going to go create a thread called "Users sites - Pages accessing CPG from outside"

So anyone with an urge to share, go there

I'll try to post one in there too...

Thanks

Vuud

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on August 14, 2005, 04:17:47 pm
Vuud an idea (but very hard to realize maybe for you :))

Instead of replying of newbies like me (we are a lot of to not understand some things :)) ... why don't you create a mini-admin with all options CPmFetch is able to do, and you only copy/paste the code ?

I know, it seems to be impossible, because there are too many options ... but ... whynot ?

Hey Radinou,

I am not sure I understand what you are asking...  Have you seen the example page off the doc's part of the web site? 

http://www.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php

Yes, its formatted terribly, and "prettying" it up is on my list of things to do... but its a long list.

Take a look there...  its examples, with the code to make them happen.  Basically, its the pages I test new functions on - so most of the time its working.  Some also do not have code - but if you see one that interests you, let me know and I will go back and make the code more visable.

If this is not what you are thinking, please let me know... and we'll figure it out

Thanks!



It's the idea of my question :)

I see now how it works ... but another question : you display only images ?

Or ... your plugin has interesting features to explore (I think)

So ... is it possible to turn in "text" mode ?"

For example ... I want xxxxx last albums from album X ... but I want to have a simply list
<ul>
  <li>album 1</li>
  <li>album 2</li> ...
</ul>

And do you plan to realize tableless version of your calling pics ?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2005, 06:17:05 pm

It's the idea of my question :)

I see now how it works ... but another question : you display only images ?

Or ... your plugin has interesting features to explore (I think)

So ... is it possible to turn in "text" mode ?"

For example ... I want xxxxx last albums from album X ... but I want to have a simply list
<ul>
  <li>album 1</li>
  <li>album 2</li> ...
</ul>

And do you plan to realize tableless version of your calling pics ?

Check out Section 4 of the examples pages... there is something in there close to what your asking for.  In combination with the new tags for imageless displays

Docs: http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html
See: the noimage entry in there...

That may do it.  To be honest I have not tried combining those... the program has evolved so much that its gotten beyond one function does one thing - its all interrelated inside, so it may just work.  Let me know if that works for you.

I am planning on more category and album sorts of listings...  Its one of those things.

I have long term plans to provide tableless versions of the pics... but since I don't have much experience with tableless right now, I am deferring it for a bit.  If anyone is really good with tableless and wants to work with me on that let me know.  I assume you mean CSS layouts right?  Anyway, that would have to be in a bit... things are busy here and the 1.4.1 support is more important right now.

Take care, let me know how it all works out








Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2005, 06:48:15 pm

Hey Stefan,

Is there anything strange about your hosting?  Different domains, sub-domaining, strange file permissions, etc?  I've taken a look at the information I could get from CFTEST on your site and I am stumped.  There are no error messages or missing images, its just... nothing.

I am going to ponder this some more, but was just wondering if there was anything out of the ordinary there.

Its much easier to fix something, when something actually blows up.  The just not doing anything is simply creepy.

Thanks,

Vuud




Hi,

i also cant get this script working. Calling cftest.php i get:
Code: [Select]
PASS
10 No dots in partial url PASS
15 coppermine.php found PASS
20 coppermine_dao.php has been removed PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux server1.serverspace.info 2.4.27 #2 Thu Nov 25 11:59:27 CET 2004 i686 INFO
40 WebServer = Apache/1.3.29 (Debian GNU/Linux) PHP/4.4.0-0.dotdeb.0 mod_ssl/2.8.16 OpenSSL/0.9.7c mod_perl/1.29 INFO
45 PHP Version = 4.4.0-0.dotdeb.0 INFO
55 DOCUMENT_ROOT: /home/harrydbx/www.myforum.com INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/harrydbx/www.myforum.com/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
But i dont see any thumbnails. I dont get a error message...

All i see is:

Code: [Select]
Trying to display some images:

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

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'd recomment 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.

Any hints what could be wrong here ?

Thanks
Stefan
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2005, 06:54:13 pm
I'm trying to get cpmfetch working but don't seem to get to view the thumbnails when trying cftest

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Error in getImageTouse: Extension (strtolower): .jpg File:/home/knobben/public_html/coppermine//albums/miami2003/thumb_117-1783_STG.JPG
Error in getImageTouse: Extension (strtolower): .jpg File:/home/knobben/public_html/coppermine//albums/miami2003/thumb_120-2031_IMG.JPG
..........

My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG


Hi Nanno,

Just want to make sure I get this... your coppermine gallery is in /coppermine but your albums directroy is in /fotoalbums  ?

Working on a fix for this now



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2005, 07:46:55 pm

Trying to display some images:

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Error in getImageTouse: Extension (strtolower): .jpg File:/home/knobben/public_html/coppermine//albums/miami2003/thumb_117-1783_STG.JPG
Error in getImageTouse: Extension (strtolower): .jpg File:/home/knobben/public_html/coppermine//albums/miami2003/thumb_120-2031_IMG.JPG
..........

My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG


HI Nanno and sorry for taking so long.

I just uploaded a new version to my web site  Stable 1.6.1 which has a new function to solve your problem.

Your the first person to run into this issue, but if CPG allows it, I gotta support it here right?

---------- from the docs (still to be added) ----------------

If for some reason you have your album directory somewhere else you need to make a call to the cpm object AFTER you create it, and BEFORE you ask it to display any images.  This qualifies as a bug so I am releasing it as a new stable.  By the time the next stable version is released, I plan on having a copy of the CPG settings extracted on installation, so this will become unneeded.  At that time, the function shown here will do nothing (so it will not break pages calling it).

Lets say in this example, your coppermine photo gallery is installed in a directory named cpg, but your photos are in a directory named testalbum.  Both of these are right off the top of the web site.

You would add in the cpm_OverridePathToAlbums call right after the creation of the $objCpm object.  Like so:

   $objCpm = new cpm('/cpg');
   $objCpm->cpm_OverridePathToAlbums("/testalbum");

--------------------------------------------------------------------

IN your case "/testalbum" would be "/fotoalbums" right?

Lemme know how this works for you

Vuud



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nanno on August 15, 2005, 08:29:07 am
Great !

It works! :)

Keep up the good work!

Thanks,

nanno
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on August 15, 2005, 08:51:15 am

It's the idea of my question :)

I see now how it works ... but another question : you display only images ?

Or ... your plugin has interesting features to explore (I think)

So ... is it possible to turn in "text" mode ?"

For example ... I want xxxxx last albums from album X ... but I want to have a simply list
<ul>
  <li>album 1</li>
  <li>album 2</li> ...
</ul>

And do you plan to realize tableless version of your calling pics ?

Check out Section 4 of the examples pages... there is something in there close to what your asking for.  In combination with the new tags for imageless displays

Docs: http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html
See: the noimage entry in there...

That may do it.  To be honest I have not tried combining those... the program has evolved so much that its gotten beyond one function does one thing - its all interrelated inside, so it may just work.  Let me know if that works for you.

I am planning on more category and album sorts of listings...  Its one of those things.

I have long term plans to provide tableless versions of the pics... but since I don't have much experience with tableless right now, I am deferring it for a bit.  If anyone is really good with tableless and wants to work with me on that let me know.  I assume you mean CSS layouts right?  Anyway, that would have to be in a bit... things are busy here and the 1.4.1 support is more important right now.

Take care, let me know how it all works out



I can help you to realize tableless version ... you'll see the code will be simplier :) (the end of tr !)

If you see http://www.sortons.net/test-nucleus.html or http://www.sortons.net/photos/thumbnails.php?album=1770, and look the code ...
:)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: runaweigh on August 15, 2005, 09:28:11 pm
Hello,
I have attempted to install the cpmfetch but I don not get the thumbnails. Here is the report on the test page.  Any advice?

help pages for CoppermineFetch."; } function OutputTestRow ($number,$text,$status) { print "$number$text"; switch ($status) { case ("PASS"): print ""; print $status; print ""; break; case ("INFO"): print ""; print $status; print ""; break; case ("BAD"): print ""; print $status; print ""; break; case ("FAIL"): print ""; print ""; print $status; print ""; break; default: print $status; } print "\n"; } function testDisplay ($PartialUrlToCPG) { include "./cpmfetch.php"; $objCpm = ""; $objCpm = new cpm($PartialUrlToCPG); $styleguide = array( //"TABLESTYLE" => "photoclip", //"rowstyle" => "photoclip", "cellstyle" => "photoclip", "linkstyle" => "photoclip", "alttag" => "One of the last photos submitted", "subtitle" => "%o
%V views", "imagestyle" => "photoclip", "imagesize" => 'thumb', "imagewidth" => '100'); print "
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery

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

"; $objCpm->cpm_close(); print "
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 15, 2005, 09:36:19 pm
Hello,
I have attempted to install the cpmfetch but I don not get the thumbnails. Here is the report on the test page.  Any advice?

help pages for CoppermineFetch."; } function OutputTestRow ($number,$text,$status) { print "$number$text"; switch ($status) { case ("PASS"): print ""; print $status; print ""; break; case ("INFO"): print ""; print $status; print ""; break; case ("BAD"): print ""; print $status; print ""; break; case ("FAIL"): print ""; print ""; print $status; print ""; break; default: print $status; } print "\n"; } function testDisplay ($PartialUrlToCPG) { include "./cpmfetch.php"; $objCpm = ""; $objCpm = new cpm($PartialUrlToCPG); $styleguide = array( //"TABLESTYLE" => "photoclip", //"rowstyle" => "photoclip", "cellstyle" => "photoclip", "linkstyle" => "photoclip", "alttag" => "One of the last photos submitted", "subtitle" => "%o
%V views", "imagestyle" => "photoclip", "imagesize" => 'thumb', "imagewidth" => '100'); print "
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery

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

"; $objCpm->cpm_close(); print "


Thats like a chunk of the code from the test page...  What did it say when you loaded it in a web browser?

Do you get any FAIL entries displayed when you go to the test page from a web browser?

Oh, if you got that when you went to it with a web browser it could mean that for some reason the files are not being executed as PHP





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Niels on August 15, 2005, 09:44:32 pm
Dear vuud,

I stumbled accros a problem I did not yet find here.. When testing the script I am receiving the following errors:
Error in getImageTouse: Extension (strtolower): .jpg File:/home/ga2958/domains/statw.nl/public_html/fotos/ftp/voorbereiding/thumb_t_p1010028.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/home/ga2958/domains/statw.nl/public_html/fotos/ftp/voorbereiding/thumb_t_p1010347.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/home/ga2958/domains/statw.nl/public_html/fotos/ftp/voorbereiding/thumb_t_p1010206.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/home/ga2958/domains/statw.nl/public_html/fotos/ftp/voorbereiding/thumb_t_p1010233.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/home/ga2958/domains/statw.nl/public_html/fotos/ftp/voorbereiding/thumb_t_p1010066.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/home/ga2958/domains/statw.nl/public_html/fotos/ftp/voorbereiding/thumb_t_p1010257.jpg
(there is six pictures to be displayed, and it does show the  borders for the pictures but not the pictures themselves, reason? No idea :(. In the html code it just says "<img src="" title="blahblah">". It is linked correctly though.
The testscript passes all scripts, and the images áre in the dir shown above.

Link to my Coppermine Gallery:
http://statw.nl/fotos/index.php
Link to test script:
http://statw.nl/cpmfetch/cftest.php
Coppermine Version:
1.3.3
Cpmfetch Version:
1.6.1

I've been hassling with this problem for about two or three hours now, installed it on another domain (same hosting company though) and still no result.
I'm building a website for my brother who is going to do a world trip and I would really like to have the site finished before 1st of september 2005 :). Hope you know a solution to this problem, cause I'm fresh out ideas ;).

Thanks a bunch!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 15, 2005, 09:59:40 pm

First off, thank you for posting all the relevant information about your set up.  It helps to have it right there.

Second:  There is a bug in 1.6.1 (which you discovered - congradulations)

Third:  I owe you two hours of your life back

Fourth: Download version 1.6.2 from the web site... it will fix it for you.

I have this cursed caching server between me and my test site and sometimes when I test stuff, it shows me something from before - so I got a good looking thing when I tested this last night.  Damnit.


Dear vuud,


Link to my Coppermine Gallery:
http://statw.nl/fotos/index.php
Link to test script:
http://statw.nl/cpmfetch/cftest.php
Coppermine Version:
1.3.3
Cpmfetch Version:
1.6.1

I've been hassling with this problem for about two or three hours now, installed it on another domain (same hosting company though) and still no result.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Niels on August 15, 2005, 10:09:24 pm
Thanks a million!!! I seriously love your dedication..  :D you made my day :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stez on August 16, 2005, 04:35:11 pm
ltns...

I second reyn's request re: a collection of sites... I'm not that creative myself and would like to steal, er, borrow, ahem, other people's ideas.

How are you getting on with the docs?  Still need any help?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 17, 2005, 05:43:21 am
ltns...

I second reyn's request re: a collection of sites... I'm not that creative myself and would like to steal, er, borrow, ahem, other people's ideas.

How are you getting on with the docs?  Still need any help?

See my answer to this request...
http://forum.coppermine-gallery.net/index.php?topic=19564.msg94817#msg94817

Then see my other answer to this request...
http://forum.coppermine-gallery.net/index.php?topic=20751.0


Doc's?  Absolutely I need help.  I will PM you my email address and we can talk about what parts you want to help with... (The nice thing about volunteering is that you get to pick what you work on :D )



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 18, 2005, 06:20:05 am
Hi,
i also cant get this script working. Calling cftest.php i get:

I've been working with Stefan offboard to resolve this problem since a lot of it included passwords and stuff.  In the end he had to send me a mysql dump to solve the problem.  I am posting this here because if someone can tell me how this could happen, it would be cool.

In the end, cpmfetch was not returning pictures because when it ran its sql to do that it could not build a set that matched.  Basically all of Stefans photos have an entry showing the owner of the photo is id #2, but the users table only has a user #1. 

I am comparing
cpg133_pictures:owner_id
with
cpg133_users:user_id

This has worked in the past.  The only thing I can think of is that he had a user #2 and deleted them.  So now the photos are orphaned.

If any one knows for sure, let me know.  Help assures your next feature request gets bumped :)

Anyway, my recommendations to solve this are:

1) Update the picture table to refer to user_id #1
2) Create a user with id 2

That should fix the problem.

Thanks to stefan for his patience in waiting for me to resolve this... its been a busy week.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Phono Paul on August 18, 2005, 12:35:45 pm
I have exactly the same problem as Stefan, and I wondered if it was somehow due to the fact I'm bridging to phpbb..?

Anyway, when you say "Update the picture table to refer to user_id #1", I guess you mean changing the cpg133_pictures table, but won't any new images added to Coppermine still have the wrong value in owner_id ..?

(sorry for sticking my oar in, just trying to get this to work myself, and just grateful someone else has the same problem!)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 18, 2005, 04:37:09 pm
I have exactly the same problem as Stefan, and I wondered if it was somehow due to the fact I'm bridging to phpbb..?

Anyway, when you say "Update the picture table to refer to user_id #1", I guess you mean changing the cpg133_pictures table, but won't any new images added to Coppermine still have the wrong value in owner_id ..?

(sorry for sticking my oar in, just trying to get this to work myself, and just grateful someone else has the same problem!)

I had Stefan add a second user with user_id of 2 and it all was better... he was also on phpbb brigde thingee

So that should fix you too!

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Phono Paul on August 18, 2005, 06:24:45 pm

Yup, works like a dream.  cheers!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: noworyz on August 20, 2005, 05:37:10 am
hey, if you look at my cpmfetch usage there is a blue outline on my image!  How do I get rid of this outline.

I use the code in two different spots and one has the outline, the other doesn't!

page with outline http://www.egriz.com/GrizBoard/
page without outline http://www.egriz.com

I am using the exact same code on both pages.  Any ideas on how to get rid of the blue outline?

Thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 20, 2005, 06:10:43 am
hey, if you look at my cpmfetch usage there is a blue outline on my image!  How do I get rid of this outline.

I use the code in two different spots and one has the outline, the other doesn't!

page with outline http://www.egriz.com/GrizBoard/
page without outline http://www.egriz.com

I am using the exact same code on both pages.  Any ideas on how to get rid of the blue outline?

Thanks

You can't be using the same code.

One page has class="grizpics" in the generated HTML, the other does not.   Something in your CSS is setting the border.

At least thats my guess


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: noworyz on August 20, 2005, 10:41:31 pm
ok, I created a test forum http://www.egriz.com/gbtest/

It is the exact same code as my main page linked here http://www.egriz.com/

The blue border color is created by my internet explorer browser (I can change the color of the border by going to TOOL > INTERNET OPTIONS > COLORS)

Do you have any idea why this may be happening?

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 20, 2005, 11:06:45 pm
ok, I created a test forum http://www.egriz.com/gbtest/

It is the exact same code as my main page linked here http://www.egriz.com/

The blue border color is created by my internet explorer browser (I can change the color of the border by going to TOOL > INTERNET OPTIONS > COLORS)

Do you have any idea why this may be happening?



Okay, now the code could be the same... no extra tags in the cpmfetch generated code.

My guess is that something in the CSS is turning off the border... the page without the border has a lot of css definitions coming in from the board software and whatever else.

I guess the best thing for you to do now is to define your own CSS class at the top of the file, and force the cpmfetch code to use that for the image and stuff...

Check this page...
http://www.fistfullofcode.com/projects/copperminefetch/tips.php#cssmouseoverboxes

There are examples there for creating borders... basically you want the img.test1 entry, but border-width:0px

There must be a better way to do it, but I am not a guru with css at any rate








Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: noworyz on August 20, 2005, 11:24:10 pm
that worked,

That is what I was originally trying but I didn't realize that I needed to define it for image, iw as defining it for links. 

Thanks a bunch!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 20, 2005, 11:43:53 pm
that worked,

That is what I was originally trying but I didn't realize that I needed to define it for image, iw as defining it for links. 

Thanks a bunch!

Like I said, I barely get by on CSS issues...

Glad to hear it works
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mylogon on August 21, 2005, 12:56:19 am
It would be nice if two things were done to this:

1.  All the command typos that make it not work - so that you have to figure out what is wrong

2.  Actually make it so a person can use it without having to be a php programmer.  Not real handy for most.  If people were programmers - they probably would not be using Coppermine.

Coppermine is made for the average user - this is far from it.

The instructions leave much to be desired.  I cannot find anyone who has tried it that actually got it to work without spending hours figuring out all the errors.  (Check webhosting forums.) Even the startup command do not work.  An error right there.

Quote
Cannot instantiate non-existent class: cpmfetch
- after the require one is run.  Know require is run - as no error on object not found.

Nice to have something - but it should really be able to work for most, not a select group of programmers.  Sample setup, running install, maybe even installation instructions on how to make work. 

I appreciate the effort it took to write this, just a shame few can figure out how to actualy make it work because of the way it was written.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 21, 2005, 05:50:16 am
Thanks for the feedback,  I love hearing it...

Can you clarify #1?  I did not understand what you were saying there...

As for #2 - while I can agree that its not as easy as understanding how to use Internet Explorer.  If they can do HTML, then hopefully they can do the quickstart and take it from there... 

As for programmers not running Coppermine, I disagree with that statement since I know a lot of professional programmers that use it (why waste your own time reinventing the wheel?).  What are you basing that statement on?   I have been a programmer for a long time now and don't see how that would be true?  Do you have any idea how long it must have taken to write CPG?  I don't either, but it must have been a long time - nothing I would undertake myself lightly.

I am sorry if people are having problems, and I have helped almost everyone that has posted here...the official support forum.   I tried finding "web hosting" forums that you mentioned, can you give me a link?  I am amazed that people would not post in a forum dedicated to it - I mean we don't charge here do we?  At least I hope not, cause otherwise I want a cut!

As for doc's they are improved as I get a hankering to work on documentation (rarely),  except for user contributions which will be gladly excepted!  One person has volunteered to rehash some of them so we will see.  I don't have much interest in writing documentation, in fact I don't like it much at all.   I try to spend a few minutes each week, fleshing out something or what not.

Last I checked, I have a 100+ people subscribed to the mailer for updates and plenty of downloads happening when I release something new - So people are getting it working. 

I may do something with the error on startup... I had it differently before, but had to change it for some reason (I forget why).  There are also a few things coming up in my release to support CPG 1.4 that will make things easier - but not terribly easier.  A point and click install is NOT in the future.

Anyway, feel free to tell anyone that has a problem to drop by here and let me (us) know and I am sure we can get them working.

And I am always open to suggestions - good ones I take and do something with in my free time, others I put on a list or convince the person why it would be a bad idea.  If you can give me some ideas on #2 I'd be willing to listen.  To be honest, it was written for people who can do PHP...  But since there is a lot of support that has to happen I am willing to consider ways to make it easier to take.  Oh of course, there is also the outside chance that it may be a good idea, but I just don't have the time or willingness to implement it.

Take care, and feel free to post comments and suggestions anytime!

Vuud

EDIT: I just remembered why that "Can't instantiate class" error is like that... to make it more user friendly would mean you would have to add a bunch more code into everypage you wanted to use it on... making it harder for people to add in.... I just remembered, when I went in to check it.




It would be nice if two things were done to this:

1.  All the command typos that make it not work - so that you have to figurre out what is wrong

2.  Actually make it so a person can use it without having to be a php programmer.  Not real handy for most.  If people were programmers - they probably would not be using Coppermine.

Coppermine is made for the average user - this is far from it.

The instructions leave much to be desired.  I cannot find anyone who has tried it that actually got it to work without spending hours figuring out all the errors.  (Check webhosting forums.) Even the startup command do not work.  An error right there.

Quote
Cannot instantiate non-existent class: cpmfetch
- after the require one is run.  Know require is run - as no error on object not found.

Nice to have something - but it should really be able to work for most, not a select group of programmers.  Sample setup, running install, maybe even installation instructions on how to make work. 

I appreciate the effort it took to write this, just a shame few can figure out how to actualy make it work because of the way it was written.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Mambocube on August 22, 2005, 01:26:54 pm
hi, i have got the cpmfetch working fine, but was hoping if anyone knew how to get it so that it shows who the photo was submitted by underneath the pic e.g

     \\\\\\\\image/////////

posted by mambocube

thanks :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Mambocube on August 22, 2005, 02:12:35 pm
<?php   

include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia (1,6,4);
$objCpm->cpm_close();

?>

this is the code i am using
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on August 22, 2005, 02:24:44 pm
(http://www.sortons.net/gfx/screenshots/accueil.jpg)

I would like to have this (right bottom) ... but
1. it's a tableless system
2. I would like infos appears by dhtml popup.

I have seen your "core" code ... it's a hell for me. I have suggested you (without answer) to help you to transform your excellent plugin in tableless system ...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 22, 2005, 03:36:11 pm
hi, i have got the cpmfetch working fine, but was hoping if anyone knew how to get it so that it shows who the photo was submitted by underneath the pic e.g

     \\\\\\\\image/////////

posted by mambocube

thanks :)

Sure, you need to set the subtitle...

$options = array( 'subtitle' => 'Image %t is %S KB');
$objCpm->viewRandomMedia(1,1,$options);

This shows the full list of what you can display underneath...
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html

I think you want %o - which is the owner's name...  replace the stuff in the example above with what you want...

Like :  "Image provided by %o"    or whatever

Hope that helps

Vuud



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 22, 2005, 03:47:01 pm
I would like to have this (right bottom) ... but
1. it's a tableless system
2. I would like infos appears by dhtml popup.

I have seen your "core" code ... it's a hell for me. I have suggested you (without answer) to help you to transform your excellent plugin in tableless system ...

Sorry the code is a hell for you... Programming can be a bit daunting for newcomers when they first look at it.  Its probably the whole thing on how it generates the code, its so elegant...  I just love that part.

Anyway, I am pretty sure I did respond.  But in brief:

* I am NOT going to transform to tableless...  Few people care about it at this point in HTML/CSS's evolution.  I will make an option to generate tableless, but that has to wait until I have time and can abstract out the generation code so I can provide a generic interface for me to code to.

* Please be more specific as for what help you are offering...  If you are writing code to do this, just want to make feature requests, etc, etc.

I do think it would be a nice to have, but not particularly needed at this point.  I understand that because you need it for something that you do feel its much more urgent - but not all that much is moving to DHTML IMO.  I run a web development company and we have 0 requests for this sort of thing - and we also tend to not suggest it as HTML is very well supported across browsers, but CSS layouts are not as proven.

So I have a list, somewhere on that list is abstracting the output code... that will make Tableless more attractive.

Regardless, I would suggest if you really need it now to simply extend CPMFetch and write your own code.  You will not have to deal with my code "Hell" since you only use the ones you need.

Here are some short examples
http://www.fistfullofcode.com/projects/copperminefetch/tests/test6.php

Hopefully that can get you where you want to be

Keep me posted, and I think there is a forum here for extending cpmfetch - if you decided to go that route, post there to keep this all organized
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Mambocube on August 22, 2005, 04:44:48 pm
Brilliant!!

exactly wat i wanted thanks vuud :) :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: martin g on August 22, 2005, 05:01:20 pm
hello...

i visited the CpmFetch and must say, that`s amazing...
----------------------

have some trpuble after downloading and upping the cpmfetch-folder


i started the cftest.php file, but it can`t display images!

used bridge: pragmamx.inc.php

my folders:   

/html/albums        (included  /html/albums/userpics )

/html/cfmfetch

/html/moduls/Gallery     (this the copperminefolder)
 

5   You set your partial URL to /html/modules/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 dd10120 2.4.21-273-athlon #1 Mon Jan 17 13:03:46 UTC 2005 i686   INFO
40   WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 PHP/4.3.11 mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6i   INFO
45   PHP Version = 4.3.11   INFO
55   DOCUMENT_ROOT: /www/htdocs/v161957/   INFO
60   C_DOCUMENT_ROOT: Not found   INFO
65   doc_root: Not found (IIS Servers only)   INFO
70   SCRIPT_FILENAME: /www/htdocs/v161957/html/cpmfetch/cftest.php   INFO
75   DOCUMENT_ROOT is a good match   PASS
80   Found CPG config file   PASS

Trying to display some images:
Not in Coppermine...



can somebody help me please?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 22, 2005, 05:10:31 pm

Is the partial URL set correctly?

If your CPG is located at something like

http://www.domainname.com/Gallery

then the top of the cftest script should be

"/Gallery"

Can you post the site, or PM it to me if you are not comfortable posting it

Thanks


5   You set your partial URL to /html/modules/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 dd10120 2.4.21-273-athlon #1 Mon Jan 17 13:03:46 UTC 2005 i686   INFO
40   WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 PHP/4.3.11 mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6i   INFO
45   PHP Version = 4.3.11   INFO
55   DOCUMENT_ROOT: /www/htdocs/v161957/   INFO
60   C_DOCUMENT_ROOT: Not found   INFO
65   doc_root: Not found (IIS Servers only)   INFO
70   SCRIPT_FILENAME: /www/htdocs/v161957/html/cpmfetch/cftest.php   INFO
75   DOCUMENT_ROOT is a good match   PASS
80   Found CPG config file   PASS
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on August 22, 2005, 08:22:31 pm
I would like to have this (right bottom) ... but
1. it's a tableless system
2. I would like infos appears by dhtml popup.

I have seen your "core" code ... it's a hell for me. I have suggested you (without answer) to help you to transform your excellent plugin in tableless system ...

Sorry the code is a hell for you... Programming can be a bit daunting for newcomers when they first look at it.  Its probably the whole thing on how it generates the code, its so elegant...  I just love that part.

Anyway, I am pretty sure I did respond.  But in brief:

* I am NOT going to transform to tableless...  Few people care about it at this point in HTML/CSS's evolution.  I will make an option to generate tableless, but that has to wait until I have time and can abstract out the generation code so I can provide a generic interface for me to code to.

* Please be more specific as for what help you are offering...  If you are writing code to do this, just want to make feature requests, etc, etc.

I do think it would be a nice to have, but not particularly needed at this point.  I understand that because you need it for something that you do feel its much more urgent - but not all that much is moving to DHTML IMO.  I run a web development company and we have 0 requests for this sort of thing - and we also tend to not suggest it as HTML is very well supported across browsers, but CSS layouts are not as proven.

So I have a list, somewhere on that list is abstracting the output code... that will make Tableless more attractive.

Regardless, I would suggest if you really need it now to simply extend CPMFetch and write your own code.  You will not have to deal with my code "Hell" since you only use the ones you need.

Here are some short examples
http://www.fistfullofcode.com/projects/copperminefetch/tests/test6.php

Hopefully that can get you where you want to be

Keep me posted, and I think there is a forum here for extending cpmfetch - if you decided to go that route, post there to keep this all organized


I'm really not ok with you ... it has been proven CSS / XHTML was THE solution for web interfaces. All "great" sites like Microsoft, Macromedia ... are recoded in XHTML / CSS ... I think a lot of web agencies "show" they can do, but they can do is not the same thing "the best". A lot of discussions about designers / coders show "one clic = 1 page" is a very old "way" to think (with dhtml, xmlhttprequest ...) ... before doing websites, go a day inside a cybercafe ... you can learn more than anything. Show to your clients http://www.csszengarden.com and show them they can change interface as simple as a clic ... they WANT this. Csszengarden proves tables are prehistoric.

So OK, I'll go inside your code to erase table / tr / td ... it's incredible to see in 2005 tables are better CSS ... waouh. If all people thought like that, we'll all run with Lynx or Mosaic today.

But let me say :

<table>
 <tr>
  <td>
    <a href="urlpic"><img src="pic"></a>
  </td>
  <td>
    <a href="urlpic"><img src="pic"></a>
  </td>
  <td>
    <a href="urlpic"><img src="pic"></a>
  </td>
 </tr>
</table>

is better for you than

<div id="thumb">
  <a href="urlpic"><img src="pic"></a>
  <a href="urlpic"><img src="pic"></a>
  <a href="urlpic"><img src="pic"></a>
</div>

Live example http://www.sortons.net/dev/nol33t/testgalerie.htm
With CSS, you can even change the "thumb" without using php (the thumbs have normal width / height, but seem to be cropped). Look at the code : say me it's not better than tables ...

And you can CONTROL ALL your layout with the ID ... we don't live in the same planet :) sorry :)

Indeed, you can erase all parameters like "cols" or "rows" ... making your script simplier.


Consider my post not a personal attack, but I see the "old" coders don't like evolution. But xhtml is the better evolution since 1998. (and the dead of NS 4, of course)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 23, 2005, 12:03:31 am
I'm really not ok with you ... it has been proven CSS / XHTML was THE solution for web interfaces.

Where was this proven?  Can you tell me there are no cross platform issues?  None?  Because if I search on that I get 600,000 "workarounds" pages.  I did not find anything "proving" that CSS layouts are THE solution.  In fact, with almost any technology, anyone who lables anything "THE Solution" for anything is either a zelot or a salesperson.

Show to your clients http://www.csszengarden.com and show them they can change interface as simple as a clic ... they WANT this. Csszengarden proves tables are prehistoric.

I would be amazed if a client actually wanted that.  I suppose if you were building web sites for some small business somewhere, but larger ones want exact control over look and feel.  I get more grief because the type face can't be used or that the color looks different on one monitor than on another.  Do you build web sites for a living? Just curious if your experience is different.  How well does tableless work on say WebTV or any number of portable devices... airport internet access kiosks?  Palm pilots? Etc, etc... 

So OK, I'll go inside your code to erase table / tr / td ... it's incredible to see in 2005 tables are better CSS ... waouh. If all people thought like that, we'll all run with Lynx or Mosaic today.

I actually run Lynx and sometimes links from the console pretty often.

Live example http://www.sortons.net/dev/nol33t/testgalerie.htm
With CSS, you can even change the "thumb" without using php (the thumbs have normal width / height, but seem to be cropped). Look at the code : say me it's not better than tables ...

Why do all CSS layed out sites look the same? 

And you can CONTROL ALL your layout with the ID ... we don't live in the same planet :) sorry :)
Indeed, you can erase all parameters like "cols" or "rows" ... making your script simplier.

Regrettably, there is a minority of people who want this.  Taking out the way most people use it just seems like a bad bad bad idea.  Besides, why on earth would I want to remove cols and rows?  How would we tell the layout how many you wanted across or down?

Consider my post not a personal attack, but I see the "old" coders don't like evolution. But xhtml is the better evolution since 1998. (and the dead of NS 4, of course).

No problem.  Old coders don't mind evolution, we have just learned that jumping on every new thing to come along is not always effective.  If you switch now, you need to deal with all the cross platform issues, incompatibilies... heck we've been using CSS for formatting for a long time and there are still browser bugs. 

As for Microsoft using CSS (Which it seems to me they don't - I see lots of evil table tags in there) - that is not exactly a great endorsement from the people who bring you quality software like windows. 

Anyway, if you want to discuss it further I am willing, but PM so we don't clutter up the forum with our friendly banter. 



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on August 23, 2005, 09:17:58 am
@vuud: this is just another "DHTML/tableless is superior" rant posted by Rod several times already. You're welcome to try to argue, but this thread might then turn into a flamewar. Seen it before. Suggestion: ignore.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: noworyz on August 23, 2005, 09:40:13 am
Ok, I have another question!  I have the cpmfetch working just fine in all my pages and in my phpbb forums!

phpbb example
http://www.egriz.com/GrizBoard/

main site examples
http://www.egriz.com/

Now what I want to do is get this code working in the header of my coppermine gallery
http://www.egriz.com/GrizPics2/index.php

I read throuhg some info on how to make a custom header but didn't really understand how to go about doing it for this.  I want to keep it the same look as it is now but instead of using the image tag to grab the photo I want to use the cpmfetch.php file to do it so it links to the photo

thanks for your help!!!!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Rodinou on August 23, 2005, 10:15:45 am
@vuud: this is just another "DHTML/tableless is superior" rant posted by Rod several times already. You're welcome to try to argue, but this thread might then turn into a flamewar. Seen it before. Suggestion: ignore.

THANX gaugau : but Vuud and me have choosen another "cleaver" solution : continue with PM. It's sad to ignore progress the new browsers offer. Don't forget for WHO you code (people or you ?)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: MAher on August 23, 2005, 11:57:19 am
Sorry to bother you with such a basic problem as the path to the config-file. I searched this thread and the docs but didn't find anything on this yet. Tried all the possible paths but no... :-[

Somehow the Document_Root is not correct, the script puts var/www in front of the Partial path to CPG I put in cftest.php.
The result is like this:

Code: [Select]
5 You set your partial URL to /site/new/scripts/cm 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 ***.***.*** 2.4.27-2-686 #1 Mon May 16 17:03:22 JST 2005 i686 INFO
40 WebServer = Apache/1.3.33 Ben-SSL/1.55 (Debian GNU/Linux) PHP/4.3.10-15 INFO
45 PHP Version = 4.3.10-15 INFO
55 DOCUMENT_ROOT: /var/www INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/user/public_html/site/new/scripts/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /var/www/site/new/scripts/cm/include/config.inc.php

The config file is in /home/user/site/ etc. /var/www/ is not the root for my site. What's going wrong? php(info) gives for the root 'no value'  ???
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 23, 2005, 03:27:14 pm

I am not sure about that... sounds like you need to do some template modification if you want to add it into your coppermine gallery... Check the template doc's and some of the forums here are dedicated to themes creation and modification...

I thought I had done it to mine, so I was just going to post the code.  But I was thinking of PHPBB...

Ah well... if you have a solution, jot it down and send it... I can always add it to the docs

:)


Ok, I have another question!  I have the cpmfetch working just fine in all my pages and in my phpbb forums!

phpbb example
http://www.egriz.com/GrizBoard/

main site examples
http://www.egriz.com/

Now what I want to do is get this code working in the header of my coppermine gallery
http://www.egriz.com/GrizPics2/index.php

I read throuhg some info on how to make a custom header but didn't really understand how to go about doing it for this.  I want to keep it the same look as it is now but instead of using the image tag to grab the photo I want to use the cpmfetch.php file to do it so it links to the photo

thanks for your help!!!!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 23, 2005, 03:30:49 pm
Sorry to bother you with such a basic problem as the path to the config-file. I searched this thread and the docs but didn't find anything on this yet. Tried all the possible paths but no... :-[

Somehow the Document_Root is not correct, the script puts var/www in front of the Partial path to CPG I put in cftest.php.
The result is like this:

Code: [Select]
5 You set your partial URL to /site/new/scripts/cm 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 ***.***.*** 2.4.27-2-686 #1 Mon May 16 17:03:22 JST 2005 i686 INFO
40 WebServer = Apache/1.3.33 Ben-SSL/1.55 (Debian GNU/Linux) PHP/4.3.10-15 INFO
45 PHP Version = 4.3.10-15 INFO
55 DOCUMENT_ROOT: /var/www INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/user/public_html/site/new/scripts/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /var/www/site/new/scripts/cm/include/config.inc.php

The config file is in /home/user/site/ etc. /var/www/ is not the root for my site. What's going wrong? php(info) gives for the root 'no value'  ???

Yeah.  Its probably symlinked in there or something.  Servers can do some strange stuff...

Check your /var/www directory and see whats there... it should still work.   Are you hosted or self hosted?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: MAher on August 24, 2005, 12:29:14 pm
/var/www is used for phpmyadmin, MRTG server statistics and for the main website of the server or so. All the users ar in /home/user and so is my gallery.
I am hosted, by a friend that is.. and tried to use cpmfetch even though I got an error but didn't work. But why is the script adding /var/www?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 24, 2005, 03:28:54 pm
/var/www is used for phpmyadmin, MRTG server statistics and for the main website of the server or so. All the users ar in /home/user and so is my gallery.
I am hosted, by a friend that is.. and tried to use cpmfetch even though I got an error but didn't work. But why is the script adding /var/www?

CpmFetch uses the apache DOCUMENT_ROOT setting to figure out the path to your web documents.  On most servers this works correctly, on your's - the personal directory is not represented in that.

Try this:

In the top of the cftest.php page (and future subsequent pages you add it into)

set

$_REQUEST['DOCUMENT_ROOT'] = "/home/user/public_html";

That should change it for the duration of the request.  We've seen strange Document_root behavior with many IIS servers, but this is the first time with apache.

Let me know how that works

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: smoke10010 on August 25, 2005, 11:40:16 am
does this work with e107... i find that a lot of mods and hacks work with e107 even though it's been ported into the system since it basically is coppermine with a few sligh modifications which don't effect how e107 runs as a whole.. chances are i'm going to test it either but it'd be nice if someone were able to let me know it works.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: MAher on August 25, 2005, 12:56:19 pm
OK, your suggestion to put
$_REQUEST['DOCUMENT_ROOT'] = "/home/user/public_html";

in the top of cftest.php didn't work, no effect on the path whatsoever.

But my host used a symlink() to make /var/www/ point to /home/ as well so /var/www/user is the same as /home/user/public_html and that works great although it's in fact a workaround.

According to him the setup of the server is rather standard this way (working with virtual hosts for all users)
But maybe a suggestion: why not let us fill in the whole path, not just a partial path? Or has this to do with compatibility with IIS or some hosts restricting access or so?

Only thing is: I get a My_SQL error :( :

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Code: [Select]
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
/home/user/public_html/site/new/scripts/cm/cpmfetch/cpmfetch_dao.php on line 710

If you do not see thumbnails, or get more warnings then something is pretty wrong :(

I am running the 1.4.1 beta version of cpg, does that have any impact?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 25, 2005, 03:44:40 pm

Yep, I posted a about a week ago about the 1.4.1 has a few database changes.

if you are using a newer version of CpmFetch, open cpmfetch_dao.php and look for the two big long SQL statements near the top (Before the first function anyway) - one is commented out.  Switch which one is commented (instructions are in there also).

its a temporary fix till I get a better way to handle the new database layout.

As for Apache, yes virtual servers are pretty standard... Its just document_root being set differently, which I have not come across before.  Of course, that could just be dumb luck on my part :)


OK, your suggestion to put
$_REQUEST['DOCUMENT_ROOT'] = "/home/user/public_html";

in the top of cftest.php didn't work, no effect on the path whatsoever.

But my host used a symlink() to make /var/www/ point to /home/ as well so /var/www/user is the same as /home/user/public_html and that works great although it's in fact a workaround.

According to him the setup of the server is rather standard this way (working with virtual hosts for all users)
But maybe a suggestion: why not let us fill in the whole path, not just a partial path? Or has this to do with compatibility with IIS or some hosts restricting access or so?

Only thing is: I get a My_SQL error :( :

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Code: [Select]
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
/home/user/public_html/site/new/scripts/cm/cpmfetch/cpmfetch_dao.php on line 710

If you do not see thumbnails, or get more warnings then something is pretty wrong :(

I am running the 1.4.1 beta version of cpg, does that have any impact?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 25, 2005, 03:47:27 pm
does this work with e107... i find that a lot of mods and hacks work with e107 even though it's been ported into the system since it basically is coppermine with a few sligh modifications which don't effect how e107 runs as a whole.. chances are i'm going to test it either but it'd be nice if someone were able to let me know it works.

Essentially if you can execute code from your e107 layout, then yes this can be made to work.

Somehow.  We've been able to do all the other content systems that came along - but I can't say that I have tried it with e107
(Although I here good things about e107)

There is another thread here for integrating into portals, if you have any problems post there and we will see what we can do...  If you get it working, also post so i can mark it off - I'd greatly appreciate it :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: MAher on August 26, 2005, 09:12:11 am

Yep, I posted a about a week ago about the 1.4.1 has a few database changes.

if you are using a newer version of CpmFetch, open cpmfetch_dao.php and look for the two big long SQL statements near the top (Before the first function anyway) - one is commented out.  Switch which one is commented (instructions are in there also).

its a temporary fix till I get a better way to handle the new database layout.

As for Apache, yes virtual servers are pretty standard... Its just document_root being set differently, which I have not come across before.  Of course, that could just be dumb luck on my part :)

Now it works like a charm! Great job and thanks a lot!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 26, 2005, 03:43:22 pm

Yep, I posted a about a week ago about the 1.4.1 has a few database changes.

if you are using a newer version of CpmFetch, open cpmfetch_dao.php and look for the two big long SQL statements near the top (Before the first function anyway) - one is commented out.  Switch which one is commented (instructions are in there also).

its a temporary fix till I get a better way to handle the new database layout.

As for Apache, yes virtual servers are pretty standard... Its just document_root being set differently, which I have not come across before.  Of course, that could just be dumb luck on my part :)

Now it works like a charm! Great job and thanks a lot!

Ironically it is due to a new feature I put in just a few weeks ago :(

Anyway, I am planning a new version with an installer and tighter integration into cpg overall.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Andreas W. on August 27, 2005, 12:44:32 am
Hi,
i could need some help.

After uploading all files i tried /cftest.php

Everything seems fine (PASS), except the thumbnail images are not displayed (although the links to the big photos work).

I noticed that the thumbnail links are corrupt:

example: http://albums/userpics/10051/thumb_wels_1.jpg

It should be http://www.mywebsite.com/albums/userpics/10051/thumb_wels_1.jpg

Perhaps it helps that i´m using a subdomain for the gallery like http://gallery.mywebsite.com
but mysqldb is here: http://www.mywebsite.com

Any help appreciated.
thank you
andreas

Code: [Select]
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 dd5738 2.4.20-4GB-athlon #1 Fri Jan 14 15:04:28 UTC 2005 i686 INFO
40 WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 mod_perl/1.27 PHP/4.3.10 mod_ssl/2.8.12 OpenSSL/0.9.6i INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /www/htdocs/_removed_/ INFO  *edited*
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /www/htdocs/_removed_/cftest.php INFO *edited*
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: smoke10010 on August 27, 2005, 02:35:06 am
i tried getting cpm fetch to work with e107 but the images don't display... all the tests pass but the calls don't work.. unfortunately i don't know enough php to modify it enough to work but just a heads up i guess
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on August 27, 2005, 03:28:41 pm
The e107 port goes unsupported, I guess CPMFetch was not designed to work with e107. We (the coppermine dev team) have no idea how e107 works, and I guess it's the same for vuud (please correct me if I'm wrong). The e107 port is just that: an unsupported port, where mods or hacks that have been made for standalone coppermine versions may work, but some certainly won't.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 27, 2005, 03:40:55 pm
The e107 port goes unsupported, I guess CPMFetch was not designed to work with e107. We (the coppermine dev team) have no idea how e107 works, and I guess it's the same for vuud (please correct me if I'm wrong). The e107 port is just that: an unsupported port, where mods or hacks that have been made for standalone coppermine versions may work, but some certainly won't.

Hello all,

Yes, I have no idea how e107 works, but so far we've gotten it working with all CMS's we've tried.  They have all just been a little different.  If you can program e107 to run code in its templates, you can get cpmfetch working.  It mostly comes down to:

 1) Setting the right path from where e107 executes to cpmfetch
 2) Working out any strange issues with paths

Hopefully later today I will have some time to answer this one and the other question...  I also want to get some more work done on cpmfetch as IRL it's been too busy lately.

So check back later in the other forum (for stuff like this) and maybe I will have an answer

http://forum.coppermine-gallery.net/index.php?topic=19528.0

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: SolidArt on August 27, 2005, 06:46:42 pm
Please HELP!
In test everything seems allright, but

Code: [Select]
Trying to display some images:

Notice: Undefined variable: SERVER_NAME in /usr/home/shkola/gallery/include/config.inc.php on line 7

In source code there're no images, just <table><tr></tr></table>.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 27, 2005, 09:19:01 pm
Please HELP!
In test everything seems allright, but

Code: [Select]
Trying to display some images:

Notice: Undefined variable: SERVER_NAME in /usr/home/shkola/gallery/include/config.inc.php on line 7

In source code there're no images, just <table><tr></tr></table>.

Strange, I don't use SERVER_NAME in any of my code that I know of... can you see whats in your config.inc.php file?  Mind you, if you post it - make sure to XXXXX over your database username and password



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Andreas W. on August 27, 2005, 10:37:40 pm
i could need some help.

No ideas? =:-/
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on August 28, 2005, 11:25:53 am
Hi,
i could need some help.

After uploading all files i tried /cftest.php

Everything seems fine (PASS), except the thumbnail images are not displayed (although the links to the big photos work).

I noticed that the thumbnail links are corrupt:

example: http://albums/userpics/10051/thumb_wels_1.jpg

It should be http://www.mywebsite.com/albums/userpics/10051/thumb_wels_1.jpg

Perhaps it helps that i´m using a subdomain for the gallery like http://gallery.mywebsite.com
but mysqldb is here: http://www.mywebsite.com

Any help appreciated.
thank you
andreas

Code: [Select]
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 dd5738 2.4.20-4GB-athlon #1 Fri Jan 14 15:04:28 UTC 2005 i686 INFO
40 WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 mod_perl/1.27 PHP/4.3.10 mod_ssl/2.8.12 OpenSSL/0.9.6i INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /www/htdocs/_removed_/ INFO  *edited*
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /www/htdocs/_removed_/cftest.php INFO *edited*
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
i could need some help.

No ideas? =:-/
Don't post a dummy placeholder URL, but actual links - makes trouble-shooting and support much easier.

Joachim
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: SolidArt on August 28, 2005, 11:36:48 am
my config.inc.php:

Code: [Select]
<?php
// Coppermine configuration file
// Silly safe mode
define('SILLY_SAFE_MODE'1);

$_SERVER["SERVER_NAME"] = "shkola.lv";
define("$SERVER_NAME","shkola.lv");
// MySQL configuration
$CONFIG['dbserver'] =                         '****';        // Your database server
$CONFIG['dbuser'] =                         '****';        // Your mysql username
$CONFIG['dbpass'] =                         '*****';                // Your mysql password
$CONFIG['dbname'] =                         '****';        // Your mysql database name

// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] =                'cpg132_';
?>

strange, that he says that $SERVER_NAME is not defined.

I really need your help. I have only two days to correct that problem.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on August 28, 2005, 12:11:58 pm
ignore the notice, post an actual error message. A link might help as well (as suggested in the cpmFetch docs).
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: SolidArt on August 28, 2005, 12:31:49 pm
Here is the link:
http://shkola.lv/gallery/fetch/cftest.php

And the config.inc.php above.

My hosting administrator asked me to comment the line
Code: [Select]
define("$SERVER_NAME","shkola.lv");
i've made this, so the line
Code: [Select]
Notice: Undefined variable: SERVER_NAME in /usr/home/shkola/gallery/include/config.inc.php on line 7 dissappeared, but i can't see the thumbnails.

I didn't change prefix.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: SolidArt on August 28, 2005, 04:45:52 pm
OK, guys...
I couldn't wait for so long. Now everything works fine, 'cause I use version 1.4.1 now, but probably there are some bugs in the latest version. You should test it much more, before publishing
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 28, 2005, 05:16:12 pm
OK, guys...
I couldn't wait for so long. Now everything works fine, 'cause I use version 1.4.1 now, but probably there are some bugs in the latest version. You should test it much more, before publishing

Sorry, what am I missing here?  Which version are you having a problem with (as far as CPG goes?)   Are you having problems with CPG 1.4.1 and cpmfetch?

mind you, that the cftest script turns up the error and warning reporting, so if there is a warning from cpg 1.4.1 BETA (yes it is a BETA, which means not perfect, which means it is out so people can test it, which means it is possible there is some problems) it may be uncovered by the cftest script - while not being terribly important.  In this case it threw me off since you did not say you were running the beta.  As for cpmfetch, there have been several postings and release notes saying how to get it running with the beta.

EVERYONE:  PLEASE STATE WHAT VERSION OF CPG YOU ARE RUNNING WHEN YOU POST FOR HELP HERE!!!  I WANT TO HERE ABOUT BUGS WITH EITHER THE BETA OR THE OLD, BUT I NEED TO KNOW WHICH ONE YOU ARE RUNNING.  WHY AM I SHOUTING???  CAUSE THIS IS IMPORTANT DAMNIT :)





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 28, 2005, 05:19:26 pm
i could need some help.

No ideas? =:-/

I am still dumbfounded that you actually managed to get www.mysite.com :)

Seriously though, a actual URLs would be helpful.  Crossing subdomains can be tricky.

Vuud

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 28, 2005, 06:19:54 pm
i tried getting cpm fetch to work with e107 but the images don't display... all the tests pass but the calls don't work.. unfortunately i don't know enough php to modify it enough to work but just a heads up i guess


Smoke18,

I posted to the other thread on this one... I am not sure where you are getting stuck, but it may get you going

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


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Andreas W. on August 29, 2005, 07:58:25 pm
deleted
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mylogon on August 30, 2005, 11:17:37 am
I have installed and ran cftest and it runs fine.  But placing your simple open code:

Code: [Select]
?php
        require_once "../cpmfetch/cpmfetch.php";
        $objCpm = new cpmfetch("/gallery");
?>

in the cpmfetch directory with the gallery called gallery (file only has this in it) - all i get is:

Fatal error: Cannot instantiate non-existent class: cpmfetch in /home/real_username_dir/public_html/cpmfetch/index.php on line 3

So what do I have wrong.  Per your instructions, I have the correct path, but ...

Should it be 
Code: [Select]
$objCpm = new cpm("/gallery"); as it is in cftest?

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 30, 2005, 03:57:41 pm

Your correct. 

Your probably also the first person to read the instructions!

Yes, use cpm instead of cpmfetch

I will fix the doc's today (I found where you found that)

Sorry for this



I have installed and ran cftest and it runs fine.  But placing your simple open code:

Code: [Select]
?php
        require_once "../cpmfetch/cpmfetch.php";
        $objCpm = new cpmfetch("/gallery");
?>

in the cpmfetch directory with the gallery called gallery (file only has this in it) - all i get is:

Fatal error: Cannot instantiate non-existent class: cpmfetch in /home/real_username_dir/public_html/cpmfetch/index.php on line 3

So what do I have wrong.  Per your instructions, I have the correct path, but ...

Should it be 
Code: [Select]
$objCpm = new cpm("/gallery"); as it is in cftest?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: c0n574nz0 on September 02, 2005, 06:25:41 am
I can't download it! why? it seems like i'm not allowed to view attachments...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on September 02, 2005, 09:15:32 am
goto http://cpmfetch.fistfullofcode.com/ and download from there.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Andreas W. on September 03, 2005, 09:50:53 am
Any ideas to help me with my problem?
thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 05, 2005, 05:30:45 am
Any ideas to help me with my problem?
thanks

Sorry, I have been building and installing a router for the past few days.  I've been getting home at 2am, and getting up and heading back.

Little time for cpmfetch, but there is soooo much I still want to do.

I may be able to look at it more tomorrow afternoon.  Sorry for the hold up.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chr1831 on September 08, 2005, 07:35:51 am
i dont know if this is the right place but ive been looking around for the right place and i coudlent start a topic..., so sorry if its wrong :(,

help please

i would like to set up cpmfetch on my art page, put i want it to show the images at there full size and still randomly how on earth would i do this???, if you could help i would love this :D
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 08, 2005, 02:50:22 pm
i dont know if this is the right place but ive been looking around for the right place and i coudlent start a topic..., so sorry if its wrong :(,

help please

i would like to set up cpmfetch on my art page, put i want it to show the images at there full size and still randomly how on earth would i do this???, if you could help i would love this :D

Yes, this is the correct place

Absolutely that can be done

Once you get through the getting started stuff...

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html
and
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html
(See the imagesize tag)

Hope that helps...  some people get mad when I don't want to retype documentation into posts just for them... its not meant to be insultive or anything...  Its just the best place to look.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chr1831 on September 08, 2005, 04:26:19 pm
No Problem  ;D
is there a way just 2 convert the calls of the images from the fetch to <img src=""> and then it would display them in full size :D
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 08, 2005, 05:38:02 pm
No Problem  ;D
is there a way just 2 convert the calls of the images from the fetch to <img src=""> and then it would display them in full size :D

I am not following you...  If you call it with the imagesize setting, you can tell it to return a large version of the photo...  See the second link.

Or am I missing something?  Which is possible
(I was wrong once) :)






Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chr1831 on September 09, 2005, 01:31:29 am
i mean is it posiable to have cpfetch return the codeing as img src="" so it is exactly as if u where opening it at 100% instead of like 20, 30% where they are some what distorted
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 11, 2005, 01:03:35 am
i mean is it posiable to have cpfetch return the codeing as img src="" so it is exactly as if u where opening it at 100% instead of like 20, 30% where they are some what distorted

If you are asking if it can return the full size image, yes.

Its the imagesize => large on the page I sent you.  That will not change it at all.

If you are asking if it can return img src without the rest of the stuff it generates, yes - but not easily.  You need to get the data back and make some additional calls




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chr1831 on September 11, 2005, 02:00:18 am
$options = array( 'subtitle' => '%t' , 'imagesize => "large"' );
$objCpm->cpm_viewRandomMedia(6,3,$options);

whats wrong with this it = no works :/
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 11, 2005, 02:27:08 am
$options = array( 'subtitle' => '%t' , 'imagesize => "large"' );
$objCpm->cpm_viewRandomMedia(6,3,$options);

whats wrong with this it = no works :/

try this:

$options = array( 'subtitle' => '%t' , 'imagesize' => "large" );
$objCpm->cpm_viewRandomMedia(6,3,$options);

Missing single quote on imagesize in above listing
Extra quote on end of large
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nate on September 11, 2005, 10:10:00 pm
I just downloaded this and it should work, but it doesn't.

    * Include what version of coppermine you are using 1.3.2
    * a link to your website and gallery http://haylieonline.com/pictures
    * a link to an example of the problem (if possible) http://haylieonline.com/cpmfetch/cftest.php no thumbnails are shown
    * how computer savvy you are (newbie, intermediate, damn good) probably above intermediate
    * what kind of web server you are running on (if known) Apache 1.x
    * Include the syntax of the command you are using. n/a, just the test script

Everything passes, I set the cpg path to /pictures. There's a pictures subdomain but /pictures is the same place. I'm pretty sure all the settings are default; I checked the prefixes and they are.
It does open and close a table tag but there aren't img tags, etc.
Yes, my host is slow, sorry ;) thanks in advance

Edit: Right after I posted I remembered our CPG uses the SMF bridge... I assume that wouldn't have anything to do with it...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 12, 2005, 06:07:02 am
I just downloaded this and it should work, but it doesn't.

    * Include what version of coppermine you are using 1.3.2
    * a link to your website and gallery http://haylieonline.com/pictures
    * a link to an example of the problem (if possible) http://haylieonline.com/cpmfetch/cftest.php no thumbnails are shown
    * how computer savvy you are (newbie, intermediate, damn good) probably above intermediate
    * what kind of web server you are running on (if known) Apache 1.x
    * Include the syntax of the command you are using. n/a, just the test script

Everything passes, I set the cpg path to /pictures. There's a pictures subdomain but /pictures is the same place. I'm pretty sure all the settings are default; I checked the prefixes and they are.
It does open and close a table tag but there aren't img tags, etc.
Yes, my host is slow, sorry ;) thanks in advance

Edit: Right after I posted I remembered our CPG uses the SMF bridge... I assume that wouldn't have anything to do with it...

Pre recorded:  Today I cut up my left pointer finger on a table saw.  While the wound required few stiches, I have an enormous dressing on it that makes it very hard to type with.  Please forgive short, abbreviated messages - they are simply because it takes me too long to type with one hand.  Thank you.


probably due to there not being any users in the coppermine users table.  How many smf users?  You van try creating them in coppermine... same problem we had with the phpbb bridge.  lemme know ifd you need help on that. 

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Shadower on September 12, 2005, 07:56:49 pm
What's the cpm command for showing the textual-link to the last 10 files added.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nate on September 12, 2005, 10:44:15 pm
probably due to there not being any users in the coppermine users table.  How many smf users?  You van try creating them in coppermine... same problem we had with the phpbb bridge.  lemme know ifd you need help on that. 
There are about 100 SMF users and 1 CPG user. Do I need to create 100 users in Coppermien? I tried adding a row in CPG's user db but had no effect... so I don't really know what I'm doing ;).
Thanks for the help.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 12, 2005, 10:48:23 pm
probably due to there not being any users in the coppermine users table.  How many smf users?  You van try creating them in coppermine... same problem we had with the phpbb bridge.  lemme know ifd you need help on that. 
There are about 100 SMF users and 1 CPG user. Do I need to create 100 users in Coppermien? I tried adding a row in CPG's user db but had no effect... so I don't really know what I'm doing ;).
Thanks for the help.

Woof... Let me mull that over... 100 users.  Not sure if its easier to just recode the query or code up something to move user information :)

Are they in the same database?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 12, 2005, 10:55:51 pm
What's the cpm command for showing the textual-link to the last 10 files added.

Pre recorded:  Sep 11th I cut up my left pointer finger on a table saw.  While the wound required few stiches, I have an enormous dressing on it that makes it very hard to type with.  Please forgive short, abbreviated messages - they are simply because it takes me too long to type with one hand.  Thank you.

Function is viewLastAddedMedia from this page
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s03.html

Need options array in your call
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html

You need noimage option from this page, also subtitle link
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html

You probably want a subtitle so something shows up
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html

Now, if you don't actually want to try to learn this yourself, or check the docs out... it would be something like this:

$options = array("noimage" => "", "subtitlelink" => "", 'subtitle' => 'Image %t is %S KB');
cpm_viewLastAddedMedia(10,1,$options);

Or something like that

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nate on September 12, 2005, 11:28:27 pm
probably due to there not being any users in the coppermine users table.  How many smf users?  You van try creating them in coppermine... same problem we had with the phpbb bridge.  lemme know ifd you need help on that. 
There are about 100 SMF users and 1 CPG user. Do I need to create 100 users in Coppermien? I tried adding a row in CPG's user db but had no effect... so I don't really know what I'm doing ;).
Thanks for the help.

Woof... Let me mull that over... 100 users.  Not sure if its easier to just recode the query or code up something to move user information :)

Are they in the same database?




Yes, same database. We can delete most of them (assuming that wouldn't cause bad things with SMF), but what about when more sign up? Will cpmfetch quit working?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 13, 2005, 03:01:30 am

No, not to delete them... we need to replicate them into the cpg user table if anything



probably due to there not being any users in the coppermine users table.  How many smf users?  You van try creating them in coppermine... same problem we had with the phpbb bridge.  lemme know ifd you need help on that. 
There are about 100 SMF users and 1 CPG user. Do I need to create 100 users in Coppermien? I tried adding a row in CPG's user db but had no effect... so I don't really know what I'm doing ;).
Thanks for the help.

Woof... Let me mull that over... 100 users.  Not sure if its easier to just recode the query or code up something to move user information :)

Are they in the same database?




Yes, same database. We can delete most of them (assuming that wouldn't cause bad things with SMF), but what about when more sign up? Will cpmfetch quit working?

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Vini on September 16, 2005, 01:12:27 am
Please
can anyone help me???
I only want to show the Last Updated Albums on my website!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 16, 2005, 06:17:06 am
Please
can anyone help me???
I only want to show the Last Updated Albums on my website!

How far did you get so far?

This could be what you are looking for:

cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")
in the docs on this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s05.html
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: isloera on September 21, 2005, 05:21:33 am
First of all, I want to thank vuud for cpmfetch. Ok now I will continue with my post  ;)


I downloaded copperminefetch-1.6.2 fisrts and I followed the instructions. I opened cftest.php and everything passed the only weird thing was that the thumbnails were not showing. I tried the version before, copperminefetch-1.6.1, I looked everywhere for a solution and after two hours I found out what was the problem thanks to some posts in this thread.

I'm using Coppermine bridged with phpBB, and the only user that posts pictures is me :). My users send me the pictures and I put them in the Gallery.  The solution, as Vuud suggested before, was to add my username as used in phpBB to the coppemine users table. After doing that it worked :o, well kind of.  The thumbnails dind't show, but the captions with the links to the thumbnails were there and some errors related to the fetching of some more.   After Upgrading back to  copperminefetch-1.6.2 it worked fine and the Thumbnails showed. So far it works I still have to use the functions.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 21, 2005, 05:08:47 pm

Thanks!

Yeah, the various bridges have turned out to be a pain.  Glad to hear you survived the pain.

A new version will be out in a week or two that will be drastically different from the current one, at least from the setup and running point of view.  Just so people don't think I have disappeared completely.

Vuud

First of all, I want to thank vuud for cpmfetch. Ok now I will continue with my post  ;)


I downloaded copperminefetch-1.6.2 fisrts and I followed the instructions. I opened cftest.php and everything passed the only weird thing was that the thumbnails were not showing. I tried the version before, copperminefetch-1.6.1, I looked everywhere for a solution and after two hours I found out what was the problem thanks to some posts in this thread.

I'm using Coppermine bridged with phpBB, and the only user that posts pictures is me :). My users send me the pictures and I put them in the Gallery.  The solution, as Vuud suggested before, was to add my username as used in phpBB to the coppemine users table. After doing that it worked :o, well kind of.  The thumbnails dind't show, but the captions with the links to the thumbnails were there and some errors related to the fetching of some more.   After Upgrading back to  copperminefetch-1.6.2 it worked fine and the Thumbnails showed. So far it works I still have to use the functions.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: RockCitySaint on September 21, 2005, 09:58:39 pm
Hi Vuud, I fixed my problem that I had before, but now I have a new one:

I searched for this and looked in the docs and didn't see anything, so anyways...
Some of my users uploaded pictures that weren't .jpg but instead .jpe and cpmfetch wont display the images. They display the filename or something. Is there a way to get cpmfetch to display them, I tried looking through the code but wasn't sure about it and didn't want to mess it up.

thanks,
RCS
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 21, 2005, 10:27:44 pm

Well, there are two solutions...

 1) Get rid of those users.  In any given system users are generally related to most problems.

 2) We have to tell cpmfetch that jpe's are okay.  Are jpe's jpgs basically?


Hi Vuud, I fixed my problem that I had before, but now I have a new one:

I searched for this and looked in the docs and didn't see anything, so anyways...
Some of my users uploaded pictures that weren't .jpg but instead .jpe and cpmfetch wont display the images. They display the filename or something. Is there a way to get cpmfetch to display them, I tried looking through the code but wasn't sure about it and didn't want to mess it up.

thanks,
RCS
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: smfsupport on September 21, 2005, 11:44:31 pm
yes, they are.

PS. Can't get rid of those users, and I can't really explain to them what they're doing wrong because they're dont understand computers, so its either tell cpmfetch they're okay or manually change the extensions through coppermine (PAIN).
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: RockCitySaint on September 21, 2005, 11:46:51 pm
^^^ Sorry, that was me. I logged in as smfsupport because I was having a similar problem as gau gau was having with smf on my site and wanted to see what was wrong.

RCS
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Andreas W. on September 23, 2005, 10:25:19 pm
Any ideas to help me with my problem?
thanks

Sorry, I have been building and installing a router for the past few days.  I've been getting home at 2am, and getting up and heading back.

back home? ;-)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nyoutdoors on September 26, 2005, 06:39:01 am
Every time I try to download the newest version fom the initial post in this thread, I keep getting taken back to the sign-in page.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on September 26, 2005, 07:28:48 am
Then try downloading from the project homepage http://www.fistfullofcode.com/projects/copperminefetch/
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: cyprus07 on September 27, 2005, 03:39:40 am
hi, i tried instaling cpmfetch on my site and i get this error


80   CPG Config file not found: /home2/polionli/public_html/cpmfetch/include/config.inc.php


what have i done wrong
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 27, 2005, 06:57:57 am
hi, i tried instaling cpmfetch on my site and i get this error


80   CPG Config file not found: /home2/polionli/public_html/cpmfetch/include/config.inc.php


what have i done wrong

Did you change the path at the top of the cftest.php file to point at your coppermine gallery?

Can you post a link to the cftest.php file?  Or PM me if you are security concerned

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 27, 2005, 06:59:00 am
Any ideas to help me with my problem?
thanks

Sorry, I have been building and installing a router for the past few days.  I've been getting home at 2am, and getting up and heading back.

back home? ;-)


Yeah, I am back...  How is your problem?  Sometimes these things have a way of resolving themselves...

 :)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: cyprus07 on September 27, 2005, 07:55:26 am
here is the link where cftest.php

is www.poli-online.net/cpmfetch/cftest.php
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 27, 2005, 08:22:19 am
here is the link where cftest.php

is www.poli-online.net/cpmfetch/cftest.php

Yep, you need to edit the top of the cftest.php file and change the variable to wherever your CPG install is (not cpmfetch)

So if your photo gallery is in /gallery - you need to use that.

I can't tell from looking at the site
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nk111 on September 27, 2005, 11:36:52 am
Hi there,

i downloaded and installed cpmfetch today. After setting the path in cftest i got
no more errors there but no pictures at all. Same in cfimageget. I just get a 1x1
empty gif there which seems to be the problem.gif I guess.

Here's the url:

http://mad-d-sign.com/cpmfetch/cftest.php

http://mad-d-sign.com/cpmfetch/cfimageget.php

My CPG 1.3.5 is bridged with SMF 1.1 RC1. Could that be the problem. If so, any ideas
how to solve this?

regards
Nico

<edit>
Sorry, for not reading the recent posts. I guess, I'd have to create all the users in the cpg tables too? There are too many to do so... Any other way to solve the problem? Or should I just wait for a newer version?
</edit>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 27, 2005, 04:51:25 pm
Hi there,

i downloaded and installed cpmfetch today. After setting the path in cftest i got
no more errors there but no pictures at all. Same in cfimageget. I just get a 1x1
empty gif there which seems to be the problem.gif I guess.

Here's the url:

http://mad-d-sign.com/cpmfetch/cftest.php

http://mad-d-sign.com/cpmfetch/cfimageget.php

My CPG 1.3.5 is bridged with SMF 1.1 RC1. Could that be the problem. If so, any ideas
how to solve this?

regards
Nico

<edit>
Sorry, for not reading the recent posts. I guess, I'd have to create all the users in the cpg tables too? There are too many to do so... Any other way to solve the problem? Or should I just wait for a newer version?
</edit>



Do you mean wait for a newer version of the SMF Bridge?   I am not sure that I will be supporting all of the hacks that come out for coppermine photo gallery.  I may change it so that it ignores user data completely, which would solve this problem.

Hmmm,

Ah nevermind... I thought we could get away with something, but not really.  Too bad.  A few solutions leap to mind... you can recode the cpm_dao sql to use the smf user tables, or just take out the references to anything in the user table in the sql at the top and then in all the different sql calls lower.  The other solution is to write some sort of sql call that will take the smf users and copy the corresponding data into the cpg user tables.

Wish I could be more help on this, but I don't use the SMF bridge and I am having a tough time finding time to get ready for the 1.4 release of CPG never mind my personal wish list for CpmFetch

Good luck and let me know if you have any questions







Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: cyprus07 on September 28, 2005, 03:21:36 am
ok. now it works fine. however how do i add it in my site? and instead of having 3 pictures i want to have them going downwards.

i want to ad it on my site www.poli-online.net on the left menu where you see the 2 pictures right now. how do i do that is there some kind of code?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 28, 2005, 04:08:05 am
ok. now it works fine. however how do i add it in my site? and instead of having 3 pictures i want to have them going downwards.

i want to ad it on my site www.poli-online.net on the left menu where you see the 2 pictures right now. how do i do that is there some kind of code?

Read the quickstart
http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php

Then if you are especially giddy, the documentation (the how to use stuff)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on September 28, 2005, 05:21:31 am
I hope this is the right thread,
On my site, I am displaying the two latest images. Is there a way I can seperate them to latest of each album (limiting it at two)?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 28, 2005, 05:48:16 am
I hope this is the right thread,
On my site, I am displaying the two latest images. Is there a way I can seperate them to latest of each album (limiting it at two)?

If you want to show the last image from two different categories, you could just make two calls to cpmfetch (hint: don't recreate the object, just add a second call).

Of course I could be misunderstanding the problem


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on September 28, 2005, 11:07:55 am

If you want to show the last image from two different categories, you could just make two calls to cpmfetch (hint: don't recreate the object, just add a second call).

Of course I could be misunderstanding the problem


If I  call it twice, i think it will simply display the last uploaded file twice.
How might I specify only to call one per album.

In other words, not two last uploaded files, but most recent file from latest two albums.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: cyprus07 on September 28, 2005, 03:44:23 pm


Read the quickstart
http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php

Then if you are especially giddy, the documentation (the how to use stuff)



ok i did what you said and put it here http://www.poli-online.net/cpmfetch/cpmfetch.php

however how do i include it in the code where i want it to be displayed. and if it can be like they have done it here http://www.poliaektimisoara.ro/forum/index.php  so that instead of going acros it goes down, and displays the Latest image, then 3 of the last images in the last 3 albums


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 29, 2005, 06:16:37 am

If you want to show the last image from two different categories, you could just make two calls to cpmfetch (hint: don't recreate the object, just add a second call).

Of course I could be misunderstanding the problem


If I  call it twice, i think it will simply display the last uploaded file twice.
How might I specify only to call one per album.

In other words, not two last uploaded files, but most recent file from latest two albums.

Yes, just use the function call that asks for the last uploaded photo from an album

do it twice, asking for different albums

Check out:  cpm_viewLastAddedMediaFrom( ) on this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s03.html

do call it twice, the first time for album 1 and the second time for album 2 (insert your own album numbers)

Lemme know if I am still being dense... its been a loooong day



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on September 29, 2005, 06:29:54 am
i think you are saying:
call one: display most recent photo from [album1]
call two: display most recent photo from [album2]

But instead of displaying most recent from album, I'm looking to display most recent from gallery (only allowing one per album)


Currently I am displaying the two most recent gallery wide.

Same thing, except somewhere in there might be a function:
"After insert recent photo 1, check recent photo 2.
If recent photo 2 is from same album, check recent photo 3, etc."



I havent actually tried what you are asking yet. It doesnt seem like its going to work, but if you want I'll just shut up and just try what it is that you're saying.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 29, 2005, 07:08:32 am
i think you are saying:
call one: display most recent photo from [album1]
call two: display most recent photo from [album2]

But instead of displaying most recent from album, I'm looking to display most recent from gallery (only allowing one per album)


Currently I am displaying the two most recent gallery wide.

Same thing, except somewhere in there might be a function:
"After insert recent photo 1, check recent photo 2.
If recent photo 2 is from same album, check recent photo 3, etc."

I havent actually tried what you are asking yet. It doesnt seem like its going to work, but if you want I'll just shut up and just try what it is that you're saying.

So what you are saying is that you have more than two galleries, but you only want to show the newest 1 added to the last two galleries to be added to?

So they would come from different galleries each time then?

Your screwed on that one then.  Nothin in there to do that. 

If you have php know-how, you can get back a lot of recently added and cycle down till you find two from different galleries.  If you try this, let me know if you get stuck.

This page has some examples of extending cpmfetch that could get you headed down the right path
http://www.fistfullofcode.com/projects/copperminefetch/tests/test6.php

Sorry










Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on September 29, 2005, 07:15:02 am
Right, but NOT from two different galleries, but two different albums.

The current latestupdate fetch works great. It displays the two latest photos.
I am only trying to modify it to not display two images from the same album.

Does that make sense?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 29, 2005, 07:20:14 am
Right, but NOT from two different galleries, but two different albums.

The current latestupdate fetch works great. It displays the two latest photos.
I am only trying to modify it to not display two images from the same album.

Does that make sense?

When you say galleries do you mean categories?  Or two entirely different cpg installations?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on September 29, 2005, 07:22:26 am
I only have one gallery.
I have about four categories (with more to be added in the future)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 29, 2005, 07:25:04 am
I only have one gallery.
I have about four categories (with more to be added in the future)

Yeah, thats going to be custom coding to do that... regrettably.  If I can tomorrow I will ponder it.  So much to do.

Me sleep now
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on September 29, 2005, 07:26:38 am
sleep my friend.
and let me know if there is anything i can do in return.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mulesnx on September 29, 2005, 08:03:19 am
Hi there,

i downloaded and installed cpmfetch today. After setting the path in cftest i got
no more errors there but no pictures at all. Same in cfimageget. I just get a 1x1
empty gif there which seems to be the problem.gif I guess.

Here's the url:

http://mad-d-sign.com/cpmfetch/cftest.php

http://mad-d-sign.com/cpmfetch/cfimageget.php

My CPG 1.3.5 is bridged with SMF 1.1 RC1. Could that be the problem. If so, any ideas
how to solve this?

regards
Nico

<edit>
Sorry, for not reading the recent posts. I guess, I'd have to create all the users in the cpg tables too? There are too many to do so... Any other way to solve the problem? Or should I just wait for a newer version?
</edit>



I am having the same problem as this guy... Is it because my cpg is bridged with phpbb?  That is the only "hack" I have used at all.  How do I get around this, if there is a way??? Thanks..
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 29, 2005, 02:41:14 pm
Hi there,

i downloaded and installed cpmfetch today. After setting the path in cftest i got
no more errors there but no pictures at all. Same in cfimageget. I just get a 1x1
empty gif there which seems to be the problem.gif I guess.

Here's the url:

http://mad-d-sign.com/cpmfetch/cftest.php

http://mad-d-sign.com/cpmfetch/cfimageget.php

My CPG 1.3.5 is bridged with SMF 1.1 RC1. Could that be the problem. If so, any ideas
how to solve this?

regards
Nico

<edit>
Sorry, for not reading the recent posts. I guess, I'd have to create all the users in the cpg tables too? There are too many to do so... Any other way to solve the problem? Or should I just wait for a newer version?
</edit>


I am having the same problem as this guy... Is it because my cpg is bridged with phpbb?  That is the only "hack" I have used at all.  How do I get around this, if there is a way??? Thanks..


Probably is the same problem.  The problem is that the phpbb bridge does not use the cpg user table.  If you only have a few users, you can recreate them in the cpg database and that will solve your problem.

I am sure it could be automated for larger numbers of users.

So in short, if you add some users to cpg, it should start working

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nk111 on September 29, 2005, 04:24:45 pm
Do you mean wait for a newer version of the SMF Bridge?   I am not sure that I will be supporting all of the hacks that come out for coppermine photo gallery.  I may change it so that it ignores user data completely, which would solve this problem.

Hmmm,

Ah nevermind... I thought we could get away with something, but not really.  Too bad.  A few solutions leap to mind... you can recode the cpm_dao sql to use the smf user tables, or just take out the references to anything in the user table in the sql at the top and then in all the different sql calls lower.  The other solution is to write some sort of sql call that will take the smf users and copy the corresponding data into the cpg user tables.

Wish I could be more help on this, but I don't use the SMF bridge and I am having a tough time finding time to get ready for the 1.4 release of CPG never mind my personal wish list for CpmFetch

Good luck and let me know if you have any questions

Ok, I'm working on a cpmfetch_dao for the smf-bridged version. I'll post here if I get it working.

Another problem: Is it possible to change the way to get the document root? In my case it's wrong. As you can see here:

Code: [Select]
5 You set your partial URL to /_md/mad-d-sign.com/gallery PASS
10 No dots in partial url PASS
15 coppermine.php found PASS
20 coppermine_dao.php has been removed PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux powerbox.prohost.de 2.4.30 #13 SMP Tue Jul 19 03:33:01 CDT 2005 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.4.0 INFO
55 DOCUMENT_ROOT: /www/einsweb INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /www/einsweb/_md/mad-d-sign.com/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file

my apache document root the scripts reads from $_SERVER['DOCUMENT_ROOT'] as "/www/einsweb". But since this a shared server my real document root is /www/einsweb/_md/mad-d-sign.com! So I have to add the missing part in front of my partial url to pass the tests!

Ok, this worked, and after switching off the privacy mode by using $objCpm->cpm_unlock_private(true) i got a table on the test page. But now of couse the img and href url's are wrong because of the tweaked partial url.

I Guess a better solution would be to let the user define the absolute path to coppermine himself and maybe giving _SERVER["SCRIPT_FILENAME"] as hint?!

What do you think? I could imagine I'm not the only one who runs in this problem...

regards
Nico
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 29, 2005, 04:31:19 pm

Ok, this worked, and after switching off the privacy mode by using $objCpm->cpm_unlock_private(true) i got a table on the test page. But now of couse the img and href url's are wrong because of the tweaked partial url.

I Guess a better solution would be to let the user define the absolute path to coppermine himself and maybe giving _SERVER["SCRIPT_FILENAME"] as hint?!

What do you think? I could imagine I'm not the only one who runs in this problem...

regards
Nico


There is a small smattering of people that have had this problem... but it gets worse once you start including other web servers (IIS, etc).

Anyway, there are ways to override it...  Basically, do the setup so that it can find your cpg config file and then use these functions

cpm_OverridePathToCoppermine($newpath_)
cpm_OverrideUrlToCoppermine($newpath_)

The first changes what the program uses internally to find stuff
The second changes what it uses for links and stuff

The whole startup thing is being re-written into a new and glorious form that will bring wonderous functionality and new and exiting features to all.  This will be part of the CPG 1.4 support I am adding.

I'll need beta testers when its done, so if you are having problems - this could be a good thing to try.  I'll be posting to the mailing list.

Good luck





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mulesnx on September 29, 2005, 06:50:35 pm
I will try putting some people in my cpg table.  Thanks!!!  Oh yeah.  When do you plan on making this compatible with the new version of coppermine?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 29, 2005, 07:34:31 pm
I will try putting some people in my cpg table.  Thanks!!!  Oh yeah.  When do you plan on making this compatible with the new version of coppermine?

Well...  I planned on making it compatible a few weeks ago, but have not had time yet.  I am hoping to sit down and spend a few days just catching up and modiying stuff.  I would say before 1.4 is officially releases (or a day or two after as that will motivate me greatly)

You can get it to work with 1.4+ but it requires commenting one line out and uncommenting another.  That will make it work (its a very quick edit)

The release notes for 1.6.1 have some details. are here:
http://www.fistfullofcode.com/projects/copperminefetch/downloads/releasenote_1.6.1.txt
(but use 1.6.2 if you download one)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: GuTe on September 30, 2005, 09:06:49 am
great script!

How can i turn off so that it doesn't link to the pic?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nk111 on September 30, 2005, 02:02:41 pm
Hi,

for those you having trouble with cpmfetch and the smf-bridged cpg:

I made a version of cpmfetch_dao.php that works with the bridged version. I simply removed
all references to the cpg user tables. Of couse you can not use any user related information
in the format string for the pictures with that version. But it works fine if you just want the
pictures.

You can download the file here (http://www.mad-d-sign.com/smf/cpmfetch_dao_for_cpmfetch_1_6_0.zip)
and put in your cpmfetch folder.

regards
Nico
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 30, 2005, 02:45:27 pm
great script!

How can i turn off so that it doesn't link to the pic?

Check this page in the documentation
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s04.html
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nk111 on September 30, 2005, 03:41:48 pm
Can you add a version number to the download... as in, which version of cpmfetch it is based on.

Thanks

Done... Please modify your post also to update the quoted link.

Another one: Is it possible to get rid of these <br /> tags when i want no subtitle at all?
The only solution i found, is to set return type to "html" and then replace the tags myself.
This would be nice for future versions because it makes the table cells higher than necessary.

Thank you again for your great work
regards
Nico
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on September 30, 2005, 05:42:43 pm
Can you add a version number to the download... as in, which version of cpmfetch it is based on.

Thanks

Done... Please modify your post also to update the quoted link.

Another one: Is it possible to get rid of these <br /> tags when i want no subtitle at all?
The only solution i found, is to set return type to "html" and then replace the tags myself.
This would be nice for future versions because it makes the table cells higher than necessary.

Thank you again for your great work
regards
Nico

Sounds like some undesired behavior... I'll just fix it.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 01, 2005, 12:14:57 am
sleep my friend.
and let me know if there is anything i can do in return.

any luck?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: cyprus07 on October 01, 2005, 07:02:53 am


Read the quickstart
http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php

Then if you are especially giddy, the documentation (the how to use stuff)



ok i did what you said and put it here http://www.poli-online.net/cpmfetch/cpmfetch.php

however how do i include it in the code where i want it to be displayed. and if it can be like they have done it here http://www.poliaektimisoara.ro/forum/index.php  so that instead of going acros it goes down, and displays the Latest image, then 3 of the last images in the last 3 albums





can anyone help me with this question above?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 01, 2005, 10:14:51 pm
sleep my friend.
and let me know if there is anything i can do in return.

any luck?

And let this be a lesson to the rest of you... when I say something right before I go to sleep, I tend to forget about it.

Anyway, not sure if this is what you want, but I am sure this is what you are getting

Notes:

* Set the "album=33,18,2" to the ones you want included
* Set the $cnt=3 to the number of albums you have above
* The 100,100 will get the first 1000 photos.  The total must be more than that which would be added into the the last added album...

Anyway it stops processing as soon as it has 3 so you won't be parsing all 1000 results.

Nothing in here for linking, but you can add that in youself... you can peek at the top of cpmfetch_dao.php to see what names are available in the row... 


<?php
$objCpm->cpm_setReturnType("resultset");
$data = $objCpm->cpm_viewLastAddedMediaFrom(100, 100, "album=33,18,2");

$cnt = 3;  //Number of different albums to look for (set this to the number you added into the album= above)
$albumsfound = array();

foreach ($data as $row) {
   
   if (! in_array($row['pAid'],$albumsfound)) {
      $imagename = $objCpm->cpm->getImageToUse($row['pFilepath'], $row['pFilename'] ,"thumb_");
      print "<img src='$imagename'>";
      array_push($albumsfound,$row['pAid']);
      $cnt--;
      if ($cnt = 0) break;
   }
}

?>

Hope that gets you going... best of luck, rah rah, all that

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 01, 2005, 10:19:57 pm
thanks that helps alot. i owe you one.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 02, 2005, 05:36:16 am
thanks that helps alot. i owe you one.

No problem

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: zigzaggy on October 04, 2005, 01:12:08 am
Hello,
Is there a way to make this work on a Joomla (Mambo) site?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 04, 2005, 01:40:48 am
Hello,
Is there a way to make this work on a Joomla (Mambo) site?


According to the thread actually related to that sort of thing.. it does.
http://forum.coppermine-gallery.net/index.php?topic=19528.0

(Mambo anyway, no idea what a Joomia site is)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on October 04, 2005, 07:15:27 am
(Mambo anyway, no idea what a Joomia site is)
Joomla is a fork of Mambo, see http://forum.coppermine-gallery.net/index.php?topic=22120.0 e.a.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 05, 2005, 06:19:50 pm
I've been searching to display the date under the most recent pictures but havn't found anything.
Is it possible?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 05, 2005, 06:34:44 pm
I've been searching to display the date under the most recent pictures but havn't found anything.
Is it possible?

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html

See the entries for %w or %W

You may, or may not also be interested in this:
cpm_setDateFormat($format)  on the following page
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s02.html
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 05, 2005, 08:27:09 pm
thanks alot.
for those following this thread in the future,
i found some additional information at http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 05, 2005, 08:56:31 pm
Small note:

Code: [Select]
<?
include "../fetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
?>

<?
$objCpm->cpm_viewRandomMedia(1,2,$options);
?>

</td>
</tr>

<tr>
<td align="center" valign="middle"><?
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
?>
</td>
</tr>

I tried to add the optios array in it's own cell to prevent a long title from disrupting the layout of the images, but it wouldn't display.
Any suggestions either in TD, or CSS as to prevent long title images from disrupting layouts?

Thanks.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 05, 2005, 09:42:10 pm
Small note:

Code: [Select]
<?
include "../fetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
?>

<?
$objCpm->cpm_viewRandomMedia(1,2,$options);
?>

</td>
</tr>

<tr>
<td align="center" valign="middle"><?
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
?>
</td>
</tr>

I tried to add the optios array in it's own cell to prevent a long title from disrupting the layout of the images, but it wouldn't display.
Any suggestions either in TD, or CSS as to prevent long title images from disrupting layouts?

Thanks.


The $options has to preceed the call, otherwise it cannot work.

Code: [Select]
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
$objCpm->cpm_viewRandomMedia(1,2,$options);
The $options is not a command but a variable.

To illustrate, you could have also written it like so:

Code: [Select]
$objCpm->cpm_viewRandomMedia(1,2,array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" ));

As for long titles, I can't think of anything off the bat... they should wrap, but that won't help you with larger words.

How long are they?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 05, 2005, 09:47:08 pm
yeah i figured the options array had to be introduced before it was called.
the titles? see they're not neccessarily long, but if theyre longer (in width) than the picture, it pushes the picture up (disrupting my beautiful alignment).

i guess i could find a way to make the picture stay put in the tabe and any text under it to just extend the length of the table.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 05, 2005, 10:08:37 pm
yeah i figured the options array had to be introduced before it was called.
the titles? see they're not neccessarily long, but if theyre longer (in width) than the picture, it pushes the picture up (disrupting my beautiful alignment).

i guess i could find a way to make the picture stay put in the tabe and any text under it to just extend the length of the table.

What if you set the cells to valign top?  Either by css or by sending it through as an option...

there is an undocumented entry for options called "cellattributes"  you can send that through with 'cellattributes'=>'valign='top"'

Its only undocumented because I keep forgetting to document them.  They also exist for rows, tables, etc.

Sigh - there is just never enough time


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 05, 2005, 10:17:19 pm
Sigh - there is just never enough time

amen.

yeah thats what i'm trying to do now. tried in the table, and .css. ill get it eventually.
check out the screenshot, it will show you what i mean.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 06, 2005, 02:20:02 am
I've tried EVERYTHING.

I'm pretty sure it's on fetch side.
Any ideas?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 06, 2005, 04:43:17 am
I've tried EVERYTHING.

I'm pretty sure it's on fetch side.
Any ideas?

Okay, post some code here...  I'm sure its do able

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 06, 2005, 04:46:09 am
I hope you don't make me look like an idiot.
Code: [Select]
<table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="75%"><table width="100%" height="200" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td><table width="100%" height="200" border="0" cellpadding="0" cellspacing="0" class="orangeborder">
                            <tr>
                              <td height="23" colspan="2" background="../images/STFHotNews_bg.gif"><img src="../images/pg.gif" width="114" height="23"></td>
                              <td width="284" height="23" background="../images/STFHotNews_bg.gif"><div align="right"><img src="../images/STFHotNews_r.gif" width="3" height="23"></div></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top"><div align="center">
                                <p><strong>Random Photo
                                  Generator! <br>
                                    <a href="javascript:location.reload()" target="_self">Generate
                                Again</a></strong>
                                </p>
                                <table width="100" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td valign="top"><div align="center">
                                        <?
include "../fetch/cpmfetch.php";
$objCpm = new cpm('/gallery');

                                     
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
                                     
$objCpm->cpm_viewRandomMedia(1,2,$options);
?>
                                    </div></td>
                                  </tr>
                                </table>
                              </div></td>
                              <td width="50%" valign="top"><div align="center">
                                <p><br>
                                  <strong> <img src="../images/new.gif" width="19" height="9" border="0"> Most
                                Recent Pictures:<br>
                                  </strong>
                                  <?


$options = array( 'subtitle' => '%w', "tablestyle" => "lastaddedmedia" ); ?>
                                  <? $objCpm->cpm_viewLastAddedMedia(1,2,$options);
$objCpm->cpm_close();
?>
                                </p>
                                </div></td>
                            </tr>
                           
                        </table></td>
                      </tr>
                  </table></td>
                </tr>
              </table>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 06, 2005, 03:36:39 pm
I hope you don't make me look like an idiot.

Your example is great, but did not include any CSS which is how you are trying to solve the problem.

Try this just for fun, and let me know what happens.  I gave you the wrong syntax before on the undocumented call

The contents of the cellattributes has to be an array of things to add.  Try this, send a Snippet of the generated code if it does not work.

Code: [Select]
                         
$options = array( 'subtitle' => '%h views<br>%t',  "cellattributes"=>array("valign"=>"'top"));
$objCpm->cpm_viewRandomMedia(1,2,$options);


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 06, 2005, 06:39:27 pm
Hmm. tried it but it looks the same. Can't tell anything is different.

.CSS for Random Media

Code: [Select]
.lastaddedmedia {
font-family: Arial, Helvetica, sans-serif;
font-size: 5px;
font-style: italic;
color: #CCCCCC;
vertical-align: top;
}

P.S. I'm not entirely sure if it is reading this CSS.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 06, 2005, 07:13:48 pm
Hmm. tried it but it looks the same. Can't tell anything is different.

.CSS for Random Media

Code: [Select]
.lastaddedmedia {
font-family: Arial, Helvetica, sans-serif;
font-size: 5px;
font-style: italic;
color: #CCCCCC;
vertical-align: top;
}

P.S. I'm not entirely sure if it is reading this CSS.

Can you post the html generated from when you had the cellattributes added in?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 06, 2005, 07:17:32 pm
Code: [Select]
<table width="100" border="0" cellspacing="0" cellpadding="0">

                                  <tr>
                                    <td valign="top"><div align="center">
                                        <table  >
<tr>
<td valign="'top" ><a href="/gallery/displayimage.php?pos=-23"  ><img  src="/gallery//albums/userpics/10001/thumb_DSC03265.jpg" alt="DSC03265.jpg" title="DSC03265.jpg"  /></a><br /><br />19 views<br></td><td valign="'top" ><a href="/gallery/displayimage.php?pos=-307"  ><img  src="/gallery//albums/userpics/10001/thumb_RSCN1855.JPG" alt="RSCN1855.JPG" title="RSCN1855.JPG"  /></a><br /><br />22 views<br>True Mother with True Grandson</td>
</tr>

</table>


                                    </div></td>

                                  </tr>
                                </table>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 06, 2005, 07:27:57 pm
Code: [Select]
<table width="100" border="0" cellspacing="0" cellpadding="0">

                                  <tr>
                                    <td valign="top"><div align="center">
                                        <table  >
<tr>
<td valign="'top" ><a href="/gallery/displayimage.php?pos=-23"  ><img  src="/gallery//albums/userpics/10001/thumb_DSC03265.jpg" alt="DSC03265.jpg" title="DSC03265.jpg"  /></a><br /><br />19 views<br></td><td valign="'top" ><a href="/gallery/displayimage.php?pos=-307"  ><img  src="/gallery//albums/userpics/10001/thumb_RSCN1855.JPG" alt="RSCN1855.JPG" title="RSCN1855.JPG"  /></a><br /><br />22 views<br>True Mother with True Grandson</td>
</tr>

</table>


                                    </div></td>

                                  </tr>
                                </table>



One of us has some bad code

<td valign="'top" >

Should be

<td valign="top" >

Do you have an extra something in the cellattributes array?  I could have typed it wrong, so please don't go by how I did it.

should be

cellattributes => array ("valign" => "top");


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: willstein on October 06, 2005, 08:47:28 pm
One of us has some bad code

<td valign="'top" >

Should be

<td valign="top" >



I'll pretend I know what that means...





After trying:
Code: [Select]
cellattributes => array ("valign" => "top");

and my whole site crashing, i was like 'ahh hell'.

but then...
Code: [Select]
cellattributes => array ("valign" => "top"));... amazing.

you. are. amazing.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 06, 2005, 09:35:53 pm

Good, I am happy
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: toontastic on October 08, 2005, 12:54:14 pm
This seems to be the only place I can post, guess people can't post on the sub board ? Anyway I've just set this up on my site and everything has passed but I'm not getting the grid of images. I've checked the prefixes in Coppermine and they match what are in cpmfetch. Any ideas why this isn't work ? The ssi.php one works (sort of get a few errors) and I assume this must go sort of down the same route so I'm not sure why it won't work. The gallery is at www.newcastle-online.com/gallery and fetch is placed at the root has suggested www.newcastle-online.com/cpmfetch you can see I get no images at www.newcastle-online.com/cpmfetch/cftest.php

All help will be gratefully recieved. I did do a search for this query but couldn't find anything.

Thanks,
Phil
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 09, 2005, 10:01:12 am
Are you bridged with anything?  Phpbb? Smf?  Anything?

What version of Coppermine Photo Gallery?




This seems to be the only place I can post, guess people can't post on the sub board ? Anyway I've just set this up on my site and everything has passed but I'm not getting the grid of images. I've checked the prefixes in Coppermine and they match what are in cpmfetch. Any ideas why this isn't work ? The ssi.php one works (sort of get a few errors) and I assume this must go sort of down the same route so I'm not sure why it won't work. The gallery is at www.newcastle-online.com/gallery and fetch is placed at the root has suggested www.newcastle-online.com/cpmfetch you can see I get no images at www.newcastle-online.com/cpmfetch/cftest.php

All help will be gratefully recieved. I did do a search for this query but couldn't find anything.

Thanks,
Phil
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ohfishing on October 09, 2005, 10:43:35 am
Hello, Im no good at this stuff ..this thread is WAY  over my head, I have been reading for hours and I now have to ask.. Im stuck on step 2 installation  :-[ 
Code: [Select]
You set your partial URL to stl-web/bulletin/phpBB5/cpg135/ 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 = FreeBSD st06.startlogic.com 4.9-RELEASE-p11 FreeBSD 4.9-RELEASE-p11 #0: Sat i386 INFO
40 WebServer = Apache/1.3.31 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/0.9.7c INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /home/ohfishin/public_html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/ohfishin/.panel/web/bulletin/phpBB5/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /home/ohfishin/public_htmlstl-web/bulletin/phpBB5/cpg135//include/config.inc.php FAIL
I have a 75 and an 80 and I dont know why. Could one of you veterans please fix me up?  After reading 17 pages of this thread I have a feeling  this may not be my last question...but its a start. thank you
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: toontastic on October 09, 2005, 11:29:12 am
I am yes, I'm bridged with SMF will it not work with this bridge ? I think we're using version 1.3.3 of the gallery. Looks like I need to perform an upgrade as well once I've done this :)

Cheers,
Phil
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 09, 2005, 05:05:03 pm
I am yes, I'm bridged with SMF will it not work with this bridge ? I think we're using version 1.3.3 of the gallery. Looks like I need to perform an upgrade as well once I've done this :)

Cheers,
Phil


See the other thread about using cpmfetch with other boards and such

http://forum.coppermine-gallery.net/index.php?topic=19528.20

Its a known problem with a few solutions depending on how many users you have.   Post over there if none of the existing threads help you.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ohfishing on October 09, 2005, 09:31:44 pm
ARRGGGG!!  this stuff is incredible ! I cant find the path to congif.init.php
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 10, 2005, 07:29:44 am
ARRGGGG!!  this stuff is incredible ! I cant find the path to congif.init.php

There is no congif.init.php

its config.

More information would help... like link to cftest page, what versions of everything etc...  That would be fantastic

Are you sub domained?  anything like that?  What are you trying. 

The ARRGGGGG says alot, but nothing useful
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ohfishing on October 11, 2005, 01:26:33 am
Thank you ! OK ... My test page status has changed since I typed the prior post. My document root is now OK  However I still have error 80. here is my test page http://ohfishing.com/cpmfetch/cftest.php  my version is cpg135 , my cpmfetch is version 1.6.2 , I dont know what you mean by subdomain? 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ohfishing on October 11, 2005, 01:28:20 am
ALSO ... I am bridged to PHP as you asked in another thread..... what kind of problem?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ohfishing on October 11, 2005, 04:17:38 am
Well I did an experiment , I made an empty folder, I put a COPY of the config in there and ran the test...it PASSED . However the thumbnails dont show up. I dont suppose it will work this way being that the cpg folder is at another path. I just wanted to try to find the config in an easy place. Moving the folders is not an option (I tried) as I have to many things depending on those paths like wordpress,phpbb,albums,galleys etc. I know this experiment probably seems pretty lame to you guys... but I feel like a rocket scientist ...only if the thumbs showed up :-(
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 13, 2005, 02:12:25 pm
Well I did an experiment , I made an empty folder, I put a COPY of the config in there and ran the test...it PASSED . However the thumbnails dont show up. I dont suppose it will work this way being that the cpg folder is at another path. I just wanted to try to find the config in an easy place. Moving the folders is not an option (I tried) as I have to many things depending on those paths like wordpress,phpbb,albums,galleys etc. I know this experiment probably seems pretty lame to you guys... but I feel like a rocket scientist ...only if the thumbs showed up :-(

The problem with the bridged stuff has been talked about over and over again in the parallel thread on embedding and stuff I think.  Its that it does not use the coppermine users table - so if you only have a few PhpBB or SMF users then you can just recreate them.  Otherwise you need to be more creative.

Title: Help.
Post by: pyimaung on October 14, 2005, 03:04:56 am
I don't know where to post so here it goes..Sorry if it's in the wrong place..

I'm using CPG 1.3.2 (integrated with phpBB2) and CPM Fetch 1.6.2

I've uploaded everything and tested my test page and everything was ok except I couldn't see the thumbnails of the photos where it said it was supposed to be..

It said if it didn't appear, it might be because I've changed the default table prefixes...but I haven't even touched any of the prefixes.. Where do I check my prefixes and what do i change them to?

Please help.. Thank you.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Sy on October 15, 2005, 12:36:27 am
pyimaung: -

I've just installed and had this problem myself.  After trawling through this thread I found the answer.  Simply go into your phpMyAdmin and then the cpg132_users table.  The into the user_id field.  Insert a new row and create a user with a user_id of 2.  Reload your cftest.php file and the images will appear.  :)

Now that's sorted on to my own problems.

I've just setup a quick test page with the following code.  It all works great but my images are coming up with blue borders due to them being links.  I've searched the forum and found one other person with this problem but didn't really understand how it was resolved.  As far as I can figure it's something to do with cascading style sheets...but I'm not really that up on them.  Think it maybe down to a:link but can't get it to work or even figure out how to turn borders off using a:link.  Any ideas or help for a css/php n00b?

Code: [Select]
<?php 
include "cpmfetch.php";
$objCpm = new cpm("/members/gallery");
$objCpm->cpm_viewRandomMedia(2,3);
$objCpm->cpm_close();
?>

<html>
<head>
</head>
<body>
</body>
</html>

Thanks for any help or ideas.

Sy
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 15, 2005, 08:26:21 am
pyimaung: -

I've just installed and had this problem myself.  After trawling through this thread I found the answer.  Simply go into your phpMyAdmin and then the cpg132_users table.  The into the user_id field.  Insert a new row and create a user with a user_id of 2.  Reload your cftest.php file and the images will appear.  :)

Now that's sorted on to my own problems.

I've just setup a quick test page with the following code.  It all works great but my images are coming up with blue borders due to them being links.  I've searched the forum and found one other person with this problem but didn't really understand how it was resolved.  As far as I can figure it's something to do with cascading style sheets...but I'm not really that up on them.  Think it maybe down to a:link but can't get it to work or even figure out how to turn borders off using a:link.  Any ideas or help for a css/php n00b?

Code: [Select]
<?php 
include "cpmfetch.php";
$objCpm = new cpm("/members/gallery");
$objCpm->cpm_viewRandomMedia(2,3);
$objCpm->cpm_close();
?>

<html>
<head>
</head>
<body>
</body>
</html>

Thanks for any help or ideas.

Sy


The solution for the missing users is fine... just be aware some subtitle information wont work... the stuff related to usernames and such.  So your good 99% of the way with that.

As for your problem... check this page.  There are two examples of doing nifty things with images and stuff in there.  Maybe something helpful.

http://www.fistfullofcode.com/projects/copperminefetch/tips.php
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 15, 2005, 08:28:16 am
Well I did an experiment , I made an empty folder, I put a COPY of the config in there and ran the test...it PASSED . However the thumbnails dont show up. I dont suppose it will work this way being that the cpg folder is at another path. I just wanted to try to find the config in an easy place. Moving the folders is not an option (I tried) as I have to many things depending on those paths like wordpress,phpbb,albums,galleys etc. I know this experiment probably seems pretty lame to you guys... but I feel like a rocket scientist ...only if the thumbs showed up :-(

If you did not get resolution on this... the thumbs missing are due to the bridging issue (mentioned in the other thread and just before this message in this thread)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Sy on October 15, 2005, 01:11:08 pm
pyimaung: -

I've just installed and had this problem myself.  After trawling through this thread I found the answer.  Simply go into your phpMyAdmin and then the cpg132_users table.  The into the user_id field.  Insert a new row and create a user with a user_id of 2.  Reload your cftest.php file and the images will appear.  :)

Now that's sorted on to my own problems.

I've just setup a quick test page with the following code.  It all works great but my images are coming up with blue borders due to them being links.  I've searched the forum and found one other person with this problem but didn't really understand how it was resolved.  As far as I can figure it's something to do with cascading style sheets...but I'm not really that up on them.  Think it maybe down to a:link but can't get it to work or even figure out how to turn borders off using a:link.  Any ideas or help for a css/php n00b?

Code: [Select]
<?php 
include "cpmfetch.php";
$objCpm = new cpm("/members/gallery");
$objCpm->cpm_viewRandomMedia(2,3);
$objCpm->cpm_close();
?>

<html>
<head>
</head>
<body>
</body>
</html>

Thanks for any help or ideas.

Sy


The solution for the missing users is fine... just be aware some subtitle information wont work... the stuff related to usernames and such.  So your good 99% of the way with that.

As for your problem... check this page.  There are two examples of doing nifty things with images and stuff in there.  Maybe something helpful.

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


Thanks a lot vuud with your link above I've got it licked.  Also want to thank you for this awesome script.  :)

Sy
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pyimaung on October 15, 2005, 06:31:07 pm
Thanks SY..You're a genius..It's all working now.. Just one more question.. How do I make the gallery pop up in a pop up window without the address bar.. If it cannot be done then how do I unlink the fetched photos to the gallery. Can anyone help?? Thanks!!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 15, 2005, 08:16:02 pm
Thanks SY..You're a genius..It's all working now.. Just one more question.. How do I make the gallery pop up in a pop up window without the address bar.. If it cannot be done then how do I unlink the fetched photos to the gallery. Can anyone help?? Thanks!!

Check this... there is a number of ways to accomplish it... the cfshow may be the easiest

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s04.html
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: wearentyou.com on October 16, 2005, 06:11:57 pm
Hi there,

Having read through this thread extensively, I have come to the point where I need to post my question as I can't seem to work it out by myself.

I basically have the same problem as ohfishing with my cftest.php file.

It all passes except for the last two:

75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL

The URL of the cftest file is http://www.wearentyou.com/Coppermine/cftest.php

I am using Coppermine 1.3.4 and CPMFetch 1.6.2.

Would it affect the running of this file having CPMFetch installed inside the coppermine folder?

I am an intermediate webmaster, and started learning about PHP/Mysql a short while ago for new projects. I am happy enough tracking down code in my installation, changing variables etc, but I can't seem to get my head around what needs to be changed in order for this to work.

Your help is much appreciated.

Thanks in advance,

Ben

wearentyou.com
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pyimaung on October 17, 2005, 03:39:37 pm
hi vuud,
thanks for your quick reply.. I've looked at the link u gave me and i'm not a programmer so i don't know where to put these codes or which files to edit.. A little bit more detail like which file to edit and where to put the codes would be really appreciated.. And an example code would really help.. thank you..

Quote
imagelink => "none" or "album" or "large"
windowtarget => "_blank" or "_parent" or "_blank-js" or "_blank-cfshow"


imagelink - [none|album|large]
What type of image to link to when the image is clicked. None indicates no link will be provided.

windowtarget - [_blank | _parent| _blank-js | _blank-cfshow ...]
If this is present a target tag is inserted with the contents. This is simply passed through. You can add anything in there (I think) - probably even javascript.

_blank-js
Requires the file cpmfetch.js to be included in your page. That provides the javascript to display the image correctly.

_blank-cfshow
Uses the cfshow.php file to display the image. This will be expanded greatly in the future.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 17, 2005, 07:26:46 pm
Hi there,

Having read through this thread extensively, I have come to the point where I need to post my question as I can't seem to work it out by myself.

I basically have the same problem as ohfishing with my cftest.php file.

It all passes except for the last two:

75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL

The URL of the cftest file is http://www.wearentyou.com/Coppermine/cftest.php

I am using Coppermine 1.3.4 and CPMFetch 1.6.2.

Would it affect the running of this file having CPMFetch installed inside the coppermine folder?

I am an intermediate webmaster, and started learning about PHP/Mysql a short while ago for new projects. I am happy enough tracking down code in my installation, changing variables etc, but I can't seem to get my head around what needs to be changed in order for this to work.

Your help is much appreciated.

Thanks in advance,

Ben

wearentyou.com

Your DOCUMENT_ROOT setting is "undefined" which is a new one to me... normally that holds where the documents are...

Strange... is this hosted or your own server?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: wearentyou.com on October 17, 2005, 07:43:49 pm
Hi there,

Having read through this thread extensively, I have come to the point where I need to post my question as I can't seem to work it out by myself.

I basically have the same problem as ohfishing with my cftest.php file.

It all passes except for the last two:

75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL

The URL of the cftest file is http://www.wearentyou.com/Coppermine/cftest.php

I am using Coppermine 1.3.4 and CPMFetch 1.6.2.

Would it affect the running of this file having CPMFetch installed inside the coppermine folder?

I am an intermediate webmaster, and started learning about PHP/Mysql a short while ago for new projects. I am happy enough tracking down code in my installation, changing variables etc, but I can't seem to get my head around what needs to be changed in order for this to work.

Your help is much appreciated.

Thanks in advance,

Ben

wearentyou.com

Your DOCUMENT_ROOT setting is "undefined" which is a new one to me... normally that holds where the documents are...

Strange... is this hosted or your own server?




It's hosted by http://www.bravenet.com - to be honest they haven't been too great so far - I have used them happily for other projects but there are silly little nuances with their hosting such as they have disable the phpinfo function meaning I had to email support just to find out what version of GD is on their server -

they don't offer support for 3rd party php-based software hence me asking on here - surely there must be some way around this problem?

Vuud if it helps I can grant you FTP access to the site... I trust you enough!  ::)

Thanks again,

Ben

wearentyou.com
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: julala on October 18, 2005, 12:36:56 am
Firstly, thank you for a great script and also your committed support on this forum - you are a patient man. 8)

Managed to get everything installed and running painlessly.  And your docs were detailed and helpful.

Small question.

I am using the "Who's online mod" and was wondering if it is possible to fetch user data with cpmfetch.  I would like to show how many users I have in my gallery on my home page.

cpm 1.3

Thanks

Julala
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Babounet on October 18, 2005, 01:19:11 am
Hello,

I've some trouble with the fonction cpm_unlockPrivate($bool). Can someone help me?

My php code in my page:

<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/pics');
$objCpm->cpm_unlockPrivate(true);
$objCpm->cpm_viewLastAddedMedia (1,4);
$objCpm->cpm_close();
?>

The error:
Fatal error: Call to undefined function: cpm_unlockprivate()

I surch to have pics of the last galleries, even if it is a public or registered gallery.

Many thanks for your help!
Seb
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: boghsteren on October 19, 2005, 12:22:14 am
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL

I get exactly the same problem. Url for my cftest.php is http://bogh.orgfree.com/pics/cpmfetch/cftest.php

Been trying everything I can think of, but to no avail.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pyimaung on October 20, 2005, 12:09:29 pm
imagelink => "none" or "album" or "large"
windowtarget => "_blank" or "_parent" or "_blank-js" or "_blank-cfshow"


imagelink - [none|album|large]
What type of image to link to when the image is clicked. None indicates no link will be provided.

windowtarget - [_blank | _parent| _blank-js | _blank-cfshow ...]
If this is present a target tag is inserted with the contents. This is simply passed through. You can add anything in there (I think) - probably even javascript.

_blank-js
Requires the file cpmfetch.js to be included in your page. That provides the javascript to display the image correctly.

_blank-cfshow
Uses the cfshow.php file to display the image. This will be expanded greatly in the future.


Can someone help me with the above code please?? In which file do I place these codes and how? Can someone show me an example? I want to use _blank-js. Thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 21, 2005, 06:24:24 am

It's hosted by http://www.bravenet.com - to be honest they haven't been too great so far - I have used them happily for other projects but there are silly little nuances with their hosting such as they have disable the phpinfo function meaning I had to email support just to find out what version of GD is on their server -

they don't offer support for 3rd party php-based software hence me asking on here - surely there must be some way around this problem?


As far as I can tell, the Phpinfo() call works there. 

There is a way around this, and god knows I should document it one of these days.  I have to see if I can remember it.

Sorry to ALL for delays on responding - IRL I am in the middle of starting new things and its been increadibly time consuming.  I have not abandoned the project - the next release will be 1.4 compatible, solve lots of problems like this one and will also be released under a new license (even free'r)

I will try to recall how I did it and post it back.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 21, 2005, 06:28:59 am
Firstly, thank you for a great script and also your committed support on this forum - you are a patient man. 8)

Managed to get everything installed and running painlessly.  And your docs were detailed and helpful.

Small question.

I am using the "Who's online mod" and was wondering if it is possible to fetch user data with cpmfetch.  I would like to show how many users I have in my gallery on my home page.

cpm 1.3

Thanks

Julala

It can read some user information for use in titles and subtitles, but nothing specific to just get the number of users.  If you feel like trying to code it in, feel free to ask for advice and I'd love to take it as a contribution and add it in after.

I just added it to my growing list of things to do...  It will be in as part of the function formatStats ($format) as a parameter.  But I am not sure when that will be.  If you want to try to add it there - simply look in cpmfetch_dao.php and search on that function and see how it works.  Add, send me new code.

if not, I will have it eventually.

:(



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 21, 2005, 06:34:12 am
imagelink => "none" or "album" or "large"
windowtarget => "_blank" or "_parent" or "_blank-js" or "_blank-cfshow"


imagelink - [none|album|large]
What type of image to link to when the image is clicked. None indicates no link will be provided.

windowtarget - [_blank | _parent| _blank-js | _blank-cfshow ...]
If this is present a target tag is inserted with the contents. This is simply passed through. You can add anything in there (I think) - probably even javascript.

_blank-js
Requires the file cpmfetch.js to be included in your page. That provides the javascript to display the image correctly.

_blank-cfshow
Uses the cfshow.php file to display the image. This will be expanded greatly in the future.


Can someone help me with the above code please?? In which file do I place these codes and how? Can someone show me an example? I want to use _blank-js. Thanks


Okay, first read this page... its how to include stuff like that as part of the call
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html

Did you read the above?  You must at least read it before continuing here...

Okay...

<?php
$styleguide = array();
$styleguide['imagelink'] = "large";
$styleguide['windowtarget'] = "_blank-js";
$objCpm->cpm_viewLastAddedMedia(1,1,$styleguide);
?>

See! I knew you were going to look at the example before reading the docs.  The optionsarray carries almost all the power in cpmfetch, its worth understanding.

But good luck anyway

Dont forget from above
Requires the file cpmfetch.js to be included in your page.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 21, 2005, 06:42:31 am
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL

I get exactly the same problem. Url for my cftest.php is http://bogh.orgfree.com/pics/cpmfetch/cftest.php

Been trying everything I can think of, but to no avail.

Gah!  What is wrong with server people these days!

Damnit all!  Sorry, its not you - but this problem has been the bane of this programs existance since it was started.  Not just this, but all servers - I have like 5 ways to check in there and it always breaks on someones machine.  THERE SEEMS TO BE NO GOOD WAY TO FIND THE LOCATION OF FILE THAT IS STANDARD ON ALL SYSTEMS!   Phooey!

Anyway, its not you - its this cursed problem.  I vow that this will be resolved once and for all someday - damn I almost said next version.  I guarentee the next version will at least be easier to work around this problem.  Damn them all!!!!!
 
 >:(




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: boghsteren on October 21, 2005, 09:39:37 am
Damnit all!  Sorry, its not you - but this problem has been the bane of this programs existance since it was started.  Not just this, but all servers - I have like 5 ways to check in there and it always breaks on someones machine.  THERE SEEMS TO BE NO GOOD WAY TO FIND THE LOCATION OF FILE THAT IS STANDARD ON ALL SYSTEMS!   Phooey!

Is there a simple way to manually set the ROOT manually in cpmfetch? I am pretty sure that would solve the problem.

* Note: I am still in a process of getting familiar with php...

Thanks for a great script (exactly what I need) and very dedicated support. Very cool.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 21, 2005, 04:49:44 pm
Damnit all!  Sorry, its not you - but this problem has been the bane of this programs existance since it was started.  Not just this, but all servers - I have like 5 ways to check in there and it always breaks on someones machine.  THERE SEEMS TO BE NO GOOD WAY TO FIND THE LOCATION OF FILE THAT IS STANDARD ON ALL SYSTEMS!   Phooey!

Is there a simple way to manually set the ROOT manually in cpmfetch? I am pretty sure that would solve the problem.

* Note: I am still in a process of getting familiar with php...

Thanks for a great script (exactly what I need) and very dedicated support. Very cool.

If you can get it to find the config file from cpg... you can adjust how it works with

cpm_OverridePathToCoppermine($newpath_)

cpm_OverrideUrlToCoppermine($newpath_)

The path one adjusts how it looks for your cpg directory, the URL adjusts the http:// part of the images that get returned.

These are not really documented, and I think I wrote them late one night - so I can never remember how to use them.    The Path one should allow you to change what the document root would have set for you.  The initial call to cpmfetch to create the object has to pass and that works off of document root.

You could also try to put it in your scripts

 $_SERVER['DOCUMENT_ROOT'] = "/path/to/your/root/of/your/web/site/here";

Someone said that worked... but I have not tested it.










Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: toykilla on October 23, 2005, 06:50:19 pm
I have 2 sites running on the same server. I need to use CPM fetch on the site that does not have coppermine running on it. (pull from the other site).. How can i do this?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dukuduku on October 25, 2005, 04:40:40 am
Howdy all,

I just want to report a finding since it took some time to debug.

I had a similar problem as described by a previous poster.  cftest.php said everything was OK but I couldn't see any images.  When I added a second user #2, it didn't fix my problem.  But then I read that you join cpg135_pictures.owner_id to cpg135_users.user_id, I looked at my pictures table and noticed that all owner_id's were set to 0.  There is no user_id 0, so I updated the pictures table and gave the pictures to user_id 1.  After this update, cftest.php worked properly.

I can guess why this happened to me, but that is another matter altogether. ::)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 25, 2005, 05:00:50 am
Howdy all,

I just want to report a finding since it took some time to debug.

I had a similar problem as described by a previous poster.  cftest.php said everything was OK but I couldn't see any images.  When I added a second user #2, it didn't fix my problem.  But then I read that you join cpg135_pictures.owner_id to cpg135_users.user_id, I looked at my pictures table and noticed that all owner_id's were set to 0.  There is no user_id 0, so I updated the pictures table and gave the pictures to user_id 1.  After this update, cftest.php worked properly.

I can guess why this happened to me, but that is another matter altogether. ::)

Were you bridged with something?  CPG would not have added a bad owner number by itself...



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Titooy on October 25, 2005, 05:55:54 pm
Hello,

I've some trouble with the fonction cpm_unlockPrivate($bool). Can someone help me?

My php code in my page:

<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/pics');
$objCpm->cpm_unlockPrivate(true);
$objCpm->cpm_viewLastAddedMedia (1,4);
$objCpm->cpm_close();
?>

The error:
Fatal error: Call to undefined function: cpm_unlockprivate()

I surch to have pics of the last galleries, even if it is a public or registered gallery.

Many thanks for your help!
Seb

There's actually a mistake in the doc: the function cpm_unlockPrivate() is actually cpm_unlock_private()
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Babounet on October 25, 2005, 06:07:23 pm
many many thank's Titooy !!!

That's exactly the solution I was looking for!!!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 25, 2005, 06:18:32 pm

And now its on my list of things to fix :)

Thanks

many many thank's Titooy !!!

That's exactly the solution I was looking for!!!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dukuduku on October 25, 2005, 08:55:33 pm
Were you bridged with something?  CPG would not have added a bad owner number by itself...

I am not bridged, we had customized an older version of coppermine, (1.1.0) I believe, which was a while ago.  I just upgraded to the newest version of coppermine (1.3.5) and I couldn't use the upgrade script because of the changes that were made, so had to manually copy the data.  But I looked at the original data in 1.1.0 and the owner_id was set to 0, and I don't know how it got that way.  But the new version is what matters now.

I look forward to trying cpmFetch, because it will integrate the two sites I am working on well.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: disstress on October 26, 2005, 01:34:50 am
  I would really like to know how to make the image
link border smaller when using cpmfetch.
You can see an example on thier page
http://cpmfetch.fistfullofcode.com/projects/copperminefetch/index.php
If you look on the right side at the pictures set as
an example, the border around them is a few pixels thick.
I would like to know how to change that to be as
thin as possible or possibly have no border.
I have searched through the code and through my
coppermine template's css, I use the default template BTW.
I am not sure if I am in the right forum, if not please move me
and thanks in advance for any advice/solution.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Feydakin on October 26, 2005, 10:58:05 pm
I have the php call working just fine at www.imagesontheweb.net/image-test.php but I am having a problem with the call for plain html pages..

Code: [Select]
<img src="/galleria/cpmfetch/cfimageget.php?size=thumb">
is how I'm calling it right now and I just get the nice red x..

The main reason I want to call through html is that we originally wrote the site in Mason and it doesn't play nice with php in the same file.. And rewriting everything in php, while nice, would cause other issues.. So, anyway, what basic thing am I not seeing that is super obvious to everyone else??

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: disstress on October 27, 2005, 04:00:57 am
Code: [Select]
ERROR: Path to Coppermine incorrect. (/home/imagesj/domains/imagesontheweb.net/public_htmlhttp://www.imagesontheweb.net/galleria//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home/imagesj/domains/imagesontheweb.net/public_html/galleria/cpmfetch/cfimageget.php on line 181

You are getting this error when you try to look at the top image.
I am not familiar enough with the code in cpmfetch, but I will go through it tonight and find my resolution and yours, if someone doesn't post here first.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Feydakin on October 27, 2005, 04:47:05 pm
For some reason it's tossing in an extra / between galleria and include.. ...galleria//include.... instead of galleria/include...

More digging to find the extra / ..
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mpvvv on October 27, 2005, 05:15:53 pm
Hi,

I'm new here, anyone tried this? Can be do it?

Show the last picture from the last 6 albums with cpmfetch.


       album1           album2          album3
        lastpic            lastpic            lastpic

       album4           album5          album6
        lastpic            lastpic            lastpic

Thanks

Marcelo
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 27, 2005, 05:25:05 pm
Code: [Select]
ERROR: Path to Coppermine incorrect. (/home/imagesj/domains/imagesontheweb.net/public_htmlhttp://www.imagesontheweb.net/galleria//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home/imagesj/domains/imagesontheweb.net/public_html/galleria/cpmfetch/cfimageget.php on line 181

You are getting this error when you try to look at the top image.
I am not familiar enough with the code in cpmfetch, but I will go through it tonight and find my resolution and yours, if someone doesn't post here first.

Normally this means the variable you set for the partial url in the cfimageget has a whole URL in it instead of just the partial

should be something like

/galleria



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Feydakin on October 27, 2005, 06:14:00 pm
You are referring to this bit of code here??

Code: [Select]
// This one you need to adjust unless your gallery is at http://www.youname.com/photos
// If you installed right to the root of your web site, just use a /
$urltocpm = "/galleria";

I've tried tons of variations on the URL in cfimageget.php.. Am I missing a change somewhere else??
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on October 27, 2005, 06:44:46 pm
You are referring to this bit of code here??

Code: [Select]
// This one you need to adjust unless your gallery is at http://www.youname.com/photos
// If you installed right to the root of your web site, just use a /
$urltocpm = "/galleria";

I've tried tons of variations on the URL in cfimageget.php.. Am I missing a change somewhere else??


Yeah thats the one... it does not help?



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Feydakin on October 27, 2005, 07:48:42 pm
Nope, does not help..

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kreptil on October 29, 2005, 07:15:17 am
Nice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?

Thanks!.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: bino on October 29, 2005, 03:07:48 pm
Cpmfetch is a great feature. However, I have a question.
Is it normal when I use the latest added media code it only displays the images I added? (various other members have added images aswell but when using the code it doesn´t show them at all)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: runaweigh on October 30, 2005, 02:03:30 am
I am trying to display an image with (cpmfetch/cfig_random.php") on the index page, but I would like to display with a link to the photo album.  Currently I have the displayimage as (<a href="/photoalbum/displayimage.php?pos=-397" target="_blank") which is obviously giving me the same photo.  How do I link to the displayed image for cfig_random.php?
http://www.mycsailing.com/
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: inn87 on October 31, 2005, 07:14:33 pm
 ;) Hello,

I just installed cpmfetch to list that latest images and is workin great @ ' www.pickafish.com '. Now i'm trying to move it tothe center of the page under the cusom 'latest additions' header. pls i wouldlike to know hoe to align the gallery. Thanx  ???
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 01, 2005, 12:02:00 am
Cpmfetch is a great feature. However, I have a question.
Is it normal when I use the latest added media code it only displays the images I added? (various other members have added images aswell but when using the code it doesn´t show them at all)


Are these other images in user galleries...  If so, you could be running into the non-private aspect...  This is the function that controls this... (Private to cpmfetch means anything that is not completely opened)

cpm_unlockPrivate($bool)

This toggles access to non-public photos (default: false) It allows images not publically available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 01, 2005, 12:03:08 am
;) Hello,

I just installed cpmfetch to list that latest images and is workin great @ ' www.pickafish.com '. Now i'm trying to move it tothe center of the page under the cusom 'latest additions' header. pls i wouldlike to know hoe to align the gallery. Thanx  ???

Wrap it in a table maybe?  It supports full CSS entries if that helps (but will always generate a table layout - does not do CSS layouts yet)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 01, 2005, 12:06:37 am
I am trying to display an image with (cpmfetch/cfig_random.php") on the index page, but I would like to display with a link to the photo album.  Currently I have the displayimage as (<a href="/photoalbum/displayimage.php?pos=-397" target="_blank") which is obviously giving me the same photo.  How do I link to the displayed image for cfig_random.php?
http://www.mycsailing.com/

Yeah, not going to happen.  There is just no code there to support the state between calls.  And if you are using cfig_random I assume you are calling from an IMG tag...  as such cfig_random returns image data only. 

The only way to do what I think you are asking would be to do it via cpmfetch SSI method and stuff...  but then you mind as well just do it the SSI way and skip the cfig_random all together.  If possible, that way really is the best way to go (if your setup and circumstances afford you this)




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 01, 2005, 12:08:46 am
Nice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?

Thanks!.


Not sure I understand the question, but this may be helpful:

cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")

On this page:

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s05.html

Title: show the 4 last updated albums (1 pic + tittle)
Post by: Babounet on November 01, 2005, 12:44:36 pm
Nice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?

Thanks!.


Not sure I understand the question, but this may be helpful:

cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")

On this page:

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s05.html



Hello. How can provide a table with the 4 last updtated albums (with one pic from each album and his name below).
I've found a code on vuud's website (see below), but this provide only a text with date and album name and I have no idea how I can add a pic.

   $objCpm->cpm_setReturnType("resultset");
   $data = $objCpm->cpm_viewLastAddedMediaFrom(1000, 1000, "");
   $cnt = 0;       
   $arrayofalbums = array();
   foreach ($data as $row) {
       if (! in_array($row['aTitle'],$arrayofalbums)) {
          print date("d/m/y",$row['pCtime']);
      print "&nbsp;&nbsp;&nbsp;";
      print "";
           print $row['aTitle'];
      print "";   
      print "<br>";
      array_push($arrayofalbums,$row['aTitle']);
      $cnt++;
      if ($cnt == 4) break;   
      }
   }
?>

Please... HELP ME !!!!  :\'( :\'(

Many thanks
Seb
Title: Re: show the 4 last updated albums (1 pic + tittle)
Post by: mpvvv on November 01, 2005, 03:58:26 pm
Hi,

I'm having the same problem, can anyone help?

Thanks

Nice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?

Thanks!.


Not sure I understand the question, but this may be helpful:

cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")

On this page:

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s05.html



Hello. How can provide a table with the 4 last updtated albums (with one pic from each album and his name below).
I've found a code on vuud's website (see below), but this provide only a text with date and album name and I have no idea how I can add a pic.

   $objCpm->cpm_setReturnType("resultset");
   $data = $objCpm->cpm_viewLastAddedMediaFrom(1000, 1000, "");
   $cnt = 0;       
   $arrayofalbums = array();
   foreach ($data as $row) {
       if (! in_array($row['aTitle'],$arrayofalbums)) {
          print date("d/m/y",$row['pCtime']);
      print "&nbsp;&nbsp;&nbsp;";
      print "";
           print $row['aTitle'];
      print "";   
      print "<br>";
      array_push($arrayofalbums,$row['aTitle']);
      $cnt++;
      if ($cnt == 4) break;   
      }
   }
?>

Please... HELP ME !!!!  :\'( :\'(

Many thanks
Seb
Title: Re: show the 4 last updated albums (1 pic + tittle)
Post by: vuud on November 01, 2005, 04:18:48 pm

The code shown below is a good starting point.  Right now, cpmfetch will not do what you are looking for, so you have to wrap it with more PHP code to get the images and display them and add the titles.

I don't have time to write it at this moment.  If someone else has done this, please post the code.

Its not terribly complicated, and if you insert a print_r($row) in there you can see all the wonderful data you have access to.


Hi,

I'm having the same problem, can anyone help?

Thanks

Nice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?

Thanks!.


Not sure I understand the question, but this may be helpful:

cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")

On this page:

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s05.html



Hello. How can provide a table with the 4 last updtated albums (with one pic from each album and his name below).
I've found a code on vuud's website (see below), but this provide only a text with date and album name and I have no idea how I can add a pic.

   $objCpm->cpm_setReturnType("resultset");
   $data = $objCpm->cpm_viewLastAddedMediaFrom(1000, 1000, "");
   $cnt = 0;       
   $arrayofalbums = array();
   foreach ($data as $row) {
       if (! in_array($row['aTitle'],$arrayofalbums)) {
          print date("d/m/y",$row['pCtime']);
      print "&nbsp;&nbsp;&nbsp;";
      print "";
           print $row['aTitle'];
      print "";   
      print "<br>";
      array_push($arrayofalbums,$row['aTitle']);
      $cnt++;
      if ($cnt == 4) break;   
      }
   }
?>

Please... HELP ME !!!!  :\'( :\'(

Many thanks
Seb
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: inn87 on November 01, 2005, 04:48:29 pm
greetings !

I integrated cpmfetch to coppermine to display the latest added photos in my .shtml homepage. The photos are now just scattered in my homepage ' www.pickafish.com '. I would like the photos to be in a table  similar to the 'latest additions' table in my gallery ' "hardwired theme"  www.pickafish.com/gallery . ANy idea how ? help appreciated 

thanx
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: deejaymoni on November 01, 2005, 09:59:58 pm
Hi everyone,

I'm trying to display a list of whats been added recently within 10 days but...

Code: [Select]
<?php 
include "cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');

$objCpm->cpm_setReturnType('resultset');

$data $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide); 
foreach (
$data as $row) {
print $row['aTitle'] . "";
}
?>

this code shows me just a blank page??? ???
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 01, 2005, 10:11:39 pm
Hi everyone,

I'm trying to display a list of whats been added recently within 10 days but...

Code: [Select]
<?php 
include "cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');

$objCpm->cpm_setReturnType('resultset');

$data $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide); 
foreach (
$data as $row) {
print $row['aTitle'] . "";
}
?>

this code shows me just a blank page??? ???


One thing that leaps to mind is the time frame... have you added anything in the last ten days?  That got me once... 

if so, check the $row with a print_r to see what you are getting back for data

Let me know how that goes



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: bino on November 02, 2005, 10:14:38 am
Cpmfetch is a great feature. However, I have a question.
Is it normal when I use the latest added media code it only displays the images I added? (various other members have added images aswell but when using the code it doesn´t show them at all)


Are these other images in user galleries...  If so, you could be running into the non-private aspect...  This is the function that controls this... (Private to cpmfetch means anything that is not completely opened)

cpm_unlockPrivate($bool)

This toggles access to non-public photos (default: false) It allows images not publically available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.
I will try this when I get home but I´m not sure if that would slove my problem since I´m not running private albums. I create albums and batch upload images to them. Users that are part of a certain phpbb usergroup can single upload to them aswell.

Weird is that another admin using single upload doesn´t have his photo´s shown with the script and the one´s I uploaded with a testaccount (no admin, just right usergroup) do not cause any trouble.

Also, what do I put in as $bool?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 02, 2005, 04:14:16 pm
Cpmfetch is a great feature. However, I have a question.
Is it normal when I use the latest added media code it only displays the images I added? (various other members have added images aswell but when using the code it doesn´t show them at all)


Are these other images in user galleries...  If so, you could be running into the non-private aspect...  This is the function that controls this... (Private to cpmfetch means anything that is not completely opened)

cpm_unlockPrivate($bool)

This toggles access to non-public photos (default: false) It allows images not publically available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.
I will try this when I get home but I´m not sure if that would slove my problem since I´m not running private albums. I create albums and batch upload images to them. Users that are part of a certain phpbb usergroup can single upload to them aswell.

Weird is that another admin using single upload doesn´t have his photo´s shown with the script and the one´s I uploaded with a testaccount (no admin, just right usergroup) do not cause any trouble.

Also, what do I put in as $bool?


Bool is a boolean.  true or false

Well, the phpbb thing is probably your problem then.  the phpbb bridge does not create users in the cpg database, so it throws it off.  How many phpbb users do you have?  Essentially if you make a few cpg users then the photos will show up.

Essentially, the photo entry says "user #3 entered me" but the cpg user table has no user #3 cause its in the phpbb table.

There is a lot of talk about this in these forums already... search on phpbb and cpmfetch



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: deejaymoni on November 02, 2005, 07:04:50 pm
Hi everyone,

I'm trying to display a list of whats been added recently within 10 days but...

Code: [Select]
<?php 
include "cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');

$objCpm->cpm_setReturnType('resultset');

$data $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide); 
foreach (
$data as $row) {
print $row['aTitle'] . "";
}
?>

this code shows me just a blank page??? ???


One thing that leaps to mind is the time frame... have you added anything in the last ten days?  That got me once... 

if so, check the $row with a print_r to see what you are getting back for data

Let me know how that goes


Hi thanks for your help but it still don't wanna work for me. It shows me a Parse error: parse error in fetchtest.php on line 15
I have tried different solutions but nothing happen.

Code: [Select]
<?php 
include "cpmfetch.php";
$objCpm = new cpm('/gallery');

$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');

$objCpm->cpm_setReturnType('resultset');

$data $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide); 
foreach (
$data as $row) {
print_r $row['aTitle'] . "";
}
$objCpm->cpm_close();
?>
Title: Re: show the 4 last updated albums (1 pic + tittle)
Post by: Babounet on November 02, 2005, 07:20:46 pm

The code shown below is a good starting point.  Right now, cpmfetch will not do what you are looking for, so you have to wrap it with more PHP code to get the images and display them and add the titles.

I don't have time to write it at this moment.  If someone else has done this, please post the code.

Its not terribly complicated, and if you insert a print_r($row) in there you can see all the wonderful data you have access to.


Hi,

I'm having the same problem, can anyone help?

Thanks

Nice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?

Thanks!.


Not sure I understand the question, but this may be helpful:

cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")

On this page:

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s05.html



Hello. How can provide a table with the 4 last updtated albums (with one pic from each album and his name below).
I've found a code on vuud's website (see below), but this provide only a text with date and album name and I have no idea how I can add a pic.

   $objCpm->cpm_setReturnType("resultset");
   $data = $objCpm->cpm_viewLastAddedMediaFrom(1000, 1000, "");
   $cnt = 0;       
   $arrayofalbums = array();
   foreach ($data as $row) {
       if (! in_array($row['aTitle'],$arrayofalbums)) {
          print date("d/m/y",$row['pCtime']);
      print "&nbsp;&nbsp;&nbsp;";
      print "";
           print $row['aTitle'];
      print "";   
      print "<br>";
      array_push($arrayofalbums,$row['aTitle']);
      $cnt++;
      if ($cnt == 4) break;   
      }
   }
?>

Please... HELP ME !!!!  :\'( :\'(

Many thanks
Seb

Can someone explain me how I can use the print_r($row) function?
The problem explain above is certainly not very complicated to solve. But for me, it's not possible as long as I not a php specialist.
Can someone help me with the final solution or with the print_r($row) function?

It would be very apreciated.
Many thanks
Seb
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kegobeer on November 02, 2005, 07:26:08 pm
Quote from: Babounet
Can someone explain me how I can use the print_r($row) function?

If you are looking for instructions on print_r, try php.net.

http://www.php.net/manual/en/function.print-r.php
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 03, 2005, 06:51:44 am
Hi everyone,

I'm trying to display a list of whats been added recently within 10 days but...

Code: [Select]
<?php 
include "cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');

$objCpm->cpm_setReturnType('resultset');

$data $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide); 
foreach (
$data as $row) {
print $row['aTitle'] . "";
}
?>

this code shows me just a blank page??? ???


One thing that leaps to mind is the time frame... have you added anything in the last ten days?  That got me once... 

if so, check the $row with a print_r to see what you are getting back for data

Let me know how that goes


Hi thanks for your help but it still don't wanna work for me. It shows me a Parse error: parse error in fetchtest.php on line 15
I have tried different solutions but nothing happen.

Code: [Select]
<?php 
include "cpmfetch.php";
$objCpm = new cpm('/gallery');

$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');

$objCpm->cpm_setReturnType('resultset');

$data $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide); 
foreach (
$data as $row) {
print_r $row['aTitle'] . "";
}
$objCpm->cpm_close();
?>

print_r is a php function... It prints the contents of an array strictly to show you what it contains.  It was intended to help you get an idea of what data is coming back and what is in there.


try this:

foreach ($data as $row) {
        print "<pre>";
   print_r ($row);
        print "</pre>";

}

You can also look up print_r at www.php.net in the documentation.

It does not fix your original problem, but will help illustrate what is the row array










Title: Re: show the 4 last updated albums (1 pic + tittle)
Post by: vuud on November 03, 2005, 06:54:49 am

Can someone explain me how I can use the print_r($row) function?
The problem explain above is certainly not very complicated to solve. But for me, it's not possible as long as I not a php specialist.
Can someone help me with the final solution or with the print_r($row) function?

The print_r function is not to solve your problem, but to teach you something.  It will help you see what data you have at your disposal, which will then help you to solve your problem.

http://www.php.net has the print_r in the documentation !

Its not on the "php specialist" level, or I would not be sending you that way.  A little effort and thought and you can do it.  Really.








Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 03, 2005, 06:55:56 am
Quote from: Babounet
Can someone explain me how I can use the print_r($row) function?

If you are looking for instructions on print_r, try php.net.

http://www.php.net/manual/en/function.print-r.php

Yeah, like he said.

Its a wonderful wonderful function!  Sure to save you much trouble down the line.

Thanks!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: bino on November 03, 2005, 05:59:22 pm
Bool is a boolean.  true or false

Well, the phpbb thing is probably your problem then.  the phpbb bridge does not create users in the cpg database, so it throws it off.  How many phpbb users do you have?  Essentially if you make a few cpg users then the photos will show up.

Essentially, the photo entry says "user #3 entered me" but the cpg user table has no user #3 cause its in the phpbb table.

There is a lot of talk about this in these forums already... search on phpbb and cpmfetch
I got it working. I looked at the pictures being uploaded by which user. I created those users with their phpbb id in the cp database and now it displays all latest pictures.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 03, 2005, 06:10:06 pm
Bool is a boolean.  true or false

Well, the phpbb thing is probably your problem then.  the phpbb bridge does not create users in the cpg database, so it throws it off.  How many phpbb users do you have?  Essentially if you make a few cpg users then the photos will show up.

Essentially, the photo entry says "user #3 entered me" but the cpg user table has no user #3 cause its in the phpbb table.

There is a lot of talk about this in these forums already... search on phpbb and cpmfetch
I got it working. I looked at the pictures being uploaded by which user. I created those users with their phpbb id in the cp database and now it displays all latest pictures.

Yeah, the phpBB integration has always been a problem like that...

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fry on November 07, 2005, 02:59:25 pm
hi guys,

i wanted to include some random images from cpm in my blog, but im experiencing some problems...
i followed the instructions on the quickstart-page of the cpmfetch-page.
everything worked great, even the cftest.php did work without any error.

BUT:

then i tried to make up a test page with the code provided on the quickstart page.
i just edited the path to my gallery and uploadet it to the same directory in whicht the cpmfetch directory is.
and when i load the test.php in my browser, i get the following errors:

Code: [Select]
Warning: Unable to access cpmfetch_dao.php in /mnt/ja1/01/455/00000003/htdocs/scripte/cpmfetch/cpmfetch.php on line 25

Fatal error: Failed opening required 'cpmfetch_dao.php' (include_path='') in /mnt/ja1/01/455/00000003/htdocs/scripte/cpmfetch/cpmfetch.php on line 25

i completly dont get it....the cftest worked perfekt, but this test.php does not? and it seems to be script-internal?! i tried it with chmodding "cpmfetch_dao.php" to 777, but same error.

i have installed coppermine 1.3.5 and cpmfetch 1.6.2 on a sunOS apache 1.3.31

urls:
gallery: http://www.fryshaus.de/scripte/gallery/

test.php: http://www.fryshaus.de/scripte/test.php
which says:
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/scripte/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

cftest.php: http://www.fryshaus.de/scripte/cpmfetch/cftest.php

i woud sayi know the basics if php...


i hope i got the right threat for my problem, if not please move or tell me.
and i did use the search function, but did not get any results for: "Unable to access cpmfetch_dao.php"...

thanks a lot for help!

Title: Re: show the 4 last updated albums (1 pic + tittle)
Post by: Babounet on November 07, 2005, 06:34:53 pm

Can someone explain me how I can use the print_r($row) function?
The problem explain above is certainly not very complicated to solve. But for me, it's not possible as long as I not a php specialist.
Can someone help me with the final solution or with the print_r($row) function?

The print_r function is not to solve your problem, but to teach you something.  It will help you see what data you have at your disposal, which will then help you to solve your problem.

http://www.php.net has the print_r in the documentation !

Its not on the "php specialist" level, or I would not be sending you that way.  A little effort and thought and you can do it.  Really.


Thanks everybody for your help. php as realy no limit and is a big system. But it's not so easy to learn.
I've find an other solution (a friend rewrite a part of the code to do what I need)

Seb
Title: Re: show the 4 last updated albums (1 pic + tittle)
Post by: vuud on November 07, 2005, 07:10:09 pm

Can someone explain me how I can use the print_r($row) function?
The problem explain above is certainly not very complicated to solve. But for me, it's not possible as long as I not a php specialist.
Can someone help me with the final solution or with the print_r($row) function?

The print_r function is not to solve your problem, but to teach you something.  It will help you see what data you have at your disposal, which will then help you to solve your problem.

http://www.php.net has the print_r in the documentation !

Its not on the "php specialist" level, or I would not be sending you that way.  A little effort and thought and you can do it.  Really.


Thanks everybody for your help. php as realy no limit and is a big system. But it's not so easy to learn.
I've find an other solution (a friend rewrite a part of the code to do what I need)

Seb

I hope the code rewrite was to the examples, and not to the actual cpmfetch code itself.  Its of course completely okay for you to do it, but it will make upgrades a pain for you. 

Glad to hear one way or another its doing some good for you



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Feydakin on November 08, 2005, 06:25:29 pm
I went ahead and rewrote most of the site away from Mason and in PHP so that I could get this to work.. Anyway, I have two questions if I may..

1. After much searching I still haven't figured out how to set the border around the image to 0.. Apparently I'm blind..

2. Can I pull the comments with the images?? Maybe just the last comment posted if there is one?? I found this function but I don't think it applies..

Code: [Select]
cpm_viewLastCommentedImages($rows,$columns, [ array $options=""])

I'm assuming that it just pulls from the images that have comments..

Thanks -
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: falarious on November 09, 2005, 06:21:29 am
Hello.

I am gonig to use cpm fetch on my site.

This is the url to it http://falarious.com/index2.php

as you can see, the thumbnails are not all the same size. Also, the thumbnails arent inside the table.
How do I get the thumbnails to all be 100*100, and how do i get the thubnails inside the table?

Code: [Select]
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/");

$styleguide = array(

"subtitle" => "</div>
<p>
</p>
<table id='table2' style='border-collapse: collapse;' border='1' bordercolor='#7aabd3' cellpadding='0' cellspacing='0' width='575'>
        <tbody>
        <tr>
          <td bordercolor='#7AABD3' align='center' bgcolor='#103d6a'>
  <strong> <font color='#ffffff' face='Comic Sans MS' size='2'> %t</font></strong></td>
        </tr>
        <tr>
          <td bordercolor='#000033' align='center' bgcolor='#000033' height='59' valign='top'>
  <p>
<font color='#ffffff' face='Comic Sans MS' size='2'>

<strong style='font-weight: 400;'>
%c<br>
<br>
</strong>

</p>
        </tr>
      </tbody></table>    
<p>&nbsp;


 "
,

        

"imagestyle" => "photoclip",
"imagesize" => 'thumb');


$objCpm->cpm_viewLastAddedMedia(20,1,$styleguide);
$objCpm->cpm_close();
?>



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: tlove on November 12, 2005, 06:12:57 pm
Noticed a slight problem with my image links. I'm using CpmFetch for rss feeds and an image on my main page.

my site (http://tongsondub.com)

My image links come out with an extra '/' between gallery and album folders. eg http://mysite.com/cpm-dir//albulms/1001/thepic.gif. I'm assuming i used '/gallery/' where i should have used '/gallery' somewhere. I just have no idea where. If i'm right, can somebody point me in the right direction. Otherwise, does anybody know what i need to change to get this corrected.
The output form my feed.xml is( i used some carriage returns to make it easier to read):
Code: [Select]
Tongo's Photo Shop Recent updates to gallery http://www.tongsondub.com 2005-11-12T10:30:02+01:00 Tongsondub.com
http://www.tongsondub.com http://www.tongsondub.com/images/sitelogo.gif text/html 2005-11-09T01:08:25+01:00
http://www.tongsondub.com admin Personal :: RB.........
 http://www.tongsondub.com/tgallery/displayimage.php?pos=-3
<a href="http://www.tongsondub.com/tgallery/displayimage.php?pos=-3">
<img border = "0" src="http://www.tongsondub.com/tgallery//albums/userpics/10001/thumb_Car%20Stuff%20003.jpg" align="right" /></a>
Car Stuff 003.jpg from album Personal<br/>Filesize 74.5 kb<br/>
I can not say what engine that is or whose car its in. That's about all i got to say about that<br/>Rated 0 / 5 stars (0 votes total)
text/html 2005-11-09T01:07:18+01:00 http://www.tongsondub.com admin
Personal :: My new K-sport Coilovers http://www.tongsondub.com/tgallery/displayimage.php?pos=-2
<a href="http://www.tongsondub.com/tgallery/displayimage.php?pos=-2">
<img border = "0" src="http://www.tongsondub.com/tgallery//albums/userpics/10001/thumb_Car%20Stuff%20022.jpg" align="right" />
</a>Car Stuff 022.jpg from album Personal<br/>Filesize 68.6 kb<br/>
Not the most well-known coilovers but they have not let me down.
Most importantly, the price was more than right<br/>Rated 0 / 5 stars (0 votes total) text/html 2005-11-09T01:05:37+01:00
http://www.tongsondub.com admin Personal :: Skyline R34 GTR
 http://www.tongsondub.com/tgallery/displayimage.php?pos=-1
<a href="http://www.tongsondub.com/tgallery/displayimage.php?pos=-1">
<img border = "0" src="http://www.tongsondub.com/tgallery//albums/userpics/10001/thumb_gtr.jpg" align="right" /></a>
gtr.jpg from album Personal<br/>Filesize 137.7 kb<br/>The car i will by when i win the Lottery.<br/>Rated 5 / 5 stars (1 votes total)
if you look at the links for the images, they have two '/'s

Thanks all
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: tlove on November 12, 2005, 06:49:58 pm
found the source of the problem. In the cpmfetch.php file, there is a line that appends '/' to the path to coppermine if its not there and then in the ....._dao.php file, the albums folder is declared as '/albums' so you end up with /coppermine/ and /albums

in cpmfetch(around line 138):

Code: [Select]
if (substr($urltocpm_,-1) != '/') $urltocpm_ .= '/';

in the dao.php file(around line 170):

Code: [Select]
$this->fullpathtocpm = $this->partialUrltocpm;

}



$this->OverridePathToAlbums($this->fullpathtocpm . "/albums", $this->partialUrltocpm . "/albums");





$this->setPrivateLockOn(true);

$this->dateFormatString = $this->defaultDateFormatString;

I hope i didn't just screw something up, so far its working fine.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: smoke10010 on November 14, 2005, 06:25:25 am
Is there a way to display the thumbs of the last X number of albums updated. much like the cpm_showAlbumsUpdatedOverLastDays except no date and a set number.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 14, 2005, 10:01:00 pm
Is there a way to display the thumbs of the last X number of albums updated. much like the cpm_showAlbumsUpdatedOverLastDays except no date and a set number.

Would that mean one thumb from each of the X last updated albums?  Or do you mean the thumb assigned to the album and not the most recent upload?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: smoke10010 on November 14, 2005, 11:14:30 pm
both if possible. Right now i'm not really sure how it works it seems like it takes the last picture of the last album thats been updated.

but i'd like it so that it shows one thumb from each of the X last updated albums preferrably the thumb assigned.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ksshane on November 15, 2005, 01:02:09 am
Not exactly sure where I went wrong.

Test page shows everything working, but when I add this code

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/accgallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>


To my portal page I get this

Code: [Select]
cpm_viewRandomMedia(3,3); $objCpm->cpm_close(); ?>

Instead of random photos.

Can someone tell me what I did wrong?

Here is a link to my site if that helps

http://www.aircapitalconstrictors.com/forum/portal1.php

Thanks
Shane
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mona87 on November 15, 2005, 03:44:48 am
Im a bit confused.   

this is the code i have to show the last images i uploaded

Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/visual');
$objCpm->cpm_viewLastAddedMedia (1,4);
$objCpm->cpm_close();
?>


i want the images though to resized down to about 50 for the width.  so i added the option array

Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/visual');
$objCpm->cpm_viewLastCommentedImages(1,4, [ array imagewidth="50"])
$objCpm->cpm_close();
?>



this is the error i got when i went to my broswer.


Quote
Parse error: parse error, unexpected '[' in /home/***/public_html/cpmfetch/test2.php on line 4


any help would be greatly appreciated!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 15, 2005, 05:30:32 am
Not exactly sure where I went wrong.

Test page shows everything working, but when I add this code

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/accgallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>


To my portal page I get this

Code: [Select]
cpm_viewRandomMedia(3,3); $objCpm->cpm_close(); ?>

Instead of random photos.

Can someone tell me what I did wrong?

Here is a link to my site if that helps

http://www.aircapitalconstrictors.com/forum/portal1.php

Thanks
Shane

Looks as if your portal is processing or stripping part of the code out.  You can bring it up in the embedding thread, maybe someone else has a problem.  Be worth noting what portal you are using.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 15, 2005, 05:32:12 am
Im a bit confused.   

this is the code i have to show the last images i uploaded

Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/visual');
$objCpm->cpm_viewLastAddedMedia (1,4);
$objCpm->cpm_close();
?>


i want the images though to resized down to about 50 for the width.  so i added the option array

Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/visual');
$objCpm->cpm_viewLastCommentedImages(1,4, [ array imagewidth="50"])
$objCpm->cpm_close();
?>

this is the error i got when i went to my broswer.
Quote
Parse error: parse error, unexpected '[' in /home/***/public_html/cpmfetch/test2.php on line 4
any help would be greatly appreciated!

It looks as though you are following the docs too literally.  Typically the [ ] around something means that parameter is optional... 

Try something like this:

$objCpm->cpm_viewLastCommentedImages(1,4, array( imagewidth => "50"));


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pyimaung on November 15, 2005, 01:50:45 pm
I've used CpmFetch for my site and it was working fine. But all of a sudden, it has stopped fetching pics. I uploaded new photos but it's not showing the latest uploaded pics. Why has it stopped fetching? My code is below:

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array();
$styleguide['imagelink'] = "none";
$styleguide['windowtarget'] = "_blank-cfshow";
$objCpm->cpm_viewLastAddedMedia(1,5,$styleguide); 
$objCpm->cpm_close();
?>


Can anyone spot the problem?? Could it be a database error? How can I fix this? Thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 15, 2005, 07:59:20 pm
I've used CpmFetch for my site and it was working fine. But all of a sudden, it has stopped fetching pics. I uploaded new photos but it's not showing the latest uploaded pics. Why has it stopped fetching? My code is below:

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array();
$styleguide['imagelink'] = "none";
$styleguide['windowtarget'] = "_blank-cfshow";
$objCpm->cpm_viewLastAddedMedia(1,5,$styleguide); 
$objCpm->cpm_close();
?>


Can anyone spot the problem?? Could it be a database error? How can I fix this? Thanks


You can add in $objCpm->setDebugMode(true);

This will add in a bunch of comments into your html showing the queiers and results and such.  Might help


Also, try adding

<?php
error_reporting (E_ALL);
ini_set('display_errors',1);
?>

That will display a lot more than normal







Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pyimaung on November 16, 2005, 06:38:52 pm
Hi Vuud,
Thanks for your reply. I've tried both your suggestions but still not working.
I found out another thing today. I'm the admin and all the photos I upload are fetched but the pics that my users upload which I have to approve do not get fetched. I tried registering as a normal user and tried uploading and approved the files with my admin account. It appears in CPG but CPMFetch does not fetch. I tried uploading again as an admin and the photos were fetched just fine. Please help..Thanks.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Ralphfolkes on November 18, 2005, 09:54:43 am
I was unable to start a new topic so I am replyng to this one in hopes of an answer.

I have installed cpmfetch on my website and it is functioning for the most part except that when I try to use the last added media command I don't get the last added media.

                     
I am using the following code
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$objCpm->cpm_viewLastaddedMedia(5,1);
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>

Which gets me    http://isaiahfolkes.com/isaiah_folkes__index.php
It should have a single coluum with 5 pics of last added and then 5 random pics.  The problem I am having is the last added pics don't match coppermine http://isaiahfolkes.com/Gallery/thumbnails.php?album=lastup&cat=0

Is there something I am missing or doing wrong?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jphahn on November 18, 2005, 01:11:55 pm
I've used CpmFetch for my site and it was working fine. But all of a sudden, it has stopped fetching pics. I uploaded new photos but it's not showing the latest uploaded pics. Why has it stopped fetching?

I was having exactly the same problem.  It worked fine up until a few days ago.  I was using the SSI method to include the latest photos on an html page.  I changed it to use this method: http://forum.coppermine-gallery.net/index.php?topic=23537.0 and it works fine now.

Jason
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: guytoon on November 18, 2005, 06:55:08 pm
Hi,

CPMFetch is doing exactly what I'd like to. Unfortunately i tried to install it on 2 servers and it doesnt works. Averything is successfull on the test page but no thumbnail is displayed.

Link to my public cftest http://www.breizhskiff.com/galerie/cpmfetch/cftest.php
Coppermine is there : http://www.breizhskiff.com/galerie/

Note that my directory "albums" has no pictures at the root but in subdirectories (anyway I tried with ome at the root and it didn't change anything).

Thanks for your knid help.

Ghislain
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 18, 2005, 10:36:32 pm
Hi Vuud,
Thanks for your reply. I've tried both your suggestions but still not working.
I found out another thing today. I'm the admin and all the photos I upload are fetched but the pics that my users upload which I have to approve do not get fetched. I tried registering as a normal user and tried uploading and approved the files with my admin account. It appears in CPG but CPMFetch does not fetch. I tried uploading again as an admin and the photos were fetched just fine. Please help..Thanks.

Sorry, my time has been very limited lately so I have not been able to hang out on the board much.

CpmFetch will not grab photos that require logins to see, or ones that are awaiting approval.  So that could be a problem. 

This will help if they are just restricted

cpm_unlockPrivate($bool)

This toggles access to non-public photos (default: false) It allows images not publically available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.

I do not think there is a way around the "needing approval" state at this time - that is intentional though - as if you dont want them showing up in your gallery till you see them, you probably don't want them anywhere else.




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 18, 2005, 10:45:48 pm
I was unable to start a new topic so I am replyng to this one in hopes of an answer.

I have installed cpmfetch on my website and it is functioning for the most part except that when I try to use the last added media command I don't get the last added media.

                     
I am using the following code
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$objCpm->cpm_viewLastaddedMedia(5,1);
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>

Which gets me    http://isaiahfolkes.com/isaiah_folkes__index.php
It should have a single coluum with 5 pics of last added and then 5 random pics.  The problem I am having is the last added pics don't match coppermine http://isaiahfolkes.com/Gallery/thumbnails.php?album=lastup&cat=0

Is there something I am missing or doing wrong?

Well, its good you were not able to start a new topic - posts go here.

Second, amazingly enough Isaiah and I have the same head circumferance...  Wierd. :p

What you are doing looks correct, but your right, something is busted in there.

A few things:

What version of CPG?

Are the other ones uploaded any differently than the ones its showing?









Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 18, 2005, 10:48:28 pm
I've used CpmFetch for my site and it was working fine. But all of a sudden, it has stopped fetching pics. I uploaded new photos but it's not showing the latest uploaded pics. Why has it stopped fetching?

I was having exactly the same problem.  It worked fine up until a few days ago.  I was using the SSI method to include the latest photos on an html page.  I changed it to use this method: http://forum.coppermine-gallery.net/index.php?topic=23537.0 and it works fine now.

Jason

Things should not just stop working.  Something changed somewhere... maybe your provider revoked SSI rights or tightened down ,.htaccess configurations or something. 




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 18, 2005, 10:51:48 pm
Hi,

CPMFetch is doing exactly what I'd like to. Unfortunately i tried to install it on 2 servers and it doesnt works. Averything is successfull on the test page but no thumbnail is displayed.

Link to my public cftest http://www.breizhskiff.com/galerie/cpmfetch/cftest.php
Coppermine is there : http://www.breizhskiff.com/galerie/

Note that my directory "albums" has no pictures at the root but in subdirectories (anyway I tried with ome at the root and it didn't change anything).

Thanks for your knid help.

Ghislain


I could not help but notice you are running SMF... Are you bridging with CPG or anything?

When you bridge, a lot of times the bridge does not add users into the cpg database, but the photos get assigned new owner ID's... this breaks when we try to retrieve the information for them.

Let me know and we will take it from there.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Ralphfolkes on November 19, 2005, 01:46:14 am
I was unable to start a new topic so I am replyng to this one in hopes of an answer.

I have installed cpmfetch on my website and it is functioning for the most part except that when I try to use the last added media command I don't get the last added media.

                     
I am using the following code
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$objCpm->cpm_viewLastaddedMedia(5,1);
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>

Which gets me    http://isaiahfolkes.com/isaiah_folkes__index.php
It should have a single coluum with 5 pics of last added and then 5 random pics.  The problem I am having is the last added pics don't match coppermine http://isaiahfolkes.com/Gallery/thumbnails.php?album=lastup&cat=0

Is there something I am missing or doing wrong?

Well, its good you were not able to start a new topic - posts go here.

Second, amazingly enough Isaiah and I have the same head circumferance...  Wierd. :p

What you are doing looks correct, but your right, something is busted in there.

A few things:

What version of CPG?

Are the other ones uploaded any differently than the ones its showing?











Coppermine Photo Gallery 1.3.3
and
copperminefetch-1.6.2


Uploads it is showing are batch uploads and I have since done both batch and normal uploads.

I am using mod to bridge user reg with phpbb and haven't added any other mods to CPG.

here is the entire code for that page.

Code: [Select]
<?php
// phpbb fetch
$phpbb_root_path './Forum/';
define ('IN_PHPBB'true);
if (!
file_exists($phpbb_root_path 'extension.inc'))
{
    die (
'<tt><b>phpBB Fetch All:</b>
          $phpbb_root_path is wrong and does not point to your forum.</tt>'
);
}
include_once (
$phpbb_root_path 'extension.inc');
include_once (
$phpbb_root_path 'common.' $phpEx);
include_once (
$phpbb_root_path 'includes/bbcode.' $phpEx);
include_once (
$phpbb_root_path 'mods/phpbb_fetch_all/common.' $phpEx);
include_once (
$phpbb_root_path 'mods/phpbb_fetch_all/posts.' $phpEx);
$userdata session_pagestart($user_ipPAGE_INDEX);
init_userprefs($userdata);
$news phpbb_fetch_posts();
phpbb_disconnect();
?>


<head>
<title>Isaiah Folkes :: Index</title>
<link rel="stylesheet" href="comicBook/comicBook.css" type="text/css" />
<style type="text/css">
<!--
.BODYLINE    { background-image: url(comicBook/images/cover_background.jpg) }
TD.cat      { background-image: url(comicBook/images/background.jpg) }
TD.rowpic   { background-image: url(comicBook/images/background.jpg) }
TD.catHead,TD.catSides,TD.catLeft,TD.catRight,TD.catBottom { background-image: url(comicBook/images/background.jpg) }
-->
</style>
</head>
</head>

<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4">
<table width="750" cellspacing="0" cellpadding="10" border="0" align="center">
<tr>
<td class="bodyline">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<a href="index.php"><img src="comicBook/images/logo_comic.jpg" border="0" alt="Pictures" vspace="1" /></a>
</td>
<td align="center" width="100%" valign="middle"><span class="bigmaintitle">Isaiah Folkes</span><br>
<table cellspacing="0" cellpadding="2" border="0" width="452">
<tr>
<td align="center" valign="top" nowrap="nowrap">&nbsp;<a href="http://isaiahfolkes.com/Gallery/" class="mainmenu">&nbsp;Pictures&nbsp;</a>&nbsp;
&nbsp;<a href="http://isaiahfolkes.com/Forum/" class="mainmenu">&nbsp;Discussion&nbsp;</a>&nbsp;&nbsp; </td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" cellpadding="2" cellspacing="1" border="0" >
  <tr>
  <td><?php

for ($i 0$i count($news); $i++) {

?>

<table border="1" width="100%">
  <tr>
    <th><?php echo $news[$i]['topic_title']; ?></th>
  </tr>
  <tr>
    <td align="left" width="100%">
Posted by
<a href="<?php echo append_sid($phpbb_root_path 'profile.php?mode=viewprofile&amp;u=' $news[$i]['user_id']); ?>">
<?php echo $news[$i]['username']; ?></a>
on <?php echo create_date($board_config['default_dateformat'], $news[$i]['post_time'], $board_config['board_timezone']);  ?>
<hr size="1">
<?php echo $news[$i]['post_text']; ?>
<hr size="1">
<div align="right">(<?php echo $news[$i]['topic_replies']; ?>)
<a href="<?php echo append_sid($phpbb_root_path 'viewtopic.php?t=' $news[$i]['topic_id']); ?>">
Comment<?php if ($news[$i]['topic_replies'] != 1) { echo 's'; } ?></a></div>
    </td>
  </tr>
</table>
<br>
<?php

}

?>

</td>
<td valign="top">
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$objCpm->cpm_viewLastaddedMedia(5,1);
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>

</td>
  </tr>
</table>
</body>
</html>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: burzum on November 19, 2005, 03:06:52 am
cpmFetch displays NOTHING for me :(

Tried cpmFetch 1.6.0 and 1.6.2 - same problem (running 1.6.0. atm)
http://event-team-saar.de/cpmfetch/cftest.php

Coppermine 1.3.5. (using the SMF bridge)
php 4.3.10
SMF 1.1 RC1

I tried also my own testscript http://event-team-saar.de/test.php:

Code: [Select]
<?php 
error_reporting
(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on
###############################################################################
###############################################################################
include('cpmfetch/cpmfetch.php');
$objCpm = new cpm("/gallery");
$objCpm->cpm_setDebugMode(1);
$objCpm->cpm_setReturnType('html');
echo 
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

It returns no images, just an SQL-Query that works fine when i execute it directly, but it returns nothing! Why!? I have albums and images in the gallery.
http://event-team-saar.de/gallery/

Code: [Select]
<!-- SQL : SELECT  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 FROM  cpg135_pictures as p, cpg135_albums as a, cpg135_users AS u  WHERE a.aid = p.aid AND p.owner_id = u.user_id AND p.approved='YES'   and a.visibility = 0  ORDER BY rand(586518) LIMIT 9
ROWS: 0
 --><table  >
<tr>
<td>&nbsp;</td><td>&nbsp;</td>
</tr>

</table>

Any ideas how to solve this problem?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 19, 2005, 05:14:25 am

I am using mod to bridge user reg with phpbb and haven't added any other mods to CPG.


That is the problem.  See my next post explaining it.  (The next user probably has the same problem)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 19, 2005, 05:23:19 am
cpmFetch displays NOTHING for me :(

Tried cpmFetch 1.6.0 and 1.6.2 - same problem (running 1.6.0. atm)
http://event-team-saar.de/cpmfetch/cftest.php

Coppermine 1.3.5. (using the SMF bridge)
php 4.3.10
SMF 1.1 RC1

Any ideas how to solve this problem?

Okay, go back to 1.6.2  There is some fixes in there that you should have.

You and RalphFolkes have the same problem.  Bridging.  This is explained a bunch of times, but here it is again in summary.

CpmFetch tries to extract userdata about the user that submitted each image to use in making subtitles.  When you mod CPG and hook into other systems it does not know where to get the data from.  So, when it sees image A was added by user 6, and the CPG tables do not have a user #6, it nixes that as a bad result and skips it.

There is no way that I could have written CPG and anticpated every mod out there.  So thats the problem.  You modified the way CPG works and now this tool is not working since it cannot find data that is no longer where it should be.  Its perfectly reasonable. 

So, solutions?

1) Mod cpmfetch so that it knows where to find the user data or does not look for it.

2) Create fake users in the cpg to reflect the user #'s assigned to photos. 

3) Write a script that populates the cpg tables with userdata from the thing you are mod'ed too.  Then post the script up so the bunches of other people with this problem can use it too.

Personally I would recommend 2 if you only have a few board users, or #3 if you feel up to it, or have a lot of users. 

#1 will make it a pain for you to upgrade, and its a lot of little changes to take it out (otherwise I would just post the changes here)

Hope the explanation helps, sorry it breaks when you change the program its supposed to work with.  With the next version (1.7) I will probably insert a flag so you can tell it not to look up userdata at all.  This hurts your options for subtitles, but its better than it not working right :)  - the next version changes how it works to solve a lot of problems aside from this one due to funny configurations.

Let me know if you have any questions...

Vuud







Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Ralphfolkes on November 19, 2005, 06:15:34 am
whooo hoo..

Thanks, 

got it working like I want....
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 19, 2005, 06:31:55 am
whooo hoo..

Thanks, 

got it working like I want....

Was I right about the problem?  My hand is just itching to pat myself on the back :p
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Ralphfolkes on November 19, 2005, 08:41:30 am
yes,  I added some dummy entries in the users table in CPG and it worked.   This works for this installation since there will be very few (wife and I) users that will be uploading pictures that I want to show.  I have another much larger installation with many many users that I would like to get it to work with, but I can wait till you get something functional in the base code.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: guytoon on November 19, 2005, 10:09:57 am
Hi,

CPMFetch is doing exactly what I'd like to. Unfortunately i tried to install it on 2 servers and it doesnt works. Averything is successfull on the test page but no thumbnail is displayed.

Link to my public cftest http://www.breizhskiff.com/galerie/cpmfetch/cftest.php
Coppermine is there : http://www.breizhskiff.com/galerie/

Note that my directory "albums" has no pictures at the root but in subdirectories (anyway I tried with ome at the root and it didn't change anything).

Thanks for your knid help.

Ghislain


I could not help but notice you are running SMF... Are you bridging with CPG or anything?

When you bridge, a lot of times the bridge does not add users into the cpg database, but the photos get assigned new owner ID's... this breaks when we try to retrieve the information for them.

Let me know and we will take it from there.
Yes I confirm I'm bridging with SMF. I added the principal uploaders and it works fine.

Thanks for your help.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: burzum on November 19, 2005, 05:38:39 pm
So, solutions?

1) Mod cpmfetch so that it knows where to find the user data or does not look for it.

2) Create fake users in the cpg to reflect the user #'s assigned to photos. 

3) Write a script that populates the cpg tables with userdata from the thing you are mod'ed too.  Then post the script up so the bunches of other people with this problem can use it too.

Thanks for your fast answer!

#1 Is it enough to point cpmFetch from the cpg135_users table to smf_members and change the according fieldnames?

#2 I create just some new users for uploading? Nothing more? Hrmm maybe a solution. I have to talk with my client.

#3 I would do so, but its impossible. Coppermine saves the passwords in plaintext smf doesnt. :( So i cant convert the passwords.

I guess i'll have to stand with solution #2.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 19, 2005, 07:07:35 pm
So, solutions?

1) Mod cpmfetch so that it knows where to find the user data or does not look for it.

2) Create fake users in the cpg to reflect the user #'s assigned to photos. 

3) Write a script that populates the cpg tables with userdata from the thing you are mod'ed too.  Then post the script up so the bunches of other people with this problem can use it too.

Thanks for your fast answer!

#1 Is it enough to point cpmFetch from the cpg135_users table to smf_members and change the according fieldnames?

#2 I create just some new users for uploading? Nothing more? Hrmm maybe a solution. I have to talk with my client.

#3 I would do so, but its impossible. Coppermine saves the passwords in plaintext smf doesnt. :( So i cant convert the passwords.

I guess i'll have to stand with solution #2.


The problem is its looking for field names.

I would do #3.... All you need to is make the records with the user id number and the usersname.  Heck, does not even have to be valid data.  You just need a user entry in there for the user ids assigned to photos.

Don't need to deal with passwords.

If you only have a few, just go into cpg admin and create some users.  Does not matter who or what since no one will use them anyway, but the addition of those records will make things work again.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: burzum on November 19, 2005, 07:47:32 pm
Ahhh, ok, after a further look into the database i understood :)

I've added just one user "test" and it works now. Perfect! Thank you!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 19, 2005, 09:12:50 pm
Ahhh, ok, after a further look into the database i understood :)

I've added just one user "test" and it works now. Perfect! Thank you!

Depending on how many people you have adding them, you may need to add more.  YMMV

Good to hear its working

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: michaelkent on November 25, 2005, 12:33:49 am
I have Coppermine 1.3.5 phpbb2.0.18 and cmpfetch 1.6.2 (I think, downloaded it 2 days ago)

The Coppermine/phpbb integration seems to work fine, but I have problems getting cmpfetch to work.

I have added the following to my homepage
Code: [Select]
                <?php
                
include './cpmfetch/cpmfetch.php';
                
$objCpm = new cpm('/coppermine');
                
$objCpm->cpm_viewRandomMedia (1,4);
                
$objCpm->cpm_viewLastAddedMedia (2,4);
                
$objCpm->cpm_formatStats("Here is a percent sign %% There are %f files in %c categories containing %a albums, having served %v views and getting %n comments");
                
$objCpm->cpm_close();
                
?>

I get

(http://www.bletchley-reunion.org.uk/sample.jpg)
The pics don't display but it gets the stats, which I assume means the cmpfetch installation is OK but there's something dodgy about my coppermine install??

Coppermine, phpbb2 and cmpfetch are all in discrete directories under the homepage, the cmpfetch test page shows all passes, and I've RTFM till my eyes nip.

I'm stumped!

I've not used the default table prefixes for Coppermine or phpbb2 but cmpfetch seems to pick these up from the config file so I don't think that's it.

Any help much appreciated
Code: [Select]
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: runaweigh on November 25, 2005, 03:59:17 am
I guess I'm just not getting it, but the test page works well, and I can create a php file with different displays.  My question is likely elementary, but how do I call the file up to display on other pages on my website.  Do I href the php page or do I drop the code directly into the page I want.  Either way, I can't get it to work.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 25, 2005, 04:39:22 am
I have Coppermine 1.3.5 phpbb2.0.18 and cmpfetch 1.6.2 (I think, downloaded it 2 days ago)

The Coppermine/phpbb integration seems to work fine, but I have problems getting cmpfetch to work.

I have added the following to my homepage
Code: [Select]
                <?php
                
include './cpmfetch/cpmfetch.php';
                
$objCpm = new cpm('/coppermine');
                
$objCpm->cpm_viewRandomMedia (1,4);
                
$objCpm->cpm_viewLastAddedMedia (2,4);
                
$objCpm->cpm_formatStats("Here is a percent sign %% There are %f files in %c categories containing %a albums, having served %v views and getting %n comments");
                
$objCpm->cpm_close();
                
?>

I get

(http://www.bletchley-reunion.org.uk/sample.jpg)
The pics don't display but it gets the stats, which I assume means the cmpfetch installation is OK but there's something dodgy about my coppermine install??

Coppermine, phpbb2 and cmpfetch are all in discrete directories under the homepage, the cmpfetch test page shows all passes, and I've RTFM till my eyes nip.

I'm stumped!

I've not used the default table prefixes for Coppermine or phpbb2 but cmpfetch seems to pick these up from the config file so I don't think that's it.

Any help much appreciated
Code: [Select]


The problem is with the fact the phpbb will not create users in coppermine (cause it uses its own).  You need to add some users to the coppermine user table so that cpmfetch can build the resultset. 

If you only have a few users in phpbb, just go into coppermine and add that many.  You can match the names if you want, but it only needs user entries that match the numbers assigned the photos.

This has been talked about mostly in the other thread on embedding.  There are many ways to fix this.    Just add a few users, or go and make a script that copies over phpbb2 users.




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 25, 2005, 04:40:34 am
I guess I'm just not getting it, but the test page works well, and I can create a php file with different displays.  My question is likely elementary, but how do I call the file up to display on other pages on my website.  Do I href the php page or do I drop the code directly into the page I want.  Either way, I can't get it to work.


You just drop the code into the php page you want to display stuff on.  See the quickstart at cpmfetch.fistfullofcode.com

If you still cant get it to work, post what you put in here


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on November 25, 2005, 06:50:15 pm
Hi Dear

Ive jusgt updated my 1.3.4. to 1.4.2 stable successfully, But now i face  the following error on my index page

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

Earlier it was working fine but now it isnt
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 25, 2005, 11:48:01 pm
Hi Dear

Ive jusgt updated my 1.3.4. to 1.4.2 stable successfully, But now i face  the following error on my index page

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

Earlier it was working fine but now it isnt


Hello,

The release notes with the recent versions of cpmfetch include instructions for this problem.

Well they are for the beta, but this includes the new verions also

Quote
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.  If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.

I am working on the next version of cpmfetch, but it keeps getting bumped due to this annoying thing called life.  So hopefully I can get that out soon - which addresses many other "oddity" level problems also.

In the meantime a recent cpmfetch and the brief changes above are all thats needed to fix it.






Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on November 26, 2005, 03:10:37 am
Hi Dear

Ive jusgt updated my 1.3.4. to 1.4.2 stable successfully, But now i face the following error on my index page

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

Earlier it was working fine but now it isnt


Hello,

The release notes with the recent versions of cpmfetch include instructions for this problem.

Well they are for the beta, but this includes the new verions also

Quote
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. If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.

I am working on the next version of cpmfetch, but it keeps getting bumped due to this annoying thing called life. So hopefully I can get that out soon - which addresses many other "oddity" level problems also.

In the meantime a recent cpmfetch and the brief changes above are all thats needed to fix it.




Dear

Ive uncomment line54 & uncomment line59 as told by u but tell me wher is the other section as u mentioned " Uncomment by removing the same from the other section."

Now this is  showing the following error

Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/SITENAME/public_html/cpmfetch/cpmfetch_dao.php on line 61
 
 
if convenient paste code over here or put copy of dao file here so that i can detach & use

Thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 26, 2005, 05:18:58 am
Hi Dear

Ive jusgt updated my 1.3.4. to 1.4.2 stable successfully, But now i face the following error on my index page

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

Earlier it was working fine but now it isnt


Hello,

The release notes with the recent versions of cpmfetch include instructions for this problem.

Well they are for the beta, but this includes the new verions also

Quote
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. If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.

I am working on the next version of cpmfetch, but it keeps getting bumped due to this annoying thing called life. So hopefully I can get that out soon - which addresses many other "oddity" level problems also.

In the meantime a recent cpmfetch and the brief changes above are all thats needed to fix it.




Dear

Ive uncomment line54 & uncomment line59 as told by u but tell me wher is the other section as u mentioned " Uncomment by removing the same from the other section."

Now this is  showing the following error

Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/SITENAME/public_html/cpmfetch/cpmfetch_dao.php on line 61
 
 
if convenient paste code over here or put copy of dao file here so that i can detach & use

Thanks

When you started you had something like this in there:

Code: [Select]
// 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';
*/

Both sections start with var $sqlPictureAlbumSelect .  You need to remove the /* and */ from around the second set and put them instead around the first set

Like so...

Code: [Select]
// 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';


The error you got is due to something going wrong in your commenting or uncommenting before.  Give it a whirl with the example above.

Sorry, I will work on the new version soon
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on November 26, 2005, 09:18:39 am
THANKS Dear

Issue Resolved !!


The problem was also i was having ur 1.4 version of cpmfetch & now i download 1.6.2 & copy all the files in same directory & Site is working fine.

Also no need to say SORRY as you are favouring us for Free , So its our duty to say sorry because we are disturbing u again & again.

Anyway Good work. ;)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 26, 2005, 05:45:32 pm

Glad to hear its working!  Take care

THANKS Dear

Issue Resolved !!


The problem was also i was having ur 1.4 version of cpmfetch & now i download 1.6.2 & copy all the files in same directory & Site is working fine.

Also no need to say SORRY as you are favouring us for Free , So its our duty to say sorry because we are disturbing u again & again.

Anyway Good work. ;)


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hec Losame on November 27, 2005, 01:24:41 am
Edited to update code

Hello Vuud,

      First of all i want to thank you for all the work that you put into this software and helping others.  That aside i want to bother you with a  of question. Fist i want to tell you that four weeks ago i had no knowledge what so ever of php (nor htlm for that case) but i been learnign.  I istalled phpBB forum.  I installed a CPG gallery and bridged it to the forums.  then i started a portal and i want to show a single random picture and the lastest picture in the portal.  After digging a little bit in this forums it was obvios that CPMFetch was the tool for the job, so i decided to use it.

     CPG is version 1.3.5 and CPMfetch is verison 1.6.2

     I downloaded it and installed it and when i went to the test page no images showed up.  After a digging more into this forums i learned about the bridging promblem, so i manually compied the users table of my phpBB to the CPM users table and problem resolved.  now i implemented the code in my portal and i get the following error:

Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/skanlo.com/httpdocs/gallery/cpmfetch/cpmfetch.php on line 25



   The code im using in my portal is the following:

Code: [Select]
<!-- GALLERY -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
  <tr>
    <td class="catHead" height="28" colspan="2"><span class="cattitle"><?php echo 'Gallery' ?></span></td>
  </tr>
  <tr>
     <?php
         include 
"../gallery/cpmfetch/cpmfetch.php";
         $objCpm = new cpm('/gallery');
      ?>

      <td class="row1" align="center" width="50%">
         <?php
            $objCpm
->cpm_viewRandomMedia (1,1);
          ?>

       </td>
      <td class="row1" align="center" width="50%">
         <?php
           $objCpm
->cpm_viewLastAddedMedia (1,1);
           $objCpm->cpm_close();
         ?>

    </td>
  </tr>
</table>
<br />
<!-- GALLERY -->


You can take a look at it at www.skanlo.com/elgym  (http://www.skanlo.com/elgym)

The path for the gallery is www.skanlo.com/gallery
The path for CPGfetch is www.skanlo.com/gallery/cpmfetch

My question is how can i get rid of this warning?  I am very new at this there for not very savy about this things.

Thanks for your time and your help in advance.

Hec Losame.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 27, 2005, 05:47:52 am

Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/skanlo.com/httpdocs/gallery/cpmfetch/cpmfetch.php on line 25


According to http://www.php.net/features.safe-mode this is something to do with what files / directories PHP is allowed to open, and from what I can tell has something to do with how your server is configured....  Although I am at a complete loss as to why it does not happen when your cftest.php runs which seems fine...

It is possible that your portal (for security reasons) turns that on, and since its not in the portal directory you get that error?  I am guessing there.  You could check the source for phpbb and any .htaccess files it may come with.  Look for that setting, OR try moving the cpmfetch directory into the phpbb directory.

These are all guesses...






Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hec Losame on November 27, 2005, 07:32:44 am

Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/skanlo.com/httpdocs/gallery/cpmfetch/cpmfetch.php on line 25


According to http://www.php.net/features.safe-mode this is something to do with what files / directories PHP is allowed to open, and from what I can tell has something to do with how your server is configured....  Although I am at a complete loss as to why it does not happen when your cftest.php runs which seems fine...

It is possible that your portal (for security reasons) turns that on, and since its not in the portal directory you get that error?  I am guessing there.  You could check the source for phpbb and any .htaccess files it may come with.  Look for that setting, OR try moving the cpmfetch directory into the phpbb directory.

These are all guesses...


Vuud, thanks for the help. The pictures display and everything seems to work fine, but the warning is there, i was wondering if anyone knows a way to turn it off.  I made several experiments with the test code from your tutorial.  I made a file called example.php that had nothing but the test code.  That warnings comes up everywhere but from inside the cpmfetch directory.  My set up is the following:

My cpm gallery is at               www.skanlo.com/gallery
the cpmfetch directory is at   www.skanlo.com/gallery/cpmfetch
my portal is at                      www.skanlo.com/elgym

I got the warning in all of the following:  placing the example.php in my portal directory, placing it on the root directory.  placing it on the gallery directory.

then i put the example.php file inside the cpmfetch directory and no warning was displayed.  then i moved the whole cpmfetch directory to the root directory witht the example.php and no warning was displayed.  They i moved the whole cpmfetch directory again into my portal directory and no warning displayed.  So i concluded that no matter where the cpmfetch directory is at, as long as the your code is inside that directory, you have no warning being displayed.  Ofcourse this is not good new because i woul have put my whole portal inside the cpmfetch directory and that woul mean a lot of redirecting and recoding for a lot of stuff.  Right now im looking into turning off warnings even if its just during that part of the code.

Since i get hosted on a pay shared server, i dont think i will have acces to turn off the open_basedir thing.  At lest thats what i understand.

Also, i noticed that for the random picture it always shows the same picture.  I was wondering if this is a bug, or if im just really unlucky and i always get the same picture.  I would appreciate any insights about this.

Thanks again for your sharing your time and your knowledge.

Hec Losame
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hec Losame on November 27, 2005, 07:51:38 am
Well, seems like i did it.  As i said above, im new to this, so for most of you this could have been obvious or simple.

I just added the line:

Code: [Select]
        error_reporting(0);
right before

       
Code: [Select]
include "./cpmfetch/cpmfetch.php";
         $objCpm = new cpm('/gallery');

and the line

         
Code: [Select]
error_reporting(E_ALL ^ E_NOTICE);
right after

           
Code: [Select]
$objCpm->cpm_close();

I hope this is not bad or wrong in some way. I got this from http://mx2.php.net/error_reporting  (http://mx2.php.net/error_reporting). At least the warning is gone and the pictures are displaying. 

Now I only have one question.  How come the random pictures is the same picture everysingle time?  Is this a bug, or may I be doing something wrong?  once again, i would appreciate any insights about this.

Hec Losame

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hec Losame on November 27, 2005, 07:08:21 pm
Hello its me again.  Sorry im it seems like im spamming.  I noticed that only images from public albums get displayed on the random image.  after reading the documentation i found out that i could include images from private albums by "calling the cpm_unlockPrivate(true) function".  I tested this on the example.php file i mentioned in my post above and gives me the error.  I was wondering if where should i make this call, i mean, where do i place this code.

Once more thanks for your time, your knowledge and your patience.

Hec Losame
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 27, 2005, 09:22:25 pm
Hello its me again.  Sorry im it seems like im spamming.  I noticed that only images from public albums get displayed on the random image.  after reading the documentation i found out that i could include images from private albums by "calling the cpm_unlockPrivate(true) function".  I tested this on the example.php file i mentioned in my post above and gives me the error.  I was wondering if where should i make this call, i mean, where do i place this code.

Once more thanks for your time, your knowledge and your patience.

Hec Losame


Gives you what error?

Did you include the $objCpm on the front of it?  Oh, and the docs are wrong... it should be like the below... Someone reported this a while back, but I have not updated the docs.

$objCpm->cpm_unlock_private(true);

My bad :(

Are your other issues all better now?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Hec Losame on November 28, 2005, 01:04:17 am

Are your other issues all better now?




Vuud, everything is running smooth now.  you are a genius.  Thanks again for your help and your time.  I really appreciate it as i do appreciate this marvelous piece of code you have provide us.  Thanks.

Hec Losame
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 28, 2005, 02:01:11 am

Subscribe to the mailing list, new version will be announced soon!

Have fun with it


Are your other issues all better now?




Vuud, everything is running smooth now.  you are a genius.  Thanks again for your help and your time.  I really appreciate it as i do appreciate this marvelous piece of code you have provide us.  Thanks.

Hec Losame
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on November 28, 2005, 02:59:53 pm
Dear VUUD

Is there way out for pic of the day or pic of the week in your mod foer all or specific categories/ albums

or make some thing like that

Ive seen one other mod but there ive to modify my code heavily , iwant to have some crisp solution from u  ;)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 28, 2005, 04:02:11 pm
Dear VUUD

Is there way out for pic of the day or pic of the week in your mod foer all or specific categories/ albums

or make some thing like that

Ive seen one other mod but there ive to modify my code heavily , iwant to have some crisp solution from u  ;)


Can you define what would make something "Pic or the day" or "Pic of the week"?

Thats a big ambigious

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on November 28, 2005, 04:07:46 pm
Dear Vuud

Please check this topic

http://forum.coppermine-gallery.net/index.php?topic=14600.0

I believe u'll make a shortcut to that
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on November 28, 2005, 04:15:11 pm
Dear Vuud

Please check this topic

http://forum.coppermine-gallery.net/index.php?topic=14600.0

I believe u'll make a shortcut to that

Okay, now I see.

No.

If that becomes a standard part of a cpg release I would definately do it, but I can't start coding against hacks to the software I am coding for,  Its just going to get out of hand.

I do have functions for random from most viewed and random from most popular, which are both sort of a stretch anyway.

Sorry, but that is just not going to happen

Again, sorry, but I can't do it.




Title: Well, progress on the new version
Post by: vuud on November 30, 2005, 09:14:48 am

Sort a teaser, and to at least get myself motivated to finish it...

I have version 1.7.0 almost done.  Well, the code itself is, but the installer is not.  I took a day off and did nothing but recode the whole thing.

Yes, thats right - an installer.

The biggest plus for me is that I eliminated a lot of code and duplication.

The biggest plus for all of you is that

1) You will set the configuration once, and no matter what you do, all the programs know to read it. 

2) The configuration gets built of CPG settigns data, so no more futzing with setting prefixes and such

3) Support for cpg 1.4

4) Support to make bridging at least not a problem

5) Should be more IIS and other wierd server tolerant

6) I think the double backslash thing is gone

The big drawback is that this product contains WHEAT and SOY.  So those with allergies could have a problem.  PEANUT safe though.

Oh yeah, and some functions are going away, BUT the normal ones are still available to you - so you should only need to make very minor changes to your web pages. 

$objcpm = new cpmfetch("/cpg");

now becomes

$objcpm = new cpmfetch();

All thats left is to make the installer that builds your config files and a few tweaks to the data.

So hopefully in a day or two.

I am not taking feature requests specifically for this release, but if anyone has any gripes about something that was hard to do that I can make easier, now would be a good time to point it out to me.

Have a nice night and lets all hope for the best




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kehbop on December 05, 2005, 06:26:37 am
Hi. I just can't get this to work at all. I really don't know any php but I've gotten a phpBB fetch to work and that seemed a lot more complex...
I'm using cpg 1.3.2

This is the code I'm am trying to use.
Code: [Select]
<?php 
include "gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia (1,1);
$objCpm->cpm_close();
?>
It does not return any errors but it doesn't show any picture. My coppermine is in the /gallery/ folder.

When I try changing the code to this, as it has it in the documentation, it returns me with an error about not finding the right directory.
Code: [Select]
include "./cpmfetch/cpmfetch.php";
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 05, 2005, 06:38:34 pm
Hi. I just can't get this to work at all. I really don't know any php but I've gotten a phpBB fetch to work and that seemed a lot more complex...
I'm using cpg 1.3.2

This is the code I'm am trying to use.
Code: [Select]
<?php 
include "gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia (1,1);
$objCpm->cpm_close();
?>
It does not return any errors but it doesn't show any picture. My coppermine is in the /gallery/ folder.

When I try changing the code to this, as it has it in the documentation, it returns me with an error about not finding the right directory.
Code: [Select]
include "./cpmfetch/cpmfetch.php";

By any chance are you bridged with PHPBB?  If so, this is a well known problem and has been talked about in the forums here a lot. 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kehbop on December 06, 2005, 02:53:06 am
So is there a solution?

I'm about to search for it now, but I don't want to keep searching for it if there isn't one...  :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kehbop on December 06, 2005, 03:12:45 am
Quote
Get the owner_id of the photos from the pictures table and make sure that Id exists in the users table.

If not, create another cpg user... that will be the real owner for the photos and all will work well

those were the two suggestions you told me to do. The first one sounds complicated, but I think the second one might work. But I don't know exactly what you mean. Can you explain it again?

Thanks!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 06, 2005, 06:02:02 am
those were the two suggestions you told me to do. The first one sounds complicated, but I think the second one might work. But I don't know exactly what you mean. Can you explain it again?

Thanks!

I can try.  Bear in mind I may forget a step, but you should be able to figure it out from there.

1. Log into coppermine gallery as an admin
2. Click on "users" from the admin menu
3. Click "new user"
4. Give the new user a funny name... this is important.

Important note:  There is a difference between funny and offensive.  I would strongly suggest the former over the latter.  Examples of funny names would be like:

Balzack Blisterfrog
Tuggmabellz Fugnutter
Licquema Svettynutz
I.P. Daily
Etc.

Offensive user names are like offensive passwords.  They have a habit of being revealed at the worst times.

5. Assign the user whatever for a password since you will never use it again.

Now repeat the above steps 3-5 once for each PHPBB user you have adding photos.  Step 4 will be the most challenging as coming up with funny names is not as easy as it seems.  Alternatively you could go with the names of the seven dwarfs if you could remember them and if you have less than 8 users to add.

Good luck

Baron Von Flatulator

( I appologize if anyone reading this actually has one of those names.  I mean, I am really really sorry if you have one of those names)





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on December 06, 2005, 11:52:42 pm
Hi Vuud, good to see you continued developing CPMFetch (tested the first version for you long time ago :))

I started using CPG again, and therefore also want to use the new cpmfetch version. Im having problems with the cftest.php i get alot
of errors.


Code: [Select]
Notice: Undefined index: DOCUMENT_ROOT in c:\domains\grafflix.nl\wwwroot\cftest.php on line 213

Notice: Undefined index: DOCUMENT_ROOT in c:\domains\grafflix.nl\wwwroot\cftest.php on line 214

Notice: Undefined index: SCRIPT_FILENAME in c:\domains\grafflix.nl\wwwroot\cftest.php on line 214

Notice: Undefined index: DOCUMENT_ROOT in c:\domains\grafflix.nl\wwwroot\cftest.php on line 221
5 You set your partial URL to /flix 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 = Windows NT SOHOSTED12 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: Not found BAD
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: Not found BAD
75 DOCUMENT_ROOT is a good match PASS
80 CPG Config file not found: /flix/include/config.inc.php FAIL

The path to the CPG config file is correct, so i really dont understand how to fix it.



You have some time to help me ?

My hosting rund IIS, heard CPMFetch has alot of errors with it..

Peace !
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 07, 2005, 06:02:32 am

My hosting rund IIS, heard CPMFetch has alot of errors with it..

Peace !


Hey!  Good to see you live.  Welcome back.

Owwwwch.  Cpmfetch has no errors with IIS.  They just don't seem to set the correct variables for the server info at least use a standard.

The best way is to find a host that runs a server OS and not a desktop OS.  :D

Second best, is to set something like this before your call to start cpmfetch (You'll have to edit the cftest.php file)

$_SERVER['DOCUMENT_ROOT'] = "/use/the/filesystem/path/to/your/document/root/here";

This will set what cpmfetch is looking for.

The next release is my self titled "Godfather release" - as in the line "Today is the day I settle all cpmfetch business"...  So IIS problems will go away along with a lot of other revealled weakness over time.  Some stuff I just did not think of when I wrote the first round.

Sigh.

Ah well, let me know how this works out.

Vuud

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on December 07, 2005, 10:55:55 am
Tnx for the quick reply Vuud, it kinda worked. The path error is gone, only errors left  are:

70   SCRIPT_FILENAME: Not found   BAD
75   DOCUMENT_ROOT is not a good match

Not getting a thumbnal with the tester though.
Gonna Try some stuff and let you know if i succeed.

Greets
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on December 07, 2005, 11:05:20 am
Also gives me this:  Unknown column 'u.user_website' in 'field list'

Note that CPG is bridged with SMF, and SMF is bridged with Joomla.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on December 08, 2005, 12:59:46 am
Hmm it didnt work out  8)

Any more ideas ? tried the latest dev version, also no luck.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fanime7 on December 08, 2005, 01:08:23 am
Also gives me this:  Unknown column 'u.user_website' in 'field list'

Note that CPG is bridged with SMF, and SMF is bridged with Joomla.

hmm I don't know whats wrong but it works if I replace it with a 1.41 cpmfetch_dao.php - I still get the error DOCUMENT_ROOT is not a good match but it seems to load the pictures correctly.

if I use the latest pmfetch_dao.php I get the same error/problem as you.  I try to fix it with the document_root variable but no luck.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 08, 2005, 06:17:40 am
hmm I don't know whats wrong but it works if I replace it with a 1.41 cpmfetch_dao.php - I still get the error DOCUMENT_ROOT is not a good match but it seems to load the pictures correctly.

if I use the latest pmfetch_dao.php I get the same error/problem as you.  I try to fix it with the document_root variable but no luck.


The user table not found is probably due to using the new version of cpg and not following the release notes in the readme.  You need to comment and uncomment some lines in cpmfetch_dao so it knows what files to look for.

Not sure why the document_root thing would not do it.

Strange
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on December 08, 2005, 11:19:31 am
removed some lines from the dao. the mysql error message is gone,  but still not thumbnails to see. :-X
guess ill have to wait for the "Godfather" release.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Colegota on December 08, 2005, 02:43:19 pm
Hi!

I've tried to find this error on forum first, but I can't have the same problem first.

I run the cftest.php program and also an small one from doc. It looks to work but images are not shown. No errors reported, so I see that the html generated for images is like

Code: [Select]
img  src="//albums/...
That's starting with a double slash (//).
I suppose that I made some mistake in configuration variables, but I can't find it.
I have both coppermine and cpmfetch at root directory, so I usually put an "/" in variables.

This is my start of cftest.php
Code: [Select]
$ChangeThisToYourPartialUrlToCPG = "/";
All results are "PASS" or "INFO", but no image displayed.

In cpmfetch.php
Code: [Select]
class cpm {

//The following 3 entries can be adjusted if you are using non-standard prefixes in CPG
var $thumbnailprefix = "thumb_";
var $intermedprefix = "normal_";
var $fullsizeprefix = '';
var $defaultimagesize = "thumb_";

// //////////////////// NO USER SERVICEABLE PARTS BEYOND THIS POINT ////////////////////////

//  ... really

// //////////////////// NO USER SERVICEABLE PARTS BEYOND THIS POINT ////////////////////////

var $VERSION = "1.6.2";

var $cpm = "";
var $urltocpm = "/";       //from a web client point of view without domain name /photos
var $filepathtocpm = "";  //server path to cpm directory  /home/vuud/cpm

var $optionHash = array(); //Contains the options submitted by the user
var $styleHash = array();

var $returntype = "print"; // print, html, resultset
var $debugMode = false;

And a little test program with same results.
Code: [Select]
<?php
error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on
include "cpmfetch.php";
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>


I also noticed that url to last images are given with a negative value, but it works. Like that:
Code: [Select]
a href="/displayimage.php?pos=-1458"
Thanks,
Colegota
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 08, 2005, 04:53:17 pm
removed some lines from the dao. the mysql error message is gone,  but still not thumbnails to see. :-X
guess ill have to wait for the "Godfather" release.

If you are bridged, you need to create some users in coppermine photo gallery.  The problem is that the bridge allows for users to be created elsewhere.

So when we try to figure out who owner #3 is (for example), CPG has no information on it.

So if you have say, 3 PHPBB users, you need to just add three users to cpg.  names or anything do not need to match up or anything.... just something there.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 08, 2005, 05:07:27 pm

I run the cftest.php program and also an small one from doc. It looks to work but images are not shown. No errors reported, so I see that the html generated for images is like

Code: [Select]
img  src="//albums/...
That's starting with a double slash (//).
I suppose that I made some mistake in configuration variables, but I can't find it.
I have both coppermine and cpmfetch at root directory, so I usually put an "/" in variables.


No mistakes.  That is just how it works out when cpg is installed in the root.  The double slash should not affect anything - its an eyesore that is resolved in the next release.



Quote
This is my start of cftest.php
Code: [Select]
$ChangeThisToYourPartialUrlToCPG = "/";
All results are "PASS" or "INFO", but no image displayed.


Are you bridged with SMF, PHPBB, Joomba, Mambo, or any other one, etc...?  If so you have the regular user display problem.  See my post above to n3m on this, and for more information see the "embedding in SMF, PHPBB..."  etc thread.  Its also been discussed here a few times.

Again, will be resolved in the next release.

Quote
I also noticed that url to last images are given with a negative value, but it works. Like that:
Code: [Select]
a href="/displayimage.php?pos=-1458"

This is normal. 


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Colegota on December 08, 2005, 05:37:09 pm
Are you bridged with SMF, PHPBB, Joomba, Mambo, or any other one, etc...?  If so you have the regular user display problem.  See my post above to n3m on this, and for more information see the "embedding in SMF, PHPBB..."  etc thread.  Its also been discussed here a few times.

No. I just have Coppermine (and cpmfetch) installed on this server.
I use SMF and Wordpress in other servers (accesing images on cpg server), but for the moment I'm just testing on coppermine server.

This is the code generated for one of images
Code: [Select]
<img  src="//albums/mapamundi/china2005/thumb_IMG_0777.JPG"
class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   />

But as you can see, image
http://www.mapamundi.org//albums/mapamundi/china2005/thumb_IMG_0777.JPG
is correct and works.

BTW I'm using cfimageget from other servers and it works fine.

Regards,
Colegota
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Colegota on December 08, 2005, 05:40:29 pm
BTW If you need to see it I'll keep this online for some time:

http://www.mapamundi.org/cftest.php

Thanks,
Colegota
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 08, 2005, 08:24:12 pm
BTW If you need to see it I'll keep this online for some time:

http://www.mapamundi.org/cftest.php

Thanks,
Colegota


Thanks.  While it did not help. 

If cfimageget is working from another server, maybe it is the extra slashes.   But I'd be surprised since you'd be the first to report that problem I think.

Okay, version 1.7 fixes that - will be out probably by the end of the weekend.  I have the installer that is almost done and then everyones problems will go away, things will be wonderful, children will dance in the streets and the wine will flow like... well... I'm gonna drink a lot.   Yeah.  Thats the plan.

I need a nap

EDIT:  You could always just move to using it in the site somewhere.  Maybe the cftest program is screwy.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Colegota on December 08, 2005, 08:57:58 pm
Hi!

Yes. It's the double slash. I did take the html code generated for a test sample and removed one slash just in the first image.
Here you can see the result
http://www.mapamundi.org/prueba-cpmfetch.html

After that I look into your examples page code and noticed that in that case the double slash is in the middle of url due to you have a "/photos" directory, so your code is
Code: [Select]
img  src="/photos//albums/..."While mine is just
Code: [Select]
img  src="//albums/..."
Maybe this is the difference, cause I can see your samples without problem.

I have two computers and I tested in both, one is Mandriva Linux 10.2 with Mozilla 1.7 and Konqueror 3.2.3, and other is a Mandriva Linux 2005 LE with Mozilla Firefox 1.0.2.

So I wait for new version. I hope you enjoy your drink as we enjoy your code. ;)

Thank you again,
Colegota
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 08, 2005, 09:56:48 pm
Hi!

Yes. It's the double slash. I did take the html code generated for a test sample and removed one slash just in the first image.
Here you can see the result
http://www.mapamundi.org/prueba-cpmfetch.html

After that I look into your examples page code and noticed that in that case the double slash is in the middle of url due to you have a "/photos" directory, so your code is
Code: [Select]
img  src="/photos//albums/..."While mine is just
Code: [Select]
img  src="//albums/..."
Maybe this is the difference, cause I can see your samples without problem.

I have two computers and I tested in both, one is Mandriva Linux 10.2 with Mozilla 1.7 and Konqueror 3.2.3, and other is a Mandriva Linux 2005 LE with Mozilla Firefox 1.0.2.

So I wait for new version. I hope you enjoy your drink as we enjoy your code. ;)

Thank you again,
Colegota



The extra slash is due to the awful way in which I handle CPG being in the home directory.  It was bad evil code, and was removed for the new version.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: farhan on December 09, 2005, 01:00:41 pm
Hello

I installed 1.4.2 and applied the fix you had couple of pages back, but now i am getting another error

Quote
Notice: Undefined property: sqlPictureAlbumSelect in /home/isbunder/public_html/cpmfetch/cpmfetch_dao.php on line 457You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM gAllEry_pictures as p, gAllEry_albums as a, gAllEry_usersWarning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/isbunder/public_html/cpmfetch/cpmfetch_dao.php on line 710

http://www.isbunderground.com/cpmfetch/cftest.php

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 09, 2005, 09:26:16 pm
Hello

I installed 1.4.2 and applied the fix you had couple of pages back, but now i am getting another error

http://www.isbunderground.com/cpmfetch/cftest.php



Wierd.  The sqlPictureAlbumSelect is where it all starts going downhill... why that is undefined is a new one on me.

I'll poke it a bit

Thanks for providing the link - it helps.



Title: Problem with seeing images? Hmmm?
Post by: 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.
Title: Re: Problem with seeing images? Hmmm?
Post by: vuud on December 11, 2005, 04:56:41 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



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 12, 2005, 02:41:35 am
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ZakRhino on December 12, 2005, 09:47:39 pm
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?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 12, 2005, 10:30:32 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

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ZakRhino on December 13, 2005, 12:30:11 am
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. ???
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 13, 2005, 06:28:08 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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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 :

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

I get theses errors :

Code: [Select]
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 15, 2005, 03:03:34 am
Hi

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

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

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

I get theses errors :

Code: [Select]
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?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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
Code: [Select]
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 15, 2005, 07:26:18 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
Code: [Select]
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. 

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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:


Code: [Select]
<?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!!

Code: [Select]
<?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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 15, 2005, 10:13:56 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:


Code: [Select]
<?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!!

Code: [Select]
<?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.







Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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)

Code: [Select]
<?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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 16, 2005, 01:27:36 am
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)

Code: [Select]
<?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?

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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 :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: bibendum on December 16, 2005, 04:32:31 pm
Can you post or PM me a link to your cftest.php page?




Mp was posted, did you received ?

Thanks Vuud
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 16, 2005, 06:59:43 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 :)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kev@num on December 19, 2005, 08:00:34 pm
hi Vuud. thanks again mate, i've sent you a PM with the details of the site!

:)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on December 20, 2005, 05:20:26 pm
Dear Vuud

My details are

CMS : Joomla
CPG : 1.4 (new)
forum : smf
My knowledge : INtermediate
server: linux

Im having 3 CPG galleries on my site

1) www.mysite.com / WALLPAPER
2) www.mysite.com / LOGOS
3) www.mysite.com / MOVIES

& ive ive installed your Excellent MOD cpmfetch for random wallpapers on  joomla index page & now i want to fetch data from logo gallery & movies gallery

If i copy mod to other folders & after filling necessary details (path to movies cpg etc.) i post for 2 other galleries on index page it says error of cant redeclare

Hope u understand : In simple words if i want to fetch data form 3 different  galleries installed on one same site to one same index page .. How is that possible ?

Please tell me what & How to do

Regards


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fcarentz on December 21, 2005, 05:03:44 am
1. Coppermine 1.4.2
2. http://theminivault.grimeygames.com/gallery 
3. http://theminivault.grimeygames.com/ - The Fetch table on the righthand side
4. Intermediate
5. Apache
6. There is no syntax error or mysql error. Everything seems to be runnig correctly. However I am not retreiving anything except content from the very first user gallery.

Code: [Select]
          <?php 
include 
"./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array('alttag'=>"Posted By: %o",'imagewidth'=>"100");
$objCpm->cpm_viewLastAddedMedia (51$options);
$objCpm->cpm_close();
          
?>


This will result with images being pulled back but only those images that have been added to album 1...not sure what I need to change. I have tried to use

Code: [Select]
$objCpm->cpm_viewLastAddedMediaFrom(5,1,"cat=1",$options);

With the same results. I want to display the last 5 added images from any personal galleries. I do know for a fact that user 1 was not the last files uploaded as I uploaded them myself and have have many more added after I had done it. Any help would be greatly appreciated.

Thanks in advance.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 21, 2005, 05:25:18 pm
Dear Vuud

My details are

CMS : Joomla
CPG : 1.4 (new)
forum : smf
My knowledge : INtermediate
server: linux

Im having 3 CPG galleries on my site

1) www.mysite.com / WALLPAPER
2) www.mysite.com / LOGOS
3) www.mysite.com / MOVIES

& ive ive installed your Excellent MOD cpmfetch for random wallpapers on  joomla index page & now i want to fetch data from logo gallery & movies gallery

If i copy mod to other folders & after filling necessary details (path to movies cpg etc.) i post for 2 other galleries on index page it says error of cant redeclare

Hope u understand : In simple words if i want to fetch data form 3 different  galleries installed on one same site to one same index page .. How is that possible ?

Please tell me what & How to do

Regards


Without trying it myself...

 1) Make sure you are closing with $objCpm->cpm_close() before starting the next one.

If that does not work, give them different names...

$objCpm1 = new cpm("/gallery");
$objCpm1->cpm_viewLastAddedMedia (5, 1, $options);
$objCpm1->cpm_close();
 
$objCpm2 = new cpm("/other");
$objCpm2->cpm_viewLastAddedMedia (5, 1, $options);
$objCpm2->cpm_close();


If none of that works, post exactly what it is saying it cannot redeclare

Vuud
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 21, 2005, 05:42:07 pm

I have a maurauder figure half done somewhere... I used to do a lot of those - warhammer and before that.  But all my paints are dried up and the brushes are lost... sigh

Anyway...

I am not sure I ever tested for subdirectories in personal albums - that could be the problem.  I've added it to my list of things to test.

 




1. Coppermine 1.4.2
2. http://theminivault.grimeygames.com/gallery 
3. http://theminivault.grimeygames.com/ - The Fetch table on the righthand side
4. Intermediate
5. Apache
6. There is no syntax error or mysql error. Everything seems to be runnig correctly. However I am not retreiving anything except content from the very first user gallery.

Code: [Select]
          <?php 
include 
"./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array('alttag'=>"Posted By: %o",'imagewidth'=>"100");
$objCpm->cpm_viewLastAddedMedia (51$options);
$objCpm->cpm_close();
          
?>


This will result with images being pulled back but only those images that have been added to album 1...not sure what I need to change. I have tried to use

Code: [Select]
$objCpm->cpm_viewLastAddedMediaFrom(5,1,"cat=1",$options);

With the same results. I want to display the last 5 added images from any personal galleries. I do know for a fact that user 1 was not the last files uploaded as I uploaded them myself and have have many more added after I had done it. Any help would be greatly appreciated.

Thanks in advance.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fcarentz on December 21, 2005, 06:18:41 pm
Thats cool, it seems coding and painting minis goes hand in hand. HAHA, must be something about enjoying tedious tasks. LOL

To the subject at hand:

The funny thing is even the get Random only pulls from the first Personal Album and not from everything?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: JoeyE on December 21, 2005, 11:20:45 pm
I am totally lost on this. I am not sure if I coded this correctly. I am trying to use the owner=xxxxx for the $source. But nothing happens.
Here is where I am trying to use it:

Example: http://viscomcreatives.org/?author=12
Code: [Select]
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/photo');
$objCpm->cpm_viewRandomMedia (3,4,"cat=1:owner=Joey Esquivel");
$objCpm->cpm_close();
?>

At the moment, it just does a random image from all the albums. The way I have my coppermine gallery set up is that I have one category with each user creating their own albums within that one category. I would like to ultimately just list the albums per each user. But I am unaware of how to do this. So for now I would simply like to have random images from just that specific user's albums. Any advice would be a great bit of help. Thank you.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fcarentz on December 22, 2005, 03:52:09 pm
Ok so I created a new album to try and workaround this issue. Changed the whole site so now it only pulls images that are in one specific album, but unfortunatley now it always pulls the same image back.

I create the object in the page header and close it in the footer and the following code is where it is pulling the image from the gallery. And still nothing. I only want to pull one images at random from album 38.

My server structure is

Page with linked images.: http://mysite.com/index.php
cpmFetch: http://mysite.com/cpmfetch/cpmfetch.php
gallery installation: http://mysite.com/gallery

My header is
Code: [Select]
require_once "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");


My Call to spmfetch is this
Code: [Select]
<?php 
$source 
"album=38";
$options = array('subtitle' => 'Posted By: %o','alttag'=>"%c"'tablestyle' => 'rate''imagewidth'=>"100",'imagestyle' => 'rate');
$objCpm->cpm_viewRandomMediaFrom(11$source$options);
$objCpm->cpm_close();
?>

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mini1400 on December 22, 2005, 06:33:39 pm
Is there any way of getting the exif date as a parameter for subtitle in the $options array?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: MrTeck on December 22, 2005, 09:30:27 pm
Firts of all, tnx u very much VuuD.

Why no make a recopilation of the blocks?
I use this:
(http://img445.imageshack.us/img445/6899/samplecfetch7kj.jpg)

And the code is:
Code: [Select]
<?php
echo '
<style type="text/css"><!--
.test1 {  border-width:0px;}
--></style>'
;

echo 
'<div align="center">';
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/coppermine");
echo 
' <div align="center">'
echo 
' <b><u>Stats</u></b><br>'
$objCpm->cpm_formatStats("Albums: <b>%a</b> <br> Images: <b>%f</b> <br> Clicks: <b>%v</b> <br> Comments: <b>%n</b> <br><br>");
echo 
'</div>';

echo 
' <b><u>Last Image</u></b><br>'
$options = array( 'subtitle' => '<b>%a</b> <br> Name: <b>%t</b> Author: <b>%o</b> <br> Here since <b>%D</b> days <br> Clicks: <b>%h</b> <br> Score: <b>%V</b>' "imagestyle" => "test1");
$objCpm->cpm_viewLastAddedMedia(1,1,$options,);

//$objCpm->cpm_close(); 
echo'</div>';
?>
Title: Re: Well, progress on the new version
Post by: chican0 on December 25, 2005, 06:45:11 am
Sort a teaser, and to at least get myself motivated to finish it...

I have version 1.7.0 almost done.  Well, the code itself is, but the installer is not.  I took a day off and did nothing but recode the whole thing.

Yes, thats right - an installer.

The biggest plus for me is that I eliminated a lot of code and duplication.

The biggest plus for all of you is that

1) You will set the configuration once, and no matter what you do, all the programs know to read it. 

2) The configuration gets built of CPG settigns data, so no more futzing with setting prefixes and such

3) Support for cpg 1.4

4) Support to make bridging at least not a problem

5) Should be more IIS and other wierd server tolerant

6) I think the double backslash thing is gone

The big drawback is that this product contains WHEAT and SOY.  So those with allergies could have a problem.  PEANUT safe though.

Oh yeah, and some functions are going away, BUT the normal ones are still available to you - so you should only need to make very minor changes to your web pages. 

$objcpm = new cpmfetch("/cpg");

now becomes

$objcpm = new cpmfetch();

All thats left is to make the installer that builds your config files and a few tweaks to the data.

So hopefully in a day or two.

I am not taking feature requests specifically for this release, but if anyone has any gripes about something that was hard to do that I can make easier, now would be a good time to point it out to me.

Have a nice night and lets all hope for the best


I just need to eliminate the double slashed (//). Is there any way to get the fix for that?

By the way... supurb script.
Title: CPM PHPBB Bridge causes no images to appear using cpmfetch
Post by: baal32 on December 25, 2005, 10:15:07 pm
Using cpm 1.33, phpbb 2.0.15, cpmfetch 1.6.2
The problem appears to be that when using the cpm-phpbb bridge all user info is actually stored in the phpbb database leaving the cpm users table storing only an admin user.  This causes problems in cpmfetch_dao wherein resultsets are generated joining the pictures and users tables on the user_id (select ...... where .... AND p.owner_id = u.user_id) because the users table is essentially empty, which of course yields an empty set. 

I'm not a php expert and certainly not overly familiar with the cpmfetch code so I'm not sure how difficult it would be to get the code to join against the phpbb_users table instead of the cpg table.

Thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on December 26, 2005, 03:15:34 pm

Without trying it myself...

 1) Make sure you are closing with $objCpm->cpm_close() before starting the next one.

If that does not work, give them different names...

$objCpm1 = new cpm("/gallery");
$objCpm1->cpm_viewLastAddedMedia (5, 1, $options);
$objCpm1->cpm_close();
 
$objCpm2 = new cpm("/other");
$objCpm2->cpm_viewLastAddedMedia (5, 1, $options);
$objCpm2->cpm_close();


If none of that works, post exactly what it is saying it cannot redeclare

Vuud


Hi Dear Vuud

Ive tried this but didnt succeed, wht ive done is

1) joomla : in root
2) CPG 1 gallery : site.com/gallery1
3) CPG 1 gallery : site.com/gallery2

& ive made 2 cpmfetch folders in root like :

1) www.site.com/cpmfetch ( in cpmfetch.php ive chnge path to gallery1 )
2) www.site.com/cpmfetch1 ( in cpmfetch.php ive chnge path to gallery2 )

Now as u told ive paste tag (this pics was actually in table)


Code: [Select]
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr align="center" valign="middle">
                    <th scope="col"><?php
include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery2');
?>
</th>
                    <th scope="col">&nbsp;</th>
                  </tr>
                  <tr align="center" valign="middle">
                    <th scope="col"><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");  ?>
</th>
                    <th scope="col"><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");  ?>
</th>
                  </tr>
                  <tr align="center" valign="middle">
                    <td><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");  ?>
                      <div align="center"></div>
                    <div align="center"></div></td>
                    <td><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");  ?>
                    <div align="center"></div></td>
                  </tr>
                </table><?php $objCpm1->cpm_close(); ?>


Before & after pasting this gallery 1 was working fine but the gallery 2 shows this error

Fatal error: Cannot redeclare class cpm_dao in /home/SITENAME/public_html/cpmfetch1/cpmfetch_dao.php on line 22

Please suggest :)

Regards

Rahul








Title: CPMFetch 1.6.2, Coppermine bridged with PHPBB 2.0.18, a hack to make them work
Post by: imrich on December 26, 2005, 10:48:35 pm
I can try.  Bear in mind I may forget a step, but you should be able to figure it out from there.

1. Log into coppermine gallery as an admin
2. Click on "users" from the admin menu
3. Click "new user"
4. Give the new user a funny name... this is important.

Important note:  There is a difference between funny and offensive.  I would strongly suggest the former over the latter.  Examples of funny names would be like:

Balzack Blisterfrog
Tuggmabellz Fugnutter
Licquema Svettynutz
I.P. Daily
Etc.

Offensive user names are like offensive passwords.  They have a habit of being revealed at the worst times.

5. Assign the user whatever for a password since you will never use it again.

Now repeat the above steps 3-5 once for each PHPBB user you have adding photos.  Step 4 will be the most challenging as coming up with funny names is not as easy as it seems.  Alternatively you could go with the names of the seven dwarfs if you could remember them and if you have less than 8 users to add.

Good luck

Baron Von Flatulator

( I appologize if anyone reading this actually has one of those names.  I mean, I am really really sorry if you have one of those names)


First, I want to thank vuud for an incredible add on to Coppermine! :D

My Coppermine 1.3.5 is bridged with phpbb 2.0.18.

I have a bunch of users in my phpbb forum (about 100) and thought this 'make up some fake users in the Coppermine database' was just too much work for me (lazyness is the mother of most of my coding), so I thought take this as a 'hint' by vuud to what may be a minimal change to the code to allow it to work with the PHPBB database.

First (and this is important), I have both my coppermine and my phpbb data in the same mysql database. My phpbb database has a phpbb prefix (i.e. phpbb_).  This is important to allow this 'hack' to work!

I made some rather simple-minded changes to cpmfetch_dao.php in an attempt to get CpmFetch 1.6.2 to work with PHPBB 2.0.18.

Note, at this time, I'm using Coppermine version 1.3.5. I have NOT tested this yet with Coppermine 1.4.2.


I haven't done any significant testing, but it seems to work and cftest.php works too. ;)

open cpmfetch.dao.php and find line:
Code: [Select]
$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:
Code: [Select]
$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.

If you get a chance to try this with Coppermine 1.4.2 bridge with PHPBB 2.0.18 and it works ok, I'd appreciate someone letting me know. If I get a chance to upgrade to cpg 1.4.2 myself, I'll let you know.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 28, 2005, 08:11:44 am
Is there any way of getting the exif date as a parameter for subtitle in the $options array?

Not unless someone submits some code to do this :)

Also I am running out of $a, %b, etc markers... I will have to switch to %aa% in the future...

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 28, 2005, 08:14:25 am
I am totally lost on this. I am not sure if I coded this correctly. I am trying to use the owner=xxxxx for the $source. But nothing happens.
Here is where I am trying to use it:

Example: http://viscomcreatives.org/?author=12
Code: [Select]
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/photo');
$objCpm->cpm_viewRandomMedia (3,4,"cat=1:owner=Joey Esquivel");
$objCpm->cpm_close();
?>


At the moment, it just does a random image from all the albums. The way I have my coppermine gallery set up is that I have one category with each user creating their own albums within that one category. I would like to ultimately just list the albums per each user. But I am unaware of how to do this. So for now I would simply like to have random images from just that specific user's albums. Any advice would be a great bit of help. Thank you.

Strange... can you tell me where you saw that owner or author was a valid tag for the source block?


Title: Re: CPMFetch 1.6.2, Coppermine bridged with PHPBB 2.0.18, a hack to make them wo
Post by: vuud on December 28, 2005, 08:16:03 am
First, I want to thank vuud for an incredible add on to Coppermine! :D

My Coppermine 1.3.5 is bridged with phpbb 2.0.18.

I have a bunch of users in my phpbb forum (about 100) and thought this 'make up some fake users in the Coppermine database' was just too much work for me (lazyness is the mother of most of my coding), so I thought take this as a 'hint' by vuud to what may be a minimal change to the code to allow it to work with the PHPBB database.

First (and this is important), I have both my coppermine and my phpbb data in the same mysql database. My phpbb database has a phpbb prefix (i.e. phpbb_).  This is important to allow this 'hack' to work!

I made some rather simple-minded changes to cpmfetch_dao.php in an attempt to get CpmFetch 1.6.2 to work with PHPBB 2.0.18.

Note, at this time, I'm using Coppermine version 1.3.5. I have NOT tested this yet with Coppermine 1.4.2.


I haven't done any significant testing, but it seems to work and cftest.php works too. ;)

open cpmfetch.dao.php and find line:
Code: [Select]
$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:
Code: [Select]
$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.

If you get a chance to try this with Coppermine 1.4.2 bridge with PHPBB 2.0.18 and it works ok, I'd appreciate someone letting me know. If I get a chance to upgrade to cpg 1.4.2 myself, I'll let you know.


Thanks for posting this!  I have no idea what the tables are over there so this helps.

Thanks again for the contribution
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 28, 2005, 08:21:41 am
Ok so I created a new album to try and workaround this issue. Changed the whole site so now it only pulls images that are in one specific album, but unfortunatley now it always pulls the same image back.

I create the object in the page header and close it in the footer and the following code is where it is pulling the image from the gallery. And still nothing. I only want to pull one images at random from album 38.

My server structure is

Page with linked images.: http://mysite.com/index.php
cpmFetch: http://mysite.com/cpmfetch/cpmfetch.php
gallery installation: http://mysite.com/gallery

My header is
Code: [Select]
require_once "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");


My Call to spmfetch is this
Code: [Select]
<?php 
$source 
"album=38";
$options = array('subtitle' => 'Posted By: %o','alttag'=>"%c"'tablestyle' => 'rate''imagewidth'=>"100",'imagestyle' => 'rate');
$objCpm->cpm_viewRandomMediaFrom(11$source$options);
$objCpm->cpm_close();
?>


Try this (for lack of anything better to suggest)

$objCpm->cpm_viewRandomMediaFromAlbum(1, 1, 28, $options);

I could not get to your site as mysite.com... or is that just an example?

I remember poking at your site I think (you PM'd me right?) and thought it all looked okay (at least that it should work)




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 28, 2005, 08:23:06 am
Firts of all, tnx u very much VuuD.

Why no make a recopilation of the blocks?
I use this:
(http://img445.imageshack.us/img445/6899/samplecfetch7kj.jpg)

And the code is:
Code: [Select]
<?php
echo '
<style type="text/css"><!--
.test1 {  border-width:0px;}
--></style>'
;

echo 
'<div align="center">';
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/coppermine");
echo 
' <div align="center">'
echo 
' <b><u>Stats</u></b><br>'
$objCpm->cpm_formatStats("Albums: <b>%a</b> <br> Images: <b>%f</b> <br> Clicks: <b>%v</b> <br> Comments: <b>%n</b> <br><br>");
echo 
'</div>';

echo 
' <b><u>Last Image</u></b><br>'
$options = array( 'subtitle' => '<b>%a</b> <br> Name: <b>%t</b> Author: <b>%o</b> <br> Here since <b>%D</b> days <br> Clicks: <b>%h</b> <br> Score: <b>%V</b>' "imagestyle" => "test1");
$objCpm->cpm_viewLastAddedMedia(1,1,$options,);

//$objCpm->cpm_close(); 
echo'</div>';
?>

Is it just giving you a purple block?
Title: Re: Well, progress on the new version
Post by: vuud on December 28, 2005, 08:24:16 am
I just need to eliminate the double slashed (//). Is there any way to get the fix for that?

By the way... supurb script.

If you want to deal with the manual install...  the next version is a whole re-write of the option and directory handling.

I hate writting installers.

hate it.


Title: Re: CPM PHPBB Bridge causes no images to appear using cpmfetch
Post by: vuud on December 28, 2005, 08:27:04 am
Using cpm 1.33, phpbb 2.0.15, cpmfetch 1.6.2
The problem appears to be that when using the cpm-phpbb bridge all user info is actually stored in the phpbb database leaving the cpm users table storing only an admin user.  This causes problems in cpmfetch_dao wherein resultsets are generated joining the pictures and users tables on the user_id (select ...... where .... AND p.owner_id = u.user_id) because the users table is essentially empty, which of course yields an empty set. 

I'm not a php expert and certainly not overly familiar with the cpmfetch code so I'm not sure how difficult it would be to get the code to join against the phpbb_users table instead of the cpg table.

Thanks

Someone posted this very thing just a few back...
http://forum.coppermine-gallery.net/index.php?topic=19564.msg117939#msg117939

Heck, I wrote the cpmfetch code and I don't know what half of it does (mostly kidding)


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 28, 2005, 08:34:54 am
Hi Dear Vuud

Ive tried this but didnt succeed, wht ive done is

1) joomla : in root
2) CPG 1 gallery : site.com/gallery1
3) CPG 1 gallery : site.com/gallery2

& ive made 2 cpmfetch folders in root like :

1) www.site.com/cpmfetch ( in cpmfetch.php ive chnge path to gallery1 )
2) www.site.com/cpmfetch1 ( in cpmfetch.php ive chnge path to gallery2 )

Now as u told ive paste tag (this pics was actually in table)


Code: [Select]
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr align="center" valign="middle">
                    <th scope="col"><?php
include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery2');
?>
</th>
                    <th scope="col">&nbsp;</th>
                  </tr>
                  <tr align="center" valign="middle">
                    <th scope="col"><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");  ?>
</th>
                    <th scope="col"><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");  ?>
</th>
                  </tr>
                  <tr align="center" valign="middle">
                    <td><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");  ?>
                      <div align="center"></div>
                    <div align="center"></div></td>
                    <td><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");  ?>
                    <div align="center"></div></td>
                  </tr>
                </table><?php $objCpm1->cpm_close(); ?>


Before & after pasting this gallery 1 was working fine but the gallery 2 shows this error

Fatal error: Cannot redeclare class cpm_dao in /home/SITENAME/public_html/cpmfetch1/cpmfetch_dao.php on line 22

Please suggest :)

Regards

Rahul



This is great, but I either messed up when I told you (I am too tired to go back and check) or you missed one important part.

If I strip out all the annoying html code in there we have this

Code: [Select]
include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery2');
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2"); 
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_close();

I have this sense of deja vu, so forgive me if I went over this before

If you want to display images from two different galleries on the same page, you could do it like this:

Code: [Select]
include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery1');
$objCpm2 = new cpm('/gallery2');

$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");

$objCpm2->cpm_viewRandomMediaFrom(1,1,"cat=2"); 
$objCpm2->cpm_viewRandomMediaFrom(1,1,"cat=2");

$objCpm1->cpm_close();
$objCpm2->cpm_close();



Notice I created an $objCpm1 and $objCpm2?

You should only need a include "./cpmfetch/cpmfetch.php";

Both can work out of that.




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: benseth on December 28, 2005, 08:41:33 am
How do i make it that One photo from the album is showing for a catogory instead of all the pictures?
here's my code
<head>

<style type="text/css">
BODY { MARGIN: 0px; font-size: 9px; font-family:tahoma; color:#000000; letter-spacing: 0px; font-weight: none; text-align: lest; line-height:1.1}

I{COLOR:#DCDCDC}
B{COLOR:#C4EADF}
U{COLOR:#F2C280}

LI {FONT-SIZE: 9px;  font-family:tahoma; letter-spacing: 0px; font-weight: none; text-align: lest; line-height:1.1}

A:link   {FONT-WEIGHT:bold; COLOR:#7ADBE2;TEXT-DECORATION:none}
A:visited {FONT-WEIGHT:bold;COLOR:#7ADBE2; TEXT-DECORATION:none}
A:active {FONT-WEIGHT:bold;COLOR:#7ADBE2; TEXT-DECORATION: none}
A:hover  {FONT-WEIGHT:bold;COLOR:#FFFFFF; TEXT-DECORATION: none;}

TR {font-size: 9px; font-family:tahoma; color:#ADADAD; letter-spacing: 0px; font-weight: none; text-align: center; line-height:1.1}
TD {font-size: 9px; font-family:tahoma; color:#ADADAD; letter-spacing: 0px; font-weight: none; text-align: center; line-height:1.1}

}



</style>

 <style type="text/css">
.test1 {  border-style:solid;
          border-width:0px;
          border-color: #FFFFFF;
          margin: 1px;
          background: #FFFFFF; }
</style>
</head>
<body>
<center>
<?php
   include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(30,1,array("subtitle" => "%a", "tablestyle" => "test1","imagestyle" => "test1" , "windowtarget" => "_blank-js"));
$objCpm->cpm_close();
?>
</center>
Title: Re: CPMFetch 1.6.2, Coppermine bridged with PHPBB 2.0.18, a hack to make them wo
Post by: imrich on December 28, 2005, 01:49:58 pm
Thanks for posting this!  I have no idea what the tables are over there so this helps.

Thanks again for the contribution


You are very welcome! It just so happened that user_id is the same for the CPG tables as it is for the phpbb tables.  There are some other very common items also.

I was looking for some abstraction or functions which would get the particular items from the database, but I didn't find them. My guess is that the ultimate change would be to have your cpmfetch functions to use coppermine bridge routines. This was as people make new bridges, cpmfetch will go along for the ride and will just work too.

I've done more testing and all that I've tested seems to work.

I did see that the number of views in cftest.php did not work, but they also didn't work in the raw cpmfetch 1.6.2 code which I downloaded either. ;)

I hope someone will find this useful as I know there are a lot of people using phpbb.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 28, 2005, 04:52:32 pm
How do i make it that One photo from the album is showing for a catogory instead of all the pictures?
here's my code
<head>

<style type="text/css">
BODY { MARGIN: 0px; font-size: 9px; font-family:tahoma; color:#000000; letter-spacing: 0px; font-weight: none; text-align: lest; line-height:1.1}

I{COLOR:#DCDCDC}
B{COLOR:#C4EADF}
U{COLOR:#F2C280}

LI {FONT-SIZE: 9px;  font-family:tahoma; letter-spacing: 0px; font-weight: none; text-align: lest; line-height:1.1}

A:link   {FONT-WEIGHT:bold; COLOR:#7ADBE2;TEXT-DECORATION:none}
A:visited {FONT-WEIGHT:bold;COLOR:#7ADBE2; TEXT-DECORATION:none}
A:active {FONT-WEIGHT:bold;COLOR:#7ADBE2; TEXT-DECORATION: none}
A:hover  {FONT-WEIGHT:bold;COLOR:#FFFFFF; TEXT-DECORATION: none;}

TR {font-size: 9px; font-family:tahoma; color:#ADADAD; letter-spacing: 0px; font-weight: none; text-align: center; line-height:1.1}
TD {font-size: 9px; font-family:tahoma; color:#ADADAD; letter-spacing: 0px; font-weight: none; text-align: center; line-height:1.1}

}



</style>

 <style type="text/css">
.test1 {  border-style:solid;
          border-width:0px;
          border-color: #FFFFFF;
          margin: 1px;
          background: #FFFFFF; }
</style>
</head>
<body>
<center>
<?php
   include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(30,1,array("subtitle" => "%a", "tablestyle" => "test1","imagestyle" => "test1" , "windowtarget" => "_blank-js"));
$objCpm->cpm_close();
?>
</center>


Do you mean the photo the coppermine photo gallery shows for that category?


Title: Re: CPMFetch 1.6.2, Coppermine bridged with PHPBB 2.0.18, a hack to make them wo
Post by: vuud on December 28, 2005, 04:58:44 pm
You are very welcome! It just so happened that user_id is the same for the CPG tables as it is for the phpbb tables.  There are some other very common items also.

I was looking for some abstraction or functions which would get the particular items from the database, but I didn't find them. My guess is that the ultimate change would be to have your cpmfetch functions to use coppermine bridge routines. This was as people make new bridges, cpmfetch will go along for the ride and will just work too.

I doubt that this will happen...  at least anytime soon.  Once I did that, then I am forced in lockstep with the whole CPG system - which does a great job but has a different design objective. 

My short term plan is to cut off the connection that fails when it is bridged (people will not be able to display the author though) and then add in some of the bridges I guess.   The biggest pain is not having all of the bridges set up here.  So I will probably take solicitations with a database layout provided. 

Quote
I've done more testing and all that I've tested seems to work.

I did see that the number of views in cftest.php did not work, but they also didn't work in the raw cpmfetch 1.6.2 code which I downloaded either. ;)

What? the number of views for a photo was / is not working?

Quote
I hope someone will find this useful as I know there are a lot of people using phpbb.


Title: Re: CPMFetch 1.6.2, Coppermine bridged with PHPBB 2.0.18, a hack to make them wo
Post by: imrich on December 28, 2005, 05:16:25 pm

What? the number of views for a photo was / is not working?



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.

Title: Re: CPMFetch 1.6.2, Coppermine bridged with PHPBB 2.0.18, a hack to make them wo
Post by: vuud on December 28, 2005, 05:25:22 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.



Its not hard DB work...   Its just I am not going to install every supported Portal to get the db layout for that side :D

I noted about views... I will be sure to check that for next release!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chican0 on December 28, 2005, 05:41:14 pm
If you want to deal with the manual install...  the next version is a whole re-write of the option and directory handling.

I hate writting installers.

hate it.

Thanks for your response vuud. Hope your holidays were good to you.

I don't mind a manual install for now. If you have the time, I have the time. :)

If not, then I can wait. Whatever is easiest on you.

By the way, is it possible to make a financial donation for this?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 28, 2005, 09:49:32 pm
Thanks for your response vuud. Hope your holidays were good to you.

I don't mind a manual install for now. If you have the time, I have the time. :)

If not, then I can wait. Whatever is easiest on you.

By the way, is it possible to make a financial donation for this?

I am going to start taking some donations, and also offer customization services for those using it in a commercial capacity (ie: if you are making money off it, I will let you pay me to help you).

Home, personal and non-profits don't apply to that though
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: benseth on December 29, 2005, 01:12:56 am

Do you mean the photo the coppermine photo gallery shows for that category?



Like how the person did this http://www.slave4u.com/celebrities/latest.php
They show One image from the category i think it's the first picture/or latest from the album, Instead of having all the pictures.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ZakRhino on December 29, 2005, 03:34:24 am
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

Call this dumb but when I remove it, It said (PHP) that I had an error on that line b/c I remove the test1 O_o Werid! But I put it back and it works there no test1 in my CSS at all. Also is there a way to make the image be change ever day or with in a time period of hours?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 04:28:47 am
Call this dumb but when I remove it, It said (PHP) that I had an error on that line b/c I remove the test1 O_o Werid! But I put it back and it works there no test1 in my CSS at all. Also is there a way to make the image be change ever day or with in a time period of hours?

You must have messed up the options array format when you removed it then.

Creating a syntax error.

Post the broken line if you want to remove it... But make sure you are removing both parts of the test1 entry... the key and the value.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 04:32:11 am
Like how the person did this http://www.slave4u.com/celebrities/latest.php
They show One image from the category i think it's the first picture/or latest from the album, Instead of having all the pictures.

Like:

cpm_viewLastAddedMediaFrom ( 1, 1, "cat=48");

This would use category 48

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: benseth on December 29, 2005, 08:29:52 am
Like:

cpm_viewLastAddedMediaFrom ( 1, 1, "cat=48");

This would use category 48


No no, like what i ment was.  I have selected cat's 43 44 45 46 47 48  and 49.  Each time i add new files, all the filies are showen.  What i want is One file from each album shown instead of all of them.  Such as the link i posted before, where the first picture is shown with the album while when you click on it.. there's is the full set.

my code is

Code: [Select]
<head>

<style type="text/css">
BODY { MARGIN: 0px; font-size: 9px; font-family:tahoma; color:#000000; letter-spacing: 0px; font-weight: none; text-align: lest; line-height:1.1}

I{COLOR:#DCDCDC}
B{COLOR:#C4EADF}
U{COLOR:#F2C280}

LI {FONT-SIZE: 9px;  font-family:tahoma; letter-spacing: 0px; font-weight: none; text-align: lest; line-height:1.1}

A:link   {FONT-WEIGHT:bold; COLOR:#7ADBE2;TEXT-DECORATION:none}
A:visited {FONT-WEIGHT:bold;COLOR:#7ADBE2; TEXT-DECORATION:none}
A:active {FONT-WEIGHT:bold;COLOR:#7ADBE2; TEXT-DECORATION: none}
A:hover  {FONT-WEIGHT:bold;COLOR:#FFFFFF; TEXT-DECORATION: none;}

TR {font-size: 9px; font-family:tahoma; color:#ADADAD; letter-spacing: 0px; font-weight: none; text-align: center; line-height:1.1}
TD {font-size: 9px; font-family:tahoma; color:#ADADAD; letter-spacing: 0px; font-weight: none; text-align: center; line-height:1.1}

}



</style>

 <style type="text/css">
.test1 {  border-style:solid;
          border-width:0px;
          border-color: #FFFFFF;
          margin: 1px;
          background: #FFFFFF; }
</style>
</head>
<body>
<center>
<?php
   
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(30,1,array("cat"=>"43,44,45,46,47,48,49,""subtitle" => "%a""tablestyle" => "test1","imagestyle" => "test1" "windowtarget" => "_blank"));
$objCpm->cpm_close();
?>

</center>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fcarentz on December 29, 2005, 10:29:19 am
Try this (for lack of anything better to suggest)

$objCpm->cpm_viewRandomMediaFromAlbum(1, 1, 28, $options);

I could not get to your site as mysite.com... or is that just an example?

I remember poking at your site I think (you PM'd me right?) and thought it all looked okay (at least that it should work)






Yea tried that it didnt work.

Yes the mysite.com was just an example...the site url is http://theminivault.grimeygames.com

I just ended up using the SSI
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ZakRhino on December 29, 2005, 11:55:10 am
You must have messed up the options array format when you removed it then.

Creating a syntax error.

Post the broken line if you want to remove it... But make sure you are removing both parts of the test1 entry... the key and the value.

This is the code

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


Is it also possible to make the image gernal daily or with in a hourly time frame?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on December 29, 2005, 02:13:09 pm
Quote
This is great, but I either messed up when I told you (I am too tired to go back and check) or you missed one important part.

If I strip out all the annoying html code in there we have this

Code: [Select]
include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery2');
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2"); 
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_close();

I have this sense of deja vu, so forgive me if I went over this before

If you want to display images from two different galleries on the same page, you could do it like this:

Code: [Select]
include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery1');
$objCpm2 = new cpm('/gallery2');

$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");

$objCpm2->cpm_viewRandomMediaFrom(1,1,"cat=2"); 
$objCpm2->cpm_viewRandomMediaFrom(1,1,"cat=2");

$objCpm1->cpm_close();
$objCpm2->cpm_close();



Notice I created an $objCpm1 and $objCpm2?

You should only need a include "./cpmfetch/cpmfetch.php";

Both can work out of that.




Dear

ive done the following

1) Paste the following code

include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery1');
$objCpm2 = new cpm('/gallery2');

$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");

$objCpm2->cpm_viewRandomMediaFrom(1,1,"cat=2"); 
$objCpm2->cpm_viewRandomMediaFrom(1,1,"cat=2");

$objCpm1->cpm_close();
$objCpm2->cpm_close();

But it only shows  gallery 1 images

    2)            Even ive tried this :-

In cpmfetch.php ive cleared path to galery & use it as below & upload in ./cpmfetch1/ 

// //////////////////// NO USER SERVICEABLE PARTS BEYOND THIS POINT ////////////////////////

   var $VERSION = "1.6.2";
   var $cpm = "1.4.2";
   var $urltocpm = "";       //from a web client point of view without domain name /photos
   var $filepathtocpm = "";  //server path to cpm directory  /home/vuud/cpm


But no success :(

Now take this i want to have fresh install of Cpmfetch MOD for 2 galleries

Tell me few answers :-

1) In root directory ive to make 2 cpmfetch folders or 1 (ex. site.com/cpmfetch & site.com/cpmfetch1)

2) In cpmfetch.php ive to edit or gallery path or not If yes then > ( if copy 2 cpmfetch folders as describe in No.1  ive to edit both cpmfetch.php the real path to gallery)

Test it on your site also if possible please send me link i want to have a look


Please Suggest !!!!!  :)
Code: [Select]
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on December 29, 2005, 04:24:59 pm
Hi Vuud, im back again.
Switched webhost from IIS to Apache. (special for fetch :P)
But again I seem to have a problem with Fetch. At first it was giving me an opendir error, but
after moving the Fetch files to the root it was ok. But still im not getting any images ?
Got time to help me a bit ?

Running latest version of Joomla/Coppermine/Copperminefetch PHP5/Apache2


Cheers (again  :-[)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 05:33:53 pm
No no, like what i ment was.  I have selected cat's 43 44 45 46 47 48  and 49.  Each time i add new files, all the filies are showen.  What i want is One file from each album shown instead of all of them.  Such as the link i posted before, where the first picture is shown with the album while when you click on it.. there's is the full set.

Code: [Select]
<?php
   
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(30,1,array("cat"=>"43,44,45,46,47,48,49,""subtitle" => "%a""tablestyle" => "test1","imagestyle" => "test1" "windowtarget" => "_blank"));
$objCpm->cpm_close();
?>

</center>

Ahhhh.  I grok.

No.  To do that you really need to make multiple calls to get one from each.

Code: [Select]
$options = array("subtitle" => "%a", "tablestyle" => "test1","imagestyle" => "test1" , "windowtarget" => "_blank");
$objCpm->cpm_viewLastAddedMediaFrom(1,1,"cat=41",$options);
$objCpm->cpm_viewLastAddedMediaFrom(1,1,"cat=42",$options);
$objCpm->cpm_viewLastAddedMediaFrom(1,1,"cat=43",$options);
$objCpm->cpm_viewLastAddedMediaFrom(1,1,"cat=44",$options);
$objCpm->cpm_viewLastAddedMediaFrom(1,1,"cat=44",$options);

Of course each will have their own tables... which will suck.

You could also just get back the data and format each display one at a time... but that would take some doing.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 05:37:00 pm
This is the code

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


Is it also possible to make the image gernal daily or with in a hourly time frame?

$objCpm->cpm_viewRandomMedia(1,1,array("imagestyle" => "RandomImageBorder"));

Nope, its not possible to do an hourly or anything.  If you have cron access you could concievably schedule a script to grab a new one each hour, but cpmfetch does not provide for any sort of state keeping.  With a bit of php code you could create something that does that using cpmfetch

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 05:56:42 pm
Tell me few answers :-

1) In root directory ive to make 2 cpmfetch folders or 1 (ex. site.com/cpmfetch & site.com/cpmfetch1)

No, you should not have to.  Use a normal verson of cpmfetch

Quote
2) In cpmfetch.php ive to edit or gallery path or not If yes then > ( if copy 2 cpmfetch folders as describe in No.1  ive to edit both cpmfetch.php the real path to gallery)

In most cases no.  The "/gallery" thing

$objCpm1 = new cpm('/gallery1');
$objCpm2 = new cpm('/gallery2');

Tells it where to find stuff.  Including copies is not going to do anything.

Quote
Test it on your site also if possible please send me link i want to have a look

I don't have two galleries running on my site to try this on unfortunately.  But there is no reason why it does not work.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 06:00:14 pm
Hi Vuud, im back again.
Switched webhost from IIS to Apache. (special for fetch :P)
But again I seem to have a problem with Fetch. At first it was giving me an opendir error, but
after moving the Fetch files to the root it was ok. But still im not getting any images ?
Got time to help me a bit ?

Running latest version of Joomla/Coppermine/Copperminefetch PHP5/Apache2


Cheers (again  :-[)

Are you bridged with Joomla?

I've not tested with php5 either...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on December 29, 2005, 06:12:29 pm
No, you should not have to.  Use a normal verson of cpmfetch

In most cases no.  The "/gallery" thing

$objCpm1 = new cpm('/gallery1');
$objCpm2 = new cpm('/gallery2');

Tells it where to find stuff.  Including copies is not going to do anything.

I don't have two galleries running on my site to try this on unfortunately.  But there is no reason why it does not work.





Dear ive used

Code: [Select]
<?php include "./cpmfetch/cpmfetch.php"$objCpm1 = new cpm('/wallpaper'); $objCpm2 = new cpm('/gallery'); $objCpm1->cpm_viewRandomMediaFrom(2,2,"cat=2"); $objCpm1->cpm_viewRandomMediaFrom(2,2,"cat=2"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm1->cpm_close(); $objCpm2->cpm_close(); ?>
its only showing wallpapers (gallery1 ) not the other

Regards

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on December 29, 2005, 06:14:13 pm
Vuud:

Tnx for the reply.

Yes I am bridged with Joomla, but have also tested it without the bridge. Didnt work.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 06:24:10 pm
Vuud:

Tnx for the reply.

Yes I am bridged with Joomla, but have also tested it without the bridge. Didnt work.

When you tested it with the bridge, was there users in the coppermine table?  The problem we have with the bridging is that users added by the bridged system do not add user entries into the coppermine table where we look.  So if you had it bridged and turned off the bridge it would still not work.

Try to create a few users in the cpg admin pages.  If you get some images after that, then thats the problem we have to work out.  Unless of course it was all high numbered joomba users that added the photos.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 06:34:21 pm

Dear ive used

Code: [Select]
<?php include "./cpmfetch/cpmfetch.php"$objCpm1 = new cpm('/free-desktop-wallpaper'); $objCpm2 = new cpm('/humor-photo-gallery'); $objCpm1->cpm_viewRandomMediaFrom(2,2,"cat=2"); $objCpm1->cpm_viewRandomMediaFrom(2,2,"cat=2"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm1->cpm_close(); $objCpm2->cpm_close(); ?>
PLease check my site www.funcyber.com front page, im online now for next 30 minutes, its only showing wallpapers gallery (gallery1 ) not the other , see bottom of page

my yahoo id is kaushalrahul@yahoo.com if possible come on chat


Regards



Wierd... that should work fine.  Try taking out the gallery 1 stuff just to see if gallery2 stuff starts working.

There should be no problem doing this, so lets see if we can get just the humor one working
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on December 29, 2005, 06:38:04 pm
Wierd... that should work fine.  Try taking out the gallery 1 stuff just to see if gallery2 stuff starts working.

There should be no problem doing this, so lets see if we can get just the humor one working


Ive paste this

<?php include "./cpmfetch/cpmfetch.php"; $objCpm2 = new cpm('/humor-photo-gallery'); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_close(); ?>


humor Gallery is not shown up on bottom its empty
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 06:49:02 pm
Ive paste this

<?php include "./cpmfetch/cpmfetch.php"; $objCpm2 = new cpm('/humor-photo-gallery'); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_close(); ?>


humor Gallery is not shown up on bottom its empty

Bizarre.

Add this in before the include

error_reporting(E_ALL);
ini_set('display_errors',1);


Try adding in this call before you try to get the images back

$objCpm2->cpm_listMediaCount();

just to see if it is finding the database.

I dont expect this to fix anything, but maybe will give us and idea as to what is screwy
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 06:51:40 pm
Ive paste this

<?php include "./cpmfetch/cpmfetch.php"; $objCpm2 = new cpm('/humor-photo-gallery'); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_close(); ?>


humor Gallery is not shown up on bottom its empty

Is that second gallery bridged with anything?

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on December 29, 2005, 06:54:25 pm
Bizarre.

Add this in before the include

error_reporting(E_ALL);
ini_set('display_errors',1);


Try adding in this call before you try to get the images back

$objCpm2->cpm_listMediaCount();

just to see if it is finding the database.

I dont expect this to fix anything, but maybe will give us and idea as to what is screwy


this  ive paste :

 <?php error_reporting(E_ALL);
ini_set('display_errors',1); include "./cpmfetch/cpmfetch.php"; $objCpm2 = new cpm('/humor-photo-gallery'); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_listMediaCount(); $objCpm2->cpm_close(); ?>

Results : -
 


260   


 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 08:25:51 pm
this  ive paste :

 <?php error_reporting(E_ALL);
ini_set('display_errors',1); include "./cpmfetch/cpmfetch.php"; $objCpm2 = new cpm('/humor-photo-gallery'); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_listMediaCount(); $objCpm2->cpm_close(); ?>

Results : -
260   


I am going to bet that the second one is bridged with something.  But I've not heard back from you on what / if it is.  All the symptoms point to that.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on December 29, 2005, 08:38:30 pm
I am going to bet that the second one is bridged with something.  But I've not heard back from you on what / if it is.  All the symptoms point to that.


Sorry to say it is bridged with Joomla/mambo, you didnt ask me earlier

Now what to do ??
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 08:43:35 pm
Sorry to say it is bridged with Joomla/mambo, you didnt ask me earlier

Yes, I did.
http://forum.coppermine-gallery.net/index.php?topic=19564.msg118356#msg118356

Quote
Now what to do ??

How many Joomba users do you have that add photos?

If its a few, just start adding some fake users into coppermine.

If its many, wait about 1-2 weeks for the new version which will handle bridged cases better




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: CPG Guru on December 29, 2005, 08:47:09 pm
Yes, I did.
http://forum.coppermine-gallery.net/index.php?topic=19564.msg118356#msg118356

How many Joomba users do you have that add photos?

If its a few, just start adding some fake users into coppermine.

If its many, wait about 1-2 weeks for the new version which will handle bridged cases better


Currently im only adding all pics through 2 different logins & in future it'll be open for general public to add pics

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 29, 2005, 08:50:24 pm
Currently im only adding all pics through 2 different logins & in future it'll be open for general public to add pics

Go into the coppermine admin page for that gallery and create two or three new users.  If the users you are using have low user id's this will work fine.  it will allow cpmfetch to match up against some dummy data and show images.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: benseth on December 30, 2005, 06:08:38 am
How do you show latest album?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 30, 2005, 06:47:02 am
How do you show latest album?

Latest added album, last album added to?  No sure what you are asking here
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: benseth on December 30, 2005, 08:47:29 am
Latest added album
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on December 30, 2005, 08:59:47 am
Latest added album

I do not think CPG tracks the date that albums were added.  If they do, I am not sure where it was.  I suppose one could guess at the highest album number, but some of that gets wierd

like cat = 1 is really user galleries, one of them started at 10000+ for something -

so I'd be less tempted to code to that sort of guess


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 01, 2006, 12:10:37 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
Title: Re: CPMFetch 1.6.2, Coppermine bridged with PHPBB 2.0.18, a hack to make them wo
Post by: imrich on January 01, 2006, 02:07:14 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
Code: [Select]
"subtitle" => "%o<br>%V views",

change the %V to %h like this:

Code: [Select]
"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! :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 02, 2006, 04:13:33 pm
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

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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 ?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 03, 2006, 04:57:03 am
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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 03, 2006, 04:58:12 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?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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';
*/
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: imrich on January 03, 2006, 02:05:30 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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Zanelli on January 03, 2006, 03:48:22 pm
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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: imrich on January 03, 2006, 05:41:13 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:

Code: [Select]
$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:

Code: [Select]
$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
Code: [Select]
u.user_id

 and change it to

Code: [Select]
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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: sigepjedi on January 03, 2006, 09:44:43 pm
Trying to install the latest version and i get the following:

Quote
Unknown 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
 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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?!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on January 04, 2006, 12:51:16 pm
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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 04, 2006, 02:45:47 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...

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 04, 2006, 02:46:57 pm
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 04, 2006, 02:48:19 pm
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: JoeyE on January 04, 2006, 03:28:58 pm
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

Code: [Select]
<?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:

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

Any suggestions?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on January 04, 2006, 04:24:26 pm
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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pedrosite on January 04, 2006, 08:24:06 pm
Hello,
I've upgrade coppermine from version 1.3 to 1.4.3 and after cpmfetch don't display the random image. The browser display this text:
Quote
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /web/htdocs/www.pedrosite.it/home/cpmfetch/cpmfetch_dao.php on line 710

My code is:
Code: [Select]
include "/web/htdocs/www.pedrosite.it/home/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array( "imagestyle" => "test1", "linkstyle","imagesize" => "int","imagewidth" => 140 );
$objCpm->cpm_viewRandomMedia(1,1,$styleguide);

The page that show the error is: http://www.pedrosite.it (http://www.pedrosite.it)

Thaks for the help!
Antonio.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 04, 2006, 08:38:05 pm
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.


This is probably a stupid question, but do you have more than 3 publically available images?  The behavior is to stop displaying when it runs out, which would explain the lack of 5.

Are you bridged and added cpg users?  Maybe you did not add enough?

Inquiring minds.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 04, 2006, 08:42:11 pm
Hello,
I've upgrade coppermine from version 1.3 to 1.4.3 and after cpmfetch don't display the random image. The browser display this text:
My code is:
Code: [Select]
include "/web/htdocs/www.pedrosite.it/home/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array( "imagestyle" => "test1", "linkstyle","imagesize" => "int","imagewidth" => 140 );
$objCpm->cpm_viewRandomMedia(1,1,$styleguide);

The page that show the error is: http://www.pedrosite.it (http://www.pedrosite.it)

Thaks for the help!
Antonio.




Two people just asked this and got an answer, its in the release notes, and its been brought up a bunch of times in this forum.

At least try to search for an answer first.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: amused1958 on January 04, 2006, 09:34:17 pm
Hi

I've upgraded to CPG 1.4.3 & CpmFetch 1.6.2.
However: the test-page doesn't show the thumbnaisl as expected.
In fact it shows the alternate tag instead of the image. Clicking on the image does send me to the gallery, so it all does work.
Only the thumbnails are not shown.

See http://marislaan.kohnstammschool.nl/cpmfetch.162/cftest.php

Couldn't find a solution in dox or forum. What am I missing??
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on January 04, 2006, 10:11:18 pm

This is probably a stupid question, but do you have more than 3 publically available images?  The behavior is to stop displaying when it runs out, which would explain the lack of 5.

Are you bridged and added cpg users?  Maybe you did not add enough?

Inquiring minds.




Hi, tnx for the quick reply again :)

Yes, my coppermin IS bridged, so could be that thats the problem. Im gonna ad a few more users, and see if
that works. I'll let you know.

Cheers
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on January 04, 2006, 10:16:28 pm
Tested with standalone version, didnt change anything :(

Any more things that could affect cpmfetch ? I was thinking about the chmod of the
pictures, but didnt change anything.
Title: Re: CPMFetch 1.6.2, Coppermine bridged with PHPBB 2.0.18, a hack to make them work
Post by: Zanelli on January 05, 2006, 04:10:01 pm
First, I want to thank vuud for an incredible add on to Coppermine! :D

My Coppermine 1.3.5 is bridged with phpbb 2.0.18.

I have a bunch of users in my phpbb forum (about 100) and thought this 'make up some fake users in the Coppermine database' was just too much work for me (lazyness is the mother of most of my coding), so I thought take this as a 'hint' by vuud to what may be a minimal change to the code to allow it to work with the PHPBB database.

First (and this is important), I have both my coppermine and my phpbb data in the same mysql database. My phpbb database has a phpbb prefix (i.e. phpbb_).  This is important to allow this 'hack' to work!

I made some rather simple-minded changes to cpmfetch_dao.php in an attempt to get CpmFetch 1.6.2 to work with PHPBB 2.0.18.

Note, at this time, I'm using Coppermine version 1.3.5. I have NOT tested this yet with Coppermine 1.4.2.


I haven't done any significant testing, but it seems to work and cftest.php works too. ;)

open cpmfetch.dao.php and find line:
Code: [Select]
$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:
Code: [Select]
$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.

If you get a chance to try this with Coppermine 1.4.2 bridge with PHPBB 2.0.18 and it works ok, I'd appreciate someone letting me know. If I get a chance to upgrade to cpg 1.4.2 myself, I'll let you know.


I have an earlier version of PHPBB and this dosen't work could this be that "phpbb_users" is diffrent?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: imrich on January 05, 2006, 09:44:44 pm
What version of phpbb are you using?

Also, what is your phpbb table prefxi? This is configurable. So your installation uses something different than "phpbb_" then you have to make a similar change.

Per my post, you also need to have the phpbb and coppermine data in the same database.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vb28 on January 06, 2006, 05:10:43 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
Code: [Select]
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


i am having the same problem as well i also have the same settings as above...but i notice that the cftest.php is working toxicfritz but for me the pictures are not showing only the alt is displaying the path to pictures don't have the url infront of it... i am getting http:///images/dog/1.jpg beside from getting http://www.site.com/images/dog/1.jpg

any advice....

thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: snork13 on January 06, 2006, 10:45:12 pm
@vuud


quick question? Is there a way to control thumbnail size, other then the css I'm using?

example in the info center...http://www.snork13.net/forum (http://www.snork13.net/forum)

thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dukuduku on January 07, 2006, 11:01:45 pm
Hi Vuud,

Your docs state:
Quote
13.2.   I have my pages and gallery on different subdomains... will CpmFetch work?

I have gotten a few of these working, but not enough to have all the answers. To use CpmFetch in its normal usage, the subdomain has to have access to the files on the CPG domain. If you have that, then I am confident it can be made to work.

For one reason or another, I have had to move my website off of the server that is hosting coppermine (and off the subdomain).  I am trying to configure cpmFetch but I can't get through the test page (step 80 fails) since it can't find the configuration file for coppermine (it uses the document root I believe).

Is what I am trying to do possible?  Last resort is moving coppermine to the new server, which I will do if necessary.

Thanks,
dukuduku
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: martyn_c on January 08, 2006, 03:09:20 am
Hi all,

This evening i have upgraded from cpm 1.3.x to 1.4.3. It is bridged to phpbb2.0.19.

Using cpmfetch 1.6.2, i get no errors on the cftest.php, but there are no images - 'view source' just shows a series of 'tr' and 'table' tags.

I've tried all the suggestions in previous replies to this topic without luck, but also noticed that there is no mention of this specific grouping of program versions.

Any clues?

Many thanks,

Martyn
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on January 08, 2006, 03:14:28 am
If your installation is bridged you can try to add a few more users into the cpg database. Sometimes it only shows a few or no images at all, when
cpg uses the bridged database.

Good luck.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: benseth on January 08, 2006, 06:55:03 am
Hey I found out how CPMFETCH can work on the latest CPG.

Remove all the */ and the /* from line 54 to 59.  It should look like this

Code: [Select]
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';



I did it and it work perfectly now :D
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on January 08, 2006, 02:31:58 pm
Does anyone have an idea howto let a semi-transparant image float over the thumbs ?

Like on: http://www.threadless.com/catalog/Retired

Couldnt get it to work with css.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: imrich on January 08, 2006, 03:38:08 pm
Hi all,

This evening i have upgraded from cpm 1.3.x to 1.4.3. It is bridged to phpbb2.0.19.

Using cpmfetch 1.6.2, i get no errors on the cftest.php, but there are no images - 'view source' just shows a series of 'tr' and 'table' tags.

I've tried all the suggestions in previous replies to this topic without luck, but also noticed that there is no mention of this specific grouping of program versions.

Any clues?

Many thanks,

Martyn

Martyn,

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

This is what I did and it's working perfectly with phpbb 2.0.19.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 08, 2006, 05:38:45 pm
Hey I found out how CPMFETCH can work on the latest CPG.

Remove all the */ and the /* from line 54 to 59.  It should look like this

Code: [Select]
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';



I did it and it work perfectly now :D


Wow
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 08, 2006, 05:43:56 pm
Hi Vuud,

Your docs state:
For one reason or another, I have had to move my website off of the server that is hosting coppermine (and off the subdomain).  I am trying to configure cpmFetch but I can't get through the test page (step 80 fails) since it can't find the configuration file for coppermine (it uses the document root I believe).

Is what I am trying to do possible?  Last resort is moving coppermine to the new server, which I will do if necessary.

Thanks,
dukuduku



The docs are full of lies I tell you.  I hate the docs more than most of the things I hate.  And thats a lot.

Anyway, if you are on a completely different domain, you can access if using the SSI techniques that seem to work the best.  Sometimes you can call it from PHP...  The big thing is to have it working on the server you have CPG on and then start trying to remotely get data.  See the SSI thread for some more ideas on it.

Hope that helps some


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on January 08, 2006, 05:59:42 pm
Any ideas on my question vuud ? if you have the time.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 08, 2006, 06:05:56 pm
Any ideas on my question vuud ? if you have the time.

Aside from doing it the way they did it... nope. 

If you did not want to do it their way, maybe something with positioning a gif with transparent parts over your pictures with css positioning stuff - but I know little about CSS layouts - so that could be crazy talk.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: deejaymoni on January 08, 2006, 06:09:27 pm
Hey I found out how CPMFETCH can work on the latest CPG.

Remove all the */ and the /* from line 54 to 59.  It should look like this

Code: [Select]
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';



I did it and it work perfectly now :D

You are the man it works as well with cpg 1.4.3 bridged with phpbb Plus 1.5

thanks a lot
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on January 08, 2006, 06:11:44 pm
Tnx for the reply.

Could you tell me where the "html" gets spitted out with the thumb. Maybe i can add a transparant image there.
I tried with the CSS positioning, but then the image gets placed BEHIND the thumb, so that wasnt very useful :P
And is it possible to change the size of the thumbs ?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 08, 2006, 06:41:02 pm
You are the man it works as well with cpg 1.4.3 bridged with phpbb Plus 1.5

thanks a lot

It would be worth adding that the instructions have you comment out the old one.  See the instructions included with cpmfetch.

While it wont cause a problem now, in the future depending - it might
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 08, 2006, 06:46:19 pm
Tnx for the reply.

Could you tell me where the "html" gets spitted out with the thumb. Maybe i can add a transparant image there.
I tried with the CSS positioning, but then the image gets placed BEHIND the thumb, so that wasnt very useful :P
And is it possible to change the size of the thumbs ?

Doesnt CSS layouts have something with a Z-plane layering?  That would control if its behind or above.

You can override and force the thumbs to stretch with the imageheight or imagewidth option array attributed.  Mind you this only instructs the browser to resize them.

Image tags get spit out from about line 1377 in cpmfetch.php

Hope that helps
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: apassio on January 08, 2006, 07:22:12 pm
Just installed CpmFetch 1.6.2 and I get an error message while running http://www.dophan.com/cpmfetch/cftest.php (http://www.dophan.com/cpmfetch/cftest.php)

Code: [Select]
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/dophan2/public_html/cpmfetch/cpmfetch_dao.php on line 710
I run CPG 1.4.3.

Website: http://www.dophan.com
Coppermine gallery: http://www.dophan.com/photos/

Did I overlook something?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 08, 2006, 08:29:07 pm
Just installed CpmFetch 1.6.2 and I get an error message while running http://www.dophan.com/cpmfetch/cftest.php (http://www.dophan.com/cpmfetch/cftest.php)

Code: [Select]
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/dophan2/public_html/cpmfetch/cpmfetch_dao.php on line 710
I run CPG 1.4.3.

Website: http://www.dophan.com
Coppermine gallery: http://www.dophan.com/photos/

Did I overlook something?

Your not getting a "Unknown column 'u.user_website' in 'field list'" right above it by any chance?

Look in the releasenotes that came with 1.6.2 for what to do when running the beta

That will fix your problem.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: apassio on January 08, 2006, 09:03:19 pm
Done, fixed, cftest.php runs ok now.

Thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: snork13 on January 08, 2006, 11:31:33 pm
Any ideas on my question vuud ? if you have the time.

<div style="width:190px;background-image:url(http://media.threadless.com/product/146/smallphoto.jpg);"><a href="/product/146/Saint" onmouseover="photoSwap('so146','http://media.threadless.com/imgs/soldout-r.gif')" onmouseout="photoSwap('so146','http://media.threadless.com/imgs/soldout.gif')"><img name="so146" src="http://media.threadless.com/imgs/soldout.gif" width="190" height="136"></div>

javascript
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dukuduku on January 09, 2006, 06:16:50 am
The docs are full of lies I tell you.  I hate the docs more than most of the things I hate.  And thats a lot.

Anyway, if you are on a completely different domain, you can access if using the SSI techniques that seem to work the best.  Sometimes you can call it from PHP...  The big thing is to have it working on the server you have CPG on and then start trying to remotely get data.  See the SSI thread for some more ideas on it.

Hope that helps some
Hey, at least you HAVE docs!  And lies are easily changed to... non-lies.  (I was going to say truths, but that is getting a bit too philosophical!)

I think going the SSI route is not worth the investment for me at this point.  I will probably just move coppermine and the gigs of pictures to the temporary server as we are still somewhat under development.

Cheers,
dukuduku
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 10, 2006, 06:09:41 am
Hey, at least you HAVE docs!  And lies are easily changed to... non-lies.  (I was going to say truths, but that is getting a bit too philosophical!)

I think going the SSI route is not worth the investment for me at this point.  I will probably just move coppermine and the gigs of pictures to the temporary server as we are still somewhat under development.

Cheers,
dukuduku



Nope, the lies shall remain lies.  Except for a chosen few.  They shall become damned lies.







Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: martyn_c on January 10, 2006, 04:06:27 pm
Hi all,

Solved my problem now - didn't fully read what i needed to do from the suggestions already posted.

Hence I can confirm that the following modifications will enable cpmfetch1.6.2 to work with cpm1.4.3 bridged to phpbb2.0.19.


>Open cpmfetch_dao.php
>Comment out line 57
>Remove comments from around line 62 (As per the instructions in the release notes!)

>Find:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";

>Replace with:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
(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.)

>Find every occurance of u.user_id and change it to phpbb.user_id. (This is the step I failed to read!)
>Save cpmfetch_dao.php and then try cftest.php.


Many thanks to all - just thought it would be good to present the entire solution in one place - hopefully i've not made a mistake in trying to remember what i did to make it all work together!

Keep up the good work - loving this addon to Coppermine!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: imrich on January 10, 2006, 06:35:52 pm
Hi all,

Solved my problem now - didn't fully read what i needed to do from the suggestions already posted.

Hence I can confirm that the following modifications will enable cpmfetch1.6.2 to work with cpm1.4.3 bridged to phpbb2.0.19.


>Open cpmfetch_dao.php
>Comment out line 57
>Remove comments from around line 62 (As per the instructions in the release notes!)

>Find:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";

>Replace with:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
(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.)

>Find every occurance of u.user_id and change it to phpbb.user_id. (This is the step I failed to read!)
>Save cpmfetch_dao.php and then try cftest.php.


Many thanks to all - just thought it would be good to present the entire solution in one place - hopefully i've not made a mistake in trying to remember what i did to make it all work together!

Keep up the good work - loving this addon to Coppermine!


Yes, this is just what I did to get CpmFetch to work with PHPBB 2.0.18 and 2.0.19. Thanks for confirming this to the group! :D I'm sure this will help others too. It may want to be it's own thread! ;)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 10, 2006, 11:07:48 pm
Yes, this is just what I did to get CpmFetch to work with PHPBB 2.0.18 and 2.0.19. Thanks for confirming this to the group! :D I'm sure this will help others too. It may want to be it's own thread! ;)


The test version I have here can detect when cpg is officially bridged to something else.  If everyone who is running a bridge can send me the table format for the userid I will work it out so some of the data becomes available.

Otherwise, for the ones I don't have data for I will just ignore the other db, and things will work, but username and stuff will not be available.

Vuud

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: imrich on January 11, 2006, 01:38:47 pm
Quote from: Vuud
If everyone who is running a bridge can send me the table format for the userid I will work it out so some of the data becomes available.

Is this what you need?

This is from phpbb 2.0.19

Code: [Select]
CREATE TABLE `phpbb_users` (
  `user_id` mediumint(8) NOT NULL default '0',
  `user_active` tinyint(1) default '1',
  `username` varchar(25) NOT NULL default '',
  `user_password` varchar(32) NOT NULL default '',
  `user_session_time` int(11) NOT NULL default '0',
  `user_session_page` smallint(5) NOT NULL default '0',
  `user_lastvisit` int(11) NOT NULL default '0',
  `user_regdate` int(11) NOT NULL default '0',
  `user_level` tinyint(4) default '0',
  `user_posts` mediumint(8) unsigned NOT NULL default '0',
  `user_timezone` decimal(5,2) NOT NULL default '0.00',
  `user_style` tinyint(4) default NULL,
  `user_lang` varchar(255) default NULL,
  `user_dateformat` varchar(14) NOT NULL default 'd M Y H:i',
  `user_new_privmsg` smallint(5) unsigned NOT NULL default '0',
  `user_unread_privmsg` smallint(5) unsigned NOT NULL default '0',
  `user_last_privmsg` int(11) NOT NULL default '0',
  `user_emailtime` int(11) default NULL,
  `user_viewemail` tinyint(1) default NULL,
  `user_attachsig` tinyint(1) default NULL,
  `user_allowhtml` tinyint(1) default '1',
  `user_allowbbcode` tinyint(1) default '1',
  `user_allowsmile` tinyint(1) default '1',
  `user_allowavatar` tinyint(1) NOT NULL default '1',
  `user_allow_pm` tinyint(1) NOT NULL default '1',
  `user_allow_viewonline` tinyint(1) NOT NULL default '1',
  `user_notify` tinyint(1) NOT NULL default '1',
  `user_notify_pm` tinyint(1) NOT NULL default '0',
  `user_popup_pm` tinyint(1) NOT NULL default '0',
  `user_rank` int(11) default '0',
  `user_avatar` varchar(100) default NULL,
  `user_avatar_type` tinyint(4) NOT NULL default '0',
  `user_email` varchar(255) default NULL,
  `user_icq` varchar(15) default NULL,
  `user_website` varchar(100) default NULL,
  `user_from` varchar(100) default NULL,
  `user_sig` text,
  `user_sig_bbcode_uid` varchar(10) default NULL,
  `user_aim` varchar(255) default NULL,
  `user_yim` varchar(255) default NULL,
  `user_msnm` varchar(255) default NULL,
  `user_occ` varchar(100) default NULL,
  `user_interests` varchar(255) default NULL,
  `user_actkey` varchar(32) default NULL,
  `user_newpasswd` varchar(32) default NULL,
  `user_login_tries` smallint(5) unsigned NOT NULL default '0',
  `user_last_login_try` int(11) NOT NULL default '0',
  PRIMARY KEY  (`user_id`),
  KEY `user_session_time` (`user_session_time`)
) TYPE=MyISAM;

I hope this helps you.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 11, 2006, 05:17:50 pm
Is this what you need?

This is from phpbb 2.0.19

Code: [Select]
CREATE TABLE `phpbb_users` (
  `user_id` mediumint(8) NOT NULL default '0',
  `user_active` tinyint(1) default '1',
  `username` varchar(25) NOT NULL default '',
  `user_password` varchar(32) NOT NULL default '',
  `user_session_time` int(11) NOT NULL default '0',
  `user_session_page` smallint(5) NOT NULL default '0',
  `user_lastvisit` int(11) NOT NULL default '0',
  `user_regdate` int(11) NOT NULL default '0',
  `user_level` tinyint(4) default '0',
  `user_posts` mediumint(8) unsigned NOT NULL default '0',
  `user_timezone` decimal(5,2) NOT NULL default '0.00',
  `user_style` tinyint(4) default NULL,
  `user_lang` varchar(255) default NULL,
  `user_dateformat` varchar(14) NOT NULL default 'd M Y H:i',
  `user_new_privmsg` smallint(5) unsigned NOT NULL default '0',
  `user_unread_privmsg` smallint(5) unsigned NOT NULL default '0',
  `user_last_privmsg` int(11) NOT NULL default '0',
  `user_emailtime` int(11) default NULL,
  `user_viewemail` tinyint(1) default NULL,
  `user_attachsig` tinyint(1) default NULL,
  `user_allowhtml` tinyint(1) default '1',
  `user_allowbbcode` tinyint(1) default '1',
  `user_allowsmile` tinyint(1) default '1',
  `user_allowavatar` tinyint(1) NOT NULL default '1',
  `user_allow_pm` tinyint(1) NOT NULL default '1',
  `user_allow_viewonline` tinyint(1) NOT NULL default '1',
  `user_notify` tinyint(1) NOT NULL default '1',
  `user_notify_pm` tinyint(1) NOT NULL default '0',
  `user_popup_pm` tinyint(1) NOT NULL default '0',
  `user_rank` int(11) default '0',
  `user_avatar` varchar(100) default NULL,
  `user_avatar_type` tinyint(4) NOT NULL default '0',
  `user_email` varchar(255) default NULL,
  `user_icq` varchar(15) default NULL,
  `user_website` varchar(100) default NULL,
  `user_from` varchar(100) default NULL,
  `user_sig` text,
  `user_sig_bbcode_uid` varchar(10) default NULL,
  `user_aim` varchar(255) default NULL,
  `user_yim` varchar(255) default NULL,
  `user_msnm` varchar(255) default NULL,
  `user_occ` varchar(100) default NULL,
  `user_interests` varchar(255) default NULL,
  `user_actkey` varchar(32) default NULL,
  `user_newpasswd` varchar(32) default NULL,
  `user_login_tries` smallint(5) unsigned NOT NULL default '0',
  `user_last_login_try` int(11) NOT NULL default '0',
  PRIMARY KEY  (`user_id`),
  KEY `user_session_time` (`user_session_time`)
) TYPE=MyISAM;

I hope this helps you.



Actually yes - thats it exactly.  Thanks!

Okay, so thats phpbb down... I still need one from:

invisionboard
vbulletin23
vbulletin30
yabbse
woltlab21
punbb

I have SMF so I can get that.  Maybe also vbulletin30, but I am not sure.

Thanks for the help

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Pete77s on January 15, 2006, 03:07:28 am
Hi all,

Solved my problem now - didn't fully read what i needed to do from the suggestions already posted.

Hence I can confirm that the following modifications will enable cpmfetch1.6.2 to work with cpm1.4.3 bridged to phpbb2.0.19.


>Open cpmfetch_dao.php
>Comment out line 57
>Remove comments from around line 62 (As per the instructions in the release notes!)

>Find:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";

>Replace with:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
(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.)

>Find every occurance of u.user_id and change it to phpbb.user_id. (This is the step I failed to read!)
>Save cpmfetch_dao.php and then try cftest.php.


Many thanks to all - just thought it would be good to present the entire solution in one place - hopefully i've not made a mistake in trying to remember what i did to make it all work together!

Keep up the good work - loving this addon to Coppermine!



Hi, after doing the above, I ran the cftest.php and had green pass. so i guess I did something right. expect im still getting errors.. and I clicked on ranndom.php and get all sorts of erros too.

by saying to remove  line 62 and 57 do you mean the whole part? or just that spesific line?

whole part I mean this: ( line 62)
// 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';
*/
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: imrich on January 15, 2006, 03:09:02 pm
Pete,

What is means is to find this code:
Code: [Select]
// 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 change it to this:
Code: [Select]
// 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';
*/

THEN

Find the lines:
Code: [Select]
// 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';
*/

and change it to this:

Code: [Select]
// 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';

So you are turning off the first bit of code by turning it into a comment
and then you are enabling the second  bit of code by removing the start and end comment delimiters.

The actual instructions for doing this are in the release notes, this is what it says:

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.  If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.

I hope to have a development version out in a few days to permanently address this change.

Does this help at all?

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: SpoiledMutts_Com on January 19, 2006, 11:20:03 pm
I am having problems showing all pics (regardless if random or latest) from all albums in a category.  I would actually like to show all the latests pics that are public.  I am running the latest stable versions of everthing, here is the code I have used.  It coppermine is bridged with SMF, I have tried all the commented lines but regardless of which I use it only shows the first album made in the category (there are only 2 categories).

Code: [Select]
echo '<div align="right">';
include "/var/www/html/photogallery/ssi/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photogallery");
//$objCpm->cpm_viewRandomMedia(5,1);
//$objCpm->cpm_viewLastAddedMedia (5,1);
//$objCpm->cpm_viewLastAddedMediaFrom (5,1, "cat=1");
//$objCpm->cpm_viewLastAddedMediaFromCategory (5, 1, 1);
//$objCpm->cpm_viewRandomMediaFrom(5,1,"cat=1");
$objCpm->cpm_viewLastAddedMediaFromCategory(18,1,2);
$objCpm->cpm_close();
echo '</div>';

Like I said, I have tried all the commented out ways, I get pics but only from the first album created in those categories.  I am wanting to show all latest pics in all public categories.  Thanks for any help.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: reSet on January 20, 2006, 11:25:35 am
Dear CPG peoples!
I've been searching the forum for an hour without success

my name is reSet Sakrecoer and i've been using your softwar for some time now.
I just installed a cpg 1.4.3 to our server on barcelona_hq.micromusic.net
it works brilliant i love all the new features!

Still one thing bothers me, in 1.3, coppermine used quicktime to display mp3's, now aday its microsoft Mplayer.
Since the Microsoft player is completley out of control on macintoshs, i realy wonder why you chose this. Quicktime works the same on any station? see i'm no wizz about best compression and best thhis or that... i timidely think "compatibilty"

Now i've noticed some people get mad when peoples are requesting about other features than picture related, and i hope i wont bother them. But i would love to know how i can make it use the quictime player again :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 20, 2006, 09:38:34 pm
Dear CPG peoples!
I've been searching the forum for an hour without success

my name is reSet Sakrecoer and i've been using your softwar for some time now.
I just installed a cpg 1.4.3 to our server on barcelona_hq.micromusic.net
it works brilliant i love all the new features!

Still one thing bothers me, in 1.3, coppermine used quicktime to display mp3's, now aday its microsoft Mplayer.
Since the Microsoft player is completley out of control on macintoshs, i realy wonder why you chose this. Quicktime works the same on any station? see i'm no wizz about best compression and best thhis or that... i timidely think "compatibilty"

Now i've noticed some people get mad when peoples are requesting about other features than picture related, and i hope i wont bother them. But i would love to know how i can make it use the quictime player again :)

Are you talking about CPMFETCH of Coppermine Photo Gallery?

You could be in the wrong forum

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on January 20, 2006, 09:44:08 pm

Be advised

I added a new thread here for dealing with bridges and cpmfetch.  Figure its a popular enough topic

Also, for some reason

http://cpmfetch.fistfullofcode.com is not working

However http://www.fistfullofcode.com then click on cpmfetch in the menu works fine.

Just so you know

:D
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chad_jennings on January 21, 2006, 02:53:37 am
Hello,
I am trying to get version 1.6.2 to work correctly on my church's website.
I have created a file containing the following code:
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/album");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>

I am calling it from my newIndex.html with the following code:
Code: [Select]
<iframe src="viewPhoto.php" width="225" height="195"></iframe>

Everything appears to be working correctly at first, but when the thumbnail is clicked on, instead of going to the larger photo in Coppermine I get my homepage displayed in the iframe instead.

I am using Coppermine 1.4.3 on Firefox.

Thanks in advance for any help.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Kinetica on January 21, 2006, 10:25:53 am
since i cannot figure out how to start a new topic, i guess this is the closest topic i am able to post this in. i got CfImageGet to work (from ver1.6.2) in my phpbb (ver2.19) signature. i just cant figure out how to get it to work as a random avatar. keep getting the error The URL of the remote avatar is not valid. i wouldnt mind using the .htaccess work-around but kinda lost when it comes to that. any help would be great.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Gary B on January 21, 2006, 01:44:00 pm
I have cp\oppermine 1.4.3 installled and CFG 1.6.2 installed and no matter what I set in the following line my randon images are heavily favoriing my Disney Animal Kingdom photos.  I have tried limiting it to another photo gallery and it still shows the Animal Kingdom photos.

http://www.themeparks.com/

My randomimages.php
Code: [Select]
<?php 
include "cpmfetch.php";
$objCpm = new cpm('/library');
$objCpm->cpm_viewRandomMedia(1,1,array("tablestyle" => "test1","subtitle" =>"This photo is from the %a album","imagesize" => "thumb","imagestyle" => "test1"));
$objCpm->cpm_close(); 
?>


Thank you for any help
Gary
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: chad_jennings on January 21, 2006, 06:52:44 pm
Hello,
I am trying to get version 1.6.2 to work correctly on my church's website.
I have created a file containing the following code:
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/album");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>

I am calling it from my newIndex.html with the following code:
Code: [Select]
<iframe src="viewPhoto.php" width="225" height="195"></iframe>

Everything appears to be working correctly at first, but when the thumbnail is clicked on, instead of going to the larger photo in Coppermine I get my homepage displayed in the iframe instead.

I am using Coppermine 1.4.3 on Firefox.

Thanks in advance for any help.

Okay, I'm a dork  ::).  I figured out the problem.  Since I was calling the .php file from an iframe the link was calling the resulting file and placing the contents in the iframe, which is the correct behavior.  It was late and I was tired when I was having the problem and I thought I had it fixed and then when I didn't I just wasn't thinking.  Sorry about the post that really wasn't necessary.  :D

Oh, btw, I used the options parameter and added the
Code: [Select]
"windowtarget" => "_parent" to fix it.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: websnow on January 25, 2006, 03:21:34 am
How to display image description ?

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: websnow on January 25, 2006, 03:51:33 am
i got it

Code: [Select]
$options = array( 'subtitle' => 'Image name= %t,  <br>Cap Description = %c ' );
$objCpm->cpm_viewLastAddedMedia (2,4,$options);

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html#
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Pete77s on January 28, 2006, 05:40:42 pm
Pete,

What is means is to find this code:
Code: [Select]
// 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 change it to this:
Code: [Select]
// 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';
*/

THEN

Find the lines:
Code: [Select]
// 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';
*/

and change it to this:

Code: [Select]
// 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';

So you are turning off the first bit of code by turning it into a comment
and then you are enabling the second  bit of code by removing the start and end comment delimiters.

The actual instructions for doing this are in the release notes, this is what it says:

Does this help at all?




Yup! thanks... I think I got it. sorry about the late reply. got a little busy. well this is what ctest.php tells me:
Trying to display some images:

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

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'p.approved='YES' and a.visibility = 0 ORDER BY rand(23232) L
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/pete77/public_html/pix/cpmfetch/cpmfetch_dao.php on line



what is this telling me?

Also another question. it says I should be seeing some images. but I would need to create a block first right? ok  and the code for these bocks is in the first post where the author of this mod shows some examples am I right? my coppermine is already bridged to my 2.0.19 phpbb board.

Okay, what Im trying to do is get a block,  a scrolling of images to go across the top of my portal. I will have it marquee across.  Will I be able to do this with this cfetch?

thanks.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kadekawa on January 29, 2006, 10:43:15 pm
Love CpmFetch - just installed for a friend's website and for some reason
the cftest.php is passing everything cep the small grid of thumbnails its supposed to show....thats with userpics uploaded for the albums in coppermine - it does work
when there is a batch upload of pics  ???

TopMedia and Random and all other scripts will only pull from the batch folder too...help!

Thank you in advance!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: adolfs on January 30, 2006, 10:02:25 pm
Great plug...i recently had the need to run it off a subdomain galleries.xxxxxxx.com I am having a hard time pointing to the location in the install files any suggestions of how to do it?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: seanbluekey on January 31, 2006, 11:41:24 pm
I don't know anything about PHP. but my Q is can I also put this on a .asp page? if so how do I go about it. I have tried several things:

1) I put the cpmfetch folder in the /picture folder.
2) I changed the cftest.php file
$ChangeThisToYourPartialUrlToCPG = "/picture";

2) and then I have put this in the body:

<?php   
include "coppermine.php";
$objCpm = new cpm('/picture');

$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);

$objCpm->cpm_close();

?>

and it is not working :'( Please help!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: freesouljah on February 01, 2006, 10:57:31 pm
I did a search...but couldn't find if there is a way to list albums from categories aphabetically using cpmFetch.  Is this possible?

thanks man  8)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pat rick on February 05, 2006, 09:11:59 pm
I was searching through this forum, but it didn't solve my question.
I'd like to just get variables which I can use for further php processing.
For example, how can I get the height or the subtitle of a image as a variable?
I did the following, as I could find it in this forum:

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");

// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');

// This gets an assocative array of the 1 random image from anywhere public in the album
$data $objCpm->cpm_viewRandomTopRatedMediaFrom('cat=3',1,1,$options);

// This gets the image to display...
$imagename $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");

$objCpm->cpm_close();
?>
 

This will will return the absolut path of the picture. Great!
But how can I get the picture id, subtitle, height and width of this picture as a variable?
Is there any chance for it?

Thank you.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mona87 on February 06, 2006, 09:39:25 pm
I have a question concerning the formatting of the script.  I put up a section on my site to automatically put the last pictures into the gallery on the frontpage.

http://www.ranifan.com/test.php

thats the example of what i have on my frontpage.   The only problem is that the resizing is terrible.   

www.drewfan.com

On this site, she has a last updated section, but the pictures are resized so that it looks decent.  And its resized only a section of the picture and not the whole thing for better quality.

how do i accomplish this?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Aergonaut on February 07, 2006, 01:49:55 am
Not sure if this has been asked already, so please point me to the right place if it has...  I'm trying to use CpmFetch to get recent additions to my Coppermine gallery on my website's homepage.  However, when I use the function listed in the documentation, all I get is an empty table with no data, like this:

Code: [Select]
<table><tr></tr></table>
I haven't changed the CpmFetch code at all.  My site is here (http://www.bayareaddr.com).
Title: CPM 1.4.3 SMF BRIDGE CPMFETCH 1.6.2
Post by: radmofo on February 08, 2006, 06:50:22 pm
Hello I am having some trouble with the setup listed in the subject block. It seems that All newly uploaded pictures cannot be "fetched" with cpmfetch as well as albums 26 and above. I have asked this question in other area's I would like some sort of feedback as to how to remedy this. I have no errors and personnally think I have tried everything that I know of. I am not sure if ths is a bug or some weird thing. Any assistance will be appreciated. Preferably VUUD (the creator) By the way have you had a chance to see if albums 26 and above would pull pictures?

Title: Re: CPMFetch 1.6.2, Coppermine bridged with PHPBB 2.0.18, a hack to make them work
Post by: Zanelli on February 09, 2006, 04:36:57 pm
I have an earlier version of PHPBB and this dosen't work could this be that "phpbb_users" is diffrent?

Okay I'm still having problems with this, my Coppermine and my PHPBB are on seperate databases:

CPG database name = _coppermine
PHPBB database name = _phpbb1

I'm not sure what I have to change to get this to work?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: soldstatic on February 11, 2006, 05:23:15 am
sorry for the newB question with cpmFetch, but how do we get rid of the blue link border around the images?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: motorcontrol on February 11, 2006, 08:12:29 pm
CPMFetch Directory: http://wolfdisease.org/hntd/cpmfetch (v1.6.2)
Coppermine Directory: http://wolfdisease.org/hntd/photos (v1.4.3)

Here's my problem. On my test page (http://wolfdisease.org/hntd/cpmfetch/cftest.php) I get the image preview fine. There are no extra warnings, etc.

However, on cfig_random.php, I get this error:

ERROR: Path to Coppermine incorrect. (/home/sidni/wolfdisease.org/photos//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home/.hebi/sidni/wolfdisease.org/hntd/cpmfetch/cfimageget.php on line 167


And when I go to insert the code into my layout (http://wolfdisease.org/hntd/indexx.php?x=index) I get this error:

ERROR: Path to Coppermine incorrect. (/home/sidni/wolfdisease.org/photos//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home/.hebi/sidni/wolfdisease.org/hntd/cpmfetch/cpmfetch.php on line 770


I've used this script before on another site and had no problem whatsoever. Last night I spent a good chunk of time double checking and reinstalling, but nothing seems to have changed. Hopefully someone will give me an answer on this, cause it's driving me nuts.

Thanks!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: davelu on February 13, 2006, 06:18:17 am
I just finshed running the test and the result came back postive but when i scorlled down this is what is said
Trying to display some images:

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

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

And when i tired out the examples The exact same error message displayed

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

Thanks
-Dave
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: ferrer on February 13, 2006, 10:49:52 pm
I wondered if it is possible to do the following with CPM Fetch. I have two types of images in my coppermine. Landscape and Portait, All of my Landscape thumbnails are 250 pixels wide. Would it be possible to change CPM Fetch  so that when including random files it would only include landscape pictures? Or is this not very easy to do?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kadekawa on February 14, 2006, 10:47:18 pm
ok got my earlier problem fixed - was a bridging problem with phpbb now a new one - which goes to my noobishness on php/html/and the interweb in general

cpm_viewTopRatedMediaFrom ($source, $rows, $columns, [array $options=""])

how do i actually define the $source string?

ive seen the examples given in the manual
$source = "cat=2,3:album=12,13,10"; for example but where should this go?

thank you in advance and happy valentines day everyone!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: HPG on February 14, 2006, 11:21:25 pm
Okay, this is odd ...

I've got everything to work in my cftest.php file, it's all 'Pass', but my preview thumbnails are not showing up. I have no clue why.

Here is my cftest:   http://www.hpgalerij.net/cpmfetch/cftest.php

I checked my prefixes and they're all correct. I'm pretty sure it's because the cftest uses two "//"'s in the image source ( src="//albums/wpw-20050525/thumb_50913025_8.jpg") but I have no idea where this can be fixed.

Any help would be greatly appreciated!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Antifmradio on February 15, 2006, 12:17:20 am
Lets do what needs to be  done first shall we?  ;D

What version of coppermine you are using Coppermine Photo Gallery v1.4.2
What version of CoppermineFetch you are using 6.0
A link to your website and gallery website = www.clubex.com/index1.php gallery = www.clubexl.com/gallery.index.php
A link to an example of the problem (if possible) Please see top right of www.clubexl.com/index1.php
How computer savvy you are (newbie, intermediate, damn good) not damn good but better then intermediate
What kind of web server you are running on (if known) LINUX
Include the syntax of the command you are using. ???

also
when i open the page where the CPMFETCH should display an image i get this error
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/clubexl/public_html/cpmfetch/cpmfetch_dao.php on line 695

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


On my CPMFETCH TEST page (supplied by the big man)
i see all PASS and INFO. There are NO failures in the test but i do get this at the bottom
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/clubexl/public_html/cpmfetch/cpmfetch_dao.php on line 695


I have CPMFETCH in its own folder just outside of ROOT
i have CPG in its own folder Just outside of ROOT

not sure what other info would help.
...this is where i do the usual <fingers  pointing together, squelching a small "HELP?" >
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: engleb on February 15, 2006, 10:40:35 pm
I've done a bit of searching here and reading through the docs at fistfullofcode.com without any luck, so I thought I'd ask here in hopes that either I just missed something really obvious or someone else has done the same thing and will share the procedure.

On my site, I'd like to include images from the last x albums.  More specifically, I'd like to display the image that is set as the "Album thumbnail" for the last x added albums.  Searching the forums here and reading the docs on the main site, I don't see anything that will do what I'm looking for.

Is this something that is possible with CpmFetch as it currently works?  If not, has anyone modified it or created something similar?

Thanks,
Brett
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vb28 on February 16, 2006, 08:54:45 pm
Sorry, I have been building and installing a router for the past few days.  I've been getting home at 2am, and getting up and heading back.

back home? ;-)



Yeah, I am back...  How is your problem?  Sometimes these things have a way of resolving themselves...

 :)



Hi vuud,

i am having the same problem as Andreas W. i don't did you guys found a soluation for it..?
http://albums/fun/thumb_ATT00060.gif
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: robinna on February 17, 2006, 03:52:17 am
okay, I found something that seems to work to solve the problem below (and I am not using xoops, just a plain ol' simple php with a little css on my home page). I was having a similiar problem to antifmradio (the specifics are below).
I will be interested to know if it works for others with the same problem. I did read through the threads concerning cpmfetch, but in all honesty, I had a hard time figuring out which thing referred to which problem or issue (maybe this thread could be split up into more specific topics?)
I also read the cpmfetch documentation and while I didn't see the specific answer to my problem (if it was there, I did indeed miss it, but there is ALOT of wonderful, helpful info about setting it up, etc.)
However: here is what I found that seemed to work.
http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=44476&viewmode=flat&order=ASC&start=20


..and here is all of the stuff about my problem:
What version of coppermine you are using Coppermine Photo Gallery v1.4.3
What version of CoppermineFetch you are using 1.6.2
What kind of web server you are running on (if known) LINUX

error message:
when i open the page where the CPMFETCH should display an image i get this error
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
(path info specific to my site)/cpmfetch/cpmfetch_dao.php on line 710

On my CPMFETCH TEST page
i see all PASS and INFO. There are NO failures in the test but i do get this at the bottom
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in (path info specific to my site)/cpmfetch/cpmfetch_dao.php on line 710

I have CPMFETCH in its own folder just outside of ROOT
i have CPG in its own folder Just outside of ROOT

---------------------------
good luck! You can see it working at
http://www.robinart.com

robinna
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: nicedreams on February 17, 2006, 09:09:20 pm
Quote
error message:
when i open the page where the CPMFETCH should display an image i get this error
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
(path info specific to my site)/cpmfetch/cpmfetch_dao.php on line 710

On my CPMFETCH TEST page
i see all PASS and INFO. There are NO failures in the test but i do get this at the bottom
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in (path info specific to my site)/cpmfetch/cpmfetch_dao.php on line 710

There is a line in cpmfetch_dao.php that you need to change depending on the version of cpm. Between line 55-65, there is a var $sqlPictureAlbumSelect line,reverse which one is commented out. That will fix that error message.

Jim
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: robinna on February 18, 2006, 03:02:51 am
thanks for the info but mine is working just fine, after I followed the directions over at the xoops forum (which is in the link in my previous post) For those of you having the same problem, the solution might depend on which version of coppermine or cpmfetch you have as to what the fix is and how much php experience you have as to the easier way of doing.  ;D

the problem/error message in question is:
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
(path info specific to my site)/cpmfetch/cpmfetch_dao.php on line 710

(...and I only include that info so that folks will know which error I'm talking about because mine is working just fine... )
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on February 18, 2006, 05:40:02 am

Hi,  I just thought I would post a quick note here saying I am not dead.  No matter what the press reports.

I've been incredibly busy though leaving little time for fixing cpmfetch.  Hopefully after this week I will be back in shape to polish off the next release.


Anyone with u.username problems - there was a post a little while ago with someone detailing how to fix that problem.

Vuud
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: robinna on February 18, 2006, 06:29:14 pm
thanks for such a great tool!
also, I just wanted to say thanks for the documentation at fistfull of code; it is excellent. I found alot of info about customizing the cpmfetch results. I wanted to do pull only from certain categories and albums, and found all of the info I needed here:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch05s02.html

thanks again, just what I was looking for!
robinna
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: somnaom on February 20, 2006, 02:23:45 am
Hi all,

Solved my problem now - didn't fully read what i needed to do from the suggestions already posted.

Hence I can confirm that the following modifications will enable cpmfetch1.6.2 to work with cpm1.4.3 bridged to phpbb2.0.19.


>Open cpmfetch_dao.php
>Comment out line 57
>Remove comments from around line 62 (As per the instructions in the release notes!)

>Find:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";

>Replace with:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
(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.)

>Find every occurance of u.user_id and change it to phpbb.user_id. (This is the step I failed to read!)
>Save cpmfetch_dao.php and then try cftest.php.


Many thanks to all - just thought it would be good to present the entire solution in one place - hopefully i've not made a mistake in trying to remember what i did to make it all work together!

Keep up the good work - loving this addon to Coppermine!


This solved my problem too. But I got another one instead: three copies of every thumbnail.  ???
(phpBB 2.0.19, cpg 1.4.3 & CpmFetch 1.6.2)  :)
Title: Allow results from CPMFetch into wrapped Mambo/Joomla
Post by: Skully1 on February 20, 2006, 02:33:39 pm
Hi all.  A little confused why this post can't be posted in the correct forum (CPMFetch)... anyways....

I'm not a programmer but have a joomla/CPG/SMF site that I want to use the functionality that CPMFetch provides.

What I would like would be to post results from CPMFetch into my wrapped CPM inside Mambo.   I've tried looking at the code (again, not a programmer) and there doesn't seem to be a way to get this to work.  It would be great.

Here's my site:  www.insanebunkers.com

Thanks in advance to anyone that wants to help/comment. 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: howie10 on February 20, 2006, 08:06:43 pm
Hi everyone.

I love the idea of this mod, - but i'm not sure it's going to work for me   ???

I have my CPG 1.4.1 running on a home server using Apache 2.0 and MYSQL5. I have got cftest.php working perfectly.   ;D

However, I want to show the images from the gallery on my ISP-hosted CGI space.

From reading the original docs and some of the forum postings, I suspect that images cannot be grabbed by a php page running on another server.
Can anyone confirm this?
Is there a known workaround? (ie.. using static http refs instead)   :-\

Appreciate any help.

Howie
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: soldstatic on February 20, 2006, 10:05:35 pm
Could someone help me track down how to eliminate the border around the images generated by cpm fetch?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dropmachine on February 20, 2006, 10:40:40 pm
Seems I am getting the same error as many others. I've done a search, and haven't found a fix that works yet.

I don't have PHPBB installed, if that helps.

cpmfetch_dao.php on line 710


Whats goin on? How do I fix this? newest version of CPM and Fetch installed...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: younk on February 20, 2006, 10:44:23 pm
i also get the:"
Code: [Select]
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /mounted-storage/home10/sub002/sc16206-UEQL/babez.dk/cpmfetch/cpmfetch_dao.php on line 710
Error as dropmachine. But i keep following this topic, and hope that someday there will be a fix!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Sasse on February 22, 2006, 04:22:56 pm
Same problem as younk and dropmachine!

Unknown column 'u.user_website' in 'field list'

I hope that there will be a fix, too!

Thx for any help!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: lisah on February 23, 2006, 12:53:38 am
Is it possible to display images only from certain categories?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Dakey on February 23, 2006, 08:09:03 pm
Same problem as younk and dropmachine!

Unknown column 'u.user_website' in 'field list'

I hope that there will be a fix, too!

Thx for any help!

Same problem for me...  :'(
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on February 23, 2006, 08:14:27 pm
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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dlkbailey on February 24, 2006, 02:36:54 am
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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Sasse on February 24, 2006, 08:01:02 am
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?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pelhrimak on February 25, 2006, 09:40:29 am
Code: [Select]
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.
Title: CpmFetch - some albums will not display?
Post by: tgelston on February 26, 2006, 05:15:02 pm
Here is the code

Code: [Select]
$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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: metamog on February 27, 2006, 11:44:22 pm
I get the same error as reply#661

"Unknown column..."


CPG 1.43 (security patched).

CPMfetch 1.62
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: metamog on February 28, 2006, 02:48:00 pm
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: fwe77 on March 01, 2006, 11:05:05 am
Sorry for my bad English!  :-\

Problem - cpm_viewRandomMedia - only one album is indicated!

Version - copperminefetch-1.6.2, CPG 1.4.3!

cftest.php :

Code: [Select]
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!

Code: [Select]
<?
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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on March 02, 2006, 01:08:08 am
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..
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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....
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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

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


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....
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Enc0der on March 03, 2006, 01:05:36 pm
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:
Code: [Select]
$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!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dropmachine on March 03, 2006, 03:19:47 pm
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!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: metamog on March 03, 2006, 03:45:31 pm
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



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

Thanks very much!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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 (http://www.ratemyscrapbook.net). Thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on March 07, 2006, 09:21:00 am
anycontent.php can be included on another page using PHP's include or require command unless it contains particular coppermine stuff.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jgsketch on March 07, 2006, 03:02:36 pm
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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on March 08, 2006, 06:58:38 am
CpmFetch doesn't use coppermine's functions, but functions of it's own.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on March 08, 2006, 07:30:09 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 (http://www.ratemyscrapbook.net). Thanks

Like what for example?

Vuud

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jgsketch on March 08, 2006, 02:29:24 pm
Quote
Like what for example?

Vuud

For example, I would like to get this page www.ratemyscrapbook.net/rateme.php (http://www.ratemyscrapbook.net/rateme.php) to show on a seperate mainpage that is not part of coppermine.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: lordprodigy on March 10, 2006, 11:45:00 pm
I get an error :(
Code: [Select]
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!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mikeyc on March 11, 2006, 01:32:56 am
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.
Title: Cpmfetch 1.6.2 in CPG 1.3.2 page shows only first 20 albums, then blank
Post by: webseamstress on March 11, 2006, 03:17:18 am
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...)
Title: High number albums not displaying - sorry , my bad
Post by: webseamstress on March 11, 2006, 04:11:08 am
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!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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
Title: No Thumbs (double forward slash is the problem)
Post by: Teasy on March 11, 2006, 07:12:30 pm
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.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: lordprodigy on March 12, 2006, 07:05:31 am
@ mikeyc: Thanks a lot. it worked.  :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on March 12, 2006, 08:33:07 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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pcboy123 on March 13, 2006, 09:46:05 pm
hello i just installed this... but i get an error!! :

these are the results:

Code: [Select]
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??
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on March 14, 2006, 01:13:21 am
hello i just installed this... but i get an error!! :

(..deleted..)

Code: [Select]
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pcboy123 on March 14, 2006, 03:57:55 am
thanks that fixed it for me now...
 i have a problem i just created a new .php file with this code

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


but i get this error:

Code: [Select]
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: blackwelldunn on March 16, 2006, 12:12:05 am
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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:
Code: [Select]
$objCpm->cpm_viewRandomMedia(2,3,$styleguide); 
Produces in output source code:
Code: [Select]
<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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: pcboy123 on March 17, 2006, 10:29:51 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:
Code: [Select]
$objCpm->cpm_viewRandomMedia(2,3,$styleguide); 
Produces in output source code:
Code: [Select]
<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...

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on March 18, 2006, 02:13:57 am
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: 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 !
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on March 19, 2006, 02:10:40 am
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

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on March 19, 2006, 01:05:53 pm
Allright, tnx for all the hard work !
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on March 22, 2006, 04:33:00 am
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:
Code: [Select]
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:
Code: [Select]
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.)
Code: [Select]
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
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on March 22, 2006, 02:36:15 pm
I've made a simple page using
Code: [Select]
require_once "./cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photos");

include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/coppermine");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
and at first I had the error Unknown column 'u.user_website' in 'field list'.  On following another tip about changing the /* */ around I've lost the error but it's not displaying any images.

Can someone explain what I've done wrong or missed out please

Ok, I've tested the cftest.php and get the following problems.  If I leave the /* */ as they are then I get the following message

"Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/ftp/simaviatorsuk.org/cpmfetch/cpmfetch_dao.php on line 710"

If I swap them both around to */ /* I get this error

"Parse error: parse error, unexpected '*', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/ftp/simaviatorsuk.org/cpmfetch/cpmfetch_dao.php on line 61"
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: soldstatic on March 22, 2006, 05:11:22 pm
stuarta, you shouldnt have */ /*... /* is a comment so youd basically be commenting out the rest of the code... instead you have comment out ie:

Code: [Select]
/*
commented stuff here
*/

certain parts of the code and un comment by totally deleting the /* and */ that is around other code.

HOWEVER

I too have the same problem where I switched the comments around, that got rid of the error msg, but now its just not showing any pics at all.

More specifically, as the cftest.php showed, my DOCUMENT_ROOT_PATH or whatever is "bad".
The Doc ROoT path that it displays was something ie:
Code: [Select]
/home/user/rootdirectory/
When I know that it needs to be:
Code: [Select]
/home/.otherthing/user/rootdirectory/
so where does DOCUMENT_ROOT_PATH get its value?? What do i need to change on this?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on March 22, 2006, 05:17:40 pm
ok so how should the /*'s be?

 I to had nothing showing when I first changed them round but thought I better make sure that the cdtest was working first before I went any further which is when I came across these problems.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: soldstatic on March 22, 2006, 05:22:26 pm
http://forum.coppermine-gallery.net/index.php?topic=19564.msg122063#msg122063
will tell you how to get the comments
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on March 22, 2006, 05:36:28 pm
ok I've put it back to

Code: [Select]
// 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';
*/

and get the message

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

I see that I have to comment and uncomment but at risk of being called a n00b, I'm unsure how to do this. :-[
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: soldstatic on March 22, 2006, 05:38:49 pm
Code: [Select]
// 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';
*/

should be

Code: [Select]
// 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';
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on March 22, 2006, 05:41:20 pm
right excellent that works thankyou.  Think I have it working now, just have dodgy thumbnails.  Think it is probably because my host is usng GD1.

Temp page I'm working on

http://www.simaviatorsuk.org/home6.php (http://www.simaviatorsuk.org/home6.php)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: larronni on March 22, 2006, 11:10:08 pm
I have installed CpmFetch and it is working just fine  :)
But now I want to do more.... I like to view the last xxx pictures from an album, and view the title on all the images.
So made a page, and entered : (And some more...)
$options = array("subtitle" => " %t",);
$objCpm1->cpm_viewLastAddedMediaFrom(6,4,32,$options);

But what I can't figure out, is how to get the picture and the title into a tabel.... Like :
|--------------|
|  Picture  |
|              |
| title        |
|--------------|
What I get from this code, is the picture, and the title under the picture.. So if the title is long, the picture moves to the right.....
Is it possbile to do this ??
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on March 23, 2006, 01:39:03 am
ok think I've just messed it up.

I decided to change my coppermine folder name to gallery.  I've changed the path in CP admin and the fetch test works fine, but my html page is now showing

ERROR: Path to Coppermine incorrect. (/var/www/html/simaviatorsuk.org/coppermine//include/config.inc.php)

It's still looking for the coppermine/include/config.inc.php file but not sure which file is looking for it.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: soldstatic on March 23, 2006, 02:25:01 am
did you change the path that the html page is looking for to the new path to cpmfetch and/or coppermine?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on March 23, 2006, 10:50:35 am
ok, I feel a prat now lol.  I've just opened up the php file I created and the path hadn't saved, changed it back and it works. Sure I saved it last night, but then it was 1.30am lol

Just got the colours to sort now.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: soldstatic on March 24, 2006, 06:11:24 am
so your cpm fetch works fine and you see the pics???

*beep* is wrong with mine...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on March 24, 2006, 09:47:22 am
yep works fine thankyou. Just got bad thumbnails which I'm assuming is down to GD1
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mcm on March 26, 2006, 11:16:21 am
OK .. I'm pulling my hair out over this .. hope someone can help!

I have coppermine in a subdomain called http://thaiexpat.mcmweb.info .. so I put the following in the index.php of the subdomain.

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

And I get the error of ...

ERROR: Path to Coppermine incorrect. (/home/content/m/c/m/mcm58/html/gallery//include/config.inc.php)

It thinks the gallery folder is in the main site .. i.e  "http://mcmweb.info/gallery" .. and also .. I don't understand why there are two slashes after "gallery"

So I changed it to ...

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

Now it can find the coppermine gallery .. but no thumbnails show and I just get links with incorrect urls. That is.. it sticks in an extra folder called "thaiexpat"

It thinks the url to the gallery is "http://thaiexpat.mcmweb.info/thaiexpat/gallery/"

instead of "http://thaiexpat.mcmweb.info/gallery"

I tried a test page in the root directory (http://mcmweb.info) with ..

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

and that works perfectly.

Anyone know how I can get it to work in the index.php of the subdomain????? HELP!!!

Thanks
 ;D
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on March 28, 2006, 01:24:54 am
ok to get round a problem of my host not support GD2, i've temporarily installed coppermine and fetch on a free host.  I'm having difficulty though linking across to it. Is this possible?

My main site is www.simaviatorsuk.org, but I've temporarily installed coppermine to http://stuarttest.awardspace.com/gallery and http://stuarttest.awardspace.com/cpmfetch.

Thanks
Title: Displaying whole album from CPG
Post by: dsnodgrass on March 30, 2006, 06:18:48 pm
There are many very elegant things that CPMFetch does but actually, I don't need them right now. All I want to do is display a Coppermine album complete, intact, and UNrandomized on a different web page.

Can anyone point me to some code fragment that will do this?  I have looked through the docs and these pages and seem to have missed how to do something rather simple.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: doktor k on April 01, 2006, 05:51:47 am
I just installed cpmfetch and ran the test page and got the following results and error message:

http://www.mypreciouspaws.net/cpmfetch/cpmfetch/cftest.php

5   You set your partial URL to /photos   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 = FreeBSD hostingprod.com 4.10-YAHOO-20040606 FreeBSD 4.10-YAHOO-20040606 #0: i386   INFO
40   WebServer = Apache/1.3.33 (Unix) FrontPage/5.0.2.2510 mod_fastcgi/2.4.2   INFO
45   PHP Version = 4.3.11   INFO
55   DOCUMENT_ROOT: /   INFO
60   C_DOCUMENT_ROOT: Not found   INFO
65   doc_root: Not found (IIS Servers only)   INFO
70   SCRIPT_FILENAME: /cpmfetch/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
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /cpmfetch/cpmfetch/cpmfetch_dao.php on line 710

 do I need to do some with MySQL page or do something else

Thanks in advance for your assistance

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on April 01, 2006, 03:33:07 pm
I just installed cpmfetch and ran the test page and got the following results and error message:

http://www.mypreciouspaws.net/cpmfetch/cpmfetch/cftest.php
...

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

...

doktor k,
This is a well documented problem in both the provided doc and this thread...  A change is needed in the dao file if running CPG 1.4.
...
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.

vuud,
any plans for a more permanent fix for this?  or at least inverting the default so current version cpg users don't run into this?

Greg
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on April 01, 2006, 05:58:33 pm
I need some help here too please....
(pulling my hair out too mcm...)

Still not able to display images at all in one of my installations, an empty table is produced...
Added "$objCpm->cpm_setDebugMode('true');" to the script, and appears it is finding 0 rows....

Using supplied cftest.php script which is issuing:
Code: [Select]
$objCpm->cpm_viewRandomMedia(2,3,$styleguide);
and producing output in page source of:
Code: [Select]
<p><span class='subtitle'>Trying to display some images:</span></p>
<p>Your installation seems correct so far, you should see a small grid of thumbnails from your gallery</p><!-- SQL : SELECT  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 FROM  sk_cpg_pictures as p, sk_cpg_albums as a, sk_cpg_users AS u  WHERE a.aid = p.aid AND p.owner_id = u.user_id AND p.approved='YES'   and a.visibility = 0  ORDER BY rand(836697) LIMIT 6
ROWS: 0
 --><table  >
<tr>

</tr>
<tr>

</tr>

</table>
Similar results in other tests as well...

Galley is at http://gallery.gmcdesign/com
Test script is at http://gallery.gmcdesign.com/cpmfetch/cftest.php

Not sure where to look next - can't find any differences between my two installs...  Help is greatly appreciated....

(Edit addition.... One difference I just thought of... the failing site is my OLDEST cpg install... While they are all running 1.4.3 now - the failing site is the only one that used to be 1.2.1...  Could there be something between 1.2.1 and 1.4.3 that didn't get applied properly during the upgrade that CPMFETCH depends on???  Was a direct upgrade from 1.2 to 1.4.3...)

(Still getting incorrectly formed img and link statements on another site... but at least getting output there....)

Thanks,
Greg
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: MDkai on April 01, 2006, 06:34:38 pm
Just a small hint:


I had the same problem like doktor K
Quote
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /cpmfetch/cpmfetch/cpmfetch_dao.php on line 710

After reading gmc's tip i found the /* */ on a different location (between the beta part)
I switched the position but got a parsing error.

After deleting the two /* */ i had no problems at all and the image from my gallery was there ;)
Just my two cents
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on April 01, 2006, 07:03:05 pm
After reading gmc's tip i found the /* */ on a different location (between the beta part)
I switched the position but got a parsing error.

After deleting the two /* */ i had no problems at all and the image from my gallery was there ;)
Just my two cents
Because of the way its coded - two variable assignment statements - removing all the comment tags (/* */) happens to work as well... It first assigns the old (pre 1.4) values - then reassigns the new (1.4+) values...
The intent was comment out the old - and uncomment the new - but as you said - it works with no comments as well...

Greg
Title: having error plz help
Post by: niks_007 on April 01, 2006, 08:28:49 pm
Hi Friends,
   When i try to fatch CPG i got following error.


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

See the cftest.php page...

http://www.bollywoodplus.co.in/fatch/cftest.php

Thanks
I hope some one will help me...
Nishant
Title: Re: having error plz help
Post by: gmc on April 01, 2006, 08:43:35 pm
Hi Friends,
...

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

Thanks
I hope some one will help me...
Nishant

Please scroll down to post 717... or any number of others below that address this problem...
Greg
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: niks_007 on April 01, 2006, 10:17:42 pm
hi....
       The CF is working but i want following

To get pics from last updated three albums from cat=5

how could i can get that


I am using follwing code but it is returing images from last updated album. and i want pics from last three updated albums from cat=5
Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/wallpapers');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMediaFrom (1,4, "cat=5");
$objCpm->cpm_close();
?>



and below image its Tital

What code i need to made

Niks...

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: doktor k on April 01, 2006, 11:51:15 pm
Thank MDKai,

I removed the tags and it did the trick
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on April 02, 2006, 04:19:21 am
Still not able to display images at all in one of my installations, an empty table is produced...
Added "$objCpm->cpm_setDebugMode('true');" to the script, and appears it is finding 0 rows....

Some further testing and some progress...
In disecting and testing the SQL returning 0 rows:
Code: [Select]
SELECT  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 FROM  sk_cpg_pictures as p, sk_cpg_albums as a, sk_cpg_users AS u  WHERE a.aid = p.aid AND p.owner_id = u.user_id AND p.approved='YES'   and a.visibility = 0  ORDER BY rand(836697) LIMIT 6
The WHERE clause eliminating all the rows was "p.owner_id = u.user_id"
For some reason all my pics had an owner_id of '0'... and the only user defined is the admin with a user_id of '1'...
No idea how or why that happened (and not a CPMFETCH problem - maybe something to do with the 1.2.2 to 1.4.3 upgrade....)
After reviewing my other sites, and backing up the database (gallery has NO USER PICS) - issued following SQL:
Code: [Select]
UPDATE `sk_cpg_pictures` SET `owner_id` = '1';

and now at least something appears....  and appeared to cause no other problems....
Have to see what happens on next batch load of pics...

Next post for the remaining problem....
Greg
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on April 02, 2006, 04:35:43 am
OK... slugged through the last one... now down to a problem with generated pic urls...
Generated source code from cftest.php:
Code: [Select]
<p>Your installation seems correct so far, you should see a small grid of thumbnails from your gallery</p>
<table  >
<tr>
<td class="photoclip"><a href="/displayimage.php?pos=-422"  class="photoclip" ><img  src="//albums/pictures/2005events/thumb_D05_1976.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>0 views</td><td class="photoclip"><a href="/displayimage.php?pos=-49"  class="photoclip" ><img  src="//albums/pictures/2001/thumb_slootto.jpg" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>2.8 views</td><td class="photoclip"><a href="/displayimage.php?pos=-574"  class="photoclip" ><img  src="//albums/pictures/2004events/thumb_DSC_2443.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>0 views</td>
</tr>
<tr>
<td class="photoclip"><a href="/displayimage.php?pos=-318"  class="photoclip" ><img  src="//albums/pictures/2005meetings/thumb_D05_0098.jpg" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>0 views</td><td class="photoclip"><a href="/displayimage.php?pos=-261"  class="photoclip" ><img  src="//albums/pictures/2004events/thumb_DSC_1615.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>0 views</td><td class="photoclip"><a href="/displayimage.php?pos=-682"  class="photoclip" ><img  src="//albums/pictures/2004events/thumb_DSC_2699.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>2 views</td>
</tr>
</table>
Notice the "src=//albums/pictures/..."
Can't get the correct src to appear with anything I've tried (short of capturing output buffer and manipulating before display).

Gallery is at the root of a subdomain:  http://gallery.skymasters.org
Test script is at http://gallery.skymasters.org/cpmfetch/cftest.php
Partial URL variable in cftest.php is set to:  $ChangeThisToYourPartialUrlToCPG = "/";   

cfimageget.php and cfig_random.php both work fine...  but prefer the features and flexibility of generating the full table of info.

Suggestions on how to tackle this one are welcome....
Thanks!
Greg
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: niks_007 on April 02, 2006, 06:29:36 am
hi....
       The CF is working but i want following

To get pics from last updated three albums from cat=5

how could i can get that


I am using follwing code but it is returing images from last updated album. and i want pics from last three updated albums from cat=5

Code:
Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/wallpapers');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMediaFrom (1,4, "cat=5");
$objCpm->cpm_close();
?>


and below image its Tital

What code i need to made

Niks...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on April 02, 2006, 05:43:39 pm

Generated source code from cftest.php:
Code: [Select]
...
<img  src="//albums/pictures/2005events/thumb_D05_1976.JPG"
Notice the "src=//albums/pictures/..."
Can't get the correct src to appear with anything I've tried (short of capturing output buffer and manipulating before display).

Well... some RTFC (since the manual didn't have this one...) found a function cpm_OverridePathToAlbums in cpmfetch.php....
Added:
Code: [Select]
$objCpm->cpm_OverridePathToAlbums('/albums');
to cftest.php - and it shows pics now from the same subdomain....
Not sure why I would need to do that... but it works...

Haven't gotten the right combo yet for crossing subdomains... but trying...


mcm - between this function and cpm_OverrideUrlToCoppermine ... I think you can get yours to work....

Greg
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: gmc on April 02, 2006, 05:57:30 pm
hi....
       The CF is working but i want following

To get pics from last updated three albums from cat=5
...
I am using follwing code but it is returing images from last updated album. and i want pics from last three updated albums from cat=5

Code:
Code: [Select]
<?php
...
$objCpm->cpm_viewLastAddedMediaFrom (1,4, "cat=5");
...
?>
...
Niks...

Niks,
It can take much longer than 8 hours to get a reply...  Not an expert - but I don't see a single call way to get what you ask....

The cpm_viewLastAddedMediaFrom function will give the last media in the category as you have it coded... regardless of what album or how many are from each album....
Don't know how many albums you have in the category... but to get a pic from each, you would need to call cpm_viewLastAddedMediaFrom once for each album:
Code: [Select]
$objCpm->cpm_viewLastAddedMediaFrom (1,1, "album=x");
Put a table around the calls to format it nicely - since cf willl return a table for each call...

If you have more albums than you want pics - well then you need some data from the tables to get the most recent pics... idenitfy the albums they are in.... and then make the calls or just format it yourself...

You didn't give me enough time to try to figure out code for that...  and still trying to figure out my last issue....
Greg
Title: Showing the first n thumbnails from the last album created (over any category)
Post by: rtpHarry on April 02, 2006, 09:43:48 pm
I am making a website which will show photo's from music events, they are broken into different categories for nights run by different people, each event (a single night / date) gets its own album. I need to display the last album added over any category on the front page. There are lots of functions but I dont seem to be able to do this particular task.

What I intend to do is make a call to the code for
Code: [Select]
function cpm_viewLastAddedMediaFrom($rows, $columns, $source, $options="") and pass through the id of the last album added to the system, ie:

Code: [Select]
$objCpm->cpm_viewLastAddedMediaFrom (2,4, "album=AVARIABLECONTAININGLASTADDEDALBUMID");
So as u may have guessed by now my question is does anybody know a snippet of code that will extract the id of the last added album? Would just finding the highest album ID work or is there a possiblity that lower numbers may be re-used if for example an old album has been deleted?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: TroutSlayer on April 04, 2006, 12:24:39 am
Hi!

I'm still trying to get a firm grip using all the different functions, options, source variables included with cpmfetch, but so far I like it.  Thank you.  I tried searching the forums for this, but couldn't come up with anything.  The problem I'm having is getting the functions to work on albums numbers greater than 36.

This code works fine:
Code: [Select]
<?
 include "./cpmfetch/cpmfetch.php";
 $objCpm = new cpm("/Gallery");
 $picOptions = array("imagestyle" => "cpg", "imagelink" => "album", "alttag" => "%a");
 $picDesc = array("noimage" => "", "subtitle" => "%d", "tablestyle" => "tableGen");

   // THUMBNAIL
   $objCpm->cpm_viewRandomMediaFrom(1,1, "album=36", $picOptions);

   // DESCRIPTION
   $objCpm->cpm_viewRandomMediaFrom(1, 1, "album=36", $picDesc);

   // PICTURE COUNT
   $objCpm->cpm_listMediaCountFrom("album=36");


This almost identicle code does not work:

Code: [Select]
// THUMBNAIL
   $objCpm->cpm_viewRandomMediaFrom(1,1, "album=38", $picOptions);

   // DESCRIPTION
   $objCpm->cpm_viewRandomMediaFrom(1, 1, "album=38", $picDesc);

   // PICTURE COUNT
   $objCpm->cpm_listMediaCountFrom("album=38");
?>

The pieces of code are on the same page.  Top piece works, bottom one doesn't.  Any help or explanation would be greatly appreciated.  Thank you...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on April 04, 2006, 10:35:21 am
sorry to ask again, but how would I go about using this with my gallery on one host with a database but display the last added on another host.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daworm on April 04, 2006, 04:39:44 pm
Ok - i've browsed through a lot of posts on here - but I can't seem to find the specific answer to my issue.

I have resolved a few other issues, for exampe that funny "call to non-function" or whatever it was, among other things.
But as yet - I can't get it to generate HTML and display my gallery.

I've tried editing a few files suchs as "cfimageget.php" and changing the urltocpm value, and ... there was one other change - but I can't quite remember it (it's 12:30AM here and I'm dead tired)

If you could even point me to a post that addresses this exact issue I'd be most grateful.

Using the latest "stable" release from the CpmFetch website - I've got it 'mostly' working. Just can't get the turn in part.  :(
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 04, 2006, 04:48:48 pm
sorry to ask again, but how would I go about using this with my gallery on one host with a database but display the last added on another host.

You could either use cfimageget (that comes with it) or you could use a php include to run a php file on the host from the remote server (which may or may not work depending on php permissions). 

Should be something in the docs about that.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 04, 2006, 04:55:04 pm
Hi!

I'm still trying to get a firm grip using all the different functions, options, source variables included with cpmfetch, but so far I like it.  Thank you.  I tried searching the forums for this, but couldn't come up with anything.  The problem I'm having is getting the functions to work on albums numbers greater than 36.

This code works fine:
Code: [Select]
<?
 include "./cpmfetch/cpmfetch.php";
 $objCpm = new cpm("/Gallery");
 $picOptions = array("imagestyle" => "cpg", "imagelink" => "album", "alttag" => "%a");
 $picDesc = array("noimage" => "", "subtitle" => "%d", "tablestyle" => "tableGen");

   // THUMBNAIL
   $objCpm->cpm_viewRandomMediaFrom(1,1, "album=36", $picOptions);

   // DESCRIPTION
   $objCpm->cpm_viewRandomMediaFrom(1, 1, "album=36", $picDesc);

   // PICTURE COUNT
   $objCpm->cpm_listMediaCountFrom("album=36");


This almost identicle code does not work:

Code: [Select]
// THUMBNAIL
   $objCpm->cpm_viewRandomMediaFrom(1,1, "album=38", $picOptions);

   // DESCRIPTION
   $objCpm->cpm_viewRandomMediaFrom(1, 1, "album=38", $picDesc);

   // PICTURE COUNT
   $objCpm->cpm_listMediaCountFrom("album=38");
?>

The pieces of code are on the same page.  Top piece works, bottom one doesn't.  Any help or explanation would be greatly appreciated.  Thank you...


Hmmm, Someone else mentioned this awhile back - I thought they were nutz.  I will check it out a later hopefully.  Its been crazy busy lately so I've not had time for support or finishing the new release.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 04, 2006, 04:57:53 pm
Ok - i've browsed through a lot of posts on here - but I can't seem to find the specific answer to my issue.

I have resolved a few other issues, for exampe that funny "call to non-function" or whatever it was, among other things.
But as yet - I can't get it to generate HTML and display my gallery.

I've tried editing a few files suchs as "cfimageget.php" and changing the urltocpm value, and ... there was one other change - but I can't quite remember it (it's 12:30AM here and I'm dead tired)

If you could even point me to a post that addresses this exact issue I'd be most grateful.

Using the latest "stable" release from the CpmFetch website - I've got it 'mostly' working. Just can't get the turn in part.  :(


Sorry, what was the original issue?  I went back a few pages and could not find other posts.

Thanks

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dsnodgrass on April 04, 2006, 10:30:01 pm
Still looking for a way to display a specific album (in a non-randomized fashion) on another website using CpmFetch. Can it do this?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daworm on April 05, 2006, 01:26:55 am

Sorry, what was the original issue?  I went back a few pages and could not find other posts.

Thanks


Ah whoops - sorry. 
Posted that about 5 minutes before I went to bed.

The issue is, I can't get it to pull any images from my gallery.

I'm advanced at computer knowledge, beginner when it comes to coding php - I know what code is doing when I look at it, but writing it from scratch?  I need to learn.

Here is my file

http://www.ariseguild.net/default.php

My Gallery

http://www.ariseguild.net/gallery

If you look at the coding of default.php you won't see any output of html coding or anything to display images from my gallery.
But the php coding is there in the file itself.
I've used the default example that was shown on another part of your site, and I edited it to show only 1 image.

--
There were people with other issues at the start of the thread which I used to resolve my other issues (that being errors) but can't find a specific post about it NOT generating any images.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 05, 2006, 04:20:35 am
Still looking for a way to display a specific album (in a non-randomized fashion) on another website using CpmFetch. Can it do this?

"non-randomized fashon"

Can you word this differently.  What do you want?

Thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 05, 2006, 06:03:43 am
The issue is, I can't get it to pull any images from my gallery.

Here is my file

http://www.ariseguild.net/default.php

My Gallery

http://www.ariseguild.net/gallery

If you look at the coding of default.php you won't see any output of html coding or anything to display images from my gallery.
But the php coding is there in the file itself.
I've used the default example that was shown on another part of your site, and I edited it to show only 1 image.


Not pulling images can be caused by soooo many things...

I really need to see the code you are using to pull the images.  Please post it here. 

Thanks

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daworm on April 05, 2006, 01:54:10 pm
Not pulling images can be caused by soooo many things...

I really need to see the code you are using to pull the images.  Please post it here. 

Thanks



Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>

As I said - default code, just changed to (1,1)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 06, 2006, 02:38:08 am
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>

As I said - default code, just changed to (1,1)

Yikes.  Hmmmm.

Two things:

#1) Are you running some sort of content management system, or is that page just straight php there?

#2) Try adding $objCpm->cpm_getMediaCount( ); just after the "new cpm" line.  It should print a number...

It won't fix your problem, but will give me some more information to figure it out from.

Vuud
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Maestro1 on April 06, 2006, 08:04:35 am
I have a problem installing it.

Quote from: cftest.php
75  | DOCUMENT_ROOT is not a good match | BAD

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

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

I've changed cpmfetch_dao.php.
var $cpm_table_prefix = "mcg_"; //witch is table prefix

What to do?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on April 06, 2006, 12:56:18 pm
Hi Vuud,


Im trying to have two cpmfetch blocks on my site, both with differtent divs around them to position them.
The thing is that when i add a second <code> ?php
include "./cpmfetch.php";
$objCpm = new cpm("/flix");
$objCpm->cpm_viewLastAddedMedia(1,1,array("tablestyle" => "test1",'imagewidth' => '300',"imagestyle" => "test1","imagesize" => "int"));

$objCpm->cpm_close();
?>
</div>

</code>

on my site it gives me the Fatal error: Cannot redeclare class cpm in error. How can i have multiple cpmfetch blocks, that are totally seperate in styling ?


Cheers !
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: MadMarian on April 06, 2006, 01:22:36 pm
Okay, just another "config file not found"-error. I read through all the thread and found some people with the same problem, but still don't seem to be able to solve it.

This the path to my cftest.php
http://www.screamsilence.net/cpmfetch/cftest.php (http://www.screamsilence.net/cpmfetch/cftest.php)

Versions of cpg and cpmFetch are the very latest since I downloaded both just yesterday.

The settings in cftest.php are correct as I re-read the doc time and again. My domain is www.screamsilence.net and my cpg is in /gallery2. Very simple. But still doesn't work.
As a matter of fact, screamsilence.net is a subdomain of screamsilence.de pointing to screamsilence.de/net. I think this might be the problem.
What can I do? I really really want to use this tool since it's exactly what I was looking for.

Greetz,
Mad
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 06, 2006, 02:45:09 pm
I have a problem installing it.

I've changed cpmfetch_dao.php.
var $cpm_table_prefix = "mcg_"; //witch is table prefix

What to do?

Read the release notes... Its in there what to do with this error, its also been posted here like 20 times.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 06, 2006, 02:47:13 pm
Hi Vuud,


Im trying to have two cpmfetch blocks on my site, both with differtent divs around them to position them.
The thing is that when i add a second <code> ?php
include "./cpmfetch.php";
$objCpm = new cpm("/flix");
$objCpm->cpm_viewLastAddedMedia(1,1,array("tablestyle" => "test1",'imagewidth' => '300',"imagestyle" => "test1","imagesize" => "int"));

$objCpm->cpm_close();
?>
</div>

</code>

on my site it gives me the Fatal error: Cannot redeclare class cpm in error. How can i have multiple cpmfetch blocks, that are totally seperate in styling ?


Cheers !

Easiest thing to do is to move the include and the new to the top of the page, move the close to the bottom.

Now make calls with the

$objCpm->cpm_viewLastAddedMedia(1,1,array("tablestyle" => "test1",'imagewidth' => '300',"imagestyle" => "test1","imagesize" => "int"));

where ever you want (in your case two different places).  Best thing is that this only opens the database once.  You can change styling or anything on every call you make.

Hope that helps
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 06, 2006, 02:49:56 pm
Okay, just another "config file not found"-error. I read through all the thread and found some people with the same problem, but still don't seem to be able to solve it.

This the path to my cftest.php
http://www.screamsilence.net/cpmfetch/cftest.php (http://www.screamsilence.net/cpmfetch/cftest.php)

Versions of cpg and cpmFetch are the very latest since I downloaded both just yesterday.

The settings in cftest.php are correct as I re-read the doc time and again. My domain is www.screamsilence.net and my cpg is in /gallery2. Very simple. But still doesn't work.
As a matter of fact, screamsilence.net is a subdomain of screamsilence.de pointing to screamsilence.de/net. I think this might be the problem.
What can I do? I really really want to use this tool since it's exactly what I was looking for.

Greetz,
Mad


Good news is you are probably right as to what is causing your problem. Crossing subdomains is just plain painful.  Do you know the full file paths to the roots of both domains?   

Can you get this working on the same subdomain as the gallery?  If so you could do a PHP import (?) and get the images that way.   Could be easier than mucking about with subdomains and directories and stuff.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Maestro1 on April 07, 2006, 07:19:59 am
Read the release notes... Its in there what to do with this error, its also been posted here like 20 times.


I've read and corrected the error... I still have error 75... How to correct that?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daworm on April 07, 2006, 09:48:48 am
Yikes.  Hmmmm.

Two things:

#1) Are you running some sort of content management system, or is that page just straight php there?

#2) Try adding $objCpm->cpm_getMediaCount( ); just after the "new cpm" line.  It should print a number...

It won't fix your problem, but will give me some more information to figure it out from.

Vuud


Not running CMS - and seeing as I have to head out now - I'll try that in a few hours when I'm home (forgot to check this site earlier.)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 07, 2006, 02:05:51 pm
I've read and corrected the error... I still have error 75... How to correct that?

What kind of server are you running?

Are you doing some sort of crossing subdomains thing?

Is CFTest showing images?  If so, ignore the error...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Maestro1 on April 07, 2006, 10:00:49 pm
Running Apache web server v1.3... It is shared hosting. CPMFetch is not showing anything in test file. Database is mySQL v4, on other server and domain...
Need more info?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 08, 2006, 04:27:46 am
Running Apache web server v1.3... It is shared hosting. CPMFetch is not showing anything in test file. Database is mySQL v4, on other server and domain...
Need more info?

Please PM me the URL to your cftest.php file.  It should be working.  Something is strange with that document_root though
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kirkage on April 08, 2006, 01:09:43 pm
hello, cpmfetch works on my old webspace with linux server perfect. during a change of the webspace provider, my page moved to a Windows Server IIS 6.0.

Cpmfetch doesn't work. I have installed cpg in the root directory ( www.xxxx.com/index.php ), the path on the windows server is C:\XUnitConf\web32\html\xxxx\ .

in cftest.php i wrote "$ChangeThisToYourPartialUrlToCPG = "/";" but when i run cftest.php i get Error 55, "DOCUMENT_ROOT: Not found BAD" and Error 80 "CPG Config file not found: //include/config.inc.php"

also the errors:

Notice: Undefined index: DOCUMENT_ROOT in C:\XUnitConf\web32\html\xxxx\cftest.php on line 213

Notice: Undefined index: DOCUMENT_ROOT in C:\XUnitConf\web32\html\xxxx\cftest.php on line 214
 75 DOCUMENT_ROOT is a good match PASS

Notice: Undefined index: DOCUMENT_ROOT in C:\XUnitConf\web32\html\xxxx\cftest.php on line 221
 

where is the error?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 08, 2006, 04:16:21 pm
hello, cpmfetch works on my old webspace with linux server perfect. during a change of the webspace provider, my page moved to a Windows Server IIS 6.0.

Cpmfetch doesn't work. I have installed cpg in the root directory ( www.xxxx.com/index.php ), the path on the windows server is C:\XUnitConf\web32\html\xxxx\ .

in cftest.php i wrote "$ChangeThisToYourPartialUrlToCPG = "/";" but when i run cftest.php i get Error 55, "DOCUMENT_ROOT: Not found BAD" and Error 80 "CPG Config file not found: //include/config.inc.php"

also the errors:

Notice: Undefined index: DOCUMENT_ROOT in C:\XUnitConf\web32\html\xxxx\cftest.php on line 213

Notice: Undefined index: DOCUMENT_ROOT in C:\XUnitConf\web32\html\xxxx\cftest.php on line 214
 75 DOCUMENT_ROOT is a good match PASS

Notice: Undefined index: DOCUMENT_ROOT in C:\XUnitConf\web32\html\xxxx\cftest.php on line 221
 

where is the error?


The error is that IIS does not provide a document root variable so cpmfetch cannot determine what the path to your web directory is.  A few solutions  in the past have been to add in one that tells the system what it would be before the php calls the cpmgfetch object.

So something like:

$_REQUEST['DOCUMENT_ROOT'] = "C://what/ever/the/path/is";

Personally I would switch providers if they ever jumped me to a windows server, but thats just my 15 years of IT experienece talking.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jaiak on April 09, 2006, 12:57:25 am
Hello and sorry for my bad english :P

I have a coppermine 1.4.4 installed on www.ribaforada.net/fotos bridged with phpbb2.0.19 in www.ribaforada.net/foro

I comment the lines in cpmfetch_dao.php and i not get error but don't thumbnails appear in the web page.

Here is my test file:

http://www.ribaforada.net/cpmfetch/cftest.php

My prefix images are the defaults prefix, (thumb_) ...

Can you help me??
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daworm on April 09, 2006, 03:10:56 am
Not running CMS - and seeing as I have to head out now - I'll try that in a few hours when I'm home (forgot to check this site earlier.)

Sorry Vuud - no changes

http://ariseguild.net/default.php

I've moved the coding so it sits outside my table below it all (incase my table was messing it up) but no go.

EDIT:
I might redo it - see if that helps.

:EDIT 2:
Re-done it all - and I STILL can't get it to work.
I've tried adding in the DB User/Pass, removing it - allowing access to all file regardless of being hidden or not, have set the variable to /gallery/ from /photos/.

This one has me REALLLLLLY stumped.
Also - coding is back inside the bottom middle cell.

:EDIT 3:
Looked through all the php files that I could and tried to see if anything I could see made sense (none did)

Whatever the reason, it just isn't pulling data from the gallery and parsing it.
In fact, the commands don't seem to be parsing anything at all from what I can tell. :s
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 09, 2006, 08:19:13 am
Sorry Vuud - no changes

http://ariseguild.net/default.php

I've moved the coding so it sits outside my table below it all (incase my table was messing it up) but no go.

EDIT:
I might redo it - see if that helps.

:EDIT 2:
Re-done it all - and I STILL can't get it to work.
I've tried adding in the DB User/Pass, removing it - allowing access to all file regardless of being hidden or not, have set the variable to /gallery/ from /photos/.

This one has me REALLLLLLY stumped.
Also - coding is back inside the bottom middle cell.

:EDIT 3:
Looked through all the php files that I could and tried to see if anything I could see made sense (none did)

Whatever the reason, it just isn't pulling data from the gallery and parsing it.
In fact, the commands don't seem to be parsing anything at all from what I can tell. :s

Well, good effort. 

Your not bridged with something are you?  I just remember thats a popular problem for this issue....





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daworm on April 09, 2006, 10:07:31 am
Well, good effort. 

Your not bridged with something are you?  I just remember thats a popular problem for this issue....

Yeah - I am bridged.
Forgot about that.

Are you able to work around that?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jaiak on April 09, 2006, 03:05:14 pm
Hello!!

The mistakes is in the bridged !!

In the same server, other domain, and coppermine without bridged show the thumbnails correcly:

http://www.quadomingueros.com/cpmfetch/cftest.php

What I nedd edit in my coppermine and phpBB bridgeg accoutn in other domain?

Regards from spain
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 09, 2006, 06:08:04 pm
Yeah - I am bridged.
Forgot about that.

Are you able to work around that?


Basically what happens is that when you are bridged, coppermine no longer creates users in its own tables.  So when we try to retrieve user info, none are there and no image is returned.

There have been a lot of posts on this, but basically you can create some new users directly in coppermine so that there are some there.  For example, if you have three users in the bridged product, then create three bogus users in coppermine.

If you have many, you may want to find some of the other solutions here.  Some involve changing the code base, which I don't recommend.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 09, 2006, 06:08:42 pm
Hello!!

The mistakes is in the bridged !!

In the same server, other domain, and coppermine without bridged show the thumbnails correcly:

http://www.quadomingueros.com/cpmfetch/cftest.php

What I nedd edit in my coppermine and phpBB bridgeg accoutn in other domain?

Regards from spain

See the other posting here
http://forum.coppermine-gallery.net/index.php?topic=19564.msg139796#msg139796
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jaiak on April 09, 2006, 07:03:14 pm
Hello

Ok. But if I have the coppermine bridgeg... how can I add users?

Is necessary "desbridged", add the users, and after bridgeg again?

This users, are the same users that uploads pictures in the gallery? what users??

Thanks in advance!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jaiak on April 10, 2006, 12:19:02 am
Hello

I add a "adsfasdf" user in my coppermine, and appear the thumbnails in the test file... is all right??

Thanks for all!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 10, 2006, 05:00:17 am
Hello

I add a "adsfasdf" user in my coppermine, and appear the thumbnails in the test file... is all right??

Thanks for all!

Yeah, whatever you add in as the bogus users would appear as the owner name if you have that displayed.

Otherwise it seems okay... make sure you have added enough users to cover the number of users in the bridged package

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kirkage on April 10, 2006, 11:04:57 am

The error is that IIS does not provide a document root variable so cpmfetch cannot determine what the path to your web directory is.  A few solutions  in the past have been to add in one that tells the system what it would be before the php calls the cpmgfetch object.

So something like:

$_REQUEST['DOCUMENT_ROOT'] = "C://what/ever/the/path/is";

Personally I would switch providers if they ever jumped me to a windows server, but thats just my 15 years of IT experienece talking.


can you help me? which parts i must change and where must i put "$_REQUEST['DOCUMENT_ROOT'] = "C://what/ever/the/path/is";" ??

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jaiak on April 10, 2006, 10:26:47 pm
Yeah, whatever you add in as the bogus users would appear as the owner name if you have that displayed.

Otherwise it seems okay... make sure you have added enough users to cover the number of users in the bridged package

Hello again

I add one only "random user", in my phpbb has more thank 400 users registered, but onlu 4 o 5 users upload pictures...

What I need do ?? with one only user added i think that funcionally ok



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 10, 2006, 10:33:38 pm
Hello again

I add one only "random user", in my phpbb has more thank 400 users registered, but onlu 4 o 5 users upload pictures...

What I need do ?? with one only user added i think that funcionally ok


I *think* that the user ID assigned to a given picture must have an ID in the coppermine table.  But if you think its working, thats good with me.  Basically it will not display from those that are not in the table.

But the next release should fix this problem
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 10, 2006, 10:38:10 pm
can you help me? which parts i must change and where must i put "$_REQUEST['DOCUMENT_ROOT'] = "C://what/ever/the/path/is";" ??



You need to have that $_REQUEST thing in before calling the "new" call to cpmfetch.  In the cftest.php file it would be somewhere near the top - aside from that you need to change the "C://what/ever/the/path/is"; to the path to your directory.  I have no idea what that is so i can't help you.  I really don't support windows web servers for this software, but it can be done.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daworm on April 11, 2006, 02:32:24 pm
Oh cool - so if I add 10 random users to the coppermine it'll display images from the first 10 people on the forums?

I think I could live with that.

The users keeps growing on the forums though - it's about 60 people atm so... yeah.

-------
I think I'll wait till an update comes :-)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 11, 2006, 04:17:36 pm
Oh cool - so if I add 10 random users to the coppermine it'll display images from the first 10 people on the forums?

I think I could live with that.

The users keeps growing on the forums though - it's about 60 people atm so... yeah.

-------
I think I'll wait till an update comes :-)


I will try to hurry
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 11, 2006, 04:21:00 pm
Running Apache web server v1.3... It is shared hosting. CPMFetch is not showing anything in test file. Database is mySQL v4, on other server and domain...
Need more info?

Got your cftest url... strange but it should work.

Do you have coppermine bridge with anything?

That could cause your problem - but the bad document root is okay from what I can tell...  strange, but it finds the config file later which is what that is really used for.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Vanceone on April 11, 2006, 05:26:43 pm
Interesting topic.  :D   I admire your patience, vuud, and thanks for the software.  I'm running IPB 2.1.4, Coppermine 1.4.3, and CPMfetch 1.6.2.   I initially had problems with only getting a few pictures pulled from several of my categories, but after reading this topic, it was most likely the bridge to IPB.  And indeed, it was.  The relevant table name is ibf_members; the field is "id".  So, I just renamed your query appropriately, like in the phpbb examples previously given.  Works great.  Find and replaced all ten instances.    I get my latest pictures now. 

The problem is I get three copies of them, usually.  Someone else had this same problem a couple of months ago, but as I recall it was never addressed. 

More info, as you request:  :D   Running apace 1.3.3, PHP 4.4.1.  Links:  My gallery is www.harmonyforever.com/cpg143/.   Example page displaying problem is this:  www.harmonyforever.com/recent_fanart.php.  While this is meant to be a plugin to my CMS (Subdreamer), this is not inside subdreamer yet.  (interestingly enough, though, it works fine there--as in it displays all of these same images; but just multiple copies of them).  Running this code:

Code: [Select]
<?

error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on

require_once "./cpmfetch/cpmfetch.php";
$pict = new cpm("/cpg143");
$pict->cpm_unlock_private(false);
$pict->cpm_setDebugMode(true);
$last_source = "cat=2,3,11,8,9,10";
$pict->cpm_viewRandomTopRatedMediaFrom("cat=3", 4, 3, 12);

$pict->cpm_close();
?>

This is the code generating the above "recent_fanart.php" page.  As you can see, no errors are being generated.

As for my technical ability; i'd say fairly advanced.  I'm comfortable with myql, and php.  I just can't see why it's pulling duplicate copies of the images once I find and replace the u.user_id sql query with the ibf one.  This is what I changed line 94, I believe it is, of the dao file to: 

   
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u, ibf_members AS ibf ";

I use ibf.id where the u.user_id was before. 

I hope this is the info you need!

ETA:  Here is my cpmtest file, too.  www.harmonyforever.com/cpmfetch/cftest.php    It's interesting to note that while it pulls pictures, it does not pull the views of those pictures.  It's not pulling duplicate versions, either.

Since I have over a 1000 possible members to upload pictures, I have to integrate this with my IPB database; the trick of just slapping a few members into coppermine isn't feasible. 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 11, 2006, 06:22:43 pm
Interesting topic.  :D   I admire your patience, vuud, and thanks for the software.  I'm running IPB 2.1.4, Coppermine 1.4.3, and CPMfetch 1.6.2.   I initially had problems with only getting a few pictures pulled from several of my categories, but after reading this topic, it was most likely the bridge to IPB.  And indeed, it was.  The relevant table name is ibf_members; the field is "id".  So, I just renamed your query appropriately, like in the phpbb examples previously given.  Works great.  Find and replaced all ten instances.    I get my latest pictures now. 

Please send me a general list of what you changed.  The next release will have these autoselected but I have no intention of installing every one, so only bridged information i receive will be included.

Quote
The problem is I get three copies of them, usually.  Someone else had this same problem a couple of months ago, but as I recall it was never addressed. 

More info, as you request:  :D   Running apace 1.3.3, PHP 4.4.1.  Links:  My gallery is www.harmonyforever.com/cpg143/.   Example page displaying problem is this:  www.harmonyforever.com/recent_fanart.php.  While this is meant to be a plugin to my CMS (Subdreamer), this is not inside subdreamer yet.  (interestingly enough, though, it works fine there--as in it displays all of these same images; but just multiple copies of them).  Running this code:

Code: [Select]
<?

error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on

require_once "./cpmfetch/cpmfetch.php";
$pict = new cpm("/cpg143");
$pict->cpm_unlock_private(false);
$pict->cpm_setDebugMode(true);
$last_source = "cat=2,3,11,8,9,10";
$pict->cpm_viewRandomTopRatedMediaFrom("cat=3", 4, 3, 12);

$pict->cpm_close();
?>

This is the code generating the above "recent_fanart.php" page.  As you can see, no errors are being generated.



Hmmm, a few things... the TopRated stuff is a bit iffy.  Also, you have that extra "12" in your function call, which I don't think does anything as that is where the options array should be.  Who know what an integer there would do...

Anyway the whole top rated/viewed thing is a bit out of whack.  Your seeing repeats because the default behavior is to grab the top 10% of the images.  In your case that would be "4".  Hence the repeating since you ask for 12.

Look for these at the top of the cpmfetch_dao file... they represent the percentages.

In your case, I'd change the $topPercentForTopRated to at least 30 (30 percent would be the top 12).  You can go higher than that if you want.

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

Those functions are a bit funky and need work anyway - I've just not come up with a good way to do it.


Thanks for the complete problem report.  It helps

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Vanceone on April 11, 2006, 07:28:31 pm
Thanks for the fast reply.  I included that 12 in my function call, as the documentation doesn't say it takes an array, where every other function DOES take the array.  Good to know that was an error. 

As for what I changed.  All is in the dao file. 
Here is line 95-96:
Code: [Select]
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u, ibf_members AS ibf ";
line 277:
Code: [Select]
users AS u WHERE p.aid = a.aid and p.pid = $pid AND p.owner_id = ibf.id Line 295:
Code: [Select]
where p.aid = a.aid AND p.owner_id = ibf.idline 320:
Code: [Select]
" where p.aid = a.aid AND p.owner_id = ibf.id "line 355:
Code: [Select]
" where p.aid = a.aid AND p.owner_id = ibf.id "line 398:
Code: [Select]
where p.aid = a.aid AND p.owner_id = ibf.id line 430:
Code: [Select]
where p.aid = a.aid AND p.owner_id = ibf.idline 457:
Code: [Select]
WHERE a.aid = p.aid AND p.owner_id = ibf.id AND p.approved='YES' line 478:
Code: [Select]
WHERE m.pid = p.pid AND p.aid = a.aid AND p.owner_id = ibf.id" line 496:
Code: [Select]
" WHERE p.aid = a.aid  AND p.owner_id = ibf.id and p.approved='YES' $this->privacyfilter and p.ctime > "line 514:
Code: [Select]
" WHERE p.aid = a.aid  AND p.owner_id = ibf.id AND p.approved='YES' $this->privacyfilter and p.ctime > "
As for that function, I really want a most recent viewed one.  This is when the problem is really on display.  This is my new recent_fanart.php page now:
Code: [Select]
<?

error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on

require_once "./cpmfetch/cpmfetch.php";
$pict = new cpm("/cpg143");
$pict->cpm_unlock_private(false);
$pict->cpm_setDebugMode(true);
$last_source = "cat=2,3,11,8,9,10";
$pict->cpm_viewLastAddedMediaFrom( 4, 6, "cat=3");

$pict->cpm_close();
?>
If you reload www.harmonyforever.com/recent_fanart.php   you can see the problem in full display.  As you can tell, there's something screwy going on.  It's loading each image three times.  I'm not using an options array, of course. 

For your further information, here is the list of table names for an IPB 2.1.4 installation.  The relevant one is members, not the other 3 members tables.  The Id field is in members. 
ibf_admin_logs
    ibf_admin_permission_keys
    ibf_admin_permission_
    ibf_admin_sessions
    ibf_announcements
    ibf_attachments
    ibf_attachments_type
    ibf_badwords
    ibf_banfilters
    ibf_bulk_mail
    ibf_cache_store
    ibf_cal_calendars
    ibf_cal_events
    ibf_calendar_events
    ibf_components
    ibf_conf_settings
    ibf_conf_settings_titles
    ibf_contacts
    ibf_custom_bbcode
    ibf_dnames_change
    ibf_email_logs
    ibf_emoticons
    ibf_faq
    ibf_forum_perms
    ibf_forum_tracker
    ibf_forums
    ibf_groups
    ibf_languages
    ibf_login_methods
    ibf_mail_error_logs
    ibf_mail_queue
    ibf_member_extra
    ibf_members
    ibf_members_converge
    ibf_members_partial
    ibf_message_text
    ibf_message_topics
    ibf_moderator_logs
    ibf_moderators
    ibf_pfields_content
    ibf_pfields_data
    ibf_polls
    ibf_posts
    ibf_reg_antispam
    ibf_rss_export
    ibf_rss_import
    ibf_rss_imported
    ibf_search_results
    ibf_sessions
    ibf_skin_macro
    ibf_skin_sets
    ibf_skin_templates
    ibf_skin_templates_cache
    ibf_spider_logs
    ibf_stats
    ibf_subscription_currency
    ibf_subscription_extra
    ibf_subscription_logs
    ibf_subscription_methods
    ibf_subscription_trans
    ibf_subscriptions
    ibf_task_logs
    ibf_task_manager
    ibf_template_diff_changes
    ibf_template_diff_session
    ibf_templates_diff_import
    ibf_titles
    ibf_topic_markers
    ibf_topic_mmod
    ibf_topic_ratings
    ibf_topic_views
    ibf_topics
    ibf_topics_read
    ibf_tracker
    ibf_upgrade_history
    ibf_validating
    ibf_voters
    ibf_warn_logs
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 11, 2006, 08:45:22 pm
Thanks for the fast reply.  I included that 12 in my function call, as the documentation doesn't say it takes an array, where every other function DOES take the array.  Good to know that was an error. 

As for what I changed.  All is in the dao file. 

SNIP

As for that function, I really want a most recent viewed one.  This is when the problem is really on display.  This is my new recent_fanart.php page now:
Code: [Select]
<?

error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on

require_once "./cpmfetch/cpmfetch.php";
$pict = new cpm("/cpg143");
$pict->cpm_unlock_private(false);
$pict->cpm_setDebugMode(true);
$last_source = "cat=2,3,11,8,9,10";
$pict->cpm_viewLastAddedMediaFrom( 4, 6, "cat=3");

$pict->cpm_close();
?>
If you reload www.harmonyforever.com/recent_fanart.php   you can see the problem in full display.  As you can tell, there's something screwy going on.  It's loading each image three times.  I'm not using an options array, of course. 


Dang thats alot.  I guess I really only need the members layout from IBF... 

I am not sure what is causing that...  The SQL seems okay...

I'm not even sure what to suggest next... 

The other problem a few months ago... were they IBF also?  Almost seems like its a bad SQL join, but the generated SQL looks good (the debug adds in an HTML comment with the SQL code)


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daworm on April 12, 2006, 01:56:39 am

I will try to hurry

A work of art takes time :-)

Don't hurry too much or you'll leave a

;
or
()
out without thinking :-)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Vanceone on April 12, 2006, 04:31:07 am
Okay, I fixed it.  Took a while, but I slogged through and fixed it.  Here's the problem, basically.  When I created my coppermine install, I added two extra users into it, for a total of three.  When I changed the query to pull from IBP, it somehow pulled one for EACH of my three users in coppermine.  Rather  than delete my backup administrator for coppermine, I went ahead and fully integrated CPMFetch with Invision PowerBoard.  Since I imagine you'd like to know how... I'll attach my copy of the dao file for you. 

Here is the problem.  This is my select  that was causing the error: 
Quote
SELECT  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 FROM  cpg143_pictures as p, cpg143_albums as a, cpg143_users AS u, ibf_members AS ibf  where p.aid = a.aid AND p.owner_id = ibf.id and p.approved='YES'  and  ( a.category=3 )   and a.visibility = 0   ORDER BY p.ctime DESC LIMIT 0,24

The part in bold is the issue. Since I had 3 existing users in the coppermine database, independant of my IPB database (and not accessible from Coppermine anymore to delete without using PHPmyadmin, thus destroying any hope of an easy fix for casual users), it pulled back a thumbnail for each user.  If I had had four users in coppermine, or 5, 6, etc, I would have gotten one for each of them.  So,  what to do?  I erased the offending code, since it is not needed anywhere else, and fixed all names to point to the ibf fields instead (primarily in the hack to get cpmFetch to work with coppermine 1.4.   

Line 62 of the Dao file now reads like so, with the proper Ipb fields from the ibf_member table inserted:
Quote
   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, ibf.last_visit AS uUser_lastvisit, ibf.joined AS uUser_regdate, ibf.email AS uUser_email';

Here is lines 95-96 now:
Quote
      $this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
            . " ibf_members AS ibf ";

As you can see, the $database_table_prefix variable is messed up from the original; i had to delete it and the entire "AS u" statement.  Those two changes, along with the changes in my previous post, now cause cpm_fetch to work with Invisionpowerboard 2.1.4 integration. 

This, of course, assumes that your cpg install is in the same database as your IPB install.  Also, this assumes that the ibf_members table really is named that; if your prefix for IPB is not ibf, then adjust appropriately.  I also did not fix it for versions of coppermine prior to 1.4, so some changes would be need to be made for that. 

vuut, here is the field names for the ibf_members table, in sql format (with backticks):
Quote
`id`, `name`, `mgroup`, `legacy_password`, `email`, `joined`, `ip_address`, `posts`, `title`, `allow_admin_mails`, `time_offset`, `hide_email`, `email_pm`, `email_full`, `skin`, `warn_level`, `warn_lastwarn`, `language`, `last_post`, `restrict_post`, `view_sigs`, `view_img`, `view_avs`, `view_pop`, `bday_day`, `bday_month`, `bday_year`, `new_msg`, `msg_total`, `show_popup`, `misc`, `last_visit`, `last_activity`, `dst_in_use`, `view_prefs`, `coppa_user`, `mod_posts`, `auto_track`, `org_perm_id`, `temp_ban`, `sub_end`, `login_anonymous`, `ignored_users`, `mgroup_others`, `member_login_key`, `has_blog`, `subs_pkg_chosen`, `members_auto_dst`, `members_cache`, `members_disable_pm`, `members_display_name`, `members_created_remote`, `members_editor_choice`, `members_markers`
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: n3n on April 12, 2006, 07:24:34 pm
Hi Vuud,

I have a question. I would like to embed  cpmfetch in my theme.php, next to the intermediate image, to show the last uploads by that user. Could you point me in the right direction, cause i cant seem to get it working.

Tnx alot for all the nice features in CPMfetch.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: mark14911 on April 19, 2006, 08:19:42 pm
I have a problem using cpmfetch when coppermine is in the web root.
I have copermine 1.4.4 installed, on the webroot.  I have cpmfetch installed in, /cpmfetch/cpmfetch.php.

Here is what I did:
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/");
$objCpm->cpm_viewLastAddedMediaFrom(5,2,"",array('alttag' => '%t','imagewidth' => '75'));
$objCpm->cpm_close();
?>


What happens are broken links when i right click on properties it shows as the address: http://albums/2006/april/4_19_06/thumb_pic2.jpg Its doesn't include the domain name????


Now I have also set this up with coppermine in /video from the web root.  This does work.  Here is my code:
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/video");
$objCpm->cpm_viewLastAddedMediaFrom(5,2,"",array('alttag' => '%t','imagewidth' => '75'));
$objCpm->cpm_close();
?>


I don't know why i can't do the same thing when coppermine is in the web root '/' I want to put pics on my template, but it doesn't work.

I searched the forum and couldn't find anything about this?
Thanks In advance!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Jurrie on April 21, 2006, 06:49:09 pm
Hello,

I also have a problem with CPMFetch. (see: http://forum.coppermine-gallery.net/index.php?topic=30628.0)

I installed CPMFetch, it passes al the tests, but I get a warning and no pics are displayed. It says you have to edit the 3 variables in cftest.php (the prefixes), but these prefixes are the standard prefixes of coppermine (did not change that). In Coppermine itself the prefixes work just fine and the ones in cpmfetch.php are the same, but there it doesn't work...

This is the gallery: http://gallery.nederland1940-1945.nl
And this is the testpage: http://gallery.nederland1940-1945.nl/cpmfetch/cftest.php

Hope you can help me out, because I don't get it...

Greetz & thanks in advance..

Jurrie
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dolnajs on April 21, 2006, 10:30:14 pm
Hi! Sorry for this post, but I really try to find the answer of my problem, but I cant find it. :(

I have a coppermine photo gallery in http://danny.tctv112.cz/gallery/ and cpmfetch in root of this subdomain http://danny.tctv112.cz/cpmfetch/ but server has maybe some mistake or I dont know where the problem is. :(

See my CPMTEST: http://danny.tctv112.cz/cpmfetch/cftest.php

I know, that "DOCUMENT_ROOT" must be the way on server, not "/htdocs"

Where can I define the way to gallery? :( I dont know PHP scripting, and I really need a little help. :(

Please help me. :( If this problem was posted before, can you give me a link on it, please.

Thanks for your patience and time.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: infrenzy on April 24, 2006, 02:47:18 pm
Hi to everybody. Sorry for my bad english but i'm Italian.
I have a problem with coppermine fetch test page.

This is my site www.carnevalari.it
This is the gallery www.carnevalari.it/cpg132/index.php

This is the test page http://www.carnevalari.it/cpg132/cpmfetch/cftest.php

All tests are ok but i can't see thumbnails... Why??? ???

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /web/htdocs/www.carnevalari.it/home/cpg132/cpmfetch/cpmfetch_dao.php on line 710


Please help me! :-\ :'(
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Jurrie on April 24, 2006, 05:52:35 pm
Hi to everybody. Sorry for my bad english but i'm Italian.
I have a problem with coppermine fetch test page.

This is my site www.carnevalari.it
This is the gallery www.carnevalari.it/cpg132/index.php

This is the test page http://www.carnevalari.it/cpg132/cpmfetch/cftest.php

All tests are ok but i can't see thumbnails... Why??? ???

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /web/htdocs/www.carnevalari.it/home/cpg132/cpmfetch/cpmfetch_dao.php on line 710


Please help me! :-\ :'(

Strange! This is the same error I have! (see 2 posts above...). I didn't change the prefixes or something....

By the way: I deleted the old database, made a new database + fresh installation of Coppermine + CPMFetch, and still I get the same error ???

Please help...us ;)

Greetz,

Jurrie
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on April 24, 2006, 06:13:59 pm
Read the thread and the instructions, this has been asked and answered countless times already.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Jurrie on April 24, 2006, 09:03:12 pm
Read the thread and the instructions, this has been asked and answered countless times already.
Ok, it is 40 pages long, but I will take a look. Thanks

Jurrie
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Jurrie on April 24, 2006, 09:58:51 pm
Read the thread and the instructions, this has been asked and answered countless times already.

Installed Coppermine 1.4.5 & CPMFetch 1.6.2. I've tried to comment/uncomment those lines. And it "works"...........a bit.

See this link: http://gallery.nederland1940-1945.nl/cpmfetch/cftest.php

There is one picture in the gallery, but it is not displayed. Has this got to do anything with this code-fixing or is there another problem?

Greetz,

Jurrie
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on April 25, 2006, 05:46:52 am
Read the thread and the instructions, this has been asked and answered countless times already.

Not to mention the readme file that came with the download.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Jurrie on April 25, 2006, 09:03:29 am
Not to mention the readme file that came with the download.




Yes, I read the forum & the release notes, and there I could find it (stupid I didn't look there, sorry for that)...Is the problem I have right now also to find in the readme / somewhere else? I couldn't find it .... yet ;).

Greetz & thanks so far :)

Jurrie




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: infrenzy on April 25, 2006, 11:30:11 am
Read the thread and the instructions, this has been asked and answered countless times already.

Can you tell at what page of the thread or give me a link.
I cant' read 40 pages in english, i will read for a week.
Please someone help me
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: energy0m on April 28, 2006, 06:16:18 am
here is the link to the post ....

http://forum.coppermine-gallery.net/index.php?topic=19564.msg138163#msg138163

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: infrenzy on April 28, 2006, 12:36:59 pm
here is the link to the post ....

http://forum.coppermine-gallery.net/index.php?topic=19564.msg138163#msg138163



Thank you very very much energy!!!!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: yacenty on May 01, 2006, 04:15:31 pm
Hello, I'm founder of www.agrofoto.pl

I would like to present top 3 best rated and 3 top most viewed photos,
cpg is in gallery directory

CPG is 1.4.4 version - is it possible to use cpm to get this photos with links?

Could somebody tell me how can I get this pics?

best regards,
YacentY
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: energy0m on May 11, 2006, 04:53:42 pm
ok so first some info .....

np!

now i have a question of my own that i hope someone here can be as generous with help .... i need help creating the syntax of a specific call to cpmfetch ... heres some bkg info first as per thsi threads moderator's request in his first post to this thread ... 

cpm version: 1.4.5
http://www.highpointcivic.com/photos/
intermediate user
apache, linux, php .... heres a phpinfo page i just put up ... http://www.highpointcivic.com/info.php

ok so what i would like to do is display the thumbnail of the most recently added album and that albums descriotion as well as the date added ...
what code syntax would i use ?
... i thought about using:
cpm_viewLastAddedMediaFromAlbum
but that just returns a specific album's picz .....
how would i specify the most recently added album thumbnail and its info(date and description)
similar how i have the layout setup on the bottom left of this page : http://www.highpointcivic.com

your help is most appreciated ;)


oh also .. how come i can't post new threads to: "Mods: CPMFetch >" i can only reply in threads .... ??
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Zombie Lady on May 11, 2006, 05:50:27 pm
I skimmed through this thread..and did not find a request like this.  I run a gallery centered around it's users.  So I was wondering if there's a way I can show the newest user and their picture?  I would really like it to be in this format:

{image here}
{Username with link to their personal gallery} joined on {date}

You would really make my week if you or someone could make that possible to do. :D

-------------------

Also..I just wanted to let people who use CPMFetch know how they could include many different php includes.  Through iframes! :)  I mean..it's pretty a no-duh thing.  But you would have to create a .php file for each different type of inclusion you want.  For example I want to show the newest picture, random picture, and highest rated picture.  So, I will create three php files, one for each type of inclusion.  Then, on the main page I would then follow this layout:

Newest photo
{iframe with proper width and height, linked to the newest photo php document}

Random photo
{same as above, but linked to the random photo php document}

etc.  Make sure on the php document you make it match your layout (background-wise) or it would look funky.

If this idea was already discussed, just let me know and I'll take it off this post. Hehe.  But if not...it's just an idea I am using.  ^_^
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on May 11, 2006, 10:43:26 pm
I skimmed through this thread..and did not find a request like this.  I run a gallery centered around it's users.  So I was wondering if there's a way I can show the newest user and their picture?  I would really like it to be in this format:

{image here}
{Username with link to their personal gallery} joined on {date}

You would really make my week if you or someone could make that possible to do. :D

-------------------

Also..I just wanted to let people who use CPMFetch know how they could include many different php includes.  Through iframes! :)  I mean..it's pretty a no-duh thing.  But you would have to create a .php file for each different type of inclusion you want.  For example I want to show the newest picture, random picture, and highest rated picture.  So, I will create three php files, one for each type of inclusion.  Then, on the main page I would then follow this layout:

Newest photo
{iframe with proper width and height, linked to the newest photo php document}

Random photo
{same as above, but linked to the random photo php document}

etc.  Make sure on the php document you make it match your layout (background-wise) or it would look funky.

If this idea was already discussed, just let me know and I'll take it off this post. Hehe.  But if not...it's just an idea I am using.  ^_^

iframes sound intresting... but why couldn't you just include them all on the same page without doing the extra php includes and such?

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: energy0m on May 12, 2006, 07:01:47 am
anyone have any ideas bout my post?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on May 12, 2006, 02:58:32 pm
ok so what i would like to do is display the thumbnail of the most recently added album and that albums descriotion as well as the date added ...
what code syntax would i use ?
... i thought about using:
cpm_viewLastAddedMediaFromAlbum
but that just returns a specific album's picz .....
how would i specify the most recently added album thumbnail and its info(date and description)
similar how i have the layout setup on the bottom left of this page : http://www.highpointcivic.com

I do not think cpg tracks the creation time of albums.  Now that I am thinking of it you can probably do something and count on the album number being in sequence and that they don't recycle old numbers.   That would all be some custom code to do.  And then I take it you want to get the preset thumbnail for the album and stuff... 

I am not sure there are any calls in cpmfetch that would help you with that sort of thing.  I've just never added a call to go after that sort of data.

I added two new calls to my wish list for getting last added albums and getting the album info.

oh also .. how come i can't post new threads to: "Mods: CPMFetch >" i can only reply in threads .... ??

Because that level should not get polluted by new topics.  This one will be closed in a few weeks and a new one added to support the next version of cpmfetch. 

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Zombie Lady on May 12, 2006, 04:36:52 pm
iframes sound intresting... but why couldn't you just include them all on the same page without doing the extra php includes and such?

I wanted to be able to put text setting the different images apart.  Letting people know that one picture is the newest, and the other is top rated.  I'm real uptight about my website organization. Hehe.

EDIT // Also!  I just ran into a problem with the iframe thing. XD  When you click on the pictures...it opens the gallery site into the iframe.  Heheh...so is there a way to make the link open in a new window instead of that iframe? o_o
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: RoarinRow on May 13, 2006, 12:42:01 am
I tried this code and got the following message:

A random selection:
ERROR: Path to Coppermine incorrect. (//cpg143//include/config.inc.php)

With this code:

print "A random selection:<CENTER>";
include "../forum/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg143");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
print "</center>";

Any suggestions?  My Coppermine Gallery is bridged and my directory is at wwwmysite/forum/cpg143. 

Thanks!  I tried a search and read through most of these 40 pages, but none of the fixes I tried worked.
Title: CpmFetch 16.2 Old errors resurfacing
Post by: cgc0202 on May 13, 2006, 01:10:25 am
Hi,

I really want a photo randomizer to work, and if possible one that is compatible with Coppermine.  Before I present the errors I encountered, I did some preliminary reading and search and here are some details.  I downloaded, used and observed  the  following:

(1) CPMFetch1.6.2
(2) CPG v1.4.4 with the stramm mod to create "square thumbnails", as well as separate galleries using the latest CPG v1.4.5 with the stramm mod
(3) All the thumbnails and the normal and original photos are showing properly in the different galleries
(4) The uploaded CPMFetch1.6.2 when tested using the cftest.php passed the initial diagnostic test.

The initial issue was that I got error messages that turned out to be a perennial and common problem.  I saw the post of  "doctor k" and others regarding error messages when installing the CPMFetch: 

http://forum.coppermine-gallery.net/index.php?topic=19564.msg138106#msg138106

I am very thankful with the tip of gmc:

http://forum.coppermine-gallery.net/index.php?topic=19564.msg138163#msg138163

as well as the observation of MDkai

http://forum.coppermine-gallery.net/index.php?topic=19564.msg138207#msg138207

that seemed to have solved the error problems of  -- based on what appeared on "doctor k's"  cftest.php URL:

http://www.mypreciouspaws.net/cpmfetch/cpmfetch/cftest.php

the crucial test,  the photos were showing properly.

I encountered the same errors as the previous posters have gone through.   I did the correction that another poster was kind enough to provide (see above links).  The error that the others encountered disappeared.  However, a new set of errors appeared (and after searching) the new errors I encountered have been reported much earlier by Niels:

http://forum.coppermine-gallery.net/index.php?topic=19564.msg95029#msg95029

-- it turned out to be an old problem in CPMFetch v1.6.1 that should have been solved by the CPMFetch v1.6.2 version according to vuud's reply:

http://forum.coppermine-gallery.net/index.php?topic=19564.msg95033#msg95033

I am using CPMFetch v1.6.2 so I should not have encountered the aforementioned errors encountered by Niels.   I am trying to find out what may be causing this problem in my case, but it seems the the second set of errors. were not encountered by "dcktor k"

First:  Is it possible that the version of Coppermine PhotoGallery may be critical?

I looked at the cpmfetch_dao.php, based on the reported solutions in response to the errors.  The versions addressed in cpmfetch_dao.php were for CPGv1.4.1 beta or the earlier CPGv1.4.

As stated above, I am using CPGv1.4.4 (and tested this).  I have newer albums using CPGv1.4.5 with the mods by stramm to create square thumbnails. 

I encountered the second set of errors as indicated by Niels (that should not have been an issue since I am using the cpmfetchv1.6.2 as suggested by vuud (see above for links regarding the reported errors and solutions).

I have also taken precautions to ensure that the prefixes for the thumbnail and normal photos were consistent.

Second:  Is there anything else that others did to resolve the problem?

I appreciate any feedback.  Thanks.

cgc0202
Title: Re: CpmFetch 16.2 Old errors resurfacing
Post by: vuud on May 13, 2006, 01:33:59 am

First:  Is it possible that the version of Coppermine PhotoGallery may be critical?

I looked at the cpmfetch_dao.php, based on the reported solutions in response to the errors.  The versions addressed in cpmfetch_dao.php were for CPGv1.4.1 beta or the earlier CPGv1.4.

As stated above, I am using CPGv1.4.4 (and tested this).  I have newer albums using CPGv1.4.5 with the mods by stramm to create square thumbnails. 

I encountered the second set of errors as indicated by Niels (that should not have been an issue since I am using the cpmfetchv1.6.2 as suggested by vuud (see above for links regarding the reported errors and solutions).

I have also taken precautions to ensure that the prefixes for the thumbnail and normal photos were consistent.

Second:  Is there anything else that others did to resolve the problem?

I appreciate any feedback.  Thanks.

cgc0202



What are the errors you are getting?

I've not upgraded to the newer cpg, so I am not sure (although I doubt) something would have changed that much.

Bridging with something that messes with thumbnails could I guess.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on May 13, 2006, 01:35:04 am
I tried this code and got the following message:

A random selection:
ERROR: Path to Coppermine incorrect. (//cpg143//include/config.inc.php)

With this code:

print "A random selection:<CENTER>";
include "../forum/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg143");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
print "</center>";

Any suggestions?  My Coppermine Gallery is bridged and my directory is at wwwmysite/forum/cpg143. 

Thanks!  I tried a search and read through most of these 40 pages, but none of the fixes I tried worked.


Is the path to cpg correct?

or is it /forum/cpg143

I cant tell from here

Title: Re: CpmFetch 16.2 Old errors resurfacing
Post by: cgc0202 on May 13, 2006, 01:56:46 am

What are the errors you are getting?

I've not upgraded to the newer cpg, so I am not sure (although I doubt) something would have changed that much.

Bridging with something that messes with thumbnails could I guess.


Wow, thanks for the very prompt response vuud.  The original errors were exactly as reported by "doctor k", that disappeared after I removed the "/* */"; but after that disappeared, I got the second set of errors (please see note below).

Here is the link to one of my tests (showing the second set of errors, after the first set of errors disappeared):

 [Link removed.  The solution proposed by Vuud below worked.]

The errors indicated in the above link are exactly the same errors that Niels reported in 2005 (please refer to the link in my  previous post). Note, the one I showed in the link deals with the ones where I used the latest CPG v1.4.5 with the stramm mod  and the CPMFetch v1.6.2.  Also,  I already corrected the issue about "prefix", in case that might become the cause of the problem.

I did a similar test before the one shown above, on another photogallery using CPG v1.4.4 with the stramm mod  and the CPMFetch v1.6.2, where the prefix of the "thumb-" and the "normal-" versions of the original photo used the default prefix.  This was where I encountered, and corrected the first set of errors, then encountered the second set of errors that should have been corrected in the CPMFetch v1.6.2.

I posted a short post in the mod of stramm, linking my original response above, to inquire whether his mod might contribute to the problem. 

Thanks.

cgc0202

N.B.

Aside from dealing with variations of the "/* */", I also removed the paragraph after "// This is for CPG versions prior to 1.4"  but retained the paragraph after "// This is for CPG v 1.4.1 beta 1" but the second set of errors observed by Niels, whether both sets of paragraphs are in "cpmfetch_dao.php"
Title: Re: CpmFetch 16.2 Old errors resurfacing
Post by: vuud on May 13, 2006, 02:36:35 am

The errors indicated in the above link are exactly the same errors that Niels reported in 2005 (please refer to the link in my  previous post). Note, the one I showed in the link deals with the ones where I used the latest CPG v1.4.5 with the stramm mod  and the CPMFetch v1.6.2.  Also,  I already corrected the issue about "prefix", in case that might become the cause of the problem.


Well, the message may be the same, but its sort of a generic fall through when something goes wrong in a particularly touchy part of the code.

I am not sure how this is working, but let me tell you what I am seeing and maybe it will key off some memory in you.

Okay, your link that cftest is giving you is correct to the gallery.

However, your photos are not stored in the photo gallery at all.  At least that I can tell.

Here is the actual location on the server (I removed the domain name intentionally)

/pics/people/s/smith/brad/n_113984151_bh.jpg

But CPM fetch is looking for the images in something like:

/ecos201/albums/people/h/hansen/donna/t_94969959_oh.jpg

In other words, I am looking where they should be but are not for some reason... hence the missing thumbnails.





You modifying cftest.php code:

Look for this line around line 310 * i think *
Code: [Select]
$objCpm = new cpm($PartialUrlToCPG);
and then add in something like this:

Code: [Select]
$objCpm->cpm_OverridePathToAlbums("/pics");
I think that will fix what you are having issues with.

If it does not work, leave the cftest.php with the changes and let me know...

Vuud



Title: Re: CpmFetch 16.2 Old errors resurfacing
Post by: cgc0202 on May 13, 2006, 05:48:20 am
Thanks Vuud,

Your observations were correct, the example I gave is a case where the photos are outside of the Coppermine software itself.  There is a reason for that decision.  However, I did not make myself clear enough in my previous posts. 

The other example, I tried to allude to in my previous posts, tested what would happen if the photos are inside the "albums" within the Copermine Photo Gallery.  [Note that this other example was an earlier photogallery before I decided to place pics in a common folder, as you correctly observed in the first example, presented in previous posts.]  However, I will address this second example later.   I wish to share first what happened after I did the changes you suggested in your previous post. 

First example (shared in previous posts -> "/ecos201"):

I changed

$objCpm = new cpm($PartialUrlToCPG);

to

$objCpm->cpm_OverridePathToAlbums("/pics");

And, I got a fatal error message:

Fatal error: Call to a member function on a non-object in /home/mmedia/public_html/cpmfetch/cftest.php on line 310

If I undo the change, I get  back the previous errors I stated in my previous posts (more on what I observed later regarding this example).

Second example ("/usa001") :

Here is the other example, where the photos are inside the "albums" within the Coppermine Photo Gallery -- the standard format.  To demonstrate this second example, I loaded another CPMFetch (but renamed it as "cpmfetch-1" so that it would not overwrite the first example)

[Link removed by cgc0202. The proposed solution of Vuud below worked.]

Note that even if the photos are inside " albums" within the Coppermine, as well as the default prefix "thumb-" was used, I got similar errors as in the first example (please see aforementioned link for details).  I copied one set of the error messages, because there is a similarity I found when I was able to compare both

Second Example ("/usa001")

Error in getImageTouse: Extension (strtolower): .jpg
File:/home/mmedia/public_html/usa001//albums/userpics/10003/thumb_97058174_2748313e51_o.jpg

If you examine the errors in the First Example ("/ecos201") -- prior to the replacement of the code (as you suggested) that led to the "Fatal error" (see above) -- the actual set of errors were something like this:

Error in getImageTouse: Extension (strtolower): .jpg
File:/home/mmedia/public_html/ecos201//albums/people/g/goldfarb/jack/t_28113439_o.jpg

Please note the "double forward slashes" before the "albums" in both

/usa001//albums/userpics/

/ecos201//albums/people/

respectively.  I did not see that "double forward slashes" in the error posted by Niels:

http://forum.coppermine-gallery.net/index.php?topic=19564.msg95029#msg95029

I hope the above clarify some of the ambiguity in my previous postings.

Thanks.

cgc0202
Title: Re: CpmFetch 16.2 Old errors resurfacing
Post by: vuud on May 13, 2006, 06:04:21 am
First example (shared in previous posts -> "/ecos201"):

I changed

$objCpm = new cpm($PartialUrlToCPG);

to

$objCpm->cpm_OverridePathToAlbums("/pics");

And, I got a fatal error message:

Fatal error: Call to a member function on a non-object in /home/mmedia/public_html/cpmfetch/cftest.php on line 310

This will be quick, I have a presentation to make tomorrow morning and have to bone up one the mind consiousness before then.  The abbot from a local monastary will be there so I'd like to get it right.

Anyway, the change should not have replaced the first one, but ADDed to it. 


$objCpm = new cpm($PartialUrlToCPG);
$objCpm->cpm_OverridePathToAlbums("/pics");

Without the new cpm, you do not have an object to set the override on.

Try that and report back


Title: Wow! It worked! Thanks.
Post by: cgc0202 on May 13, 2006, 06:34:04 am
WOW!!!

Thanks very much Vuud.  That did the trick. 

I was a bit sleepy I guess. I apologize for not having read your previous post very carefully. [My only alibi was that I was reading the plugins on moderators and the other plugin removing the "delete" function in another thread. That might have affected my frame of mind, also.  But not a good excuse for my own carelessness.]

I decided to have multiple photogalleries that would require photos from different people to be in multiple galleries.  Having all the  photos outside of the individual photogalleries would be useful. You might even be the one who suggested that this was possible.  I have to check the thread where I asked of this possibility.

The observation you made for the "/ecos201" where the photos are outside of the standard 'albums" withing the Coppermine.  This was not the case with "/usa001" -- but got similar errors.  Please see previous post.

Thanks again.

cgc0202

N.B. 

I know the cpmfetch will work with my standard php and html based websites.  I hope it will work also as a "plugin"  for the "wiki" in the "Tikiwiki". 
Title: Re: Wow! It worked! Thanks.
Post by: vuud on May 13, 2006, 07:07:07 am
WOW!!!

Thanks very much Vuud.  That did the trick. 
The observation you made for the "/ecos201" where the photos are outside of the standard 'albums" withing the Coppermine.  This was not the case with "/usa001" -- but got similar errors.  Please see previous post.

In that one your thumbnails are called t_ and your normal are called n_

That is why it is not finding thumbnails I think. 

You need to override the naming for thumb_ and normal_

Add in

$objCpm->cpm_setMediaPrefixes("t_", "n_");

after the new statement (that creates the object)







Title: iframe & album problem
Post by: hasemann on May 13, 2006, 08:05:11 pm
My first problem is that all new albums (#101 and #102) I added in may don't show up in CPMFetch.
I tried to add a new album #103 too, but it doesn't show up? All albums from #1-#100 are shown up.
I'm using the last 45 days, when I use the last 14 days CPMFetch shows only the number of new pictures added during the last 14 days without displaying these albums.

Second problem is that I need the links to be displayed in an iframe because I'm using the CMS of joomla.
CPMFetch displays all my new added albums on the startpage, but my gallery needs to be displayed in an iframe :/
Is there a solution for this?
Title: Re: iframe & album problem
Post by: vuud on May 13, 2006, 08:42:40 pm
My first problem is that all new albums (#101 and #102) I added in may don't show up in CPMFetch.
I tried to add a new album #103 too, but it doesn't show up? All albums from #1-#100 are shown up.
I'm using the last 45 days, when I use the last 14 days CPMFetch shows only the number of new pictures added during the last 14 days without displaying these albums.

Second problem is that I need the links to be displayed in an iframe because I'm using the CMS of joomla.
CPMFetch displays all my new added albums on the startpage, but my gallery needs to be displayed in an iframe :/
Is there a solution for this?


There have been a few reports of higher numbered albums not being displayed, but I have not had time to verify it, but I really should.

I have no idea what iframes really do so I cannot say if they can or can't be used with cpmfetch.   What is the actual issue with using cpmfetch with iframes? 



Title: Thanks again Vuud.
Post by: cgc0202 on May 14, 2006, 12:37:20 am
In that one your thumbnails are called t_ and your normal are called n_
Add in
$objCpm->cpm_setMediaPrefixes("t_", "n_");
after the new statement (that creates the object)

That solved the errors too.  I anticipate to have multiple photogalleries and kept the photos in  a centralized folder (outside of the photogalleries) in in the same subdomain.  This will allow me to access the same set of photos and place them in multiple galleries.   I included the CPMFetch also in the same subdomain.   In this regard, I was reading the FAQ, and found this: 

***********
13.2.   I have my pages and gallery on different subdomains... will CpmFetch work?   
I have gotten a few of these working, but not enough to have all the answers. To use CpmFetch in its normal usage, the subdomain has to have access to the files on the CPG domain. If you have that, then I am confident it can be made to work.
*************

This may become an issue because the websites where I want to "place the photos" resulting from applying the CPMFetch  are found in other subdomains.  [My current webhosting service has the subdomains designed so that they are like separate domains altogether.]  Is there a possible or known solution to the issue raised in the FAQ?

In "Example 4.2. Example of using CpmFetch"
<?php   
include "cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>

Can the issue raised above be resolved by specifying the full path in 'include "cpmfetch.php";'

e.g.,

include "http://mysite.org/cpmfetch/cpmfetch.php";

cgc0202
Title: Re: Thanks again Vuud.
Post by: vuud on May 14, 2006, 01:12:10 am
That solved the errors too.  I anticipate to have multiple photogalleries and kept the photos in  a centralized folder (outside of the photogalleries) in in the same subdomain.  This will allow me to access the same set of photos and place them in multiple galleries.   I included the CPMFetch also in the same subdomain.   In this regard, I was reading the FAQ, and found this: 

***********
13.2.   I have my pages and gallery on different subdomains... will CpmFetch work?   
I have gotten a few of these working, but not enough to have all the answers. To use CpmFetch in its normal usage, the subdomain has to have access to the files on the CPG domain. If you have that, then I am confident it can be made to work.
*************

This may become an issue because the websites where I want to "place the photos" resulting from applying the CPMFetch  are found in other subdomains.  [My current webhosting service has the subdomains designed so that they are like separate domains altogether.]  Is there a possible or known solution to the issue raised in the FAQ?

In "Example 4.2. Example of using CpmFetch"
<?php   
include "cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>

Can the issue raised above be resolved by specifying the full path in 'include "cpmfetch.php";'

e.g.,

include "http://mysite.org/cpmfetch/cpmfetch.php";

cgc0202

You can do it as an include also... create a php file with the cpmfetch code on the main server and do a php include from the other server.  That could work.

Otherwise, as the faq said, I don't have much experience with getting that sort of thing running - so YMMV
Title: Remote site integration of CPMFetch result
Post by: cgc0202 on May 16, 2006, 11:04:33 pm
You can do it as an include also... create a php file with the cpmfetch code on the main server and do a php include from the other server.  That could work.

Otherwise, as the faq said, I don't have much experience with getting that sort of thing running - so YMMV


Hi Vuud,

I tried this approach of using the entire URL in the php "include"but I got an error, whenever I use the complete URL in the "include" statement.  This error maybe on account that I did not use it properly  [I know I cannot full URL in the usual SSI for html scripts, but I thought I can do that with php "include" -- at least I thought  I used full URL  in the php "include.]

Being able to include photos the way CPMFetch works in remote (i.e., in another subdomain  or domain) non-gallery  sites would be a powerful feature of  CPMFetch.

Until there is a method to be able to export the result of CPMFetch into "remote" sites outside of the domain where the photogallery and  CPMFetch are located, I have to rearrange the entire architecture of the way the photos are stored in my website -- it has to be decentralized rather than in one single subdomain as I originally planned. 

The integrated single site location of photos -- outside of any of the photogallery program directory has very important uses.  One of them is the ability to use the some photos in multiple (independent) photogalleries.  It is also a much simpler way of administering the photos.

cgc0202

N.B.

Maybe I did not understand the suggestion in your previous response correctly.  I did create a "test.php" page in the subdomain where the photogallery and the CPMFetch are located.  The CPMFetch result displayed properly in the  "test.php" page. [Thanks again for the help.]

To illustrate your suggestion, did you mean this?  Let us say "test.php" is in "mysite.org/test-files" so that the full URL for  "test.php" would be:

http://mysite.org/test-files/test.php

When you stated: "...do a php include from the other server", did you mean a script like this:

First Approach

<? php
include 'http://mysite.org/test-files/test.php';
?>

I tried that and got this error:
Parse error: parse error, unexpected T_INCLUDE in /home/treasure/public_html/test-fetch.php on line 2

Even if this might work there is one catch: It will require the creation of php files similar to "test.php'".   Creation of such files would be no problem if there are only a few; but becomes an issue if there are thousands or more of such files to be created.

Second Approach

I tried another approach where I use the complete URL in the "include" statement itself, for a test file (placed in the other subdomain) that included the Fetch statements, i.e.,

<?php   
include "http://mmedia.treasuresoftheinternet.org/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");
....
etc. etc.
?>

I got this error:
Fatal error: Cannot instantiate non-existent class: cpm in /home/treasure/public_html/toti-test.php on line 9

whether or not I added "http://mmedia.treasuresoftheinternet.org" (where the CPMFetch and the gallery are located) also in the

$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");

although I got more errors without the "http://mmedia.treasuresoftheinternet.org".  So, maybe I am just doing something incorrectly.

Note that the second approach works if placed in the same subdomain (where there would be no need to add the  "http://mmedia.treasuresoftheinternet.org", so that it would be simply:

<?php   
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");
....
etc. etc.
?>

If only the Second Approach works in another subdomain, then I can have a centralized subdomain for the multiple photogalleries, as well as an integrated location for all pics.

cgc0202
Title: Re: Remote site integration of CPMFetch result
Post by: vuud on May 17, 2006, 07:51:41 am

Maybe I did not understand the suggestion in your previous response correctly.  I did create a "test.php" page in the subdomain where the photogallery and the CPMFetch are located.  The CPMFetch result displayed properly in the  "test.php" page. [Thanks again for the help.]

To illustrate your suggestion, did you mean this?  Let us say "test.php" is in "mysite.org/test-files" so that the full URL for  "test.php" would be:

http://mysite.org/test-files/test.php

When you stated: "...do a php include from the other server", did you mean a script like this:

First Approach

<? php
include 'http://mysite.org/test-files/test.php';
?>

I tried that and got this error:
Parse error: parse error, unexpected T_INCLUDE in /home/treasure/public_html/test-fetch.php on line 2

Even if this might work there is one catch: It will require the creation of php files similar to "test.php'".   Creation of such files would be no problem if there are only a few; but becomes an issue if there are thousands or more of such files to be created.


The T_Include error means you botched up your php code somehow and has nothing to do with cpmfetch. 

Hint: there is no space between <? and php

Why would there be thousands of files? 




Title: Re: Remote site integration of CPMFetch result
Post by: cgc0202 on May 18, 2006, 07:16:10 pm
The T_Include error means you botched up your php code somehow and has nothing to do with cpmfetch.

Hint: there is no space between <? and php

Why would there be thousands of files? 


Thanks Vuud for the hint.  I had it correct in all the other php statements in the other test page.  I did not know why I had that mistake in the other page.

Here is the test page (i.e., "toti-test.php") URL   


http://mmedia.treasuresoftheinternet.org/toti-test.php

placed in the same subdomain as the gallery and the CPMFetch. The photos (with the accompanying text and layout structure) showed as expected (although I have to read the instructions more to make some features work).

Then, I created another test  php page  in another subdomain  (i.e., "test-fetch.php")  -- where I attempted  to "include" the entire "toti-test.php" -- text and photos -- into the "test-fetch.php" page found in the other subdomain. 

http://treasuresoftheinternet.org/test-fetch.php

The latter page contained the simple php statement:

<?php
include "http://mmedia.treasuresoftheinternet.org/toti-test.php";
?>

As you can see the "include" instructions itself works.  The entire page showed up in the other subdomain with the proper structure and text; the only issue is that the photos are not showing. 


I had an idea why this happened, and I tested it by revising the original text page.  At the bottom of the right  column, I included two photos in the original test page (i.e., "toti-test.php"):

http://mmedia.treasuresoftheinternet.org/toti-test.php

These two photos are static photos -- not generated by CPMFetch.  Both photos show up properly in the original subdomain.  Now if you compare what happens to these two photos in the other subdomain -- the upper photo does not show up while the lower photo shows up  -- it reveals the reason why all of the photos (generated through CPMFetch) do not appear when the test page was "fetched" in another subdomain:

http://treasuresoftheinternet.org/test-fetch.php

The CPMFetch itself worked in the original page, but because the presentation is partial URL, the exported photos attached the main URL of the new page (in this case  http://treasuresoftheinternet.org) rather than the original URL of  the original page  (i.e., http://mmedia.treasuresoftheinternet.org)  where it was generated.  This was just like what happened with the two photos on the right column, not generated with CPMFetch.

From the above diagnosis, it is a matter of incorporating a script that the photos must integrate the original page URL rather that the new page URL, to make this mode  work.

cgc0202

P.S. 

As outlined in my previous response, it would be nice if the method above would work because I would be able to find uses for them.  However, the ideal approach, if doable would be how to make the script:

<?php   
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");
...
....etc.
?>

work in another subdomain.  [It works if the above script is placed in the same subdomain as the Gallery and the CPMFetch.]

PPS:
You asked: Why would there be thousands of files? 
I will discuss this later since this is already a very long response.
Title: Re: Remote site integration of CPMFetch result
Post by: vuud on May 19, 2006, 01:55:52 am
Thanks Vuud for the hint.  I had it correct in all the other php statements in the other test page.  I did not know why I had that mistake in the other page.

Here is the test page (i.e., "toti-test.php") URL   


http://mmedia.treasuresoftheinternet.org/toti-test.php

placed in the same subdomain as the gallery and the CPMFetch. The photos (with the accompanying text and layout structure) showed as expected (although I have to read the instructions more to make some features work).

Then, I created another test  php page  in another subdomain  (i.e., "test-fetch.php")  -- where I attempted  to "include" the entire "toti-test.php" -- text and photos -- into the "test-fetch.php" page found in the other subdomain. 

http://treasuresoftheinternet.org/test-fetch.php

The latter page contained the simple php statement:

<?php
include "http://mmedia.treasuresoftheinternet.org/toti-test.php";
?>

As you can see the "include" instructions itself works.  The entire page showed up in the other subdomain with the proper structure and text; the only issue is that the photos are not showing. 


I had an idea why this happened, and I tested it by revising the original text page.  At the bottom of the right  column, I included two photos in the original test page (i.e., "toti-test.php"):

http://mmedia.treasuresoftheinternet.org/toti-test.php

These two photos are static photos -- not generated by CPMFetch.  Both photos show up properly in the original subdomain.  Now if you compare what happens to these two photos in the other subdomain -- the upper photo does not show up while the lower photo shows up  -- it reveals the reason why all of the photos (generated through CPMFetch) do not appear when the test page was "fetched" in another subdomain:

http://treasuresoftheinternet.org/test-fetch.php

The CPMFetch itself worked in the original page, but because the presentation is partial URL, the exported photos attached the main URL of the new page (in this case  http://treasuresoftheinternet.org) rather than the original URL of  the original page  (i.e., http://mmedia.treasuresoftheinternet.org)  where it was generated.  This was just like what happened with the two photos on the right column, not generated with CPMFetch.

From the above diagnosis, it is a matter of incorporating a script that the photos must integrate the original page URL rather that the new page URL, to make this mode  work.

cgc0202

P.S. 

As outlined in my previous response, it would be nice if the method above would work because I would be able to find uses for them.  However, the ideal approach, if doable would be how to make the script:

<?php   
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");
...
....etc.
?>

work in another subdomain.  [It works if the above script is placed in the same subdomain as the Gallery and the CPMFetch.]

PPS:
You asked: Why would there be thousands of files? 
I will discuss this later since this is already a very long response.

I am gonna give you your own thread... I have to say you put forth a great deal of effort to troubleshooting this on your test pages.  Keep at PHP and you will be a formidable programmer someday.

On this page:  http://mmedia.treasuresoftheinternet.org/toti-test.php

I think this will fix your remote problem.  This tells cpmfetch to add a full url instead of the relative one.  Then when the other site gets it, it can find the photos. 

$objCpm->cpm_OverrideUrlToCoppermine("http://mmedia.treasuresoftheinternet.org/ecos201/");

You certainly have put in a lot of effort on your own to get this working... I don't mind helping

Lemme know about the 1000's of scripts, I suspect there is a away around it (whatever it is)

Take care


Title: Re: Remote site integration of CPMFetch result
Post by: cgc0202 on May 20, 2006, 05:10:11 am
I am gonna give you your own thread... I have to say you put forth a great deal of effort to troubleshooting this on your test pages.  Keep at PHP and you will be a formidable programmer someday.

On this page:  http://mmedia.treasuresoftheinternet.org/toti-test.php

I think this will fix your remote problem.  This tells cpmfetch to add a full url instead of the relative one.  Then when the other site gets it, it can find the photos. 

$objCpm->cpm_OverrideUrlToCoppermine("http://mmedia.treasuresoftheinternet.org/ecos201/");

You certainly have put in a lot of effort on your own to get this working... I don't mind helping

Lemme know about the 1000's of scripts, I suspect there is a away around it (whatever it is)

Take care

Thanks Vuud.  I am very grateful for your patience and taking the time to help.  Here are my observations:

http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test3b.php

when I integrated your suggestion (I hope I got your message correctly -- I simply "added" the code).  There was something I observed also when I was  varying the sizes of the photos, quite more evident for the large sizes:

http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test2.php

I also answered the issue about "thousands of files".

Thanks again.

cgc0202
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Daworm on May 20, 2006, 05:27:36 pm
Hey Vudd -- long shot.

You haven't be chance updated and found a work-around for the bridging issue have you?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on May 20, 2006, 11:00:32 pm
Hey Vudd -- long shot.

You haven't be chance updated and found a work-around for the bridging issue have you?

I have a solution, and its partially integrated.  But its in the next release which I keep putting off to write and installer script for.

I've been eyeing it more and more though, so hopefully it will be soon


vUUd
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: geltab on May 21, 2006, 08:38:07 pm
"non-randomized fashon"

Can you word this differently.  What do you want?

Thanks
" ORDER BY p.filename LIMIT 0,$count";  ;)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on May 22, 2006, 12:40:08 am
" ORDER BY p.filename LIMIT 0,$count";  ;)

I don't have anything in there to do the order by filename. 

Would filename be the best way to sort though?  Wouldn't by date added be better?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: geltab on May 22, 2006, 11:18:20 am
I don't have anything in there to do the order by filename. 

Would filename be the best way to sort though?  Wouldn't by date added be better?


Ordering by date still produces images from a gallery in random order on a new page. I needed a setup where I could post an entire gallery to a new page in an ordered series..for example: 01.jpg 02.jpg 03.jpg 04.jpg...etc in a decending order. Sorting images by file name worked out very nicely for this situation.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on May 22, 2006, 05:04:32 pm
Ordering by date still produces images from a gallery in random order on a new page. I needed a setup where I could post an entire gallery to a new page in an ordered series..for example: 01.jpg 02.jpg 03.jpg 04.jpg...etc in a decending order. Sorting images by file name worked out very nicely for this situation.

Really?  I am referring to the mtime in the cpg tables... To be honest I am not 100% sure how the albums end up displaying photos... does CPG do it by filename?

Can someone clarify this for us?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on May 22, 2006, 08:54:51 pm
there are both admin settable default sort orders, custom sort orders per album and user-preferences (cookie-driven) taken into account.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on May 22, 2006, 11:43:47 pm
there are both admin settable default sort orders, custom sort orders per album and user-preferences (cookie-driven) taken into account.

Oh well that just simplifies my job :)

Thanks for the info.
Title: Resolution of large size photos
Post by: cgc0202 on May 24, 2006, 11:33:14 pm
Hi Vuud,

I finally understood how to vary the sizes of the random photos, including creating  random large size photos

http://bios.treasuresoftheinternet.org/toti-test2.php 

What I noticed however was that the resolution was not very good in    large size photo as shown in the Test2 page:

http://bios.treasuresoftheinternet.org/toti-test2.php

 It appears, based from the features I used in the gallery that the low resolution of the large size photos was because they were based from the thumbnail nail photo rather than the intermediate (normal size) or original photo.  I also included other observations in the    large size photo  in the Test2 page

[http://bios.treasuresoftheinternet.org/toti-test2.php 

including other photos of various sizes, for comparison of the resolution.

Thanks.

cgc0202
Title: Re: Resolution of large size photos
Post by: vuud on May 25, 2006, 03:42:58 am
Hi Vuud,

I finally understood how to vary the sizes of the random photos, including creating  random large size photos

http://bios.treasuresoftheinternet.org/toti-test2.php 

What I noticed however was that the resolution was not very good in    large size photo as shown in the Test2 page:

http://bios.treasuresoftheinternet.org/toti-test2.php

 It appears, based from the features I used in the gallery that the low resolution of the large size photos was because they were based from the thumbnail nail photo rather than the intermediate (normal size) or original photo.  I also included other observations in the    large size photo  in the Test2 page

[http://bios.treasuresoftheinternet.org/toti-test2.php 

including other photos of various sizes, for comparison of the resolution.

Thanks.

cgc0202

Try "int" instead of normal in the settings you are using. 

For some reason I never went with normal, but termed it "intermediate"

have you seen the online doc's at http://cpmfetch.fistfullofcode.com ?  They leave some stuff to be desired but overall can be good




Title: Re: Resolution of large size photos
Post by: vuud on May 26, 2006, 02:49:40 pm
Try "int" instead of normal in the settings you are using. 

For some reason I never went with normal, but termed it "intermediate"

have you seen the online doc's at http://cpmfetch.fistfullofcode.com ?  They leave some stuff to be desired but overall can be good

Have we gotten up to the thing about requiring thousands of files?  I think that will be an easy one.

Title: Re: Resolution of large size photos
Post by: cgc0202 on May 27, 2006, 01:13:49 am
Hi Vuud,

You responded to my previous post ( http://forum.coppermine-gallery.net/index.php?topic=19564.msg147654#msg147654 ):

Try "int" instead of normal in the settings you are using. 

For some reason I never went with normal, but termed it "intermediate"


Just as a reference point for this clarification, each unique photo I have right now has the following versions in Coppermine:

   
Note that I changed the prefix  slightly  from "normal_ -> "n_" for the "intermediate" and (prefix: "thumb_") -> (prefix: "t_") for the "thumbnail"

Can you please clarify what you mean by: "Try "int" instead of normal in the settings you are using."


In your previous response to another issue:

 http://forum.coppermine-gallery.net/index.php?topic=19564.msg145660#msg145660

In that one your thumbnails are called t_ and your normal are called n_

That is why it is not finding thumbnails I think. 

You need to override the naming for thumb_ and normal_

Add in

$objCpm->cpm_setMediaPrefixes("t_", "n_");

after the new statement (that creates the object)

I already have added:  $objCpm->cpm_setMediaPrefixes("t_", "n_");

Did you mean, I have to change the prefix of the "intermediate"  size photos from "n_" to "int_"? Or, something else?

This is a related side issue: Is there a mechanism how the CPMFetch program recognize when to use the thumbnail or the "intermediate size -- depending on the specified width?


have you seen the online doc's at http://cpmfetch.fistfullofcode.com ?  They leave some stuff to be desired but overall can be good
I went over the entire online documents (including the FAQs) awhile back when I decided to use CPMFetch, and before I posted here.  Since I do not have any programming background (and do not understand complex PHP statements very well), the way I learn stuff that I do not understand is to recreate them one at a time. This was the reason why I create the "Test files"  -- each exploring a specific topic ending with questions that are not yet resolved.  The succeeding "test php's" build from previous ones.

Thanks.

cgc0202

P.S.

I will show you "Test php 4" next time; my self-tutorial dealing with how to specify the category and/or album that goes in the Fetched materials.  For some reason, when I use the "php statements" used in the online documents -- to specify the category/album -- they do not seem to work.

I will respond to your other post separately so that the two issues will not be mixed up.
Title: Re: Resolution of large size photos
Post by: vuud on May 28, 2006, 07:30:11 am
Can you please clarify what you mean by: "Try "int" instead of normal in the settings you are using."

Your page shows this:

Code: [Select]
<?php
$source 
"album=13";
$styleguide = array( //"TABLESTYLE" => "photoclip",
//"rowstyle" => "photoclip",
"cellstyle" => "photoclip",
"linkstyle" => "photoclip",
"alttag" => "Living Things",
"imagestyle" => "photoclip",
"imagesize" => 'normal',
"imagewidth" => '500');
$objCpm->cpm_viewRandomMedia (1,1,$styleguide);
?>


Modify the imagesize entry to look like:

Code: [Select]
"imagesize" => 'int',

The imagewidth one will also force the browser to resize the image to 500.  So right not its getting thumbnails and enlarging them.  If your normal files are about the right size I would suggest removing that entry and letting the image size stay where it is.

Quote
This is a related side issue: Is there a mechanism how the CPMFetch program recognize when to use the thumbnail or the "intermediate size -- depending on the specified width?

Yes, its the "imagesize" thing shown above.



Title: CPM Test Page #2c: Album- & Category-specific Photos, Photo-framing, etc.
Post by: cgc0202 on May 29, 2006, 08:54:46 am
I am very grateful with all the help you provide so far Vuud. 

I followed your suggestion above. I also re-read Fist Full of Code (FFoC): CPMFetch: http://www.fistfullofcode.com/projects/copperminefetch/index.php (http://www.fistfullofcode.com/projects/copperminefetch/index.php), focusing on   "Selecting specific albums and categories: http://www.fistfullofcode.com/projects/copperminefetch/manual/ch05s02.html  (http://www.fistfullofcode.com/projects/copperminefetch/manual/ch05s02.html)  and adapting the "Tips and Tricks" http://www.fistfullofcode.com/projects/copperminefetch/tips.php (http://www.fistfullofcode.com/projects/copperminefetch/tips.php).

CPM Test Page #2c for TOTI (Album- & Category-specific Photos, Variable sizes, and Photo-framing):
 
http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test2c.php (http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test2c.php)

summarizes what I have learned so far in understanding CPMFetch since we started interacting in this forum. 

It is not perfect yet, as you can see. There are more room for improvements.  However, the CPM Test Page #2c for TOTI is a dummy demo for an external webpage that is in the same domain or subdomain as Coppermine (CPG) and  CPMFetch.  Unlike my former plan, I have rearranged the locations of the components of my websites so that  Coppermine (CPG) and  CPMFetch would be in the same subdomain as my related websites (based on Joomla, Calendar, Forum, etc.).

I wonder if there are sites where I can get more tutorial on how CPMFetch can be bridged with the aforementioned applications  (i.e., Joomla, Calendar, Forum, etc.).  While I do not have any scripting background, and it may take me much longer than most people to learn something, I am able to "clone" a script for a specific purpose (e.g., CPM Test Page #2c for TOTI),  if I can have access to a well-written tutorials, just like your "Fist Full of Code (FFoC): CPMFetch"

While it will be quite different from page to page, as well as more complex and elaborate, all the actual applications I will have for CPMFetch  are already outlined in  CPM Test Page #2c for TOTI (Album- & Category-specific Photos, Variable sizes, and Photo-framing):
 
http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test2c.php (http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test2c.php)

In this sense, what I wanted to do is now technical feasible.  In relation to this project, my next project would be to attempt to port CPMFetch  to Joomla.  Would it be possible to show you some relevant information from Joomla random photos "module" to get some ideas from you on how I can use that to port  CPMFetch  to Joomla?

Thanks again for your continued help and patience.

cgc0202
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dcross on May 29, 2006, 06:44:28 pm
New to this and trying to get the cftest.php to work.  Please see http://www.borgcube.co.uk/cpmfetch/cftest.php for details.  Since the test page tell you what my system is I'm not putting it here in the post.

Any help appreciated.

David.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: dcross on May 29, 2006, 06:57:06 pm
Umm, for some reason I can't edit my own post, anyway an update.

I have fixed the dao.php issue, but I still get the 'Notice: Undefined index: SCRIPT_FILENAME in c:\domains\borgcube.co.uk\wwwroot\cpmfetch\cftest.php on line 214 ' error.

Do I need to worry about this, I can get images now?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Ruiz on May 29, 2006, 08:26:35 pm
if i want to display more photos from cpg on html file,how could i do?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on May 30, 2006, 05:15:01 am
http://forum.coppermine-gallery.net/index.php?topic=32023.msg148681#msg148681
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Ruiz on May 30, 2006, 07:11:21 am
I see,but I can hardly find the method...

Only one pics could dispay on the html file...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Joachim Müller on May 30, 2006, 07:20:18 am
As suggested on the other thread: if the page you're trying to display content from Coppermine on is not PHP-enabled (and a plain HTML page usually isn't), then you simply can't use cpmFetch. Stay out of this thread in that case and add regular HTML code to that page then. If the page actually is PHP-driven, then read the cpmFetch documentation and do as suggested there: just saying "I don't understand" just isn't enough if you expect a solution. Posting a link and what you did might be a good start.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Ruiz on May 30, 2006, 07:28:06 am
ok,thanks very much!
Title: Re: CPM Test Page #2c: Album- & Category-specific Photos, Photo-framing, etc.
Post by: vuud on May 30, 2006, 08:00:32 am

While it will be quite different from page to page, as well as more complex and elaborate, all the actual applications I will have for CPMFetch  are already outlined in  CPM Test Page #2c for TOTI (Album- & Category-specific Photos, Variable sizes, and Photo-framing):
 
http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test2c.php (http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test2c.php)

In this sense, what I wanted to do is now technical feasible.  In relation to this project, my next project would be to attempt to port CPMFetch  to Joomla.  Would it be possible to show you some relevant information from Joomla random photos "module" to get some ideas from you on how I can use that to port  CPMFetch  to Joomla?

I doubt I would be much help in getting it to work in Joomba.  Mostly because I have no real idea about joomba, 2) I have no real desire to learn about Joomba, and for the next month I will be incredibly busy with some life type stuff.  It gives me a headache to even think about it.  Also, my notebook just suffered a "sudden decelartion bug" which has rendered it near useless (runs for about 20 seconds at a time) thus reducing the amount of play time I have for this stuff.

Ah, but I would suggest figuring out how joomba templating works and figure out how to execute php code in it.  Cpmfetch should be easy from there.

Good luck with that


Title: Passes all tests in cftest.php but no thumbnails displayed
Post by: buchananben on May 30, 2006, 09:24:10 am
I have setup cpmfetch in /cpmfetch/ and my coppermine installation is running in /gallery/ . I have tried loading cftest.php (http://www.nightcats.org/cpmfetch/cftest.php), but no thumbails are displayed despite it passing all the tests. I don't know where to start as no error messages are displayed. I am using the latest coppermine and cpmfetch versions. I have done the commenting/uncommenting in the cpmfetch_dao.php file for cpg1.4.6 , and I have changed line 5 in cftest.php to reflect my install.

My only thought is that it is linked to the fact that I have bridging active with punBB.

Any help is much appreciated. Let me know what other info you need.
Regards
Ben
Title: Re: Passes all tests in cftest.php but no thumbnails displayed
Post by: vuud on June 01, 2006, 06:05:03 am
I have setup cpmfetch in /cpmfetch/ and my coppermine installation is running in /gallery/ . I have tried loading cftest.php (http://www.nightcats.org/cpmfetch/cftest.php), but no thumbails are displayed despite it passing all the tests. I don't know where to start as no error messages are displayed. I am using the latest coppermine and cpmfetch versions. I have done the commenting/uncommenting in the cpmfetch_dao.php file for cpg1.4.6 , and I have changed line 5 in cftest.php to reflect my install.

My only thought is that it is linked to the fact that I have bridging active with punBB.

Any help is much appreciated. Let me know what other info you need.
Regards
Ben

Bridging is probably the culprit.  Try adding a few test users to CPG through the admin panel.  If you start seeing some items then its probably the issue. 

The next version will make it easier to handle the bridging problem - but since my recent crash, impending wedding, etc... I am not sure when that will be.  There were suggestions here for removing the code from the sql queries to not access that information...  search back a bit and you will find some posted code.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Sy on June 03, 2006, 11:30:16 am
Hi,
  I had everything working under test conditions but then I deleted the test images and uploaded the proper ones in different categories.  Now no thumbnails are shown on the page where they used to :(

I'm using CPG v 1.4.6

CMF v 1.6.2

The gallery is located http://www.hayley-louise.co.uk/portfolio/ and the thumbnails of the latest uploaded images should be showing in the bottom box which can be found http://www.hayley-louise.co.uk/home.php

I've messed about with SQL & php quite a bit in the past but I am far from an expert...or even good lol

My host uses an Apache server running 1.3.34 (Unix)

The code I'm using on the home page to pull the latest uploaded images from CPG is
Code: [Select]
<?php $objCpm->cpm_viewLastAddedMedia(1,4,array("tablestyle" => "cpmf","imagestyle" => "cpmf")); ?>
I've added in the debug code and enabled it but no errors are produced.  As CPF is bridged with phpBB I have also added in the 2nd admin account which is how I got things working in test state.

Can anyone shed any light on this please as my girlfriend wants her site up ASAP and is moaning like mad lol ;)

Thanks for any help or advice

Sy
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: thomasmedi on June 04, 2006, 12:16:22 am
Hi,

I have tried to search solution but haven't find it. I'm running the latest version of Coppermine (1.4.6), the test runs ok but I get this error message in the end:

Fatal error: Call to a member function getRandomImageFrom() on a non-object in /var/www/gallery/cpmfetch/cpmfetch.php on line 770

Here is the test:

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 pinokio 2.6.10-1.771_FC2 #1 Mon Mar 28 00:50:14 EST 2005 i686 INFO
40 WebServer = Apache/1.3.33 (Unix) PHP/5.0.3 mod_accounting/0.5 FrontPage/5.0.2.2635 mod_perl/1.29 mod_deflate/1.0.21 mod_ssl/2.8.22 OpenSSL/0.9.7a INFO
45 PHP Version = 5.0.4 INFO
55 DOCUMENT_ROOT: /var/www/gallery INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /var/www/gallery/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS

Thanks for your help.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: thomasmedi on June 05, 2006, 12:45:34 pm
Ok. I got the last problem figured out myself and cftest runs ok now. Now I got another error when I try to install the thing to my blog sidebar.php.

Code: [Select]
ERROR: Path to Coppermine incorrect. (/var/www/blog/index.php/gallery//include/config.inc.php)
Fatal error: Call to a member function getLastAddedMediaFrom() on a non-object in /var/www/blog/cpmfetch/cpmfetch.php on line 532

No matter what I write inside the $objCpm = new cpm(' '); the system adds the /var/www/blog/index.php to the beginning. I just can't figure out where and what I should change and how should I change it. I have tried everything.

This shows the pictures if I just add it to the selfmade test.php and upload it to the root:

Code: [Select]
<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
//"TABLESTYLE" => "photoclip",
//"rowstyle" => "photoclip",
"cellstyle" => "photoclip",
"linkstyle" => "photoclip",
"alttag" => "Uusimmat kuvat",
"imagestyle" => "photoclip",
"imagesize" => 'thumb',
"imagewidth" => '80');
$objCpm->cpm_viewLastAddedMedia (2,2,$styleguide); 
$objCpm->cpm_close(); ?>

 


But when I add it to the sidebar or anywhere else in my site, it doesn't work.

Anyone? I have now spend two days with this plugin and I'm about to change from the Coppermine to Gallery2 since I just want to have the latest pictures somewhere inside my blog sidebar. I'm pretty frustrated. Thanks for help.


- Tuomas
Finland 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Sy on June 05, 2006, 01:26:51 pm
Code: [Select]
ERROR: Path to Coppermine incorrect. (/var/www/blog/index.php/gallery//include

Not an expert at all but I'd guess that you have an extra trailing forward slash in your coding when calling the object from the directory gallery.  Try changing it from '/gallery/' to '/gallery' and hopefully that will resolve it for you.

Sy
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: thomasmedi on June 05, 2006, 01:46:03 pm
Thanks Sy. It wasn't the problem. I had no slash in the gallery, I tried that too.

I didn't get it to work like it was supposed to but I got it functioning some other way. I want to share this if someone has similar problems as I did.

I just figured out that maybe I could fetch the data from the working test.php somehow. The test.php which I made worked alright when I put it to the root.

All I have in the test.php is this code:

Code: [Select]
<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
//"TABLESTYLE" => "photoclip",
//"rowstyle" => "photoclip",
"cellstyle" => "photoclip",
"linkstyle" => "photoclip",
"alttag" => "Uusimmat kuvat",
"imagestyle" => "photoclip",
"imagesize" => 'thumb',
"imagewidth" => '80');
$objCpm->cpm_viewLastAddedMedia (2,2,$styleguide); 
$objCpm->cpm_close(); ?>

I uploaded the test.php to the root of my site with ftp. Then I added this script to my site (in this case I put it to sidebar.php):

<?php
$ch = curl_init("http://myblog.domain.com/test.php");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>

That script fetches all the data written to the test.php and just puts it to my site.

If someone has similar problems as I had and wants to use it, go ahead. I found the script from some website. It works alright and is pretty useful in other things too. It just fetches all the data, information and images - I mean everything -  and includes it to your website. Coolio!  8)

- Tuomas
Finland
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Jurrie on June 08, 2006, 07:45:52 pm
Installed Coppermine 1.4.5 & CPMFetch 1.6.2. I've tried to comment/uncomment those lines. And it "works"...........a bit.

See this link: http://gallery.nederland1940-1945.nl/cpmfetch/cftest.php

There is one picture in the gallery, but it is not displayed. Has this got to do anything with this code-fixing or is there another problem?

Greetz,

Jurrie

I'm still having this problem (see 3 pages back). Anyone? When you click on the not-working-thumbnail, the correct picture is displayed.

I don't get it..hope you do ;)

Greetz,

Jurrie
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: zanary on June 10, 2006, 08:23:53 am
I got this error... please help =)

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

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

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: LooneyToonDad on June 10, 2006, 04:11:47 pm
I hope this is the right thread for my two questions. I have tried searching the forum (CPM Fetch specifically) and keep getting "Query not specific enough"(something like that). Anyway, I am using CPMFetch for simply showing the most recent 6 images. That's it. Nothing more. Here are my two questions.

1. Where do I change the function/variable to only show certain media types. In other words, I only want photos to show up (.jpg, .png, .gif, etc) but not videos (.wmv, etc). I read the docs and know there is a function to do this, but I am unsure of what/where to change, and whether I list what I don't want seen, or do want seen.

2. Is there a way to limit the amount of characters shown when using the option
Code: [Select]
"subtitle" => "%t"? If the image title is too long, I want to only show a set amount of characters so it doesn't throw the cell size off too much, and makes it easier to align the thumbnail with the title. Not sure if this can be done through CPMFetch, or if it would be a CSS thing.

ANy help would be appreciated. Thanks for creating this tool. It's great, especially since it's fairly easy for us newbies :).

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: SuperJETT on June 12, 2006, 01:57:38 am
I'm using Coppermine in bridged mode with vBulletin 3.5, everything works great.  I'm also using cpmfetch on the forum index page to pull random images, that works great too.

Now, I'm trying to pull from a specific album (or category, either would work for my need) but as soon as I specify one or the other, no image.

After reading much I'm sure it's related to running in bridged mode, so I wanted to look at the queries to see if I can make a modification to work for my specific need, but I can't enable debug mode.

Here is my working file, but no debug output:
Code: [Select]
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$debug true;
$objCpm->cpm_setDebugMode($debug);
$options = array('windowtarget' => '_blank');
$objCpm->cpm_viewRandomMediaFrom(1,1,"","");
$objCpm->cpm_close();
?>

Searching turned up nothing pertinent.

Does debug mode work or am I trying to enable it improperly?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Titan85 on June 14, 2006, 02:36:14 am
I am not 100% sure that this was not asked before, but i searched and looked through the first 5 pages of this thread, with no sucess and don't have time to look through 43 pages  :o. But anyways, my question is this: When I run the test for cpmfetch, it comes back with this error:
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/jbalcomb/echoefx.com/fetch/cpmfetch/cpmfetch_dao.php on line 710

Any idea what is wrong?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: SuperJETT on June 14, 2006, 02:43:39 am
I am not 100% sure that this was not asked before, but i searched and looked through the first 5 pages of this thread, with no sucess and don't have time to look through 43 pages  :o. But anyways, my question is this: When I run the test for cpmfetch, it comes back with this error:
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/jbalcomb/echoefx.com/fetch/cpmfetch/cpmfetch_dao.php on line 710

Any idea what is wrong?

You should have kept reading, but the answer is in the cpmfetch_dao file, comment out one line and uncomment the other, lines 57/62 I believe.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Titan85 on June 14, 2006, 02:46:36 am
You should have kept reading, but the answer is in the cpmfetch_dao file, comment out one line and uncomment the other, lines 57/62 I believe.
I am new to all this and don't really get what you said. What do you mean by comment out and uncomment?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: LooneyToonDad on June 14, 2006, 03:55:22 am
I am new to all this and don't really get what you said. What do you mean by comment out and uncomment?

You have to edit the PHP file "cpmfetch_dao.php" (using something like Dreamweaver or another editor). On line 54 you need to put /*..... */ around the line to comment it out (where ..... is the actual code), and on line 59 you need to get rid of the /*..... */  surrounding it. I had the same problem and it worked for me. I had read a post somewhere on here that explained it nicely, but I can't find it again.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Titan85 on June 14, 2006, 04:04:55 am
You have to edit the PHP file "cpmfetch_dao.php" (using something like Dreamweaver or another editor). On line 54 you need to put /*..... */ around the line to comment it out (where ..... is the actual code), and on line 59 you need to get rid of the /*..... */  surrounding it. I had the same problem and it worked for me. I had read a post somewhere on here that explained it nicely, but I can't find it again.
When I went to do that I found the code on line 54 (var $topPercentForMostViewed = 25;) and edited it (/*var $topPercentForMostViewed = 25;*/), but when I went to change line 59 I found a blank line. I tried it when i just had line 54 edited and I got the same error. Could the code be on another line? I also tried line 57 and 62 as SuperJETT suggested and I got the same error again.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: LooneyToonDad on June 14, 2006, 02:10:23 pm
Could the code be on another line?

Look for the following:

Code: [Select]
// 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';*/
You'll want to comment out the line under "This is for CPG versions prior to 1.4" and remove the comment from the line "This is for CPG v 1.4.1 beta 1". I think the line numbers are different based on what editor you use. (My ftp program shows 54 and 59). Again, this is what worked for me.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Titan85 on June 14, 2006, 04:38:38 pm
Look for the following:

Code: [Select]
// 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';*/
You'll want to comment out the line under "This is for CPG versions prior to 1.4" and remove the comment from the line "This is for CPG v 1.4.1 beta 1". I think the line numbers are different based on what editor you use. (My ftp program shows 54 and 59). Again, this is what worked for me.

Ok, I did what you said to do but I got a different error: Parse error: parse error, unexpected '=', expecting T_VARIABLE in /hsphere/local/home/jbalcomb/echoefx.com/fetch/cpmfetch/cpmfetch_dao.php on line 57. My line 57 looks like this:
Code: [Select]
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 I tried to remove the "=" but then I got this error: Parse error: "parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_VARIABLE in /hsphere/local/home/jbalcomb/echoefx.com/fetch/cpmfetch/cpmfetch_dao.php on line 57". I know it is something simple know but I don't know much at all  about PHP. I think its just that equal sign, but I don't know what to do with it. What should I do?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: LooneyToonDad on June 14, 2006, 11:13:58 pm
My line 57 looks like this:
Code: [Select]
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

In order to comment out the line you nee to put the /* before the start of the line's code and */ after the end of the line's code.

Put /* before the word "var" and put */ after the semicolon. It should look like this:

Code: [Select]
/* 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'; */
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Titan85 on June 14, 2006, 11:38:39 pm
In order to comment out the line you nee to put the /* before the start of the line's code and */ after the end of the line's code.

Put /* before the word "var" and put */ after the semicolon. It should look like this:

Code: [Select]
/* 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'; */
I didn't know to cancel out the whole line. That was the problem! Thanks for the help, I REALLY appreciate it.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Titan85 on June 15, 2006, 12:47:42 am
I have what could be a stupid question...Is there a way to use cpmfetch more than once on a page? For example, if i wanted to display the latest images from on album in one section of the page and display the latest images from another album on a different area of the page?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: LooneyToonDad on June 15, 2006, 04:00:32 pm
Thanks for the help, I REALLY appreciate it.

No problem. I'm very new at this stuff myself, so I'm not very good at explaining it yet, but since I had run into the same problem not 1 day before you did, I figured I'd try and help. Glad it's working now.

1. Where do I change the function/variable to only show certain media types. In other words, I only want photos to show up (.jpg, .png, .gif, etc) but not videos (.wmv, etc). I read the docs and know there is a function to do this, but I am unsure of what/where to change, and whether I list what I don't want seen, or do want seen.

2. Is there a way to limit the amount of characters shown when using the option
Code: [Select]
"subtitle" => "%t"? If the image title is too long, I want to only show a set amount of characters so it doesn't throw the cell size off too much, and makes it easier to align the thumbnail with the title. Not sure if this can be done through CPMFetch, or if it would be a CSS thing.

ANy help would be appreciated. Thanks for creating this tool. It's great, especially since it's fairly easy for us newbies :).

Any chance someone knows about these 2 questions? The first one is more important to me than the second, but help on either would be greatly appreciated (or a push in the right direction for more info). Thanks.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Titan85 on June 15, 2006, 04:06:15 pm
Any chance someone knows about these 2 questions? The first one is more important to me than the second, but help on either would be greatly appreciated (or a push in the right direction for more info). Thanks.
I think that this might help you: http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html (http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html)Not sure if it answers your first question, but I think I saw something like that when I was going through there  :D.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Titan85 on June 16, 2006, 05:22:04 am
I am not sure if anyone saw my second question because it was kinda mixed up with my first one. But I do have one question un answered:
I have what could be a stupid question...Is there a way to use cpmfetch more than once on a page? For example, if i wanted to display the latest images from on album in one section of the page and display the latest images from another album on a different area of the page?
Title: Where to define array of what media type extensions CPMFetch should display?
Post by: LooneyToonDad on June 17, 2006, 11:51:46 pm
I had asked this earlier, but maybe I didn't state it properly. I've read the docs and found that the function cpm_setFilter($filter) is what I want to change in order to have CPMFetch show only photos on my website (not video or music). I found the function in the file cpmfetch_dao.php. Here's the code I'm looking at:

Code: [Select]
function setFilter($filterarray) {
if ($filterarray == "") {
$this->filetypefilter = "";
} else {
$this->filetypefilter = " and (";
foreach ($filterarray as $filter) {
$this->filetypefilter .= " p.filename like '%" . strtolower($filter) . "'";
$this->filetypefilter .= " or p.filename like '%" . strtoupper($filter) . "'";
$this->filetypefilter .= " or ";
}
$this->filetypefilter = substr($this->filetypefilter,0, strlen($this->filetypefilter) - 4);
$this->filetypefilter .= ') ';
}
}

Being new to php , I'm not sure in which line I define the variable/array to tell it which extensions I want it to show (I really only want .jpg's for now, but in the future I may add more to the array). If someone could point out which line(s) to change, it would be very appreciated, or if I'm way off base on this altogether, please let me know. Thank you.
Title: Strange Behavior: cpm_viewLastAddedMediaFrom
Post by: alrs on June 22, 2006, 06:28:04 am
I'm using Coppermine 1.4.8 and cpmfetch 1.6.2 to create this row of thumbnails:

http://photos.bikeboom.com/cpmtest/thumbnail_header.php (http://photos.bikeboom.com/cpmtest/thumbnail_header.php)

Sadly, pictures in the category that were uploaded by a guest user don't show up in the html generated by cpmfetch.

Code: [Select]

<?php
include "cpmfetch.php";
$options = array( 'imageheight' => '75' 'windowtarget' => '_top' );
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMediaFrom 18"cat=2"$options);
$objCpm->cpm_close();
?>


Sleuthing around, I think that the reason that cpmfetch doesn't include pictures uploaded by guest (even after approved by moderator) can be found in this line of code in cpmfetch_dao.php

Code: [Select]
$sqlcode = "SELECT " . $this->sqlPictureAlbumSelect . " FROM " . $this->sqlPictureSourceSelect . " where p.aid = a.aid AND p.owner_id = u.user_id" . $this->filetypefilter ." and p.approved='YES' "
By knocking out
Code: [Select]
AND p.owner_id = u.user_id
I am able to get guest-uploaded pictures to show up, but they appear twice.  I'd like to see guest-uploaded photos (the bulk of the images on my site) get properly called by cpm_viewLastAddedMediaFrom.

Thanks.
Lars
http://bikeboom.com (http://bikeboom.com)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jasa on June 26, 2006, 01:12:31 am

First sorry to post this question on 3 places in CPG forum - Im new here and forum is big so it took time to figure out where and how to post...  ;)

Recently I installed CFGfetch 1.6.2 (CPG148) and everything works fine, but it shows only pictures from user galleries (uploadad through CPG)!
If I choose other public categories it shows no pictures!?
For example when I put for $source = "cat=1"; it works fine, when I put cat=2 or some other cat number which exist in my gallery, CPGfetch doesnt show anything!


My CPGfetch code on the main page is:
Code: [Select]
<?php
include "scripts/cpgfetch/cpmfetch.php";
$objCpm = new cpm('/galerija');
$options = array( 'imagestyle' => 'slika');
$source "";

$objCpm->cpm_viewLastAddedMediaFrom(31,$source,$options); 
$objCpm->cpm_viewRandomMediaFrom(1,1,$source,$options);

$objCpm->cpm_close(); ?>

I dont have any clue what is the problem...
Thanks for help...

Greetz
Jasa

PS. Does anybody know how to make CPGfetch to show random pictures from last added album?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jasa on June 27, 2006, 04:43:40 pm
Problem solved (now it works) I changed the source code slightly: :)
Database query was wrong because all pictures in public galleries have p.owner_id=0... :(
By random picture I put out p.owner_id = u.user_id and by getLastAddesMedia replaced throuh (p.owner_id = u.user_id OR p.owner_id = 0)...

Greetz
J.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: jasa on June 27, 2006, 07:19:33 pm
In my previous post I wrote something about solution of the problem to show every picture in gallery instead only user galleries – somebody asked me to explain this in detail.

First of all I think that CFMfetch has problems with public galleries which are uploaded with FTP. Since such pictures doesn’t have right picture owner – owner_id is 0 – all mysql queries doesn’t bring any results!

I need 2 things - cpm_viewLastAddedMediaFrom(5, 1,$source) and cpm_viewRandomMediaFrom(3,1,$source,$options); so I changed this two function which are in cfmfetch_dao.php

In function getRandomImageFrom
In line 457 I deleted p.owner_id = u.user_id so I’ve now:
Code: [Select]
$sqlcode = "SELECT " . $this->sqlPictureAlbumSelect . " FROM " . $this->sqlPictureSourceSelect . " WHERE a.aid = p.aid AND p.approved='YES' "
. $this->filetypefilter . " " . $this->privacyfilter . $sourceSql
. " ORDER BY rand(" .  $this->getRandomSeed()   . ") LIMIT $count";
 

And function getLastAddedMediaFrom
Line 430 I removed whole part of SELECT with user queries (maybe it would work in first case too) because when you have p.owner_id = u.user_id  it shows only the same pictures. Now I have (I was lazy so I copied code directly from sqlPictureAlbumSelect and sqlPictureSourceSelect):
Code: [Select]
$sqlcode = "SELECT  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 FROM cpg11d_pictures as p, cpg11d_albums as a where p.aid = a.aid" . $this->filetypefilter ." and p.approved='YES' "
. $sourceSql . " {$this->privacyfilter} "
. " ORDER BY p.ctime DESC LIMIT 0,$count";

Yeah – I agree this is absolutely bad coding but it works. I don’t have time and knowledge of mysql and php to solve this right… I just played and figured how it works…

Maybe author will present some bugfix in future… :)

Greetz
J.
 
PS. Sorry because bad English…
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: davelu on June 28, 2006, 07:32:02 pm
I need a bit help here. How would retrive the source of an image to a var?

include ......
cmp...
$image = $objCpm->cpm_viewRandomMedia (1,6);

I hope you get what i mean. Thanks
-Dave
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 04, 2006, 03:04:34 pm
Just reinstalled this on a new host to work on a test site.

My URL is http://saukairbrakes.awardspace.com and have installed Coppermine into a folder called gallery and cpmfetch into cpmfetch, both on the root.

If I configure cftest.php with '/gallery', I get the 'can't find CPG' in the error.  If I set in the full path of '/home/www/saukairbrakes.awardspace.com/gallery', it finds the CPG file but the test pictures can't be displayed and the URL shows as 'http://saukairbrakes.awardspace.com/home/www/saukairbrakes.awardspace.com/gallery/displayimage.php?pos=-3' which I'm assuming looking at it that it's completely.

I've created a new PHP page with the following code block but just get errors coming back which can be viewed here http://saukairbrakes.awardspace.com/pictest.php

Code: [Select]
include "http://saukairbrakes.awardspace.com/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close();

I hope someone can help me overcome these problems
Title: show last updated albums not chronological
Post by: jerx on July 06, 2006, 12:20:46 am
I am trying to show the last added albums during the last 7 days on my homepage. I wanted to use cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="") function, but it displays the last added albums sorted according to categories. My categories are sorted alphabetically and therefore the function cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="") displays the last updated albums sorted by category.

Example:

category a: album a1, created on 2006/06/23, album id=1
                album a2, created on 2006/06/30, album id=4
category b: album b1, created on 2006/06/23, album id=2
                album b2, created on 2006/06/30, albunm id=5
category c: album c1, created on 2006/06/23, album id=3
                album c2, created on 2006/06/30, albunm id=6

Right now cpmfetch displays the following:
album a1 (06/23)
album a2 (06/30)
album b1 (06/23)
album b2 (06/30)
album c1 (06/23)
album c2 (06/30)
This is not cronological. It displays albums of the category, which is listed first, in ascending creation order. Then it does the same with the categories, which are listed second and third.

I want the albums to be displayed in descending creation order, no matter which category they belong to. So, it should be sorted in descending album id order. Here it would look like this:
album c2 (06/30), id=6
album b2 (06/30), id=5
album a2 (06/30), id=4
album c1 (06/23), id=3
album b1 (06/23), id=2
album a1 (06/23), id=1
Here the order is chronological and it is much easier to know, which albums have been added recently.

Is it possible to change the display order of the function? Or is there any other way to display the most recent album updates?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: HoundSP on July 07, 2006, 07:18:40 am
I'm having problem with CPM fetch after bridge with IPB 2.0.x.The imge display only shows the admin album.
Refer to this post : http://www.simplemachines.org/community/index.php?topic=73366.0

I've tried to change the table name to match with ipb table name but it still not working.

I've made changed on the following


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

To ipb user table

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

also change

Code:
u.user_lastvisit AS uUser_lastvisit
to

Code:
u.last_visit AS uUser_lastvisit
and all instances

Code:
u.user_id
to

Code:
u.id
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 07, 2006, 02:41:11 pm
right think my problem is that I need to force the document root as it's coming back as /.

I've added
Code: [Select]
$_REQUEST['DOCUMENT_ROOT'] = "/home/www/saukairbrakes.awardspace.com"; but still get no Document_root showing up.

I'm just trying this at the moment on the test file
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Duerre76 on July 08, 2006, 08:16:20 pm
Hello!

I am not customize to this forum, so i didn't find where to create new thread, but maybe this is not possible (i am french and doesn't understand everything in english)

Then, sorry if this question has already been asked but.. i have two different galleries installed on my website (the two are runned by coppermine) and i would like to know if this possible to display latest images update of both galleries on the main site. I tried several things but each time i receive this message "Cannot redeclare class cpm".

Thank you by advance  ;D

~Duerre~
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on July 08, 2006, 08:18:58 pm
Try like this:

Code: [Select]
<?php

include "path/to/cpmfetch.php";

$objCpm = new cpm('/gallery1');
// code here for gallery 1

$objCpm = new cpm('/gallery2');
// code here for gallery 2

?>

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Duerre76 on July 08, 2006, 09:47:49 pm
Try like this:

Code: [Select]
<?php

include "path/to/cpmfetch.php";

$objCpm = new cpm('/gallery1');
// code here for gallery 1

$objCpm = new cpm('/gallery2');
// code here for gallery 2

?>


Thank you very much! It works  :-*
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Ashari on July 13, 2006, 08:12:51 pm
Hi, I'm using Coppermine 1.4.8 and I am trying to use CPFetch to call images from all of my member's albums. they are not private, however when I use
print "<center>";
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(5,1,array("imagesize" => "Thumb","windowtarget" => "_new","subtitle" => "Member: %o - %c "));
$objCpm->cpm_close();
print "</center>";

I ONLY get images from the album created by the admin. I have tried using "cat=1" but that creates an error. Do I need to change something in my dao.php file? I've been searching the board but can't find an answer. Can someone help me please?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 18, 2006, 02:17:18 pm
ok just moved my website to new host.

I've added the following code into a test page

Code: [Select]
include "http://simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpmfetch/cpmfetch.php";
$objCpm = new cpm('http://simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close();

Host is http://simaviatorsuk.co.uk.streamlinenettrial.co.uk, cpmfetch is installed in /cpmfetch and gallery in /cpg148

When I access the page I get the following error

Fatal error: Cannot instantiate non-existent class: cpm in e:\domains\s\simaviatorsuk.co.uk.streamlinenettrial.co.uk\user\htdocs\pictest.php on line 13

Can anyone help please
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on July 18, 2006, 02:52:21 pm
Use a path not an url.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 18, 2006, 03:53:55 pm
I did try
Code: [Select]
$objCpm = new cpm('/cpg148'); as well but that still gives same error
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 19, 2006, 01:30:30 pm
cftest is giving the following errors

Code: [Select]
Notice: Undefined index: SCRIPT_FILENAME in e:\domains\s\simaviatorsuk.co.uk.streamlinenettrial.co.uk\user\htdocs\cpmfetch\cftest.php on line 214
5 You set your partial URL to /cpg148 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 = Windows NT IIS686 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 INFO
45 PHP Version = 4.3.2 INFO
55 DOCUMENT_ROOT: e:\\domains\\s\\simaviatorsuk.co.uk.streamlinenettrial.co.uk\\user\\htdocs INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: Not found BAD
75 DOCUMENT_ROOT is not a good match BAD
80 Found CPG config file PASS

but I'm getting thumbnails
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 20, 2006, 02:28:52 pm
Sorry just wandering if any update on this. This is the last part I'm trying to get finished on a website before I go live.

latest is that on a test page I've made, I get

Code: [Select]
Fatal error: Cannot instantiate non-existent class: cpm in e:\domains\s\simaviatorsuk.co.uk.streamlinenettrial.co.uk\user\htdocs\pictest.php on line 11

which is the line pointing it to the gallery.

Full code is

Code: [Select]
<?php
include "http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpmfetch/cpmfetch.php";
$objCpm = new cpm('http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close(); ?>

I've tried the paths with full URLS and without.

The php file is stored in http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/pictest.php

Gallery is stored in http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpg148

and cpmfetch is installed in http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpmfetch

Really hope someone can help before I try a different gallery
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on July 20, 2006, 02:52:07 pm
Use a path not an URL.

Code: [Select]
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 20, 2006, 04:06:13 pm
cftest is giving the following errors

Code: [Select]
Notice: Undefined index: SCRIPT_FILENAME in e:\domains\s\simaviatorsuk.co.uk.streamlinenettrial.co.uk\user\htdocs\cpmfetch\cftest.php on line 214
35 Server OS = Windows NT IIS686 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 INFO
45 PHP Version = 4.3.2 INFO
55 DOCUMENT_ROOT: e:\\domains\\s\\simaviatorsuk.co.uk.streamlinenettrial.co.uk\\user\\htdocs INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: Not found BAD
75 DOCUMENT_ROOT is not a good match BAD

but I'm getting thumbnails

I don't really support windows for webservers with this... it does work, but they seem to be fast and loose with the environmental variables they set.  If your getting thumbnails though it is fine.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 20, 2006, 04:26:58 pm
ok swapped over to linux database, assuming this is preferred to windows server.

got rid of that error now, just have another one which also shows up on the cftest.php.  Cftest.php is showing all ok for everything and nothing bad just the following error

Code: [Select]
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/fhlinux205/s/simaviatorsuk.co.uk.streamlinenettrial.co.uk/user/htdocs/cpmfetch/cpmfetch_dao.php on line 710
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 20, 2006, 04:50:13 pm
ok swapped over to linux database, assuming this is preferred to windows server.

got rid of that error now, just have another one which also shows up on the cftest.php.  Cftest.php is showing all ok for everything and nothing bad just the following error

Code: [Select]
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/fhlinux205/s/simaviatorsuk.co.uk.streamlinenettrial.co.uk/user/htdocs/cpmfetch/cpmfetch_dao.php on line 710

Linux servers and nicer anyway. 

Read the readme that came with it... it explains what to do to get rid of that error.

Have a nice day

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 20, 2006, 04:57:47 pm
yep just found out I need to uncomment and comment stuff, working at last.  now I can play and get just images from certain albums
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 20, 2006, 05:20:51 pm
Spoke too soon.  Managed to get one column showing random images but I can't get a second column to work showing last added.

I think it's got something to do with it already opening the connection.

Can someone quickly please paste the script I need. So far I have

Column 1
Code: [Select]
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close();

column 2
Code: [Select]
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewLastAddedMedia (10,1);
$objCpm->cpm_close();
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 20, 2006, 07:50:46 pm
Code: [Select]
[quote author=stuarta link=topic=19564.msg159269#msg159269 date=1153408851]
Spoke too soon.  Managed to get one column showing random images but I can't get a second column to work showing last added.

I think it's got something to do with it already opening the connection.

Can someone quickly please paste the script I need. So far I have

Column 1 [code]include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close();

column 2
Code: [Select]
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewLastAddedMedia (10,1);
$objCpm->cpm_close();
[/quote]

You just need one new and one close...

At the start of your page (or at least before column 1)
$objCpm = new cpm('/cpg148');


1st column
$objCpm->cpm_viewRandomMedia (10,1);

2nd column
$objCpm->cpm_viewLastAddedMedia (10,1);


End of page (or at least after the 2nd column)
$objCpm->cpm_close();

[/code]

If you still get errors, please post what the error / problem is...

thanks




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 20, 2006, 08:15:00 pm
yep works thanks
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 20, 2006, 08:44:08 pm
yep works thanks

Good.  Remember you can issue as many calls as you want between the "new" and the "close".  In fact, its most efficent this way.

Vuud
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 20, 2006, 08:52:51 pm
goin to try calling from particular album now
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 20, 2006, 11:43:30 pm
Just uploaded some new pics to my gallery and they aren't showing up under the last added images using $objCpm->cpm_viewLastAddedMedia (10,1);

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 21, 2006, 03:36:35 am
Just uploaded some new pics to my gallery and they aren't showing up under the last added images using $objCpm->cpm_viewLastAddedMedia (10,1);

They should.  Did you upload them to a private album or something?  Whats the link?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 21, 2006, 08:24:05 am
nope album same as the other one.

home page is  http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php

once on the gallery, the screenshots I added last night are showing as Last Added
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 21, 2006, 04:55:10 pm
Sorry only me again.

Ok, got random media but for some reason last added still isn't working  ???

Just managed to pull out the author name but having problems styling the font.

I have a tag in my stylesheet called .copyright which I want to use.  I've applied the following code but it's not formatting.

Code: [Select]
$options = array('subtitle'=>'%t by %o',"cellstyle"=>".copyright");
$objCpm->cpm_viewRandomMedia (5,1,$options);
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: kronik on July 21, 2006, 09:45:44 pm
Hi

Is it possible to show last/random images in Flash using cpmfetch?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 21, 2006, 09:56:36 pm
Hi

Is it possible to show last/random images in Flash using cpmfetch?

If you can remotely retrieve an image (as in http://www.yourdomainname.com/imagename.jpg) from flash you can.  I don't know flash that well, but I suspect its possible
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Filmgirl on July 23, 2006, 02:37:59 am
I can't seem to get the target=_blank aciton to work this is the code I'm using:

<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$options = array('windowtarget' => '_blank');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1, "","");
$objCpm->cpm_close();
?>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 23, 2006, 04:00:06 am
I can't seem to get the target=_blank aciton to work this is the code I'm using:

<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$options = array('windowtarget' => '_blank');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1, "","");
$objCpm->cpm_close();
?>

You are not sending the $options array into the $objCpm. 

You also need to spec an album I think.

$objCpm->cpm_viewRandomMediaFromAlbum(1,1, 6,$options);

Would display 1 image from album #6
 



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Filmgirl on July 23, 2006, 06:02:29 pm
So I can only have the target_blank to work for only one album... I can't have it for the whole gallery?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 23, 2006, 08:16:12 pm
So I can only have the target_blank to work for only one album... I can't have it for the whole gallery?


Sorry, since you were using the function call to get from an album, I thought you wanted that.

Otherwise something like:

Code: [Select]
$objCpm->cpm_viewRandomMedia(1,1,$options);
Is what you want
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 24, 2006, 04:10:26 pm
Sorry does anyone have any ideas why I can't pull in last added images or a particular album.

It seems to want to default to the same folder all the time.

Currently I have

Code: [Select]
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewRandomMedia(4,1,);

Code: [Select]
$objCpm->cpm_viewLastAddedMedia(4,1,);
$objCpm->cpm_close();

This is refusing to call in Last Added Media even though on the gallery itself there is different last added
On top of this, i've tried to call a particular album, but it's picking up the same images as with the other two.

Code: [Select]
$objCpm->cpm_viewLastAddedMedia(1,1,"album=2")
This should be an album of screenshots.

I'm also having difficulties formatting the text that it returns for file name and author.

thanks again

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 24, 2006, 11:43:01 pm
Code: [Select]
$objCpm->cpm_viewLastAddedMedia(1,1,"album=2")This should be an album of screenshots.

No, this should generate an error, or at least ignore the album=2

Review the syntax of the command you are using at this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s03.html

Your probably thinking of:
cpm_viewLastAddedMediaFrom

Syntax is at the above link also
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 09:49:55 am
ok just tried $objCpm->cpm_viewLastAddedMediaFrom (1,1, "album=2"); and it's still showing wrong album lol, damn thing
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: udgang99 on July 25, 2006, 11:32:12 am
Hi ...

I'm a very new (novice) user of this whole php/mysql/gallery-thingy, so please bear with me...
I'm trying to install the Fetch, and I'm following the instructions here: http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php

-when I go to the cftest.php, I get this error (http://udgang99.dk/cpmfetch/cftest.php)   :
Quote
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/web/gb1157/cpmfetch/cpmfetch_dao.php on line 710
... I'm pretty sure I'm using "standard prefixes" (novice, remember ... too scared to try and change anything!) ...

what do I do?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 11:45:23 am
That is down to something that is explained in the instructions.  Sorry not meaning to be awkward, but I had the same problem and I'm sat here scratching my head to think what I done to resolve it.

If I remember I'll post it back and in the meantime maybe someone else might be able to help
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2006, 03:59:30 pm
Hi ...

I'm a very new (novice) user of this whole php/mysql/gallery-thingy, so please bear with me...
I'm trying to install the Fetch, and I'm following the instructions here: http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php

-when I go to the cftest.php, I get this error (http://udgang99.dk/cpmfetch/cftest.php)   :... I'm pretty sure I'm using "standard prefixes" (novice, remember ... too scared to try and change anything!) ...

what do I do?

Read the instructions that came with the program.  Sometimes the README's there contain information to that specific release.

(It is in there).
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2006, 04:01:47 pm
ok just tried $objCpm->cpm_viewLastAddedMediaFrom (1,1, "album=2"); and it's still showing wrong album lol, damn thing

Can you post your links again?  I dredged up the old ones and one gave me an error and the other could not be found.  Could be me though - its early here.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 04:11:25 pm
Yeah sorry renamed the installation folder earlier.

Gallery is installed here  http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/gallery/

Test page I have is here  http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/pictest.php

Album 2 should be screenshots which obviously you'll be able to see from the main gallery page although now it doesn't seem to be displaying anything
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: udgang99 on July 25, 2006, 04:18:19 pm
Read the instructions that came with the program.  Sometimes the README's there contain information to that specific release.

(It is in there).


Arrghhh --- where??? I've been going over this (http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html), but I still can't find anything!!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2006, 04:23:19 pm
Yeah sorry renamed the installation folder earlier.

Gallery is installed here  http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/gallery/

Test page I have is here  http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/pictest.php

Album 2 should be screenshots which obviously you'll be able to see from the main gallery page although now it doesn't seem to be displaying anything

album 2 is the "SAUK Flying club" according to your gallery, NOT screenshots
Screenshot competition is album 6.
But those are all really problems for another forum.

Not sure why your code would not produce anything at all though.   Please post the full code. 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2006, 04:26:53 pm
Arrghhh --- where??? I've been going over this (http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html), but I still can't find anything!!

Programs ofter contain release notes... things that only apply to that version of the program.  In this case it is in a file named "Releasenotes_ something (the something is the version number).  It was in the file you downloaded.

The most recent one is also online on the downloads page.
http://cpmfetch.fistfullofcode.com/projects/copperminefetch/downloads/releasenote_1.6.2.txt

Sorry for the confusion... I've been doing dev so long I forget that other people don't actually know this stuff.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 04:32:05 pm
yep sorry album 2 (flying club is the one I'm trying to pull out)

I'm sure it's something with my code

Code: [Select]
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFrom (1,1,"album=2");
$objCpm->cpm_close();

I want to use Random images, last added images from all galleries and then individual pages to select random and last added from particular albums
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: udgang99 on July 25, 2006, 04:36:14 pm
Programs ofter contain release notes... things that only apply to that version of the program.  In this case it is in a file named "Releasenotes_ something (the something is the version number).  It was in the file you downloaded.
The most recent one is also online on the downloads page.
http://cpmfetch.fistfullofcode.com/projects/copperminefetch/downloads/releasenote_1.6.2.txt
Sorry for the confusion... I've been doing dev so long I forget that other people don't actually know this stuff.

Vuud - I'm so sorry for being an aparent moron ... but going over the releasenote has brought me nowhere nearer an answer! I have NO idea whatsoever what the information in that file is usefull for!?!?!   If the answer IS in there, could you please, please show it to me???
It is the newest Fetch I have downloaded, and I'm using CPM 1.4.8 ...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on July 25, 2006, 04:39:35 pm
Quote
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.  If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2006, 04:39:41 pm
Vuud - I'm so sorry for being an aparent moron ... but going over the releasenote has brought me nowhere nearer an answer! I have NO idea whatsoever what the information in that file is usefull for!?!?!   If the answer IS in there, could you please, please show it to me???
It is the newest Fetch I have downloaded, and I'm using CPM 1.4.8 ...


I guess its mislabeled as its no longer the beta, but still applies:

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.  If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 04:42:00 pm
That's it, you need to comment and uncomment some text
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: udgang99 on July 25, 2006, 04:57:26 pm
Ahhhh ...
I UNcommented something at line 62 (!!!)

Code: [Select]
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';

But I couldn't find anything to COMMENT around line 54 ... but it LOOKS like it works now! :)
http://udgang99.dk/cpmfetch/cftest.php

-Thanks !!!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 05:02:11 pm
yep looks good, you should be cruising now
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2006, 05:06:45 pm
yep sorry album 2 (flying club is the one I'm trying to pull out)

I'm sure it's something with my code

Code: [Select]
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFrom (1,1,"album=2");
$objCpm->cpm_close();

I want to use Random images, last added images from all galleries and then individual pages to select random and last added from particular albums

Add in the debug line I inserted below, then point me at the page it is on.

Code: [Select]
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_setDebugMode(true);
$objCpm->cpm_viewLastAddedMediaFrom (1,1,"album=2");
$objCpm->cpm_close();



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 05:12:03 pm
ok done, and in the same location

http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/pictest.php

I see there is a whole heap of info in the source now
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 06:07:20 pm
oooh and the other thing if you can please, I'm struggling to finf the correct format for pulling out the filename and author and using a particular css style to format the text.  Would be grateful if you could include that on your reply.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2006, 06:11:56 pm
oooh and the other thing if you can please, I'm struggling to finf the correct format for pulling out the filename and author and using a particular css style to format the text.  Would be grateful if you could include that on your reply.

I am not sure on the original problem... the SQL call looks okay.  Something strange is going on somewhere - afaik your the only one with this problem.  I may be able to look into it more later, but I have lots to do right now.

Anyway, the info for pulling that all out is in the documentation online.  If you get stuck, post - but I am not going to copy and paste it into the forum for ya :)

There is also examples on the website for CSS (some anyway)

Good luck
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 06:14:47 pm
well I am stuck with it as it's refusing to use the css style's I've created and the instructions on fistfullofcode aren't unfortunately the easiest to follow, or maybe it's just me being thick
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2006, 06:20:23 pm
well I am stuck with it as it's refusing to use the css style's I've created and the instructions on fistfullofcode aren't unfortunately the easiest to follow, or maybe it's just me being thick

Feel free to submit updated documentation - I will be happy to post it.  I hate writing doc's and in the beginning had no real intention to write them at all.  I'd welcome examples, rewritten for clarification, updates, etc...   Many people like using cpmfetch, I can count on one hand how many submissions I have gotten back to help out.  Which is fine - opensource is generally like that.  I wrote this for myself and posted it so other people can benefit from it.  Other than it is definately code of some sort, I make no warrenties or anything.  On the bright side - its free!

As for the CSS, if you are having a problem - post what you are doing.  I can't see what you are doing wrong from here. 


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 06:29:39 pm
yeah thankyou.  not meaning to have a go.  If I get this working then maybe it could be added to the docs.

Great system and really want to fully get it working
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 25, 2006, 06:31:29 pm
This is what I was using for grabbing the filename and author and formatting

Code: [Select]
$options = array('subtitle'=>'%t by %o');
$objCpm->cpm_viewLastAddedMedia(4,1,$options,array("imagestyle" => "quote"));
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2006, 06:33:10 pm
yeah thankyou.  not meaning to have a go.  If I get this working then maybe it could be added to the docs.

Great system and really want to fully get it working

In short for CSS...

Here is the list of option array entries... 
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html

Make sure that you have the option array passed into the function you are calling.  That's probably the biggest mistake.

And make sure it matches your CSS definition

Then look at the source and make sure its including the class="" on the generated cpmfetch stuff.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 25, 2006, 06:37:34 pm
This is what I was using for grabbing the filename and author and formatting

Code: [Select]
$options = array('subtitle'=>'%t by %o');
$objCpm->cpm_viewLastAddedMedia(4,1,$options,array("imagestyle" => "quote"));

Yeah, thats botched up in the coding.  Either of these two would work:

Code: [Select]
$options = array('subtitle'=>'%t by %o',"imagestyle" => "quote" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
[/quote]

or

Code: [Select]
$objCpm->cpm_viewLastAddedMedia(4,1,array('subtitle'=>'%t by %o',"imagestyle" => "quote" ));[/quote]

The way you were doing it would cause the imagestyle thing to either be ignored or confuse the program at worst.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 26, 2006, 10:01:02 am
ok thanks Vuud.

Changed the code to

Code: [Select]
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia(4,1,array('subtitle'=>'%t by %o',"imagestyle" => "quote" ));

on one column and

Code: [Select]
$options = array('subtitle'=>'%t by %o',"imagestyle" => "quote" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();

on the other.  Using the 'quote' class though the text under the picture should be red but it isn't

http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 26, 2006, 03:10:00 pm
ok thanks Vuud.

Changed the code to

Code: [Select]
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia(4,1,array('subtitle'=>'%t by %o',"imagestyle" => "quote" ));

on one column and

Code: [Select]
$options = array('subtitle'=>'%t by %o',"imagestyle" => "quote" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();

on the other.  Using the 'quote' class though the text under the picture should be red but it isn't

http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php


Good.  Well be careful with them.  Check your outputted code to see where it is setting the css class... for example imagestyle will only set it on the img tag itself.  Cpmfetch allows you a lot of fine control over what is what css.




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 26, 2006, 03:17:07 pm
so "imagestyle" won't change the text?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 26, 2006, 03:23:16 pm
so "imagestyle" won't change the text?

Why would it?  Its to change the css for the image.

I won't go into lots of detail, since that is more of a basic html question than a cpmfetch.

But on this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html

You probably want to play with the cellstyle setting.  That will assign a css to the cell, which contains the text.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 26, 2006, 03:37:27 pm
thought as much, cellstyle was the one i wanted and got that sorted.

Just need to get to the bottom of why it isn't picking up the correct albums or last added pictures
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 26, 2006, 06:05:26 pm
Sorry Vuud did you manage to get chance to look at the SQL or no?  I know you said you were busy. 

My final problem now  ;)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 26, 2006, 06:15:42 pm
Sorry Vuud did you manage to get chance to look at the SQL or no?  I know you said you were busy. 

My final problem now  ;)

I took a quick look and it looks okay...  its drawing the right album id and submitting it. 

Next step would be looking at the tables...  If you want to export your SQL tables for it, I can load it up here and see what is up with the photos.   Otherwise I am not sure what to do.  You can PM a download location for the export if you want.

Other than that - I am not sure what I can check

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 26, 2006, 06:23:36 pm
ok pm'd u.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 27, 2006, 06:07:24 am
ok pm'd u.

Your bridged with something.  It's a well known problem.  Basically, cpmfetch is looking for user information and its not there since it is in the forum database instead.

There are some posted solutions in the forums here, but essentially you need to yank all the information out of the sql statements that look up user info. 

Or

Create the same number of users in your cpg forum that you have in the other forum

Or

wait an indeterminant amount of time for me to start sorting out how to handle this in the next next version.

One of those, but that is definately your problem.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 27, 2006, 02:57:33 pm
ok I've turned off the bridge and it appears to be working.

One last thing, how can I fix the depth of the tables.  At the moment it's pulling out 4 images, but depth depends on how many lines of text is there.  I could possibly just fix the table depth to a certain pixel in Dreamweaver
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 27, 2006, 03:43:47 pm
ok I've turned off the bridge and it appears to be working.

One last thing, how can I fix the depth of the tables.  At the moment it's pulling out 4 images, but depth depends on how many lines of text is there.  I could possibly just fix the table depth to a certain pixel in Dreamweaver

No idea on this one... there is no provision to truncate the text or anything.  Sorry
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 27, 2006, 04:12:51 pm
that's ok.  thanks anyway for all your help
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 28, 2006, 10:53:48 am
Code: [Select]
Your bridged with something.  It's a well known problem.  Basically, cpmfetch is looking for user information and its not there since it is in the forum database instead.

There are some posted solutions in the forums here, but essentially you need to yank all the information out of the sql statements that look up user info. 

Or

Create the same number of users in your cpg forum that you have in the other forum

Ok everything done now, just looking at solving this problem.  I've rebridged and getting the same sort of problem where it's not picking up individual albums.

The user list in the gallery and forum has the same amount of users.

Been looking for solutions but not 100% sure of the error that I'm looking for
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 28, 2006, 04:04:11 pm
Code: [Select]
Your bridged with something.  It's a well known problem.  Basically, cpmfetch is looking for user information and its not there since it is in the forum database instead.

There are some posted solutions in the forums here, but essentially you need to yank all the information out of the sql statements that look up user info. 

Or

Create the same number of users in your cpg forum that you have in the other forum

Ok everything done now, just looking at solving this problem.  I've rebridged and getting the same sort of problem where it's not picking up individual albums.

The user list in the gallery and forum has the same amount of users.

Been looking for solutions but not 100% sure of the error that I'm looking for

Here is what I would do...  Find a photo that you should be getting but are not.  Look in the pictures table and get the owners id.  Then look that up in your users and make sure it exists.  If one is missing then that could be something.

Basically that is what is probably happening... the picture table has user id's that can't be found in the cpg user table (because its bridged).

At least thats my experience





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 28, 2006, 04:14:04 pm
pics were uploaded by myself though had have same username on both, that's what's odd
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 28, 2006, 04:20:29 pm
pics were uploaded by myself though had have same username on both, that's what's odd

Username does not matter.  Each has a number assigned to the name.  The number is what matters
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 28, 2006, 04:36:47 pm
ok completely confused now.  think i may forget the bridging.

My user id for Stuart in the forums is "1", which is also my admin username and was the only username that I had in coppermine.  All the albums were created with this user.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 28, 2006, 05:49:14 pm
ok completely confused now.  think i may forget the bridging.

My user id for Stuart in the forums is "1", which is also my admin username and was the only username that I had in coppermine.  All the albums were created with this user.

I don't know.  If you can tell me what picture should be coming up, the code and page it is trying from and email me the access information again, I can take another look tonight. 
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 28, 2006, 05:55:32 pm
That's ok, switched off the bridging for now and about to leave work and go home and chill over the weekend lol

My brain fried ere trying to do private work and getting stupid requests from staff when they printer or pc won't work lol

Thanks anyway Vuud, have good weekend
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 31, 2006, 05:13:42 pm
right sorry only me again with an option query.

Is it possible to show ratings for an image and/or get people to rate it from the thumbnail in a random display.

I'm using

Code: [Select]
$options = array('subtitle'=>'%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);

on this page.  Its an album for a screenshot competition.  Would like to show ratings or stars below it.  I've tried various things with no joy

http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 31, 2006, 05:38:10 pm
right sorry only me again with an option query.

Is it possible to show ratings for an image and/or get people to rate it from the thumbnail in a random display.

I'm using

Code: [Select]
$options = array('subtitle'=>'%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);

on this page.  Its an album for a screenshot competition.  Would like to show ratings or stars below it.  I've tried various things with no joy

http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php


I suspected we'd not heard the last from you.
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html
--------------------------------------------------

%v - total number of votes cast for this photo
%V - the current rating in number of stars to one decimal place


There is no way through my code to cast a vote from the thumbnail - they can click on it and go to the gallery and then cast a vote there.  I'd include some instructions telling them to do this.

Otherwise, maybe some custom PHP in there to increment the vote counter or something...  I dunno

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 31, 2006, 05:44:37 pm
Quote
I suspected we'd not heard the last from you.
nice

Tried that on

Code: [Select]
$options = array('subtitle'=>'%V,%t by %o',"cellstyle" => "copyright" );
assume it just returns number and not stars
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 31, 2006, 05:51:42 pm
nice

Tried that on

Code: [Select]
$options = array('subtitle'=>'%V,%t by %o',"cellstyle" => "copyright" );
assume it just returns number and not stars

Right you are!  Inserting images of stars in there would be a headache for layout and formatting and stuff.  May be an option someday since the stars come with cpg...  but for now... nope.

You could do:

'subtitle'=>'Rated %V out of 5<br>%t by %o'

A little nicer, but still no stars
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: stuarta on July 31, 2006, 06:10:07 pm
ok got

Code: [Select]
$options = array('subtitle'=>'Rated %V out of 5 %t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);

on one column, but now the following one with

Code: [Select]
$options = array('%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();

returns nothing  ???
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on July 31, 2006, 06:40:03 pm
ok got

Code: [Select]
$options = array('subtitle'=>'Rated %V out of 5 %t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);

on one column, but now the following one with

Code: [Select]
$options = array('%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();

returns nothing  ???

There is an obvious error.  Please check it over carefully.

Please check carefully before posting.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: twofer on August 01, 2006, 04:41:14 pm
When I run cftest.php I'm getting this:

Code: [Select]
5 You set your partial URL to /pics 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 linhost133.prod.mesa1.secureserver.net 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /home/content/t/w/o/twotrackbrewing/html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /cgi-bin/php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 Found CPG config file PASS

The thumbnails do not end up getting displayed and I am using the default prefixes for image files. Any ideas?

TIA
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 01, 2006, 05:16:07 pm
When I run cftest.php I'm getting this:

Code: [Select]
5 You set your partial URL to /pics 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 linhost133.prod.mesa1.secureserver.net 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /home/content/t/w/o/twotrackbrewing/html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /cgi-bin/php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 Found CPG config file PASS

The thumbnails do not end up getting displayed and I am using the default prefixes for image files. Any ideas?

TIA

Are you bridging coppermine to something, like SMF, PhpBB, etc, etc...  If so, search this thread for the problem and solutions to this.

Your document root is also pretty different from your script_filename variable...  Where did you put cpmfetch?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: twofer on August 01, 2006, 08:06:23 pm
I'm bridging it to SMF and I did comment out line 54 and uncomment 59 but I'm still having this problem.

I placed the cpmfetch folder in the root so it's /cpmfetch.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 01, 2006, 08:10:26 pm
I'm bridging it to SMF and I did comment out line 54 and uncomment 59 but I'm still having this problem.

I placed the cpmfetch folder in the root so it's /cpmfetch.

The line 54/59 thing, while definately necessary, does not affect bridging.  How many SMF users do you have?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: twofer on August 01, 2006, 08:16:12 pm
The line 54/59 thing, while definately necessary, does not affect bridging.  How many SMF users do you have?


About 18....not all that many.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 01, 2006, 08:25:04 pm
About 18....not all that many.

The easiest thing may be to go into cpg and create 18 users... Names and stuff do not matter, they just need to have entries in the cpg users table.

A more permanent solution for the bridging is in the works.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: twofer on August 01, 2006, 08:49:48 pm
hey thanks that worked! it might not be the prettiest solution but it works.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 01, 2006, 09:15:43 pm
hey thanks that worked! it might not be the prettiest solution but it works.

Yeah, as long as the "id" of the SMF person adding the picture has an equivalent in the cpg user table, it can grab the photo.

Like I said, fixes on the way.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 04, 2006, 05:12:59 am
Im still learning php, so I am a tad bit n00bish. However I am in dire need, I have read through most of the FAQ and I uploaded the cpmfetch folder. I ran the test and I got only one error...

Error Test: "75   DOCUMENT_ROOT is not a good match   BAD"

Actual Error: "Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/m/c/k/mckimds/html/cpmfetch/cpmfetch_dao.php on line 710"



I did not see any images in the test most likely due to this error. I am still confused on what is needed and where to run this mod properly. Im deeply sorry for my currently poor php skills. However my website needs this feature badly. I am willing to give someone temporary ftp access if it is needed.

I would love to get support through aim, this post, or you can pm me.

Please help me out here, I have spent days trying to find a way to do this and then I stumbled upon this thread. I would really appreciate it if someone out there could give me their time to help me learn what to do to get this running properly.

Thank you for reading my post,

-David
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 04, 2006, 07:06:44 am
Error Test: "75   DOCUMENT_ROOT is not a good match   BAD"

This means the path to the script and the document root do not match.  Resolve the problem below, see if it starts working anyway.  If not, please PM or post the link to the cftest.php page.

Quote
Actual Error: "Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/m/c/k/mckimds/html/cpmfetch/cpmfetch_dao.php on line 710"

The way to fix this is listed in the release_notes file that came in the download.  Look for the note about the cpg 1.4 beta thingee.  Still applies to the current 1.4.x releases.


Your welcome
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 04, 2006, 05:11:53 pm
Is it a bad thing that my test file shows that one bad error on test 75, how do I fix that? http://www.garbagewars.com/cpmfetch/cftest.php

Where would I put for example this code?

Code:

<?
php $objCpm->cpm_viewLastAddedMedia(1,2)
?>


I am guessing that I would put this code on the page I want it displayed, aka the http://www.garbagewars.com/includes/left_sidebar.php

But is this the only thing I include in this include to make it show? What else must I include in this php file in order for the above code to work and to show everything properly?

(basically anything I put in the left_sidebar.php include shows up on the left side of my website.)


-D
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 04, 2006, 05:19:07 pm
Is it a bad thing that my test file shows that one bad error on test 75, how do I fix that? http://www.garbagewars.com/cpmfetch/cftest.php

Where would I put for example this code?

Code:

<?
php $objCpm->cpm_viewLastAddedMedia(1,2)
?>


I am guessing that I would put this code on the page I want it displayed, aka the http://www.garbagewars.com/includes/left_sidebar.php

But is this the only thing I include in this include to make it show? What else must I include in this php file in order for the above code to work and to show everything properly?

(basically anything I put in the left_sidebar.php include shows up on the left side of my website.)


-D

Look at the quickstart example on the web site... you need the stuff to "create" the cpmfetch object and close it.  Basically its only a couple of lines and part of it just shows picutres, so you should be able to figure out which one to replace.

Ignore the error - I think it will be okay.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 04, 2006, 06:38:23 pm
Look at the quickstart example on the web site... you need the stuff to "create" the cpmfetch object and close it.  Basically its only a couple of lines and part of it just shows picutres, so you should be able to figure out which one to replace.

Ignore the error - I think it will be okay.




I am sorry I didn't state this prior, but I have already done all that. I don't mean to be rude, but I would really appreciate some help here rather than a point into a direction.

From what I have gathered I should just be able to put this following code into anywhere on my ./includes/left_sidebar.php page and it should work properly...

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
php $objCpm->cpm_viewLastAddedMedia(3,1)
$objCpm->cpm_close();
?>


Well it doesn't work, I get errors such as...
http://www.garbagewars.com/ (http://www.garbagewars.com/)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on August 04, 2006, 06:54:36 pm
Quote
php $objCpm->cpm_viewLastAddedMedia(3,1);

That doesn't make sense, remove the 'php'.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 04, 2006, 07:10:18 pm
That doesn't make sense, remove the 'php'.

XD your correct, however even after making the change; it's still not working  :'(
http://www.garbagewars.com/ (http://www.garbagewars.com/)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 04, 2006, 07:13:04 pm
Sorry I forgot to include, here is my entire ./include/left_sidebar.php

Code: [Select]
<?php
if( !defined('IN_SITE') )
{
exit;
}
?>


<div id="left-col">
<div class="block-container">
<div class="block-header" align="center">
<img src="./images/site/buttons/forums.png" alt="" />
</div>

<div class="block-content" align="center">
<a href="http://www.garbagewars.com/forums/">
<img src="http://www.garbagewars.com/images/site/ad/forum-ad.png" alt="" /></a> </div>
</div>



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



<div class="block-container" align="center">
<div class="block-header">
<img src="./images/site/buttons/affiliates.png" alt="" />
</div>
<!-- GWP Site -->
                <!-- Copyright (c) 2006 GarbageWars Productions. All rights reserved. -->
                <!-- http://www.garbagewars.com -->
<div class="block-content" align="center">
<a href="http://www.megamanflash.com"><img src="http://www.garbagewars.com/images/site/affiliates/megamanflash.gif" alt="" /></a> </div>
</div>

<div class="block-container" align="center">
<div class="block-header">
<img src="./images/site/buttons/linkus.png" alt="" />
</div>

<div class="block-content" align="center">
<a href="http://www.garbagewars.com"><img src="http://www.garbagewars.com/images/site/banners/88x31/GWP/gwp.gif" alt="" border="0" /></a> </div>
</div>
</div>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on August 04, 2006, 07:30:16 pm
OK, now put the semi colon back at the end of the line so that it looks like this:

Code: [Select]
$objCpm->cpm_viewLastAddedMedia(3,1);
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 04, 2006, 09:32:13 pm
OK, now put the semi colon back at the end of the line so that it looks like this:

Code: [Select]
$objCpm->cpm_viewLastAddedMedia(3,1);

XD a bad copy and paste, thanks for noticing.

I now get this error though, but this time it's not the whole page error its just where the image should be.

"Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/m/c/k/mckimds/html/cpmfetch/cpmfetch_dao.php on line 710"

I went to line 710 on _dao to check what was there and I see this...
These are lines 703-715
Code: [Select]
/**
* Takes a MySql result set and converts it to an assoc array
*
*/
function covertResultsetToArray($resultset) {
$resultarray = array();

while ($row = mysql_fetch_assoc($resultset)) {
    array_push ($resultarray,$row);
}

return ($resultarray);
}
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on August 04, 2006, 10:36:55 pm
You already got an answer to that one.

The way to fix this is listed in the release_notes file that came in the download.  Look for the note about the cpg 1.4 beta thingee.  Still applies to the current 1.4.x releases.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 04, 2006, 10:58:27 pm
Note: I am using cpm fetch ver. 1.6.2

XD ok so I read through the release notes and I commented line 54, however it says to uncomment line 59, but I have no line 59; it's just blank @_@

Also how do I check what version of coppermine I currently have installed? I have a feeling this may be why I am having problems...

The error can be viewed here > http://www.garbagewars.com/ (http://www.garbagewars.com/)

cpmfetch_dao.php code lines 81-102
Code: [Select]
   if (array_key_exists("DOCUMENT_ROOT",$_SERVER )) {
$this->fullpathtocpm = $_SERVER['DOCUMENT_ROOT'] . $this->partialUrltocpm;
} elseif (ini_get("doc_root") != "" ) {
$this->fullpathtocpm = ini_get('doc_root') . $this->partialUrltocpm;
} else {
$this->fullpathtocpm = $this->partialUrltocpm;
}

$this->OverridePathToAlbums($this->fullpathtocpm . "/albums", $this->partialUrltocpm . "/albums");


$this->setPrivateLockOn(true);
$this->dateFormatString = $this->defaultDateFormatString;

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

// Cleans up the object when we are done
function destroy ( ) {
$this->dbDisconnect();
}
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on August 04, 2006, 11:35:37 pm
You have 1.4.8, viewable on your config page and in the HTML output. Browse back througfh this thread, your issue has already been explained  numerous times to numerous people.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 05, 2006, 12:11:57 am
You have 1.4.8, viewable on your config page and in the HTML output. Browse back througfh this thread, your issue has already been explained  numerous times to numerous people.

Yes I have read through the release notes. I did the instructions to temporarly get cpm fetch working until he makes a permanent fix. As stated in my previous post, are you saying that if I am still getting errors then it can not be fixed until this new permanent fix has been created?

Like I stated above, it tells me in the release notes to uncomment line 59, but line 59 is blank, however after reading through perhaps he was off by one line or my file just happened to contain this info on line 60 because that is where I noticed the commented beta.

I uncommented them, now no errors show... except now nothing at all shows on my site's page, (no images from my gallery) it is as if I never added any code for cpm fetch... Why isn't my images showing? They are defined properly now and I am getting no errors. Do I just have to wait until a new cpm fetch version is made to fix this?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 05, 2006, 12:55:36 am
Yes I have read through the release notes. I did the instructions to temporarly get cpm fetch working until he makes a permanent fix. As stated in my previous post, are you saying that if I am still getting errors then it can not be fixed until this new permanent fix has been created?

No, what you did fixes it.

Quote
Like I stated above, it tells me in the release notes to uncomment line 59, but line 59 is blank, however after reading through perhaps he was off by one line or my file just happened to contain this info on line 60 because that is where I noticed the commented beta.

Yep, horrible error on my part.  It was line 59 in the previous release.   Good catch, and your right - its line 61.

Quote
I uncommented them, now no errors show... except now nothing at all shows on my site's page, (no images from my gallery) it is as if I never added any code for cpm fetch... Why isn't my images showing? They are defined properly now and I am getting no errors. Do I just have to wait until a new cpm fetch version is made to fix this?

Well, that is progress anyway. 


This should be the code you are using...

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(3,1);
$objCpm->cpm_close();
?>



Now, if you are bridged with phpBB then you have a whole 'nother problem that will cause you even more grief, but will cause me considerably less since I will know what is wrong.





Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 05, 2006, 02:31:02 am
No, what you did fixes it.

Yep, horrible error on my part.  It was line 59 in the previous release.   Good catch, and your right - its line 61.

Well, that is progress anyway. 


This should be the code you are using...

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(3,1);
$objCpm->cpm_close();
?>



Now, if you are bridged with phpBB then you have a whole 'nother problem that will cause you even more grief, but will cause me considerably less since I will know what is wrong.

Thank you for all of the support guys.

So by bridged with phpBB do you mean my news system code that is only on index.php? or do you mean the includes we made to devide the sections of the template up into 4 parts? the 5th being the actual page content.

Is there anything I can do to get my images to actually show? Am I screwed?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 05, 2006, 06:22:17 am
Thank you for all of the support guys.

So by bridged with phpBB do you mean my news system code that is only on index.php? or do you mean the includes we made to devide the sections of the template up into 4 parts? the 5th being the actual page content.

Is there anything I can do to get my images to actually show? Am I screwed?

I don't know exactly what the bridge does or how to set it up.  Basically there is a way to tie cpg into the users from the forum.  If you did that, I can tell you how to fix / get around it.  Probably.




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 05, 2006, 07:05:01 am
I don't know exactly what the bridge does or how to set it up.  Basically there is a way to tie cpg into the users from the forum.  If you did that, I can tell you how to fix / get around it.  Probably.

Oh that's what you mean, well yes I had help but we did bridge the forums with the gallery. I hope we can find a way around this, i'll be waiting for your reply.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 05, 2006, 04:34:24 pm
Oh that's what you mean, well yes I had help but we did bridge the forums with the gallery. I hope we can find a way around this, i'll be waiting for your reply.


Three options for you:

 (1) De-bridge them (turn off the bridge)

 (2) Create the same number of users in Coppermine that you have in your forum... just use the cpg administration tool.  Good if you only have a small number of users.

 (3) Wait till a version of cpm comes out that supports the bridging.  I may release a new development release this weekened that simply does that uncommenting and takes out the bridge preventing stuff (but reduces functionality for others)

 (4) Someone posted the code modifications for dpm_dao file, you can search for them - but do not post here for support on it, or problems you run into.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 05, 2006, 09:30:47 pm

Three options for you:

 (1) De-bridge them (turn off the bridge)

 (2) Create the same number of users in Coppermine that you have in your forum... just use the cpg administration tool.  Good if you only have a small number of users.

 (3) Wait till a version of cpm comes out that supports the bridging.  I may release a new development release this weekened that simply does that uncommenting and takes out the bridge preventing stuff (but reduces functionality for others)

 (4) Someone posted the code modifications for dpm_dao file, you can search for them - but do not post here for support on it, or problems you run into.

The dao code... It's like finding a needle in a haystack.

Im not quite sure how the forum was bridged with the gallery, so I guess I'll just have to wait for that development release. When you said "(but reduces functionality for others)" what do you mean? It will cause more problems to other people? Or it will be an unstable version and may have errors?

I hope I can count on this dev release, please link it here when it is released. Thank you for all the support up to this point, I really appreciate it.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 05, 2006, 10:07:45 pm
The dao code... It's like finding a needle in a haystack.

Im not quite sure how the forum was bridged with the gallery, so I guess I'll just have to wait for that development release. When you said "(but reduces functionality for others)" what do you mean? It will cause more problems to other people? Or it will be an unstable version and may have errors?

I hope I can count on this dev release, please link it here when it is released. Thank you for all the support up to this point, I really appreciate it.

No, it wont be unstable, but the functionality to pull out into subtitles information about the poster may be impared.

Quote
I hope I can count on this dev release

Not sure what that means, but it will probably solve your problem.

I'd sign up for the update notifications on the cpmfetch web site.  It will be announced there.


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: m85021 on August 08, 2006, 07:37:44 am
I'm getting the following error when trying to call a random image:
Code: [Select]
Error in getImageTouse: Extension (strtolower): .jpg
File:/****/******/********/html/Pictures[b]//albums[/b]/Boat_Pictures_2005/rsthumb_Picture_032.jpg

I see what the problem is:   I'm not using the default album name,  my albums are all location in a folder called 'rs_albums', but CpmFetch isn't recognizing that fact.  Also, it's placing two forward slashes after /Pictures.

Any idea how to fix this?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: m85021 on August 08, 2006, 07:41:24 am
I'm getting the following error when trying to call a random image:
Code: [Select]
Error in getImageTouse: Extension (strtolower): .jpg
File:/****/******/********/html/Pictures[b]//albums[/b]/Boat_Pictures_2005/rsthumb_Picture_032.jpg

I see what the problem is:   I'm not using the default album name,  my albums are all location in a folder called 'rs_albums', but CpmFetch isn't recognizing that fact.  Also, it's placing two forward slashes after /Pictures.

Any idea how to fix this?




Disregard the B tags in my above code....
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 08, 2006, 04:14:19 pm
Disregard the B tags in my above code....

Hmmm, I never documented this... but then again this is the first time it has come up


cpm_OverridePathToAlbums($_partialUrltoalbum);

$partialUrltoAlbum is the path from the top of your web site.

The double URL should not affect things, and I think its a bug in my code somewhere - but to date has been harmless.

G'Luck
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: marian on August 09, 2006, 02:48:59 pm
When I run cftest I get this error message. Your installation seems correct so far, you should see a small grid of thumbnails from your gallery

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/bymnews/public_html/cpmfetch/cpmfetch_dao.php on line 710
Do you know what it means?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 09, 2006, 03:56:21 pm
When I run cftest I get this error message. Your installation seems correct so far, you should see a small grid of thumbnails from your gallery

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/bymnews/public_html/cpmfetch/cpmfetch_dao.php on line 710
Do you know what it means?

This has been asked and answered so many times that I just released a new version that does the edit for you.  Look on the web site

http://cpmfetch.fistfullofcode.com in the downloads section - look for release 1.6.3

Mind you that this fixes the forum bridging problems also, but at the expense of being able to access the photo owner information.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: marian on August 09, 2006, 04:55:35 pm
This has been asked and answered so many times that I just released a new version that does the edit for you.  Look on the web site
http://cpmfetch.fistfullofcode.com in the downloads section - look for release 1.6.3
Mind you that this fixes the forum bridging problems also, but at the expense of being able to access the photo owner information.
Thanks a lot, you must have released the new version about 5 minutes after I downloaded the earlier one!!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 09, 2006, 07:21:25 pm
Thanks a lot, you must have released the new version about 5 minutes after I downloaded the earlier one!!

I had just heard back from David Kim who was testing the release for me.  I got your post and figured it would be best to just post it up instead of telling you to wait.

So probably 5 minutes after you posted
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: marian on August 09, 2006, 08:34:51 pm
Is it my imagination or is the cfrssget.php file different in 1.6.3? I could swear the one I looked at earlier had a means of doing a feed for a category and not just for the entire gallery.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 09, 2006, 09:33:31 pm
Is it my imagination or is the cfrssget.php file different in 1.6.3? I could swear the one I looked at earlier had a means of doing a feed for a category and not just for the entire gallery.

You could also be insane.
Are you thinking of rss_lastadded.php ?

This is no specific way to do that, but if you trace through the cfrssget.php file adding in a source should not be too hard.  I would make a copy of the rss_lastadded.php to a new name (like rss_myfeed.php or somethign more descriptive.)

Then modify that line that looks like:

$cfrss->addLastAddedMedia($totalToShow);

To include a source entry:

$cfrss->addLastAddedMedia($totalToShow,"cat=5");

That will do category 5... I think, I did not test it... just peaked at the code quickly.






Title: how to display the tittle of images
Post by: typn1979 on August 10, 2006, 11:23:06 am
Hello,
Below is what i've got in my index, however I also want the image titles displayed. Please tell me how can I insert the image titles right below each image?
Thank you in advance.

Code: [Select]
<?php 

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

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: haribo85 on August 10, 2006, 01:52:32 pm
Hi,

Im looking for a straight forward change to my local CpmFetch.

I am using a module within Joomla! (CMS) which contains this:

Code: [Select]
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, $options);
$objCpm->cpm_close();
echo "</center>";

What I want to be able to do is to remove the hyperlink that is made to the random image is displayed, all I want is the image and thats it.

Please can someone tell me which part of the CpmFiles this is changed in?

Thanks for your time.
Title: Re: how to display the tittle of images
Post by: vuud on August 10, 2006, 03:23:38 pm
Hello,
Below is what i've got in my index, however I also want the image titles displayed. Please tell me how can I insert the image titles right below each image?
Thank you in advance.

Code: [Select]
<?php 

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


Start by reading some of the documentation:

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 10, 2006, 03:25:38 pm
Hi,

Im looking for a straight forward change to my local CpmFetch.

I am using a module within Joomla! (CMS) which contains this:

Code: [Select]
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, $options);
$objCpm->cpm_close();
echo "</center>";

Another question that is also in the documentation

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s04.html






What I want to be able to do is to remove the hyperlink that is made to the random image is displayed, all I want is the image and thats it.

Please can someone tell me which part of the CpmFiles this is changed in?

Thanks for your time.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: typn1979 on August 10, 2006, 03:32:20 pm
Thank you very much.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: haribo85 on August 10, 2006, 04:12:17 pm
Thanks for the link, but I am still lost.

Where do I make this change?

Thanks for your time!
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 10, 2006, 04:19:47 pm
Thanks for the link, but I am still lost.

Where do I make this change?

Thanks for your time!

In the Joomla or whatever file where you see that code... I don't use Joomla so I have no idea.

Read this if you still don't get what to do with the previous link and the $options entry there read this:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html

That has everything you need


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: haribo85 on August 10, 2006, 04:26:00 pm
So where as before I would have

Code: [Select]
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, $options);
$objCpm->cpm_close();
echo "</center>";

Now I would have this? Please correct me if I'm wrong, Im a bit confused by this.

Code: [Select]
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, imagelink => "none", $options);
$objCpm->cpm_close();
echo "</center>";

Thanks for your time.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 10, 2006, 04:44:10 pm
So where as before I would have

Code: [Select]
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, $options);
$objCpm->cpm_close();
echo "</center>";

Now I would have this? Please correct me if I'm wrong, Im a bit confused by this.

Code: [Select]
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, imagelink => "none", $options);
$objCpm->cpm_close();
echo "</center>";

Thanks for your time.

Well, at least this shows some effort.

Anyway, you are close.  the $option variable is an array in my examples, so if you are using it already somewhere then you should add the imagelink to that.  If not you can create the array right there like so:

Code: [Select]
$objCpm->cpm_viewRandomMedia(1,1, array(imagelink => "none"));

Which is the same as

Code: [Select]
$options = array (imagelink => "none");
$objCpm->cpm_viewRandomMedia(1,1, $options);


You see?

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: haribo85 on August 10, 2006, 05:04:07 pm
Thanks, working perfectly, i understand how its working now, just!

But if i want to add another option like image size and width, do i add another option array? I have read the page on image sizing and have seen if i just specify the imagewidth it will keep the ratio, so is it something like this?

Code: [Select]
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$options = array (imagelink => "none");
$options2 = array ( imagewidth=> "20px");
$objCpm->cpm_viewRandomMedia(1,1, $options, $options2);
$objCpm->cpm_close();
echo "</center>";
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 10, 2006, 05:12:25 pm
Thanks, working perfectly, i understand how its working now, just!

But if i want to add another option like image size and width, do i add another option array? I have read the page on image sizing and have seen if i just specify the imagewidth it will keep the ratio, so is it something like this?

Code: [Select]
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$options = array (imagelink => "none");
$options2 = array ( imagewidth=> "20px");
$objCpm->cpm_viewRandomMedia(1,1, $options, $options2);
$objCpm->cpm_close();
echo "</center>";


The www.php.net documentation would cover arrays in a much wider scope, but no you would not stack arrays.  The second one above would just be ignored.  You want to add it to the first one:

Code: [Select]
$options = array ('imagelink' => 'none', 'imagewidth'=> '20px');
I also personally always single quote them all.  Double quotes are interpreted for variables.  I also do the first one simply because it is a good habit to be in.  Anyway YMMV on that one depending on who you ask.








Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: marian on August 10, 2006, 06:33:42 pm
You could also be insane.
Are you thinking of rss_lastadded.php ?

This is no specific way to do that, but if you trace through the cfrssget.php file adding in a source should not be too hard.  I would make a copy of the rss_lastadded.php to a new name (like rss_myfeed.php or somethign more descriptive.)

Then modify that line that looks like:

$cfrss->addLastAddedMedia($totalToShow);

To include a source entry:

$cfrss->addLastAddedMedia($totalToShow,"cat=5");

That will do category 5... I think, I did not test it... just peaked at the code quickly.

You've got it, I'm completely nuts. Don't know how anyone can look at code for a couple of hours and be anything else!  ;D
Yesterday, I created an RSS feed from the whole gallery, using Tarique's script, and to my utter amazement it worked first time. Snag was that, straight away, we had folks saying "Can we just have latest Yacht Racing pix?", so here I came!!!
Have tried your trick and when I put www.bymnews.com/cpmfetch/rss_yachtrace.php in Feed Reader I got No RSS URLs found. I then checked with last added and got the same result, so I've obviously screwed something.
?????????
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 10, 2006, 07:54:45 pm
You've got it, I'm completely nuts. Don't know how anyone can look at code for a couple of hours and be anything else!  ;D
Yesterday, I created an RSS feed from the whole gallery, using Tarique's script, and to my utter amazement it worked first time. Snag was that, straight away, we had folks saying "Can we just have latest Yacht Racing pix?", so here I came!!!
Have tried your trick and when I put www.bymnews.com/cpmfetch/rss_yachtrace.php in Feed Reader I got No RSS URLs found. I then checked with last added and got the same result, so I've obviously screwed something.
?????????

I don't know what you did wrong.  If the Tarique script works for you then stick with that - does not bother me which one you use.

Did you change this line in the top of the file?
$ENABLED =false;

to

$ENABLED = true;

Does that help?

Title: Confused
Post by: scifirocket21 on August 12, 2006, 04:40:26 am
I uploaded the files, and got as far as being able to make the test work (see it here: http://www.mydpnet.com/cpmfetch/cftest.php).  Now I have no idea what to do next.  I read documentation for this, but I just got more and more confused the more i read it. 

What I'm trying to accomplish is getting this mod to show the newest photo uploaded to the gallery on my HTML coded home page found at www.mydpnet.com. 

Any help would be greatly appricated. 
Title: Re: Confused
Post by: vuud on August 12, 2006, 06:06:50 am
I uploaded the files, and got as far as being able to make the test work (see it here: http://www.mydpnet.com/cpmfetch/cftest.php).  Now I have no idea what to do next.  I read documentation for this, but I just got more and more confused the more i read it. 

What I'm trying to accomplish is getting this mod to show the newest photo uploaded to the gallery on my HTML coded home page found at www.mydpnet.com. 

Any help would be greatly appricated. 

http://cpmfetch.fistfullofcode.com/projects/copperminefetch/quickstart.php
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: scifirocket21 on August 12, 2006, 08:09:31 am
Ok, I feel silly.  I did read that thing before I started, but it was a path error.  Everything is working the way I want it to, except one thing.  How do I get it to appear on a HTML page that is not in the same directory as CPMFETCH.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 12, 2006, 04:12:56 pm
Ok, I feel silly.  I did read that thing before I started, but it was a path error.  Everything is working the way I want it to, except one thing.  How do I get it to appear on a HTML page that is not in the same directory as CPMFETCH.

For an HTML (non-php) page you cannot do that as it is... I've got a few work arounds in here that you can use depending on what you want to do.

1.  You can use cfimageget - but that limits you to one image

2.  You can use Server Side Includes to include a php file that executes the cpmfetch commands

3.  Make your .HTML pages .PHP pages

Probably #2 you want
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: GuTe on August 13, 2006, 08:51:29 am
Hi all,

I'm having problems with displaying the images on my website. When i run cftest.php it fails to find the config.inc.php file (http://www.nordisktfiske.se/cpmfetch/cftest.php)

I have cpmfetch in a sperate folder and the copperimne gallery is in /photos.

In order to display the images on my site i use this code:

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photos");
$objCpm->cpm_viewRandomMedia(1,1,array("windowtarget" => "_blank","imagestyle" => "imgborder""imagewidth" => "140"));
$objCpm->cpm_close();
?>

All of this work on an other website I had but not on this one. Can someone see what the problem is?
I've been looking thru the forum, but with no luck.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 13, 2006, 05:54:51 pm
Hi all,

I'm having problems with displaying the images on my website. When i run cftest.php it fails to find the config.inc.php file (http://www.nordisktfiske.se/cpmfetch/cftest.php)

I have cpmfetch in a sperate folder and the copperimne gallery is in /photos.

In order to display the images on my site i use this code:

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photos");
$objCpm->cpm_viewRandomMedia(1,1,array("windowtarget" => "_blank","imagestyle" => "imgborder""imagewidth" => "140"));
$objCpm->cpm_close();
?>

All of this work on an other website I had but not on this one. Can someone see what the problem is?
I've been looking thru the forum, but with no luck.


Your server is returning a document_root that is not the same as your own document root.

Try this (and I have no idea if it will work, but I will get a good laugh if it does):

Code: [Select]
$objCpm = new cpm("../../home/nordisktfiske.se/www/photos");
Like I said, no idea what that will do (won't break anything of course)

Lemme know what happens



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: GuTe on August 13, 2006, 06:14:58 pm
Really strange...

I tried with your solution, but it turned out like this:
Path to Coppermine incorrect. (/var/www../../home/nordisktfiske.se/www/photos//include/config.inc.php)

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 13, 2006, 07:25:11 pm
Really strange...

I tried with your solution, but it turned out like this:
Path to Coppermine incorrect. (/var/www../../home/nordisktfiske.se/www/photos//include/config.inc.php)



Code: [Select]
$objCpm = new cpm("/../../home/nordisktfiske.se/www/photos");

Sorry, I was off.  This may work... (added a leading slash)


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: GuTe on August 13, 2006, 07:28:29 pm
Thanks for the help, but I still get an error:

ERROR: Path to Coppermine incorrect. (/var/www/../../home/nordisktfiske.se/www/photos//include/config.inc.php)

It looks like I wont be able to use this on the site.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 13, 2006, 07:37:17 pm
Thanks for the help, but I still get an error:

ERROR: Path to Coppermine incorrect. (/var/www/../../home/nordisktfiske.se/www/photos//include/config.inc.php)

It looks like I wont be able to use this on the site.

yeah, just not as easily...

Open cpmfetch.php find this line

Somewhere around 75

Code: [Select]
if (array_key_exists("DOCUMENT_ROOT",$_SERVER )) {
$this->filepathtocpm = $_SERVER['DOCUMENT_ROOT'] . $urltocpm_;
} elseif (ini_get("doc_root") != "") {

Change the middle line to look like this:

   
Code: [Select]
$this->filepathtocpm = "/home/nordisktfiske.se/www/photos/";
If that does not work, you need to figure out what your path is to you web directory... that should be it.

Hope this helps.




Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: GuTe on August 13, 2006, 07:48:15 pm
Woohoo!!!

Now I got something different:

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

but it looks like it will work :)
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: GuTe on August 13, 2006, 08:02:05 pm
I found it while searching the forum and I change the big sql statement in cpmfetch_dao.php.

Now I get Error in getImageTouse: Extension (strtolower): .jpg

The server has GD 2 installed.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 13, 2006, 10:29:18 pm
Woohoo!!!

Now I got something different:

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

but it looks like it will work :)

Yeah, its also in the release notes that come with it.  Also, the newest version (2 days old) eliminates that problem.

But I will give you credit for finding it in the forums...  95% of the people don't bother searching before they ask.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 13, 2006, 10:32:18 pm
I found it while searching the forum and I change the big sql statement in cpmfetch_dao.php.

Now I get Error in getImageTouse: Extension (strtolower): .jpg

The server has GD 2 installed.

Can you send me a link to this?

Unfortunately that is a tough error to troubleshoot.

Did you change the default prefix's or anything like that?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Ashari on August 13, 2006, 11:22:40 pm
Hi, I'm using Coppermine 1.4.8 and I am trying to use CPFetch to call images from all of my member's albums. they are not private, however when I use
print "<center>";
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(5,1,array("imagesize" => "Thumb","windowtarget" => "_new","subtitle" => "Member: %o - %c "));
$objCpm->cpm_close();
print "</center>";

I ONLY get images from the album created by the admin. I have tried using "cat=1" but that creates an error. Do I need to change something in my dao.php file? I've been searching the board but can't find an answer. Can someone help me please?

Can someone answer my question please or direct me to a thread that does?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2006, 01:47:54 am
Can someone answer my question please or direct me to a thread that does?

If you are bridged with something, try the new cpmfetch 1.6.3 ... it has a small fix that addresses bridged versions (which could be what is causing your problem).  If that does not help, let me know.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: tandiono on August 14, 2006, 03:22:47 am
Im using CPG 1.6.3 , the cpmfetch is place in www/gallery/cpmfetch  and im trying to show the pic but there seems to be wrong with the code.. Anyone please kindly help me. Thanks in advance..

Code: [Select]
// The Gallery
echo '
<tr>
<td class="titlebg" colspan="2">FF Gallery</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="../gallery/">
<img src="', $settings['images_url'], '/galleryicon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
<td class="windowbg2" width="100%">
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery");
$objCpm->cpm_viewRandomMedia (1,7);
$objCpm->cpm_close();
</div>
</td>
</tr>';
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2006, 03:31:45 am
Im using CPG 1.6.3 , the cpmfetch is place in www/gallery/cpmfetch  and im trying to show the pic but there seems to be wrong with the code.. Anyone please kindly help me. Thanks in advance..

Code: [Select]
// The Gallery
echo '
<tr>
<td class="titlebg" colspan="2">FF Gallery</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="../gallery/">
<img src="', $settings['images_url'], '/galleryicon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
<td class="windowbg2" width="100%">
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery");
$objCpm->cpm_viewRandomMedia (1,7);
$objCpm->cpm_close();
</div>
</td>
</tr>';

You don't give us much to work with... You neglected to say what happened... do you get errors?  wrong images?

One thing may need changing is:
$objCpm = new cpm("./gallery");

to

$objCpm = new cpm("/gallery");

Otherwise, post a URL or an actual problem to be solved

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: tandiono on August 14, 2006, 03:49:24 am
You don't give us much to work with... You neglected to say what happened... do you get errors?  wrong images?

One thing may need changing is:
$objCpm = new cpm("./gallery");

to

$objCpm = new cpm("/gallery");

Otherwise, post a URL or an actual problem to be solved



Hello, i dont get any error for the cpmfetch test :

http://www.friendsterforum.com/gallery/cpmfetch/cftest.php


as for the testing link is :

http://www.friendsterforum.com/forum/1.php

here's my current code :

<?php


Code: [Select]
// The Gallery
echo '
<tr>
<td class="titlebg" colspan="2">FF Gallery</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="../gallery/">
<img src="', $settings['images_url'], '/galleryicon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
<td class="windowbg2" width="100%">
echo '
include "../gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia (1,7);
$objCpm->cpm_close();
</div>
</td>
</tr>';


?>
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: tandiono on August 14, 2006, 03:56:23 am
Hello, sorry for the double posting as i can't modify the previous post..

anyway i try it straight on my forum :

http://www.friendsterforum.com/forum/


and here's the code :

Code: [Select]
// The Gallery
echo '
<tr>
<td class="titlebg" colspan="2">FF Gallery</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="../gallery/">
<img src="', $settings['images_url'], '/galleryicon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
<td class="windowbg2" width="100%">
include "../gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia (1,7);
$objCpm->cpm_close();
</div>
</td>
</tr>';
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: scifirocket21 on August 14, 2006, 04:42:21 am
For an HTML (non-php) page you cannot do that as it is... I've got a few work arounds in here that you can use depending on what you want to do.

1.  You can use cfimageget - but that limits you to one image

2.  You can use Server Side Includes to include a php file that executes the cpmfetch commands

3.  Make your .HTML pages .PHP pages

Probably #2 you want


How do I do number two?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: scifirocket21 on August 14, 2006, 05:12:45 am
I found the documentation to this at http://www.fistfullofcode.com/projects/copperminefetch/manual/ch11.html.  I was doing fine until I got to the 5th bullet.  I went to the SSI documentation too, and that only confused me more.  I'm sure its a simple fix, for someone how knows what they are doing (not me).
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2006, 06:13:07 am
Hello, i dont get any error for the cpmfetch test :

http://www.friendsterforum.com/gallery/cpmfetch/cftest.php


as for the testing link is :

http://www.friendsterforum.com/forum/1.php

here's my current code :

<?php


Code: [Select]
// The Gallery
echo '
<tr>
<td class="titlebg" colspan="2">FF Gallery</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="../gallery/">
<img src="', $settings['images_url'], '/galleryicon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
<td class="windowbg2" width="100%">
echo '
include "../gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia (1,7);
$objCpm->cpm_close();
</div>
</td>
</tr>';


?>

That's a PHP error.    Try moving the <?php and ?> right around the code like so:

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

That will eliminate many potential problems.  If that does not work, brush up on PHP - that is not a cpmfetch error.



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2006, 06:16:36 am
I found the documentation to this at http://www.fistfullofcode.com/projects/copperminefetch/manual/ch11.html.  I was doing fine until I got to the 5th bullet.  I went to the SSI documentation too, and that only confused me more.  I'm sure its a simple fix, for someone how knows what they are doing (not me).

Whoa, I must have wrote that during my crack smoking days...  just kidding, I still smoke crack... hah, just kidding again.  Anyway...

If you created the file named "randomimages.php" like it says, then you need to add this statement to your html file

Code: [Select]
<!--#include virtual="/cpmfetch/randomimages.php" -->
the /cpmfetch/randomimages.php is the path to the file you created above.

If i addressed the wrong bullet, let me know.  I'll fix up the documentation sometime soon also.

Sorry bout that



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: scifirocket21 on August 14, 2006, 06:46:48 am
I'm still doing something wrong! grrr. 

I show you the steps I took, and you can spot the mistake.

1) Made randomimages.php file.  Here is the code in randomimages.php file:
Code: [Select]
<?php 
include "./cpmfetch.php";
$objCpm = new cpm("/photos");
$options = array( 'subtitle' => '%t by %o' );
$objCpm->cpm_viewLastAddedMediaFrom (1,1"",$options);
$objCpm->cpm_close();
?>

2) I uploaded randomimages.php in folder directory http://www.mydpnet.com/cpmfetch.

3) After I uploaded randomimages.php, I put this code in my HTML page:
Code: [Select]
<!--#include virtual="/cpmfetch/randomimages.php" -->
That's what I did, and it wont work.

You can see that the randomimage.php file works.  You can see it here: http://www.mydpnet.com/cpmfetch/randomimages.php
But it wont work on the HTML page: http://www.mydpnet.com/  (it should come into view under the "Newest Photo" header, but it wont)

What do I do now?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2006, 07:16:34 am
I'm still doing something wrong! grrr. 

You can see that the randomimage.php file works.  You can see it here: http://www.mydpnet.com/cpmfetch/randomimages.php
But it wont work on the HTML page: http://www.mydpnet.com/  (it should come into view under the "Newest Photo" header, but it wont)

What do I do now?

Well, you did everything right, almost.

The biggest problem now is that your server is not checking to see if it needs to execute an SSI in the file.

Its the second to the last bullet on this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch11.html

Hopefully your hosting provider allows for it.

A quick question... that home page there has a lot going on, why aren't you doing all php pages?  Seems it would make it easier to integrate everything (including cpmfetch)


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: scifirocket21 on August 14, 2006, 10:25:00 pm
I guess I could play around with converting the homepage to PHP.  Ill let you know how it turns out.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 14, 2006, 11:09:46 pm
I guess I could play around with converting the homepage to PHP.  Ill let you know how it turns out.

Converting won't be that bad, but you can also make sure you got the Server Side includes set right, and that your host supports them.

Converting a page to php means renaming it to .php and then putting <?php   ?> around any php code you have in there.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: scifirocket21 on August 15, 2006, 01:08:36 am
I did it!  And look how it turned out! www.mydpnet.com

What do you think?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 15, 2006, 02:01:10 am
I did it!  And look how it turned out! www.mydpnet.com

What do you think?

Looks good.   Glad it works.
Title: display list of albums
Post by: niks_007 on August 15, 2006, 04:10:10 pm
Dear Friends,
         i wish to display the list of last updates albums with there links it should look like this

  KRRISH
  FANNA
  Kabul Express
  Tom Dick and Harry
 
        so what ever albums are newly added of updated can be seen on home page so i dont have to add them manually again and again.

www.lakesparadise.com


-----------------------
one more thing when i fetch the gallery using cpm fetch it fetches pictures from same album i want unique pictures from last updated five albums each no metter whether they are random of last updated instead of all five pics from last added album.

please help me...
Title: Re: display list of albums
Post by: vuud on August 15, 2006, 04:28:04 pm
Dear Friends,
         i wish to display the list of last updates albums with there links it should look like this

  KRRISH
  FANNA
  Kabul Express
  Tom Dick and Harry
 
        so what ever albums are newly added of updated can be seen on home page so i dont have to add them manually again and again.

www.lakesparadise.com


-----------------------
one more thing when i fetch the gallery using cpm fetch it fetches pictures from same album i want unique pictures from last updated five albums each no metter whether they are random of last updated instead of all five pics from last added album.

please help me...


Your going to have to do some PHP coding to get that sort of functionality.   Its not hard to do, but you will need to learn some PHP to do it. 

Ah, I thought we covered this before... see the second example down on this page - basically shows you exactly what to do, in a programming kind of way - modify to suit your needs

http://www.fistfullofcode.com/projects/copperminefetch/tests/test6.php (http://www.fistfullofcode.com/projects/copperminefetch/tests/test6.php)


Title: Trying to change Image Border color for cpmfetch
Post by: grafx77 on August 16, 2006, 10:35:49 am
Vuud.....im sure this wont be a hard question to answer compared to all the other complex topics you cover here. I am simply trying to change the border width and color for CPM Fetch. I followed the instructions listed here: http://www.fistfullofcode.com/projects/copperminefetch/tips.php (http://www.fistfullofcode.com/projects/copperminefetch/tips.php) but to no avail.

My code looks like this on the cpmfetch.php file, line 699
Code: [Select]
function cpm_viewRandomMediaFromAlbum ($rows, $columns, $albumid, $options="" ("imagestyle" => "test1"));) {
I've even tried this as well, exactly as posted on the above link:
Code: [Select]
cpm_viewRandomMediaFromAlbum(2,2,17,array("imagestyle" => "test1"));
I used the exact same stylesheet and names according to the link above, but I keep getting parse errors. Can you please let me know what I am doing wrong?

John
Title: Re: Trying to change Image Border color for cpmfetch
Post by: vuud on August 16, 2006, 03:24:31 pm

I've even tried this as well, exactly as posted on the above link:
Code: [Select]
cpm_viewRandomMediaFromAlbum(2,2,17,array("imagestyle" => "test1"));
I used the exact same stylesheet and names according to the link above, but I keep getting parse errors. Can you please let me know what I am doing wrong?

John

Did you include a css stylesheet in your page defining those?

The imagestyle tag only adds it into the html cpmfetch generates - it does not define it anywhere in the page.  That is up to you.
Title: Missing the thumbnails
Post by: Loox on August 17, 2006, 12:37:12 pm
Hello!

I have integrated cpmfetch (v. 1.6.2) to my coppermine gallery (v. 1.4.8 ) and tried to running cftest.php. It works, but only partially. The url of the image seems indeed correct, but i missing the thumbnails. My gallery is installed in the root-directory and i have set the directory variable with a slash. In the image path i missing the url of my site, because in the path i have two slashes. The path of the thumbnails looks like this:

Code: [Select]
img  src="//albums/userpics/10008/thumb_PIC00157.jpg
whereas the url to the full image is correctly:

Code: [Select]
/displayimage.php?pos=-289
The url of my site is: www.clickfreepic.de

What can i do to got a right image path?

PS. Sorry for my poor english!
Title: Re: Trying to change Image Border color for cpmfetch
Post by: grafx77 on August 17, 2006, 01:04:04 pm
Quote
Did you include a css stylesheet in your page defining those?

Yes, I included a .css stylesheet named imagestyle.css within the cpmfetch folder, exactly like the link I provided in the last thread.

Quote
The imagestyle tag only adds it into the html cpmfetch generates - it does not define it anywhere in the page.  That is up to you.

I am only trying to define the tag for cpm_viewRandomMediaFromAlbum as quoted on my last thread. Is there anything wrong with the code? I have tried several attempts with no luck. Can you help?
Title: Re: Trying to change Image Border color for cpmfetch
Post by: vuud on August 17, 2006, 02:53:57 pm
Yes, I included a .css stylesheet named imagestyle.css within the cpmfetch folder, exactly like the link I provided in the last thread.

I am only trying to define the tag for cpm_viewRandomMediaFromAlbum as quoted on my last thread. Is there anything wrong with the code? I have tried several attempts with no luck. Can you help?

Can you post the page this is happening on?

Title: Re: Missing the thumbnails
Post by: vuud on August 17, 2006, 02:55:32 pm
Hello!

I have integrated cpmfetch (v. 1.6.2) to my coppermine gallery (v. 1.4.8 ) and tried to running cftest.php. It works, but only partially. The url of the image seems indeed correct, but i missing the thumbnails. My gallery is installed in the root-directory and i have set the directory variable with a slash. In the image path i missing the url of my site, because in the path i have two slashes. The path of the thumbnails looks like this:

Code: [Select]
img  src="//albums/userpics/10008/thumb_PIC00157.jpg
whereas the url to the full image is correctly:

Code: [Select]
/displayimage.php?pos=-289
The url of my site is: www.clickfreepic.de

What can i do to got a right image path?

PS. Sorry for my poor english!

I've seen this before...  I think.  You could try searching the forums here for the answer.  When I remember what causes this I will repost if you have not found it.





Title: Re: Missing the thumbnails
Post by: Loox on August 17, 2006, 03:52:28 pm
I've seen this before...  I think.  You could try searching the forums here for the answer.  When I remember what causes this I will repost if you have not found it.

Thanks for the answer. But i don't found anything yet.
Title: Re: Trying to change Image Border color for cpmfetch
Post by: grafx77 on August 18, 2006, 06:33:01 am
Can you post the page this is happening on?



Sure....the page is http://largedogbreedz.com (http://largedogbreedz.com)
Title: Re: Trying to change Image Border color for cpmfetch
Post by: vuud on August 18, 2006, 01:56:23 pm
Sure....the page is http://largedogbreedz.com (http://largedogbreedz.com)

While the style sheet is not being set on the image, so there is somethign in the call you are

Can you post up the full chunk of php that is making that image appear?  I know you posted the one line before, but we are missing something.  Also, what effect are you trying to get out of it (borders, text bolded, etc)

Thanks

Title: Re: Trying to change Image Border color for cpmfetch
Post by: grafx77 on August 18, 2006, 02:45:29 pm
While the style sheet is not being set on the image, so there is somethign in the call you are

Can you post up the full chunk of php that is making that image appear?  I know you posted the one line before, but we are missing something.  Also, what effect are you trying to get out of it (borders, text bolded, etc)

Thanks

I am simply wanting to change the border color and border pixel width. It doesn't match my site as of now.

Let me see if im reading this correctly. You want me to post the entire code for cpmfetch.php? I just want to make sure because, it is a very long piece of code.
Title: Re: Trying to change Image Border color for cpmfetch
Post by: vuud on August 18, 2006, 04:14:31 pm
I am simply wanting to change the border color and border pixel width. It doesn't match my site as of now.

Let me see if im reading this correctly. You want me to post the entire code for cpmfetch.php? I just want to make sure because, it is a very long piece of code.

Heh, no - the PHP code you put into your page that is not working.  I have the code for cpmfetch.
Title: Re: Trying to change Image Border color for cpmfetch
Post by: grafx77 on August 18, 2006, 04:47:52 pm
Heh, no - the PHP code you put into your page that is not working.  I have the code for cpmfetch.

ok....I hope this is what you need.

Code: [Select]
* Displays random images from specific album or category
*
* This will generate a table and populate it with random media from the combination of
* categories and albums specified and style it based on entries in the style hash. 
* The number of photos returned matches the number of rows multiplied by the number of columns.
* Supports the setReturnType option.
*
* @param int $rows The number of rows desired in the output
* @param int $columns The number of columns desired in the output
* @param int $sources The sources you want to draw from ("cat=1,4,5:album=6,7,8")
* @param array $options Optional, Configuration options
* @todo allow for media to be specified / filtered - jpg, mp3, etc
*/
function cpm_viewRandomMediaFromAlbum(2,2,17,array("imagestyle" => "test1"));
 {
$this->loadOptions($options);
$resultset = $this->cpm->getRandomImageFrom ($source, $rows*$columns);

$retval = "";
switch ($this->returntype) {
case ('resultset'):
$retval = $resultset;
break;
case ('html'):
$retval = $this->createTable($resultset,$rows,$columns);
break;
case ('print'):
default:
print $this->createTable($resultset,$rows,$columns);
}

$this->clearOptions();
return ($retval);
}

My stylesheet labeled "imagestyle.css" looks like this. Just in case.

Code: [Select]
<style type="text/css">
img.test1 { 
border-style:solid;
border-width:1px;
border-color: #ffffff;
margin: 2px; }

img.test1:hover {
border-style:solid;
border-width:1px;
border-color: #ffffff;
margin: 2px; }
</style>

I hope this helps.
Title: Re: Trying to change Image Border color for cpmfetch
Post by: vuud on August 18, 2006, 04:51:39 pm
ok....I hope this is what you need.

Code: [Select]
* Displays random images from specific album or category
*
* This will generate a table and populate it with random media from the combination of
* categories and albums specified and style it based on entries in the style hash. 
* The number of photos returned matches the number of rows multiplied by the number of columns.
* Supports the setReturnType option.
*
* @param int $rows The number of rows desired in the output
* @param int $columns The number of columns desired in the output
* @param int $sources The sources you want to draw from ("cat=1,4,5:album=6,7,8")
* @param array $options Optional, Configuration options
* @todo allow for media to be specified / filtered - jpg, mp3, etc
*/
function cpm_viewRandomMediaFromAlbum(2,2,17,array("imagestyle" => "test1"));
 {
$this->loadOptions($options);
$resultset = $this->cpm->getRandomImageFrom ($source, $rows*$columns);

$retval = "";
switch ($this->returntype) {
case ('resultset'):
$retval = $resultset;
break;
case ('html'):
$retval = $this->createTable($resultset,$rows,$columns);
break;
case ('print'):
default:
print $this->createTable($resultset,$rows,$columns);
}

$this->clearOptions();
return ($retval);
}

My stylesheet labeled "imagestyle.css" looks like this. Just in case.


I hope this helps.

Did you modify the cpmfetch.php file or something?  Why?  There should be NOTHING in there you need to touch.  NOTHING. 

Everything you need to change you can do from your php page.  That is code I need... the part you added into your own page.

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 18, 2006, 07:18:25 pm
Ok so I went here http://www.fistfullofcode.com/projects/copperminefetch/tests/test3.php

and I want to display the image description (dont know if it's possible.) but also the rating, and views. But it seems I can only have either rating or views, not both. How can I have all three of these displayed on my site?

Also, how can I change their text size and or colors for the font of (views, rated, description) and where can I edit to make those fonts centered or position them differently? Right now the default text is black.
Title: Re: Trying to change Image Border color for cpmfetch
Post by: grafx77 on August 18, 2006, 09:04:46 pm
Did you modify the cpmfetch.php file or something?  Why?  There should be NOTHING in there you need to touch.  NOTHING. 

Everything you need to change you can do from your php page.  That is code I need... the part you added into your own page.

OK.........first, I already told you that it was the cpmfetch.php file that I added the css style value to. I am not trying to modify your script, so why such hostility?

I have been trying to follow the instructions on this link: http://www.fistfullofcode.com/projects/copperminefetch/tips.php
The link does not specify a file of any sort in which I add the css value to. The only file that had the "cpm_viewRandomMediaFromAlbum" value was cpmfetch.php, so I automatically assumed that it was the cpmfetch.php file that I had to add the css value to. I am just trying to follow your directions on the posted link. NOTHING more, NOTHING less.

The cpmfetch is currently showing within a module found here: http://dev.sirronald.com/index.php?option=com_content&task=view&id=5&Itemid=3 . If there is a file within cpmfetch that I need to adjust in order to change the border, please let me know. If I am asking the wrong person for help......well, sorry to waste your time.
Title: Re: Trying to change Image Border color for cpmfetch
Post by: vuud on August 18, 2006, 10:07:03 pm
OK.........first, I already told you that it was the cpmfetch.php file that I added the css style value to. I am not trying to modify your script, so why such hostility?

No hostility, I just want to stress that mucking around in there is going to break things and to clarify anything you need to do can be done from outside.  If you want to modify you can - its opensource, I don't care.

Quote
I have been trying to follow the instructions on this link: http://www.fistfullofcode.com/projects/copperminefetch/tips.php
The link does not specify a file of any sort in which I add the css value to. The only file that had the "cpm_viewRandomMediaFromAlbum" value was cpmfetch.php, so I automatically assumed that it was the cpmfetch.php file that I had to add the css value to. I am just trying to follow your directions on the posted link. NOTHING more, NOTHING less.

You want to add the css settings to the cascading style sheet for the page you are on.  This is different for all sites.  If you don't know where to put CSS stuff, then check some sites on making web pages or something.  You can add it directly to your html / php page or you can add it to a seperate file and include it - but none of that has anything to do with cpmfetch.  Cute with the NOTHINGS...  I'd reiterate that mine were not hostility, but emphasis.


Quote
The cpmfetch is currently showing within a module found here: http://dev.sirronald.com/index.php?option=com_content&task=view&id=5&Itemid=3 . If there is a file within cpmfetch that I need to adjust in order to change the border, please let me know. If I am asking the wrong person for help......well, sorry to waste your time.

No there is no file you need to adjust in cpmfetch.  According to that specific page, the file you want to add the css code into is:

http://dev.sirronald.com/templates/js_smoothportal_black/css/template_css.css

Now I can't see the code you are using to pull out the image, so I can't show you exactly what you want to use - but basically:

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1,array("tablestyle" => "test1","imagestyle" => "test1"));
$objCpm->cpm_close();
?>


I don't know anything about Joomba, so YMMV... and the above uses my settings, I can't see what yours are - so...

 


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: David McKim on August 19, 2006, 06:51:06 am
Ok so I went here http://www.fistfullofcode.com/projects/copperminefetch/tests/test3.php

and I want to display the image description (dont know if it's possible.) but also the rating, and views. But it seems I can only have either rating or views, not both. How can I have all three of these displayed on my site?

I never got my main question answered  :-\

Where do I define the css page? On my site? or somewhere in the cpmfetch? I tried defining it but it didn't work, I just got an error.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: grafx77 on August 19, 2006, 09:01:55 am
Ok Vuud.....here is exactly what I have.

My stylesheet for the module is located here: http://largedogbreedz.com/modules/imagestyle.css (http://largedogbreedz.com/modules/imagestyle.css)

The module "mod_randomcpg.php" looks like this originally, which I'm sure you already know:
Code: [Select]
<?php
/**
* @copyright (C) 2006 EStructure Solutions
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/

//begin validation
defined'_VALID_MOS' ) or die( 'Restricted access' );
//end validation

//begin module parameters
$gallery   = $params->get('gallery');
$cpmFetch  = $params->get('cpmFetch');
//end module parameters

$options = array('subtitle' => '<font style:"font-size: 8pt;">%t');

echo 
"<center>";
include 
$cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery); 
$objCpm->cpm_viewRandomMedia(1,1$options); 
$objCpm->cpm_close();
echo 
"</center>";

?>

I added the css style to the $objCpm->cpm_viewRandomMedia(1,1, $options); value so that it looks like this:
Code: [Select]
<?php
/**
* @copyright (C) 2006 EStructure Solutions
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/

//begin validation
defined'_VALID_MOS' ) or die( 'Restricted access' );
//end validation

//begin module parameters
$gallery   = $params->get('gallery');
$cpmFetch  = $params->get('cpmFetch');
//end module parameters

$options = array('subtitle' => '<font style:"font-size: 8pt;">%t');

echo 
"<center>";
include 
$cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery); 
$objCpm->cpm_viewRandomMedia(1,1, array("imagestyle" => "test1"));

$objCpm->cpm_close();
echo 
"</center>";

?>

Still no change in border color. I do not understand why.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 19, 2006, 02:51:41 pm
Ok Vuud.....here is exactly what I have.

My stylesheet for the module is located here: http://largedogbreedz.com/modules/imagestyle.css (http://largedogbreedz.com/modules/imagestyle.css)

The module "mod_randomcpg.php" looks like this originally, which I'm sure you already know:
Code: [Select]
<?php
/**
* @copyright (C) 2006 EStructure Solutions
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/

//begin validation
defined'_VALID_MOS' ) or die( 'Restricted access' );
//end validation

//begin module parameters
$gallery   = $params->get('gallery');
$cpmFetch  = $params->get('cpmFetch');
//end module parameters

$options = array('subtitle' => '<font style:"font-size: 8pt;">%t');

echo 
"<center>";
include 
$cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery); 
$objCpm->cpm_viewRandomMedia(1,1$options); 
$objCpm->cpm_close();
echo 
"</center>";

?>



I added the css style to the $objCpm->cpm_viewRandomMedia(1,1, $options); value so that it looks like this:
Code: [Select]
<?php
/**
* @copyright (C) 2006 EStructure Solutions
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/

//begin validation
defined'_VALID_MOS' ) or die( 'Restricted access' );
//end validation

//begin module parameters
$gallery   = $params->get('gallery');
$cpmFetch  = $params->get('cpmFetch');
//end module parameters

$options = array('subtitle' => '<font style:"font-size: 8pt;">%t');

echo 
"<center>";
include 
$cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery); 
$objCpm->cpm_viewRandomMedia(1,1, array("imagestyle" => "test1"));

$objCpm->cpm_close();
echo 
"</center>";

?>

Still no change in border color. I do not understand why.


From what I can see it is because you still have not told the web browser where the test1 css information can be found.  Everything else you have done seems to be correct now.

Go to your page in your favorite or any web brower and do, view source.  In the HEAD section (at the top) look for this line.  This is a line that tells your browser where to get its css information from.

Code: [Select]
link href="http://largedogbreedz.com/templates/box_rain_brown/css/template_css.css" rel="stylesheet" type="text/css"
You need to do one of the following:
1) Tell the browser where your code is by adding this sort of line
2) Add your test css information from your file into the one above.

This site has more information than I could type on CSS, if you have questions on it.
http://www.smartwebby.com/web_site_design/css_styles_tutorial.asp


Once you do this (Add recommened #2 for simplicity sake) you should be okay. 

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 19, 2006, 03:03:36 pm
I never got my main question answered  :-\

Where do I define the css page? On my site? or somewhere in the cpmfetch? I tried defining it but it didn't work, I just got an error.

I thought we were rid of you ;)

Sorry, missed your post somehow.

Everything you want to do uses submitting options to cpmfetch
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html


Quote
and I want to display the image description (dont know if it's possible.) but also the rating, and views. But it seems I can only have either rating or views, not both. How can I have all three of these displayed on my site?

Submit the subtitle option as shown here
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html

'subtitle' => '%c has the miserable rating of %V and has unfortunately been looked at %h times'

Quote
Also, how can I change their text size and or colors for the font of (views, rated, description) and where can I edit to make those fonts centered or position them differently? Right now the default text is black.

You need to submit css names to cpmfetch for the different parts:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html

CSS gets defined in your web page, or referenced from your web page by a LINK statement.  See the postings above this one for some more information I posted on it.

I hope that all helps

Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: grafx77 on August 19, 2006, 03:58:24 pm
Thank you for your patience and insight. I made the adjustments as you stated in your last thread, but this blue border just doesn't want to go away.

Here is what I have for the module code now:
Code: [Select]
<?php
/**
* @copyright (C) 2006 EStructure Solutions
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/

//begin validation
defined'_VALID_MOS' ) or die( 'Restricted access' );
//end validation

//begin module parameters
$gallery   = $params->get('gallery');
$cpmFetch  = $params->get('cpmFetch');
//end module parameters

$options = array('subtitle' => '<font style:"font-size: 8pt;">%t');

echo 
"<center>";
include 
$cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery); 
$objCpm->cpm_viewRandomMedia(1,1, array("template_css" => "test1"));

$objCpm->cpm_close();
echo 
"</center>";

?>

I added the css style from my last thread to my main stylesheet (template_css), but to no avail. For the sake of experimenting, I even replaced the "test1" css value with other css values from my stylesheet and nothing seems to change this border color?

Any more suggestions?
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on August 19, 2006, 04:05:00 pm
Code: [Select]
$objCpm->cpm_viewRandomMedia(1,1, array("template_css" => "test1"));
should be

Code: [Select]
$objCpm->cpm_viewRandomMedia(1,1, array("imagestyle" => "test1"));
You fixed the css file but removed the class from the image at the same time.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 19, 2006, 04:15:51 pm
Thank you for your patience and insight. I made the adjustments as you stated in your last thread, but this blue border just doesn't want to go away.

I added the css style from my last thread to my main stylesheet (template_css), but to no avail. For the sake of experimenting, I even replaced the "test1" css value with other css values from my stylesheet and nothing seems to change this border color?

Any more suggestions?

If you can look at the source code of your page (from a browser) and see that the image cpmfetch put in for you has class="cssname" (where cssname is whatever you want to us)... then its a CSS issue - which is really beyond the scope of this thread.  The link I mentioned before has some self education reading on there that could help you.

If you use firefox, the web developer extenstion is very handy and has an option in it to simply view the css the page knows about.  Its also got a ton of other cool stuff in it.

I just looked at you main page, and there is no css tag on the image... maybe I am looking in the wrong place, or you are editing it as we speak.  I also did not see any entries in the css file that page is using. 

Is there a test page you are doing this all on or something?


Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: grafx77 on August 19, 2006, 06:06:44 pm
If you can look at the source code of your page (from a browser) and see that the image cpmfetch put in for you has class="cssname" (where cssname is whatever you want to us)... then its a CSS issue - which is really beyond the scope of this thread.  The link I mentioned before has some self education reading on there that could help you.

If you use firefox, the web developer extenstion is very handy and has an option in it to simply view the css the page knows about.  Its also got a ton of other cool stuff in it.

I just looked at you main page, and there is no css tag on the image... maybe I am looking in the wrong place, or you are editing it as we speak.  I also did not see any entries in the css file that page is using. 

Is there a test page you are doing this all on or something?


I took a look at the source code from IE and did see that there is no css tag posted there, but I did post the css tag within the mod_randomcpg.php module. The code for this module was posted on my last thread.

For some odd reason, IE is not posting the css style tag, BUT I just found out that Firefox is. The border is exactly how I want it to look within Firefox. If you take a look at my homepage, you will see that the border is brown. My main website style sheet is located here: http://largedogbreedz.com/templates/box_rain_brown/css/template_css.css (http://largedogbreedz.com/templates/box_rain_brown/css/template_css.css) . On line 18 and 25 you will see where I added the img.test1 css style. This is wierd  :-\
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 19, 2006, 06:21:11 pm
I took a look at the source code from IE and did see that there is no css tag posted there, but I did post the css tag within the mod_randomcpg.php module. The code for this module was posted on my last thread.

For some odd reason, IE is not posting the css style tag, BUT I just found out that Firefox is. The border is exactly how I want it to look within Firefox. If you take a look at my homepage, you will see that the border is brown. My main website style sheet is located here: http://largedogbreedz.com/templates/box_rain_brown/css/template_css.css (http://largedogbreedz.com/templates/box_rain_brown/css/template_css.css) . On line 18 and 25 you will see where I added the img.test1 css style. This is wierd  :-\

Firefox renders that different by default I think...

I just went to that link for the css and there is no css tage in there named img.test1. 

Also, if I look at the source on your home page, cpmfetch is still not adding in the css tag to the image, which makes no sense.

Although this CSS file you are talking about is the correct one you want to edit... So that is progress.

Okay, next - check your mod file there and find the line that looks like this:  Make sure it still looks like this.  In all the emails this file has changed a few times, so I want to make sure its still what it used to be.

$objCpm->cpm_viewRandomMedia(1,1, array("imagestyle" => "test1"));



Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: grafx77 on August 19, 2006, 06:59:10 pm
AH HA......THATS IT!

The module was displaying this line: $objCpm->cpm_viewRandomMedia(1,1, array("template_css" => "test1")); instead of this $objCpm->cpm_viewRandomMedia(1,1, array("imagestyle" => "test1")); . I was under the impression that the "imagestyle" value was calling for the css file and not its class.

Thank you very much for your time and help.......much added Karma for you. Thanks again for sticking by me.
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: Nibbler on August 19, 2006, 07:02:50 pm
I did tell you that 3 hours ago, maybe you missed my post...
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: grafx77 on August 19, 2006, 07:41:48 pm
I did tell you that 3 hours ago, maybe you missed my post...

Sorry Nibbler, I did miss your post. Thanks for the help.  :) ;) :D ;D
Title: Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
Post by: vuud on August 19, 2006, 09:01:21 pm
I did tell you that 3 hours ago, maybe you missed my post...

I tried to PM you awhile back to thank you for your periodic help in this and the other cpmfetch forums...

Thanks for you help in here - i appreciate it!