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