forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: vuud on May 07, 2005, 07:27:38 am

Title: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on May 07, 2005, 07:27:38 am
CpmFetch can be pretty easily embedded into other applications.  This thread is dedicated to that.

It has been reported to work in:


It has not been able to work in:
* Let me know if anyone has this problem


Subscribe to the announcements mailer at http://cpmfetch.fistfullofcode.com to be notified of releases
Title: image links take me outside mambo wrapper
Post by: mojito on June 05, 2005, 01:37:53 pm
The links on returned images in tables can be enhanced in design  by passing css right.
But I need the links to keep me inside my wrapper as my coppermine is part of a mambo portal. And clicking an image takes me to the instal of coppermine without my mambo wrapper content around.

I have trolled around the code and found various clues but im not confidant I'd be editing the right bit.

Any pointers for this. Maybee I can hard code in my coppermine link as being absolute?

Please also note i couldnt post a new thread, this thread seems to be the only option.

thanks
mojito
Title: Mojito's mambo problem
Post by: vuud on June 05, 2005, 07:27:13 pm
The links on returned images in tables can be enhanced in design  by passing css right.
But I need the links to keep me inside my wrapper as my coppermine is part of a mambo portal. And clicking an image takes me to the instal of coppermine without my mambo wrapper content around.

I have trolled around the code and found various clues but im not confidant I'd be editing the right bit.

Any pointers for this. Maybee I can hard code in my coppermine link as being absolute?

Please also note i couldnt post a new thread, this thread seems to be the only option.

thanks
mojito
Title: Re: image links take me outside mambo wrapper
Post by: vuud on June 05, 2005, 07:31:37 pm
The links on returned images in tables can be enhanced in design  by passing css right.
But I need the links to keep me inside my wrapper as my coppermine is part of a mambo portal. And clicking an image takes me to the instal of coppermine without my mambo wrapper content around.

I have trolled around the code and found various clues but im not confidant I'd be editing the right bit.

Any pointers for this. Maybee I can hard code in my coppermine link as being absolute?

Please also note i couldnt post a new thread, this thread seems to be the only option.

thanks
mojito


So you just want to make the links point to something other than coppermine?  I don't know mambo... but I like to help

Lemme know
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: fishfreek on June 23, 2005, 10:13:15 pm
First I want to thank Vuud for his help in getting this figured out via e-mail.

Installing CpmFetch and PHPBB using the PHPBB template system (NO EXTRA MODS NEEDED).  There are other solutions on this website that require the install of other mods like Extreme Styles inorder for this to work.  This soultion uses the phpbb template system with out the need for additional mods to be installed.

Everything that I reference below I did on my website http://www.felineadvice.com to get cpmfetch working with the phpbb templates.  I am using Smartor's EZportal but you can use this method to intergrate cpmfetch on any phpbb file you wish.

Open the phpbb file you wish to have cpmfetch included in.  In my example I am using portal.php but you can use index.php or any other phpbb file.

FIND: 
Code: [Select]
$template->assign_vars(array(
ADD BEFORE:

Code: [Select]
include "./cpmfetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_setReturnType('html');

Where ./cpmfetch/coppermine.php is the path to the coppermine file installed when you uploaded cpmfetch and /gallery is the path to your coppermine gallery.  In my example my forum is installed in the root of my web space so the gallery is one level up aswell as the cpmfetch install.

FIND:
 
Code: [Select]
$template->assign_vars(array(
ADD AFTER:
Code: [Select]
'RANDOM_IMAGE' => $objCpm->cpm_viewRandomMedia(1,3),
FIND:
Code: [Select]
);
This is the closing bracket for the template array.

ADD AFTER:
Code: [Select]
$objCpm->cpm_close();
SAVE FILE
 
Now open the assocated template file.  In my example I am using portal_body.tpl  Locate where you want the images to appear and insert the approprate HTML and {RANDOM_IMAGE} where you want the images to appear.

If you follow the above you will end up with one row of images and three across.  Edit the  $objCpm->cpm_viewRandomMedia(1,3), in your file if you want more rows or more images.

Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: toastk on June 26, 2005, 06:40:01 pm
I can't seem to add cpmfetch calls to my Wordpress sidebar without cpmfetch (apparently) hosing WP's access to the database. That is, if I add cpmfetch calls to display three random thumbnails from my Coppermine gallery in my WP sidebar, anything from Wordpress in the sidebar below the thumbnails (e.g., category archives, author lists, blogroll, etc.) will not display. Disable the cpmfetch calls, and everything returns to normal.

I am basically using the standard cpmfetch example/test code to pull in a set of 3 images:
Code: [Select]
<?php
        
include "../cpmfetch/coppermine.php";
        
$objCpm = new cpm("/gallery");
        
$objCpm->cpm_viewRandomMedia(3,1);
        
$objCpm->cpm_close();
?>

I am inserting this code into my Wordpress sidebar.php template. I've tried doing so in a number of ways with varying degrees of failure. Like I said, it's not that the thumbnails aren't displaying; it's that Wordpress's access to its database seems to get hosed by cpmfetch.

Anyone else have this problem? Know of a work-around? Your advice is appreciated.

My blog is here (http://hackstadt.com/blog/). You'll probably see working thumbnails in the sidebar if you look; these are being created by a different, less robust plugin (http://www.texx.org/?p=47) to which I've made extensive repairs and additions. I'd like to use cpmfetch in its place....

I am using (or trying to use):
[/i]
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on June 26, 2005, 06:48:43 pm

Toastk,

There was a bug fix in 1.3.4 of cpmfetch that resolved an issue just like this.

IF your cpmfetch and wordpress tables are in the same database, this will most likely solve your problem.

Upgrade to the newest dev version 1.3.8 and give it another try.  Be warned, the coppermine.php file has been renamed, so remove the old one and use cpmfetch.php instead.  (makes more sense doesn't it)

Let us know how that works out, but I am darn sure it will fix your problem

Vuud



I can't seem to add cpmfetch calls to my Wordpress sidebar without cpmfetch (apparently) hosing WP's access to the database. That is, if I add cpmfetch calls to display three random thumbnails from my Coppermine gallery in my WP sidebar, anything from Wordpress in the sidebar below the thumbnails (e.g., category archives, author lists, blogroll, etc.) will not display. Disable the cpmfetch calls, and everything returns to normal.

I am basically using the standard cpmfetch example/test code to pull in a set of 3 images:
Code: [Select]
<?php
        
include "../cpmfetch/coppermine.php";
        
$objCpm = new cpm("/gallery");
        
$objCpm->cpm_viewRandomMedia(3,1);
        
$objCpm->cpm_close();
?>

I am inserting this code into my Wordpress sidebar.php template. I've tried doing so in a number of ways with varying degrees of failure. Like I said, it's not that the thumbnails aren't displaying; it's that Wordpress's access to its database seems to get hosed by cpmfetch.

Anyone else have this problem? Know of a work-around? Your advice is appreciated.

My blog is here (http://hackstadt.com/blog/). You'll probably see working thumbnails in the sidebar if you look; these are being created by a different, less robust plugin (http://www.texx.org/?p=47) to which I've made extensive repairs and additions. I'd like to use cpmfetch in its place....

I am using (or trying to use):
  • Wordpress 1.5.1
  • Coppermine Gallery 1.3.3
  • cpmfetch 1.2.2
[/i]
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: toastk on June 26, 2005, 08:05:58 pm
Ha! I was just going to report back that I had tracked this down to the Coppermine and Wordpress tables residing in the same database! I simply created unique DB usernames for wordpress and coppermine, and my problems went away.

I will still upgrade to the newest dev version of cpmfetch, though. I bet cpmfetch forces creation of a new link identifier when it calls mysql_connect() now, doesn't it? ;)

Thanks for the quick response!

Toastk,

There was a bug fix in 1.3.4 of cpmfetch that resolved an issue just like this.

IF your cpmfetch and wordpress tables are in the same database, this will most likely solve your problem.

Upgrade to the newest dev version 1.3.8 and give it another try.  Be warned, the coppermine.php file has been renamed, so remove the old one and use cpmfetch.php instead.  (makes more sense doesn't it)

Let us know how that works out, but I am darn sure it will fix your problem

Vuud
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: toastk on June 26, 2005, 08:14:52 pm
Let us know how that works out, but I am darn sure it will fix your problem

I upgraded to the latest dev version of cpmfetch and then rolled back to using identical DB usernames in Coppermine and Wordpress. The latest build definitely resolved the issue (but I'm still going to use distinct DB usernames!).

And sure enough... mysql_connect() is forcing creation of a new link. :o  ;D

Thanks again.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on June 26, 2005, 08:57:36 pm
Well, the real problem is that this is one of my first projects in PHP (I come from a perl, java, vb, c++ background).  But your conclusion sounds accurate... I misunderstood when they said database, they meant MYSQL, not the Database inside it (word is used too much). 

But yeah, thats what it does now.  The old solution would have been to not do the close() and that would have the same effect (allowing PHP to clean it up later - but that just is bad form if you ask me)

Good luck!



Ha! I was just going to report back that I had tracked this down to the Coppermine and Wordpress tables residing in the same database! I simply created unique DB usernames for wordpress and coppermine, and my problems went away.

I will still upgrade to the newest dev version of cpmfetch, though. I bet cpmfetch forces creation of a new link identifier when it calls mysql_connect() now, doesn't it? ;)

Thanks for the quick response!

Toastk,

There was a bug fix in 1.3.4 of cpmfetch that resolved an issue just like this.

IF your cpmfetch and wordpress tables are in the same database, this will most likely solve your problem.

Upgrade to the newest dev version 1.3.8 and give it another try.  Be warned, the coppermine.php file has been renamed, so remove the old one and use cpmfetch.php instead.  (makes more sense doesn't it)

Let us know how that works out, but I am darn sure it will fix your problem

Vuud
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: blambert on July 07, 2005, 06:56:17 am
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.lambertandassoc.com%2Fphotos%2Fscreenshot.jpg&hash=1013140889e6c5510058c851e6c180b80c4ec7d8)

How can I do this...the screenshot was done by a graphics editor.
Here is what I have done so far....can you help with a suggestion?
http://www.lambertandassoc.com/photos/index.php
http://www.lambertandassoc.com/photos/themes/space/callalb.php
http://www.lambertandassoc.com/photos/themes/space/template.shtml
What I am showing is that both parts work but not together. When I run the index.php it won't parse the cal.php which is nested in the templates.shtml. But when I load it direct throught the browser the template.shtml parses the callalb.php.  The callalb.php is really just the 'lastup' being merged into a table right to the {Gallery} with the Random and Lastup turned off. Please help if you can....I have some important projects I am trying to do and they like this style...similar to http://hubblesite.org/gallery/  
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 07, 2005, 07:48:34 am

How can I do this...the screenshot was done by a graphics editor.
Here is what I have done so far....can you help with a suggestion?
http://www.lambertandassoc.com/photos/index.php
http://www.lambertandassoc.com/photos/themes/space/callalb.php
http://www.lambertandassoc.com/photos/themes/space/template.shtml
What I am showing is that both parts work but not together. When I run the index.php it won't parse the cal.php which is nested in the templates.shtml. But when I load it direct throught the browser the template.shtml parses the callalb.php.  The callalb.php is really just the 'lastup' being merged into a table right to the {Gallery} with the Random and Lastup turned off. Please help if you can....I have some important projects I am trying to do and they like this style...similar to http://hubblesite.org/gallery/ 

Are you using cpmfetch and saying its messing up your template? 

If not you are posing very very large screen comps in the wrong place.

Let me know, I can either help or magically teleport this post to the proper location (by using magic)




Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Daethian on July 13, 2005, 03:42:17 am
Okay reposting here :D

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'm also thinking of trying to embed this in my B2evolution blog.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on July 13, 2005, 05:25:14 am
Okay reposting here :D

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'm also thinking of trying to embed this in my B2evolution blog.


If nothing is happening, and like you said you have xoop set to run PHP in there, then I would suggest trying to add this to the code (somewhere above it)

Code: [Select]
<?php error_reporting(E_ALL); ini_set('display_errors',1);  ?>

Sometimes the default for PHP is to not display some types of errors... this will tell it to show all the problems.

The other thing is the <?php ?> blocks... you don't have them listed, but I assume you have them in there?

One other thing to try is to VIEW SOURCE in your browser...  sometimes things may not display, but there is output.  Its rare, but I suppose it happens :)

Hope some of that helps, at tleast the error_reporting... may it give you errors (sounds wierd doesn't it)









Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Daethian on July 13, 2005, 07:18:58 am
I did have them in there but tonight I took them out after someone over at the xoops board said that is how he fixed his.

I'm not sure where to insert that code to generate the errors.  In the XOOPS files some where??  I'll go back to the XOOPS board to see if they responded.
http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=37651&start=0#forumpost169002

That install is strictly a test setup and I'm willing to allow you access to the admin panel to see what I mean.  you can catch me on yahoo if you want purple_penpal@yahoo.com
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on July 13, 2005, 07:46:11 am
I did have them in there but tonight I took them out after someone over at the xoops board said that is how he fixed his.

I'm not sure where to insert that code to generate the errors.  In the XOOPS files some where??  I'll go back to the XOOPS board to see if they responded.
http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=37651&start=0#forumpost169002

That install is strictly a test setup and I'm willing to allow you access to the admin panel to see what I mean.  you can catch me on yahoo if you want purple_penpal@yahoo.com

That code has to go somewhere before the calls you make for cpmfetch...  Anywhere that gets executed. 

I checked the forum and it looks like that has to be in a different file and included.... If you want to give me access, PM me the information and I will poke it with a stick a few times.

I'd be interesting to see XOOP from the inside anyway



Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: mrmike987 on July 13, 2005, 11:08:41 pm
Does anyone here know how to add     <?php $objCpm->cpm_viewLastAddedMedia(1,2)  ?>
to a block in phpnuke?

Thanks
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on July 13, 2005, 11:41:22 pm
Does anyone here know how to add     <?php $objCpm->cpm_viewLastAddedMedia(1,2)  ?>
to a block in phpnuke?

Thanks

I don't know PhpNuke, but I just read some of the docs... it looks like you can just create a block and have that execute cpmfetch calls. 

I was reading this page, and the one following it.
http://phpnuke.org/modules.php?name=PHP-Nuke_HOWTO&page=block-theory.html

Seems like it should not be so bad.

Let me know how that works out - I think the wierd thing to do would be figuring out the path to the cpmfetch install from where the block is executed (not where it resides).





Title: Not much luck in Mambo
Post by: marian on July 21, 2005, 05:16:54 pm
I want to display one coppermine image in the sidebar of the new template we are finalising. I gave the guy who has written the template the code
<?php
include "./cpmfetch.php";
$objCpm = new cpm("/photos"); $objCpm->cpm_viewLastAddedMedia(1,1);
$objCpm->cpm_close();
?>
That works perfectly on a php page but since he has put it in the Mambo template it is generating errors. You can see these on our test site at www.bymnews.com/merge!
Title: Re: Not much luck in Mambo
Post by: vuud on July 21, 2005, 06:44:32 pm
I want to display one coppermine image in the sidebar of the new template we are finalising. I gave the guy who has written the template the code
<?php
include "./cpmfetch.php";
$objCpm = new cpm("/photos"); $objCpm->cpm_viewLastAddedMedia(1,1);
$objCpm->cpm_close();
?>
That works perfectly on a php page but since he has put it in the Mambo template it is generating errors. You can see these on our test site at www.bymnews.com/merge!


Where did you install cpmfetch too?  Unless you installed it in the /merge directory, it wont be able to find it.  You need to edit the include statement to be able to find the file.

For example, if you put the cpmfetch folder off the root of the web site  ( /cpmfetch )

You need to change the include above too:

include "../cpmfetch/cpmfetch.php";
Title: Re: Not much luck in Mambo
Post by: marian on July 21, 2005, 07:09:18 pm

Where did you install cpmfetch too?  Unless you installed it in the /merge directory, it wont be able to find it.  You need to edit the include statement to be able to find the file.

For example, if you put the cpmfetch folder off the root of the web site  ( /cpmfetch )

You need to change the include above too:

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

Thanks that makes sense!
Title: Re: Not much luck in Mambo
Post by: marian on July 21, 2005, 07:31:00 pm
Thanks that makes sense!
It made sence but I still haven't fixed it! :(
I thought I'd take the easy way out and moved the copperminefetch folder into the merge directory and leave the code as it was, but no joy.
Still getting:
Warning: main(/cpmfetch.php): failed to open stream: No such file or directory in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 96
Warning: main(): Failed opening '/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 96
Fatal error: Cannot instantiate non-existent class: cpm in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 97
The relevant lines are:
96 include "/cpmfetch.php";
97 $objCpm = new cpm("/photos"); $objCpm->cpm_viewLastAddedMedia(1,1);
Sorry to be so pathetic about getting the hange of this.
Title: Re: Not much luck in Mambo
Post by: vuud on July 21, 2005, 08:07:49 pm
Thanks that makes sense!
It made sence but I still haven't fixed it! :(
I thought I'd take the easy way out and moved the copperminefetch folder into the merge directory and leave the code as it was, but no joy.
Still getting:
Warning: main(/cpmfetch.php): failed to open stream: No such file or directory in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 96
Warning: main(): Failed opening '/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 96
Fatal error: Cannot instantiate non-existent class: cpm in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 97
The relevant lines are:
96 include "/cpmfetch.php";
97 $objCpm = new cpm("/photos"); $objCpm->cpm_viewLastAddedMedia(1,1);
Sorry to be so pathetic about getting the hange of this.

You are going in many many different directions with many different things.

Do you have the the cpmfetch folder in your top directory?  Not just cpmfetch.php but the whole cpmfetch folder containing the cpmfetch.php file?  From a web browser it should be

http://www.bymnews.com/cpmfetch/cftest.php

When you get that...

Your include will be thus:

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



Title: Re: Not much luck in Mambo
Post by: marian on July 22, 2005, 11:40:15 am
You are going in many many different directions with many different things.
Do you have the the cpmfetch folder in your top directory?  Not just cpmfetch.php but the whole cpmfetch folder containing the cpmfetch.php file?  From a web browser it should be

http://www.bymnews.com/cpmfetch/cftest.php

When you get that...

Your include will be thus:

include "../cpmfetch/cpmfetch.php";
The cpmfetch folder is in the copperminefetch folder which is in public_html
I have tried the following includes:
/cpmfetch.php
/cpmfetch/cpmfetch.php"
/copperminefetch/cpmfetch/cpmfetch.php
/public_html/copperminefetch/cpmfetch/cpmfetch.php
& all produce a variation of the same 3 error messages

Warning: main(/cpmfetch.php): failed to open stream: No such file or directory in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 96

Warning: main(): Failed opening '/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 96

Fatal error: Cannot instantiate non-existent class: cpm in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 97
/copperminefetch/cpmfetch
Title: Re: Not much luck in Mambo
Post by: vuud on July 22, 2005, 05:15:56 pm
You are going in many many different directions with many different things.
Do you have the the cpmfetch folder in your top directory?  Not just cpmfetch.php but the whole cpmfetch folder containing the cpmfetch.php file?  From a web browser it should be

http://www.bymnews.com/cpmfetch/cftest.php

When you get that...

Your include will be thus:

include "../cpmfetch/cpmfetch.php";
The cpmfetch folder is in the copperminefetch folder which is in public_html
I have tried the following includes:
/cpmfetch.php
/cpmfetch/cpmfetch.php"
/copperminefetch/cpmfetch/cpmfetch.php
/public_html/copperminefetch/cpmfetch/cpmfetch.php
& all produce a variation of the same 3 error messages

Warning: main(/cpmfetch.php): failed to open stream: No such file or directory in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 96

Warning: main(): Failed opening '/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 96

Fatal error: Cannot instantiate non-existent class: cpm in /home/bymnews/public_html/merge/templates/jh_bym/index.php on line 97
/copperminefetch/cpmfetch


Did you try the one I posted?  You show variations, but none of them are the one I suggested which I think is what you need.

If you did, it must be something with mambo...

try the following two... one of them should work

include "../cpmfetch/cpmfetch.php";   <- this is the one I suggested last post (notice the two periods in it)

include "../../../cpmfetch/cpmfetch.php";  <- let me know if this one does the trick

Make sure you do them exactly... missing periods or slashes will do somethign completely different and wrong





Title: Re: Not much luck in Mambo
Post by: marian on July 22, 2005, 09:24:27 pm
Did you try the one I posted?  You show variations, but none of them are the one I suggested which I think is what you need.

If you did, it must be something with mambo...

try the following two... one of them should work

include "../cpmfetch/cpmfetch.php";   <- this is the one I suggested last post (notice the two periods in it)

include "../../../cpmfetch/cpmfetch.php";  <- let me know if this one does the trick

Make sure you do them exactly... missing periods or slashes will do somethign completely different and wrong
It's working now. The guy who is doing the template fixed it, after I'd told him where cpmfetch.php was.
The code he used was
include "../copperminefetch/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photos"); $objCpm->cpm_viewLastAddedMedia(1,1);
$objCpm->cpm_close();
and, as you can see on www.bymnews.com/merge, it works perfectly and I owe you a million kisses for producing this brilliant script!
As I did not get it to work, I can only assume I'd missed out a slash or period!!
I now have to tackle getting it to work in VBulletin!!
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: chupa2k on July 23, 2005, 10:53:02 pm
Anyone managed todo that on Invision Power Board 1.3 ?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on July 24, 2005, 12:09:55 am
Anyone managed todo that on Invision Power Board 1.3 ?

The general rule of thumb is if you can:

* Insert php into your boards templates

or

* Execute files on the system through templates

then you should be able to do it.

I checked invisions web site, but there is not a lot there on this.  Since its commerical software, I would forward to the technical people there and ask if you can include php in the templates or something




Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: TrickyBuddha on July 30, 2005, 01:38:27 am
Short and simple:

The problem in a nutshell: I cannot imbed my photo albums into my wordpress website, and I can't find the answers on how to do it. I need help! :)

The verbose version:

I hate to post questions on websites, especially questions that are as vague as this one will be, because I pride myself in finding the answers on my own; generally, everything's been posted a dozen times before I need to know the answer. :) Having said all that, I'm lost!

I downloaded Coppermine 1.4.1. I then downloaded CPM Fetch version 1.4.1 and got that running.

If it matters, I am running WordPress 1.5.1.1. And the theme I use is the S2A theme found at Dan Cameron's website: http://dancameron.org/pages/scattered-theme/

I made a gallery.php file and put it in the root of my website. I copy-and-pasted the line of code from the instructions. I modified it to point to my gallery folder on my website. Bingo. Everything worked like it should.

You can go to www.trickybuddha.com/coppermine to see the photo albums. I just threw some pictures up there. It's nothing final.

And if you check out:

http://www.trickybuddha.com and then click on the images link from the header, it takes you to : www.trickybuddha.com/gallery.php

There, you can see CPM Fetch seems to be up and running fine! It's currently displaying a random image from a couple different categories and albums. I'm just fiddling at the moment to get used to it all. :) Anyway, just saying that most of the posts seem to be addressing problems prior to this step. My problem is after that step.

The problem is that once I click the Images link, I lose everything else. I lose the header and sidebar and all that. I just see the four thumbnails that the gallery.php is calling. I want everything imbedded together. The second problem is that if I click on a thumbnail, it takes me to the www.trickybuddha.com/coppermine layout. I want clicked-on pictures to be imbedded within my site as well.

Does this all make sense? Is the answer really easy to find and I'm just not seeing it? Please, someone take pity on me and point me in the right direction! :D Or at least tell me I'm not crazy, there is no answer, and that is why I cannot find it.

Thanks!
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on July 30, 2005, 05:32:08 am
Does this all make sense? Is the answer really easy to find and I'm just not seeing it? Please, someone take pity on me and point me in the right direction! :D Or at least tell me I'm not crazy, there is no answer, and that is why I cannot find it.

Your not crazy
There is always a way to do anything
Its probably harder than you think
Hope you do good things using the name of the most revered figure in my belief system
(If you lowercase the B in Buddha it has a whole different connentation)

Good luck, I just don't know wordpress...
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: TrickyBuddha on July 30, 2005, 07:54:08 pm
Thank you for the response! I really appreciate it. I'll just have to do more digging to figure it all out. :D

As far as my nickname, I spent several years studying world religions as it's an interest of mine. That's partially where the nick comes from. :) As an aside, I spent some time at your site (fist full of code!) checking out that section (on Buddha). Very nice.

:)
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on August 18, 2005, 09:08:15 pm
PHPBB Bridge

A few users in the other forums here have had issues with phpbb bridge and using cpmfetch.

Aparently, and I have no first hand knowledge of this, but phpbb bridge seems to do something where your photos are added in with the wrong user_id, or at least one that does not exist.

If you have phpbb and are using the bridge to it... and you cannot get photos to display on the cftest page, then check the following...

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
Title: e107 theme modifications
Post by: vuud on August 28, 2005, 06:18:30 pm
Hi,

Regarding e107... I could not find good doc's anywhere on the e107 site, so I downloaded and poked at the themes they have in there.  It seems to me you could just edit the theme to include the cpmfetch code in the correct part.

If you can tell me where you want it to appear I can generally tell you where I think you should put it.  The trick is to get the paths to include cpmfetch correct, it will be from where the theme.php is executed, not stored.  So it would be (I am guessing) from the main e107 directory, not the themes subdirectory.

If you are using some sort of MOD or something, let me know

Vuud



Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: jerx on August 29, 2005, 04:38:18 pm
Hello,

The test page gives me the following error:
Error in getImageTouse: Extension (strtolower): .jpg File:/var/kunden/webs/TEST//gallery//albums/test/test_049.JPG
I cannot see the thumbnail, only a black frame with a "red cross" in it. If I click into the black frame, I will be taken to the fullsize view of the thumbnail image.

Code: [Select]
5 You set your partial URL to /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 debian 2.4.29-STD #10 Di Aug 16 11:38:53 CEST 2005 i686 INFO
40 WebServer = Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-15 INFO
45 PHP Version = 4.3.10-15 INFO
55 DOCUMENT_ROOT: /var/kunden/webs/TEST/ INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /var/kunden/webs/TEST/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS

I saw the double slashes in the file path of the image, so I removed the slash before "gallery" in cftest.php and before "albums" in cpmfetch_dao.php. The file path did not show the double slashes any more, but I still get the error message.

Although the test file says my installation seems correct so far, it does not look like it is correct.
1. coppermine.php and coppermine_dao.php are missing
I could not find these files. I downloaded almost every version of cpmfetch, but these files are not present. They are also not included in the coppermine gallery itself.
2. C_DOCUMENT_ROOT not found.
What is this? Is this the file path to coppermine root?
3. doc_root not found
This is only important on IIS Servers, right?

Oh yes, I use the phpbb bridge. I already edited the one and only user in coppermine users table to match the owner id of the pictures (owner_id = 2). Before doing this I did not even see the error message and the empty thumbnail frames.

Can anyone help me fixing this?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on August 29, 2005, 05:03:35 pm

Sure we can help...

The test page gives me the following error:
Error in getImageTouse: Extension (strtolower): .jpg File:/var/kunden/webs/TEST//gallery//albums/test/test_049.JPG
I cannot see the thumbnail, only a black frame with a "red cross" in it. If I click into the black frame, I will be taken to the fullsize view of the thumbnail image.

Basically it means that the file could not be found in that location.  Can you point me at the actual page, or at least post the path to the actual image it should be finding so I can see what the differences is from correct to incorrect.  Its probably something funky with the whole phpbb bridge or something.  I am sure its pretty easily fixed, just have to figure out where its messy.

Although the test file says my installation seems correct so far, it does not look like it is correct.
1. coppermine.php and coppermine_dao.php are missing
I could not find these files. I downloaded almost every version of cpmfetch, but these files are not present. They are also not included in the coppermine gallery itself.
2. C_DOCUMENT_ROOT not found.
What is this? Is this the file path to coppermine root?
3. doc_root not found
This is only important on IIS Servers, right?

1. Don't worry about these... they are an older version... anything that FAILS is marked that way (Big blinking red thing).  I want to insure no one has them laying around when they upgrade.  Maybe I will put in mouseovers explaining what those are at some point.  Good it was not found.

2 and 3...  These are used in different servers... if you don't have them thats fine...  doc_root is IIS (sometimes, sometimes not) and C_DOCUMENT_ROOT was apache on a FreeBSD configuration I think.  Perfectly fine that these are missing.

Oh yes, I use the phpbb bridge. I already edited the one and only user in coppermine users table to match the owner id of the pictures (owner_id = 2). Before doing this I did not even see the error message and the empty thumbnail frames.

Excellent.  I like a guy who does checking ahead a time and covers all his/her bases.  I would give you a little gold star, but I don't have any left.

I really need to get in there and fix that slashes issue... its harmless, but annoying.  Thanks for reminding me.

BTW, what version of coppermine photo gallery and what version of cpmfetch?

Thanks

Vuud
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: jerx on August 29, 2005, 06:53:30 pm
Thank you for your quick reply, vuud!

Here you go:
www.xxx.de (phpbb forum)
www.xxxx.de/gallery (user test/ pass test)
http://www.xxxx.de/cpmfetch/cftest.php

I am using coppermine 1.33 and cpmfetch 1.6.2. phpbb should be 2.15.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on August 31, 2005, 06:25:41 am
Thank you for your quick reply, vuud!

Here you go:
(Domains removed post problem)
www.xxxx.de (phpbb forum)
www.xxxx.de/gallery (user test/ pass test)
http://www.xxxxde/cpmfetch/cftest.php

I am using coppermine 1.33 and cpmfetch 1.6.2. phpbb should be 2.15.

You have not been forgotten... I am in the middle of building a router.  I will check it later tonight or tomorrow morning at the latest
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: jerx on August 31, 2005, 11:34:29 am
Hey vuud,

I found the problem! Stupid me, the pictures had the wrong owner, so that they have not been displayed.

Now I need to figure out why it only displays 0 views.

Edit: I think you used the wrong options in the test file. You used %V, which is the current rating. I changed it to %h.

Thank you for this wonderful and powerful mod!!!
Title: cpmFetch image links break out of Mambo wrapper
Post by: Klementz on August 31, 2005, 11:01:24 pm
I successfully got cpmFetch working on Coppermine embedded in Mambo. However, if you click a link it breaks out of the Mambo wrapper. This question was already asked in this thread, but there was no answer (because I think the question was not understood). Here is the problem:

Here is my Coppermine gallery embedded in Mambo:

http://www.clements.on.ca/component/option,com_wrapper/Itemid,41/

If you use the gallery, you will find that it stays embedded in Mambo.

Here is an example of a working cpmFetch page on my site:

http://www.clements.on.ca/content/view/81/105/

You can see that it is working fine, and embedding content inside Mambo. But when you click on one of the thumbnails, it breaks out of Mambo, and goes into an "unwrapped" Coppermine.

I don't want this to happen, since I obviously want to keep visitors inside the site (my mother gets confused enough as it is!).

Is there any way to fix this? I fear it may be a Mambo thing, and unsolvable, because cpmFetch is getting links from Coppermine, not Mambo. If you click the first link (Coppermine embedded), and start clicking around in the gallery, you will notice that the URL never changes.
Title: Re: cpmFetch image links break out of Mambo wrapper
Post by: vuud on August 31, 2005, 11:33:09 pm

Yeah, but its probably going require editing some code...  I will check it later and let you know what to modify

Vuud

I successfully got cpmFetch working on Coppermine embedded in Mambo. However, if you click a link it breaks out of the Mambo wrapper. This question was already asked in this thread, but there was no answer (because I think the question was not understood). Here is the problem:

Here is my Coppermine gallery embedded in Mambo:

http://www.clements.on.ca/component/option,com_wrapper/Itemid,41/

If you use the gallery, you will find that it stays embedded in Mambo.

Here is an example of a working cpmFetch page on my site:

http://www.clements.on.ca/content/view/81/105/

You can see that it is working fine, and embedding content inside Mambo. But when you click on one of the thumbnails, it breaks out of Mambo, and goes into an "unwrapped" Coppermine.

I don't want this to happen, since I obviously want to keep visitors inside the site (my mother gets confused enough as it is!).

Is there any way to fix this? I fear it may be a Mambo thing, and unsolvable, because cpmFetch is getting links from Coppermine, not Mambo. If you click the first link (Coppermine embedded), and start clicking around in the gallery, you will notice that the URL never changes.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Dagon on September 08, 2005, 01:53:50 am
PHPBB Bridge

A few users in the other forums here have had issues with phpbb bridge and using cpmfetch.

Aparently, and I have no first hand knowledge of this, but phpbb bridge seems to do something where your photos are added in with the wrong user_id, or at least one that does not exist.

If you have phpbb and are using the bridge to it... and you cannot get photos to display on the cftest page, then check the following...

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

If you create another user, only the photos for that user shows up.

What the bridge is doing is creating photos with the phpbb user_id located in the phpbb_users table.  The cpgxxx_users table is not used in bridged mode. 

It would be nice if CpmFetch could be configured to look at the phpbb_users table for the user_id as an option.  Is there any way to do this?

Thanks!
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on September 08, 2005, 05:03:45 am
PHPBB Bridge

A few users in the other forums here have had issues with phpbb bridge and using cpmfetch.

Aparently, and I have no first hand knowledge of this, but phpbb bridge seems to do something where your photos are added in with the wrong user_id, or at least one that does not exist.

If you have phpbb and are using the bridge to it... and you cannot get photos to display on the cftest page, then check the following...

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

If you create another user, only the photos for that user shows up.

What the bridge is doing is creating photos with the phpbb user_id located in the phpbb_users table.  The cpgxxx_users table is not used in bridged mode. 

It would be nice if CpmFetch could be configured to look at the phpbb_users table for the user_id as an option.  Is there any way to do this?

Thanks!

Nope.  Your best bet may be to do something to read in the phpbb users and write equivalent settings to the cpg forum.

I don't see adding this in the future.  Someone else may do a hack for it... 




Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: ohfishing on October 09, 2005, 09:58:26 pm
Hello, I am having some rookie trouble. I thought I would also post my problem in this thread becuase it was not awnsered in another. I installed cpmfetch to phpbb 2.0.17 I ran the cftest page and got error 75 ROOT and error 80 config init ... the path to the directory is wrong and i dont know how to fix it ..
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: [b]Not found [/b] 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 [b]BAD[/b]
80 CPG Config file not found: /home/ohfishin/public_htmlstl-web/bulletin/phpBB5/cpg135//include/config.inc.php [b]FAIL[/b]
 http://ohfishing.com/stl-web/bulletin/phpBB5/cpmfetch/cftest.php I have my cpm folder inside my PHPBB folder  right next to coppermine if it matters. I dont know how to change to the correct path to congif.init and i have no idea what error 75 is. Plz help!
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on October 10, 2005, 07:32:54 am
Hello, I am having some rookie trouble. I thought I would also post my problem in this thread becuase it was not awnsered in another. I installed cpmfetch to phpbb 2.0.17 I ran the cftest page and got error 75 ROOT and error 80 config init ... the path to the directory is wrong and i dont know how to fix it ..
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: [b]Not found [/b] 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 [b]BAD[/b]
80 CPG Config file not found: /home/ohfishin/public_htmlstl-web/bulletin/phpBB5/cpg135//include/config.inc.php [b]FAIL[/b]
http://ohfishing.com/stl-web/bulletin/phpBB5/cpmfetch/cftest.php I have my cpm folder inside my PHPBB folder  right next to coppermine if it matters. I dont know how to change to the correct path to congif.init and i have no idea what error 75 is. Plz help!

Try adding a slash at the beginning of the partial url you are setting

Are you bridged with phpBB?  If so you have another problem that is going to loom up before you


Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: toykilla on October 12, 2005, 10:41:49 pm
using this code on my forums (invision 2.1.1) does not appear to work. I tested the code on a blank html page and it works:

http://www.infinitigtrforums.com/forums/edits.php

however when i place the same code in the Invisionboard skin i get this returned where the pictures should be:

cpm_viewRandomMedia(1,1); $objCpm->cpm_close(); ?>
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on October 13, 2005, 02:13:30 pm
using this code on my forums (invision 2.1.1) does not appear to work. I tested the code on a blank html page and it works:

http://www.infinitigtrforums.com/forums/edits.php

however when i place the same code in the Invisionboard skin i get this returned where the pictures should be:

cpm_viewRandomMedia(1,1); $objCpm->cpm_close(); ?>



Can invisionboard skins execute PHP?  If so, do you have the " <?php " in front of this? 




Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Bernard on October 14, 2005, 11:14:31 pm
I cannot select specific catgegories.

Here is my source:

      include "./cpmfetch.php";
      $objCpm = "";
      $objCpm = new cpm('/galerie');
      $source = "cat=4";
      $styleguide = array(
         //"TABLESTYLE" => "photoclip",
         //"rowstyle" => "photoclip",
         "cellstyle" => "photoclip",
         "linkstyle" => "photoclip",
         "alttag" => "One of the last photos submitted",
         "subtitle" => "%o<br>%V views",
         "imagestyle" => "photoclip",
         "imagesize" => 'thumb',
         "imagewidth" => '100');      

       //$objCpm->cpm_viewRandomMedia(2,3,$styleguide);
      $objCpm->cpm_viewRandomMediaFrom  ( 2, 3, $source, "");
      print "<p>&nbsp;</p>";
      $objCpm->cpm_close();


Works only with $source="cat=1" ??

I am using the latest cpmfetch 1.6.2 and coppermine 1.3. See my installation here http://www.crostuttgart.de/galerie/

Thanks for your help in foward !


ps: stupid question - i don´t have a "new topic" button here ..
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on October 15, 2005, 08:30:17 am

Good on the new topic button - last thing we want is a ton of new threads popping up in here :)

Are you sure you have more than one category?  Are you thinking albums?  That could be why cat=1 works, but cat=4 does not.

Just a thought





I cannot select specific catgegories.

Here is my source:

      include "./cpmfetch.php";
      $objCpm = "";
      $objCpm = new cpm('/galerie');
      $source = "cat=4";
      $styleguide = array(
         //"TABLESTYLE" => "photoclip",
         //"rowstyle" => "photoclip",
         "cellstyle" => "photoclip",
         "linkstyle" => "photoclip",
         "alttag" => "One of the last photos submitted",
         "subtitle" => "%o<br>%V views",
         "imagestyle" => "photoclip",
         "imagesize" => 'thumb',
         "imagewidth" => '100');      

       //$objCpm->cpm_viewRandomMedia(2,3,$styleguide);
      $objCpm->cpm_viewRandomMediaFrom  ( 2, 3, $source, "");
      print "<p>&nbsp;</p>";
      $objCpm->cpm_close();


Works only with $source="cat=1" ??

I am using the latest cpmfetch 1.6.2 and coppermine 1.3. See my installation here http://www.crostuttgart.de/galerie/

Thanks for your help in foward !


ps: stupid question - i don´t have a "new topic" button here ..

Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on October 15, 2005, 08:32:15 am
Hello, I am having some rookie trouble. I thought I would also post my problem in this thread becuase it was not awnsered in another. I installed cpmfetch to phpbb 2.0.17 I ran the cftest page and got error 75 ROOT and error 80 config init ... the path to the directory is wrong and i dont know how to fix it ..
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: [b]Not found [/b] 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 [b]BAD[/b]
80 CPG Config file not found: /home/ohfishin/public_htmlstl-web/bulletin/phpBB5/cpg135//include/config.inc.php [b]FAIL[/b]
http://ohfishing.com/stl-web/bulletin/phpBB5/cpmfetch/cftest.php I have my cpm folder inside my PHPBB folder  right next to coppermine if it matters. I dont know how to change to the correct path to congif.init and i have no idea what error 75 is. Plz help!

Document root means it cannot find your document root variable.  Something the server should set, and a constant source of annoyance for me.  The link there did not work for me either.


Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Bernard on October 15, 2005, 01:50:53 pm

Good on the new topic button - last thing we want is a ton of new threads popping up in here :)

Are you sure you have more than one category?  Are you thinking albums?  That could be why cat=1 works, but cat=4 does not.

Just a thought

>> Yes I have many cats ... displaying a single album also does not work. If you don't mind you can have a look at my gallery structure on http://www.crostuttgart.de/galerie/

Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on October 15, 2005, 08:25:17 pm

Good on the new topic button - last thing we want is a ton of new threads popping up in here :)

Are you sure you have more than one category?  Are you thinking albums?  That could be why cat=1 works, but cat=4 does not.

Just a thought

>> Yes I have many cats ... displaying a single album also does not work. If you don't mind you can have a look at my gallery structure on http://www.crostuttgart.de/galerie/



Tag,

I will have to look at it better, and having your link there will be a help.   Your syntax seems correct... hmmmm

I'll check it later on

Bye

Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: ericmn on November 07, 2005, 03:55:33 am
Hi, seems really cool stuff...
I use coppermine 1.3.5 bridged to SMF 1.0.5 (with tinyportal (http://www.tinyportal.net)) a.so latest version of Cpmfetch
 and tried to show random or latest image in block, but all i get is just same image all the time.
Please help....
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 07, 2005, 07:12:45 pm
Hi, seems really cool stuff...
I use coppermine 1.3.5 bridged to SMF 1.0.5 (with tinyportal (http://www.tinyportal.net)) a.so latest version of Cpmfetch
 and tried to show random or latest image in block, but all i get is just same image all the time.
Please help....

I am guessing that its the typical user table not populated in coppermine... it causes problems.  If you only have one picture uploaded by a normal coppermine user, that will be the only one available.

You need to somehow create users in the cpg table to match the smf users (or at least pretend to)

Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: akime on November 07, 2005, 08:28:12 pm
cpmfetch doesn't work with my coppermine gallery.
The test says that everything is ok http://smv.rbg-langenau.de/cpmfetch/cftest.php
I don't know whats wrong?
Title: Re: cpmFetch image links break out of Mambo wrapper
Post by: v8central on November 11, 2005, 03:40:23 am
I successfully got cpmFetch working on Coppermine embedded in Mambo. However, if you click a link it breaks out of the Mambo wrapper. This question was already asked in this thread, but there was no answer (because I think the question was not understood). Here is the problem:

Here is my Coppermine gallery embedded in Mambo:

http://www.clements.on.ca/component/option,com_wrapper/Itemid,41/

If you use the gallery, you will find that it stays embedded in Mambo.

Here is an example of a working cpmFetch page on my site:

http://www.clements.on.ca/content/view/81/105/

You can see that it is working fine, and embedding content inside Mambo. But when you click on one of the thumbnails, it breaks out of Mambo, and goes into an "unwrapped" Coppermine.

I don't want this to happen, since I obviously want to keep visitors inside the site (my mother gets confused enough as it is!).

Is there any way to fix this? I fear it may be a Mambo thing, and unsolvable, because cpmFetch is getting links from Coppermine, not Mambo. If you click the first link (Coppermine embedded), and start clicking around in the gallery, you will notice that the URL never changes.
I see your problem, and I'll be facing the same thing but I can't even get the content displaying like in your example yet - can you give me any tips please ?
Title: Redeclare error in Gallery
Post by: CPG Guru on November 13, 2005, 05:25:10 pm
Hi

Im making one wallpaper site & on top i want to have 5 different random pics from 5 defined categories

Example : Nature, Wildlife, celebs, Love, Hot

I want to know if on same page i want to put cpmfetch code again to display random pics from predefined categories . Is That Possible

Ive simply tried to copy & put code in each block after defineing respected category , Result was the first pic was fine but 2nd pic gives an error 

Fatal error: Cannot redeclare class cpm in /home/SITENAME/public_html/cpmfetch/cpmfetch.php on line 33


This was redeclare error ..

So please recommend what to do now ,

Alternate is i should use iframes to do that but that'll not be search engine friendly

Title: Re: cpmFetch image links break out of Mambo wrapper
Post by: v8central on November 14, 2005, 09:54:20 pm
I successfully got cpmFetch working on Coppermine embedded in Mambo. However, if you click a link it breaks out of the Mambo wrapper. This question was already asked in this thread, but there was no answer (because I think the question was not understood). Here is the problem:

Here is my Coppermine gallery embedded in Mambo:

http://www.clements.on.ca/component/option,com_wrapper/Itemid,41/

If you use the gallery, you will find that it stays embedded in Mambo.

Here is an example of a working cpmFetch page on my site:

http://www.clements.on.ca/content/view/81/105/

You can see that it is working fine, and embedding content inside Mambo. But when you click on one of the thumbnails, it breaks out of Mambo, and goes into an "unwrapped" Coppermine.

I don't want this to happen, since I obviously want to keep visitors inside the site (my mother gets confused enough as it is!).

Is there any way to fix this? I fear it may be a Mambo thing, and unsolvable, because cpmFetch is getting links from Coppermine, not Mambo. If you click the first link (Coppermine embedded), and start clicking around in the gallery, you will notice that the URL never changes.
I see your problem, and I'll be facing the same thing but I can't even get the content displaying like in your example yet - can you give me any tips please ?

*BUMP*

Anyone ?
Title: Re: Redeclare error in Gallery
Post by: vuud on November 14, 2005, 09:59:11 pm
Hi

Im making one wallpaper site & on top i want to have 5 different random pics from 5 defined categories

Example : Nature, Wildlife, celebs, Love, Hot

I want to know if on same page i want to put cpmfetch code again to display random pics from predefined categories . Is That Possible

Ive simply tried to copy & put code in each block after defineing respected category , Result was the first pic was fine but 2nd pic gives an error 

Fatal error: Cannot redeclare class cpm in /home/SITENAME/public_html/cpmfetch/cpmfetch.php on line 33


This was redeclare error ..

So please recommend what to do now ,

Alternate is i should use iframes to do that but that'll not be search engine friendly



You only need to create the cpmfetch object once before all your calls and close it once after.  In between you can do as many calls to get images and stats that you want.

I suspect thats your problem
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: CPG Guru on November 15, 2005, 03:33:04 am

You only need to create the cpmfetch object once before all your calls and close it once after. In between you can do as many calls to get images and stats that you want.

I suspect thats your problem



I agree that we can call it any no. of time , but as i told u i want 1 pic from each category in Horizontal line , but if i used your this code the first category comes in first line 2nd in 2nd line & so on all this executes in vertical manner

<?php   
include "cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);           
$objCpm->cpm_viewRandomMedia (1,3);
$objCpm->cpm_viewRandomMedia (1,35);
$objCpm->cpm_close();
?>

Again, I want to insert 5 pics in Horizontol way, so please suggest the best way.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 15, 2005, 05:38:24 am

You only need to create the cpmfetch object once before all your calls and close it once after. In between you can do as many calls to get images and stats that you want.

I suspect thats your problem



I agree that we can call it any no. of time , but as i told u i want 1 pic from each category in Horizontal line , but if i used your this code the first category comes in first line 2nd in 2nd line & so on all this executes in vertical manner

<?php   
include "cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);           
$objCpm->cpm_viewRandomMedia (1,3);
$objCpm->cpm_viewRandomMedia (1,35);
$objCpm->cpm_close();
?>

Again, I want to insert 5 pics in Horizontol way, so please suggest the best way.


A messy way that leaps to mind would be to do it in a table... this would yield tables in tables, but unless you are php-ready and want to code a bit to display the images, you can do:

Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/photos');
?>


<table>
<tr>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=1");  ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=2");  ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=3");  ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=4");  ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=5");  ?></td>
</tr>
</table>
<?php $objCpm->cpm_close(); ?>


I cant remember if the "cat=1" should go before the 1,1 or not.  Hmmmm

Anyway, the other way is to get back result sets and build your own img ref tag from it.

This will make a series of 1 image tables inside the table of 5 cells.

Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: v8central on November 15, 2005, 11:12:12 am
Hello ?

can someone give me some tips on how to use CPMFETCH within the bounds of a Mambo/Joomla article please ?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: ksshane on November 15, 2005, 12:48:50 pm
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 - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: v8central on November 15, 2005, 10:11:19 pm
I wrote this email to send to "Bill" from CPMFETCH, but I just got an autoresponder saying use the forums - great :(, but here's the email if it helps :

Quote
Mate,  I'm having real problems getting CPMFETCH working the way I want.

What I want to do is create a site for a car yard.  They upload the pics to a Coppermine album, but the main website is running Joomla.  So they post a Joomla article and use CPMFETCH to put the thumbnails into the Joomla article.  Then using the normal CPMFETCH functionality the users click on the thumb and it opens the full image (in coppermine). 

I can't figure out how this works, or find any demo code.  Queries in forums are largely going unanswered as well :(

Can you help me at all please ?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: CPG Guru on November 17, 2005, 08:44:25 pm

You only need to create the cpmfetch object once before all your calls and close it once after. In between you can do as many calls to get images and stats that you want.

I suspect thats your problem



I agree that we can call it any no. of time , but as i told u i want 1 pic from each category in Horizontal line , but if i used your this code the first category comes in first line 2nd in 2nd line & so on all this executes in vertical manner

<?php   
include "cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewRandomMedia (1,3);
$objCpm->cpm_viewRandomMedia (1,35);
$objCpm->cpm_close();
?>

Again, I want to insert 5 pics in Horizontol way, so please suggest the best way.

Quote

A messy way that leaps to mind would be to do it in a table... this would yield tables in tables, but unless you are php-ready and want to code a bit to display the images, you can do:

Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/photos');
?>


<table>
<tr>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=1"); ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=2"); ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=3"); ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=4"); ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=5"); ?></td>
</tr>
</table>
<?php $objCpm->cpm_close(); ?>


I cant remember if the "cat=1" should go before the 1,1 or not. Hmmmm

Anyway, the other way is to get back result sets and build your own img ref tag from it.

This will make a series of 1 image tables inside the table of 5 cells.


Quote


YAHOOOOO    !!!!!!!

It Works Dear as it is !!!!!!!!!!!!!!

Ive PM u my site link , !!@#$   Please Suggest & Have Feel of your Hard work

THANKS DEAR
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 18, 2005, 11:11:40 pm
I wrote this email to send to "Bill" from CPMFETCH, but I just got an autoresponder saying use the forums - great :(, but here's the email if it helps :

Quote
Mate,  I'm having real problems getting CPMFETCH working the way I want.

What I want to do is create a site for a car yard.  They upload the pics to a Coppermine album, but the main website is running Joomla.  So they post a Joomla article and use CPMFETCH to put the thumbnails into the Joomla article.  Then using the normal CPMFETCH functionality the users click on the thumb and it opens the full image (in coppermine). 

I can't figure out how this works, or find any demo code.  Queries in forums are largely going unanswered as well :(

Can you help me at all please ?

Yeah.  *beep*!!  How dare!  My goodness, why on earth would people NOT want to get e-mails all the time about free software when there is a chance someone else can answer some in the forums?  Geeeze - the nerve.  And how dare it be suggested that you seek help in a forum or even give suggestions as to where else you could look!  Even the HELP page on the cpmfetch site tells you to email, oh wait, no - it tells you to go to the forum.  My bad.   Hmmmm.   Maybe its because if all the problems are in one place in public, along with countless solutions, someone could search on them and figure out the answer. 

Be happy the autoresponder included your message so you could repost it.

Anyway.  People have gotten it running in many many forum systems.  You just need to figure out how to execute an SSI or PHP.  I don't use "joomla" so i have no idea.  Get it to execute some php and you should be okay.

From a solution point of view, do they need to get random or can they just do an img tag to the image?


As for replies going unanswered in fourms - this and joomla (I guess) is free software, community supported.  There are about 1000 messages on cpmfetch, and over 15,000 views I'd say on the all in all its active.  If you want to be helpful post a solution when you figure it out.  I have no idea why messages in joomla would go unanswed.







Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: v8central on November 19, 2005, 05:53:50 am
Thank you for replying - but I thought I would get more than a truckful of abuse and no real help at all.  I actually sent that email because my post had gone unanswered on here for many days, even when I was bumping and providing more info

Quote
If you want to be helpful post a solution when you figure it out.
You've got to be kidding right ?  I give back to many forums, where the people are helpful.  On forums like this where it seems you are chosen to be ignored, then I choose to do the same.

Thanks for the help so far :(
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 19, 2005, 06:31:12 am
Thank you for replying - but I thought I would get more than a truckful of abuse and no real help at all.  I actually sent that email because my post had gone unanswered on here for many days, even when I was bumping and providing more info

Quote
If you want to be helpful post a solution when you figure it out.
You've got to be kidding right ?  I give back to many forums, where the people are helpful.  On forums like this where it seems you are chosen to be ignored, then I choose to do the same.

Thanks for the help so far :(

You were not chosen to be ignored.  Someone else was picked this week - seriously, I would tell you who it was, but that would ruin it for everyone.   Apparently no one knows how your system works, hence the lack of answers.  Its better this way than having 50 responses saying "I dont know" right?

There was help in there.  I mentioned two things to look at specifically.  Including PHP in the templates or articles or referencing a SSI or even just calling it from an image tag.  All of which the Joomla forums should be able to help you with.  But you want to ignore this bit of advice i threw in because it still means you have to work at it yourself.

Quote
You've got to be kidding right ?  I give back to many forums, where the people are helpful.  On forums like this where it seems you are chosen to be ignored, then I choose to do the same.

Here is part of the probolem:

* You are asking for tips for a system no one else here has used (that I know of).

* Your posts are all bump, or just asking again, or complaining.  Not one shows that you actually tried, or have been trying, or even made an attempt.

What would you suggest for responses?  Something like:  "I dunno"? 

If you had shown any inkling of even making an effort to try to solve this on your own I probably would have helped.    Sorry you are terribly unhappy with this forum.   If you do figure it out and don't post a solution for some other poor guy who tries to do the same thing later on (trust me no one here right now will benefit from it) regardless of your feelings for me/us then shame on you.  Shame shame shame. FOSS is about giving code out for free.  There is nothing in there entitling you to support.  Honest.  Heck even if you pay for software, rarely do you get any decent support that you don't have to pay for.

Your not hurting me by not doing it.  Just some other complete stranger.  But anyway, in the meantime enjoy the work that has already been done for you in cpmfetch for free...

If you want to actually post what you have tried and what happened maybe someone will have an idea. 

If you don't want to try it yourself, see this page and the item entitled "Pay for CpmFetch Support"
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch03.html

And I recommend you read it before making snide comments.

Regards,

Bill "Vuud" Chmura





Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 19, 2005, 06:51:13 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

Sorry, started looking at this the other day, but that big ass scorpion on the front page scares me :)  Why i could never live out sou-west.

Anyway - your page has this in the html:

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

Which means its not getting interpreted as php when the page is constructed. 

I'm an SMF person myself, so I am not sure on the PHPBB - but I know it will work in PHPBB... someone did it here before. 

Yeah, here it is:   http://forum.coppermine-gallery.net/index.php?topic=19528.msg87858#msg87858

This person documented how they did it (thanks fishfreak) after we got it working.

Now, I would chastise you for not searching the board for a solution, but I have already vented for the night...

Hope that helps, if it does not - post where the process broke down.

Later









Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: v8central on November 19, 2005, 08:50:57 am
Would the situation change if I mentioned that Joomla! is a very recent fork of Mambo ? (Apologies, but I thought that almost everyone knew that anyway). The CPMFETCH documentation says that it works with Mambo, but there are no working examples.  I don't have a problem working things out for myself but this time I need a nudge in the right direction.  I tried CPMFETCH because I want to display the Coppermine images outside the Coppermine code (I want to put them in a news article in Mambo), but where do I start ? I have the code installed and working (via the test script), but apart from that I'm stuck hence the posting on this forum.

I contacted another user via PM (he must have been chosen to be ignored a few months ago :p) because his post helped me out but the question he posed remained unanswered as well.  Now I don't expect EVERY question to be supplied with a fully worked answer within seconds of posting (THAT is unrealistic), but what I do expect is the so-called "experts", "support personnel", whatever you/they are called here to actually respond with SOMETHING .... even if it is just "I don't get what you mean, could you explain it a different way ?" rather than completely ignoring the situation.


I would love to get CPMFETCH working, but without an example of how it works in Mambo (aka Joomla!) I've actually started coding my owm solution which doesn't require CPMFETCH at all .... although I think CPMFETCH will be a more elegant solution for everything.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 19, 2005, 07:05:18 pm
Would the situation change if I mentioned that Joomla! is a very recent fork of Mambo ? (Apologies, but I thought that almost everyone knew that anyway). The CPMFETCH documentation says that it works with Mambo, but there are no working examples.  I don't have a problem working things out for myself but this time I need a nudge in the right direction.  I tried CPMFETCH because I want to display the Coppermine images outside the Coppermine code (I want to put them in a news article in Mambo), but where do I start ? I have the code installed and working (via the test script), but apart from that I'm stuck hence the posting on this forum.


I contacted another user via PM (he must have been chosen to be ignored a few months ago :p) because his post helped me out but the question he posed remained unanswered as well.  Now I don't expect EVERY question to be supplied with a fully worked answer within seconds of posting (THAT is unrealistic), but what I do expect is the so-called "experts", "support personnel", whatever you/they are called here to actually respond with SOMETHING .... even if it is just "I don't get what you mean, could you explain it a different way ?" rather than completely ignoring the situation.


I would love to get CPMFETCH working, but without an example of how it works in Mambo (aka Joomla!) I've actually started coding my owm solution which doesn't require CPMFETCH at all .... although I think CPMFETCH will be a more elegant solution for everything.

Lol, I don't think there are any support personnel or anything here really.  I mean its not a job or anything.  I wrote it, then just gave it away.  I originally intended no documentation at all, aiming it at other programmers.  but I did and here we are today.  So there is no real committment to support like a M$ or Apple would have.  But time permitting I help when I can.  Sometimes other post notes, but not as often as I would like to see.  Mostly the forum is here for historical reasons... sometimes your issue has been covered already.

As for examples, I am willing to take any submissions for the docs as far as how to do it, but you have to understand that FOSS is a very self centric thing... I got it to do what I needed, then a bunch more - but I am not willing to cover every contingency.  I will take writeups sent to me and insert them with a big credit to the person though.

But anyway, I think the problem you are going to have with what you are trying to do is when you stick them into an article.  I know the other successes have been with sticking them into templates (which in turn hold the article I am guessing).   Now, I am guessing here, based on my experiences, that the content of the article may not be processed as possibly having executable code in it.    That is where you are going to have the biggest problem. 

Now if you want the cpmfetch in the template thats different.  We could be fighting over semantics.  If you are really just going to stick something into an article instead of the template you really need to find out if / how to execute PHP code.

If you can't execute code you can always use cfimageget to grab a single image into an IMG tag.

I guess thats your next step... clarify what exactly you want to stick exactly where.  Then I will tell you where you can stick cpmfetch.  lol


Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: v8central on November 19, 2005, 10:51:11 pm
 ::) As I said, I want to post the thumbs in an article, I didn't mention templates at all because I don't want to put the thumbs in a template.

One other problem I found, is that if I'm CPMFETCH and using that within Mambo/Joomla then when I click on the thumb it goes to my full Coppermine install (ie it breaks out of the Mambo template).  This is a whole different problem though.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 20, 2005, 03:37:51 am
::) As I said, I want to post the thumbs in an article, I didn't mention templates at all because I don't want to put the thumbs in a template.

One other problem I found, is that if I'm CPMFETCH and using that within Mambo/Joomla then when I click on the thumb it goes to my full Coppermine install (ie it breaks out of the Mambo template).  This is a whole different problem though.

Okay, I know you said it, but you would not believe how many people get the terminology confused.

Pretty much you need to determine if you can execute PHP or make SSI calls, or just call IMG tags from the article.

I am not sure how to keep it contained in Mambo.  You could always just set it to popup a window without going into the CPG (Just display the image)


 
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: ksshane on November 20, 2005, 10:44:41 pm
Thanks for the help.  I could have swore I did a search (im usually pretty good at doing that before posting a question)...   But I really feel bad since the answer to my question was in this exact same thread. :o
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 21, 2005, 12:15:48 am
Thanks for the help.  I could have swore I did a search (im usually pretty good at doing that before posting a question)...   But I really feel bad since the answer to my question was in this exact same thread. :o

Don't feel bad.  As long as you learn something :D

Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: drunkendave on November 23, 2005, 06:26:22 pm
Ok I've spent 2 hours reading almost everything in this Forum (which I don't mind I'm on Vacation lol)  I started off by having problems with the cftest.php.  Again from reading post I got it to display Thumbnails. Here are the test results still some errors and I read that using IIS is bad but that's all I have to use.
Code: [Select]
Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\vhosts\canadianrifles.com\httpdocs\cpmfetch\cftest.php on line 213

Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\vhosts\canadianrifles.com\httpdocs\cpmfetch\cftest.php on line 214

Notice: Undefined index: SCRIPT_FILENAME in C:\Inetpub\vhosts\canadianrifles.com\httpdocs\cpmfetch\cftest.php on line 214

Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\vhosts\canadianrifles.com\httpdocs\cpmfetch\cftest.php on line 221
5 You set your partial URL to ../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 = Windows NT TOTALWEBHQ01 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 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
I understand there is some bad's in there although I created an index.php file with
Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('../gallery');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close();
?>
Load up http://www.canadianrifles.com/cpmfetch/index.php  and it shows the thumbnails.  Now my biggest problem is getting those images to show up on my block on my main page.  I'm just learning all this PhP and website editing but I have a basic knowledge of it.  I tried putting in my block <img src="http://www.canadianrifles.com/cpmfetch/index.php>  but get nothing but a broken image. 
I've also tried using the cfimageget.php.  I've changed direct access to true and changed my $urltocpm = "../gallery/";  i've also tried using /gallery/,  /gallery  and gallery/   but everytime i point my browser to cfimageget.php it comes back as the white screen of death.  If there is anything else you need to know please ask.  Oh and if this has already been answered I give full permission to flame me in every way possible.  I could've looked right at it but after going through 30+ forum pages all i'm seeing when I look away from the screen is code everywhere lol.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 23, 2005, 06:38:02 pm
Ok I've spent 2 hours reading almost everything in this Forum (which I don't mind I'm on Vacation lol)  I started off by having problems with the cftest.php.  Again from reading post I got it to display Thumbnails. Here are the test results still some errors and I read that using IIS is bad but that's all I have to use. 
Code: [Select]
Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\vhosts\canadianrifles.com\httpdocs\cpmfetch\cftest.php on line 213

Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\vhosts\canadianrifles.com\httpdocs\cpmfetch\cftest.php on line 214

Notice: Undefined index: SCRIPT_FILENAME in C:\Inetpub\vhosts\canadianrifles.com\httpdocs\cpmfetch\cftest.php on line 214

Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\vhosts\canadianrifles.com\httpdocs\cpmfetch\cftest.php on line 221
5 You set your partial URL to ../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 = Windows NT TOTALWEBHQ01 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 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
I understand there is some bad's in there although I created an index.php file with
Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('../gallery');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close();
?>
Load up http://www.canadianrifles.com/cpmfetch/index.php  and it shows the thumbnails.  Now my biggest problem is getting those images to show up on my block on my main page.  I'm just learning all this PhP and website editing but I have a basic knowledge of it.  I tried putting in my block <img src="http://www.canadianrifles.com/cpmfetch/index.php>  but get nothing but a broken image. 
I've also tried using the cfimageget.php.  I've changed direct access to true and changed my $urltocpm = "../gallery/";  i've also tried using /gallery/,  /gallery  and gallery/   but everytime i point my browser to cfimageget.php it comes back as the white screen of death.  If there is anything else you need to know please ask. 


Since apache runs fine on windows and is free, I don't buy the IIS is the only thing you have to use... but out of sympathy I will try to help you,  lol.

Lets avoid cfmageget for now unless you really have a need to use it that way.  If you have PHP for your pages, just do it the normal way.  Less complexity

You should be able to just take the code you have in the cpmfetch/index.php file and insert it into your home page.  No need to use img tags or anything.

In theory this should work for you

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


Let me know how far that gets you, and if it does not work, leave it in so I can see the source.  I'll be around for a bit.






Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: drunkendave on November 23, 2005, 06:51:11 pm
Quote
Since apache runs fine on windows and is free, I don't buy the IIS is the only thing you have to use... but out of sympathy I will try to help you,  lol.

Well that's the only thing my Webhost offers so unless I wanted to find a new one then yeah it's kinda the only thing I have to work with lol.  But that's besides the point.  I made a block with that code in it...the one thing i didn't try before and got and error that I can finally go and do a search on these boards for. 
Code: [Select]
ERROR: Path to Coppermine incorrect. (/gallery//include/config.inc.php)
Fatal error: Call to a member function on a non-object in C:\Inetpub\vhosts\canadianrifles.com\httpdocs\cpmfetch\cpmfetch.php on line 770

So basically I have the path called out wrong somewhere and am gonna go take a look for it and check your forums.  Thanks for the quick reply also.  I'll let you know how I make out.  Thanks again.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 23, 2005, 07:03:12 pm
Quote
Since apache runs fine on windows and is free, I don't buy the IIS is the only thing you have to use... but out of sympathy I will try to help you,  lol.

Well that's the only thing my Webhost offers so unless I wanted to find a new one then yeah it's kinda the only thing I have to work with lol.  But that's besides the point.  I made a block with that code in it...the one thing i didn't try before and got and error that I can finally go and do a search on these boards for. 
Code: [Select]
ERROR: Path to Coppermine incorrect. (/gallery//include/config.inc.php)
Fatal error: Call to a member function on a non-object in C:\Inetpub\vhosts\canadianrifles.com\httpdocs\cpmfetch\cpmfetch.php on line 770

So basically I have the path called out wrong somewhere and am gonna go take a look for it and check your forums.  Thanks for the quick reply also.  I'll let you know how I make out.  Thanks again.

I see on the provider.  For my personal stuff I use e-rice.net  ($14/year) - comes with everything except shell access and backups.  But in like 3 years I've had no problems.  Anyway.

The problem you are having now is with the document_root not being picked up correctly.  A major PITA for my coding of this thing.  So you are not doing anything wrong - its IIS (and a bunch of others).

Try adding this

$_SERVER['DOCUMENT_ROOT'] = "C:/Inetpub/vhosts/canadianrifles.com/httpdocs/";

just before the

$objCpm = new cpm('/gallery');


I am not sure if that will help, but someone told me that worked for them before.







Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: drunkendave on November 23, 2005, 07:11:24 pm
Ok that did the trick now I just have to add some other stuff to the block and I'm all set.  Thank you very much sir.  It's always nice to see something work after working on it for many hours.  Tonight I shall drink a beer in your honour and hard work.  Thanks  ;D


P.S a friend of mine has a PHP tool on his website that I find useful in case you wanted to check it out.  http://www.canadiancod.com/modules.php?name=PHP-Nuke_Tools
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on November 23, 2005, 07:15:39 pm
Ok that did the trick now I just have to add some other stuff to the block and I'm all set.  Thank you very much sir.  It's always nice to see something work after working on it for many hours.  Tonight I shall drink a beer in your honour and hard work.  Thanks  ;D

No problem.   

Listen, about the beer... well, I tend to stick toward the better end of beers - so if its a mass produced  brand name type thing - I'd just as soon not have it drunk in my honour.  So if you get beer, get something good!

:D

Vuud

Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: jerx on December 04, 2005, 11:25:20 pm
Hi,

I use cpmfetch to display 2 random pictures on my phpbb portal page. Today some users experienced following error:

Code: [Select]
phpBB : critical error

Could not connect to the database

Warning: mysql_connect(): Too many connections in
/cpmfetch/cpmfetch_dao.php on line 661

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link
resource in /cpmfetch/cpmfetch_dao.php on line 665

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource
in /cpmfetch/cpmfetch_dao.php on line 666

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource
in /cpmfetch/cpmfetch_dao.php on line 679

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource
in /cpmfetch/cpmfetch_dao.php on line 682

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource
in /cpmfetch/cpmfetch_dao.php on line 683

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result
resource in /cpmfetch/cpmfetch_dao.php on line 710

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource
in /cpmfetch/cpmfetch_dao.php on line 671

Due to this problem some users were not able to log in. Looks like you run into problems if you have many pictures (5000+) in your gallery. When I started using cpmfetch I only had 3000+ pictures. The server load hasn' t been very high today, around 0.2.

Did anybody have had the same problem? Does anyone know how to get around this?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on December 05, 2005, 02:34:03 am
Hi,

I use cpmfetch to display 2 random pictures on my phpbb portal page. Today some users experienced following error:

Code: [Select]
phpBB : critical error

Could not connect to the database

Warning: mysql_connect(): Too many connections in
/cpmfetch/cpmfetch_dao.php on line 661

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link
resource in /cpmfetch/cpmfetch_dao.php on line 665

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource
in /cpmfetch/cpmfetch_dao.php on line 666

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource
in /cpmfetch/cpmfetch_dao.php on line 679

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource
in /cpmfetch/cpmfetch_dao.php on line 682

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource
in /cpmfetch/cpmfetch_dao.php on line 683

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result
resource in /cpmfetch/cpmfetch_dao.php on line 710

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource
in /cpmfetch/cpmfetch_dao.php on line 671

Due to this problem some users were not able to log in. Looks like you run into problems if you have many pictures (5000+) in your gallery. When I started using cpmfetch I only had 3000+ pictures. The server load hasn' t been very high today, around 0.2.

Did anybody have had the same problem? Does anyone know how to get around this?


Are you calling the $objCpm->cpm_close() when you are done?  How are you using it in PHPBB?  The close may not matter.

I tend to think it is not a cpmfetch issue...  Cpmfetch opens a new database connection when you start it, then closes it when you call the close function.  It does not open one for each picture or anything - the number of photos you have would not make a difference.

It could be the amount of traffic you are getting to the site.  cpmFetch will open a new connection each time it is called, instead of using an existing one (otherwise it attempts to close the existing one when it closes). 

Hmmm...  I guess if you had 100 people hitting your page at the same time, it would open 100 database connections (1 per user).  But it would close them just as fast.

Let me know how you are embedding the images in there...

Also has anyone had problems just using phpbb?











Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: jerx on December 06, 2005, 12:05:26 am
It looks like this:


Code: [Select]
...

// cpmfetch
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_setReturnType('html');

$template->assign_vars(array(
'RANDOM_IMAGE' => $objCpm->cpm_viewRandomMedia(1,2, array('alttag' => '%a, %f')),
'WELCOME_TEXT' => $CFG['welcome_text'],

..

'AVATAR_IMG' => $avatar_img)
);
$objCpm->cpm_close();
if(!isset($topics))
{

...

Today everything was back to normal. I don' t think it was too much traffic, because yesterday' s numbers were lower than today. Maybe it was a hacking attempt?! I saw 390 simultanous tasks. Usually it is below 100. At busy times it is slightly over 100. Unfortunately I did not know how to view the tasks/mysql connections, so I could not investigate any further.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on December 06, 2005, 05:53:01 am
It looks like this:


Code: [Select]
...

// cpmfetch
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_setReturnType('html');

$template->assign_vars(array(
'RANDOM_IMAGE' => $objCpm->cpm_viewRandomMedia(1,2, array('alttag' => '%a, %f')),
'WELCOME_TEXT' => $CFG['welcome_text'],

..

'AVATAR_IMG' => $avatar_img)
);
$objCpm->cpm_close();
if(!isset($topics))
{

...

Today everything was back to normal. I don' t think it was too much traffic, because yesterday' s numbers were lower than today. Maybe it was a hacking attempt?! I saw 390 simultanous tasks. Usually it is below 100. At busy times it is slightly over 100. Unfortunately I did not know how to view the tasks/mysql connections, so I could not investigate any further.


Well, the code looks fine above... that will create and destroy one mysql session.  And if you start the cpmfetch object with $objCpm = new cpm("/gallery"); and then never use it, it never makes a database connection.  So the close would be redundant.  If you are using the same database for the cpmfetch and for the phpbb stuff, you could try

Find this line in cpmfetch_dao.php (somewhere around 661 in my copy, but I've been tampering with it, so it may be somewhere else)

Code: [Select]
$this->dbconnection = mysql_connect($this->dbhost, $this->dbuser, $this->dbpass, true);

and remove the true from the end

Code: [Select]
$this->dbconnection = mysql_connect($this->dbhost, $this->dbuser, $this->dbpass);

It is very important that you do NOT use the cpm_close() if you do this.  This lets it use an existing database connection if one exists.  If you use the close after that it will terminate your phpbb connection.

Normally on cpmfetch you do not want this behaviour - but in your case, this could reduce the number of connections by half.

I've made a note to make this behavior more definable in the next version of cpmfetch.


Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: jerx on December 06, 2005, 06:56:53 am
Changing cpmfetch_dao.php doesn' t seem to have any effect at all. Although you told me to delete the close statement I was curious and did not do it. But everything worked the same as before. I expected some missing data on my phpbb portal. Is it because all phpbb stuff was already done when the close statement is processed?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on December 06, 2005, 07:17:52 am
Changing cpmfetch_dao.php doesn' t seem to have any effect at all. Although you told me to delete the close statement I was curious and did not do it. But everything worked the same as before. I expected some missing data on my phpbb portal. Is it because all phpbb stuff was already done when the close statement is processed?

Your probably correct on the result of not removing the close statement.  I would still remove it if I were you - just because it did not do anything there does not mean that it wont come back to bite you in the arse on some other page, or later if you add something else into phpbb that would get processed after.

It may not have a noticable effect, but it is one less db connection per client... so if too many concurrent users was your actual problem, this will help.

I dont think the problem was here originally, but this is a good improvement anyway.

I've been thinking about how you could have a lot of simultaneous connections that would cause the database too many connections error.  I've come up with a few things:

* If your hosted, someone else could have a run-away chunk of code opening a lot for no reason.  The server would block on a cumulative total (like 1000 - they user 999, leaving you with 1)

* A search engine could have crawled your site... I am not sure if PHP and PHPBB can share connections or if each instance would open a new one. 

I dunno.  Lets just hope the problem goes away!





 
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: astrothug on December 13, 2005, 06:01:16 am
i was using an older version of coppermine and cpgfetch 1.6.2 then updated my coppermine to 1.4.2 and cpgfetch does not work. when i went to cftest i get this error
Code: [Select]
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
C:\www\webroot\site1\cpmfetch\cpmfetch_dao.php on line 710

everything was working great before i updated to the new coppermine.
www.ghostintheshell.ca (http://www.ghostintheshell.ca)
www.ghostintheshell.ca/wp/ (http://www.ghostintheshell.ca/wp/)
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on December 13, 2005, 06:25:39 am
i was using an older version of coppermine and cpgfetch 1.6.2 then updated my coppermine to 1.4.2 and cpgfetch does not work. when i went to cftest i get this error
Code: [Select]
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
C:\www\webroot\site1\cpmfetch\cpmfetch_dao.php on line 710

everything was working great before i updated to the new coppermine.
www.ghostintheshell.ca (http://www.ghostintheshell.ca)
www.ghostintheshell.ca/wp/ (http://www.ghostintheshell.ca/wp/)


This is a known, well discussed issue.  View the releasenotes that came with cpmfetch 1.6.2 or search the boards.  You need to make a simple edit to cpmfetch_dao.php

That should fix what ails you.  The database in cpg changed between 1.3 and 1.4
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: dlkbailey on February 25, 2006, 05:37:43 pm

This is a known, well discussed issue.  View the releasenotes that came with cpmfetch 1.6.2 or search the boards.  You need to make a simple edit to cpmfetch_dao.php

That should fix what ails you.  The database in cpg changed between 1.3 and 1.4

I just installed cpmfetch 1.6.2 and I get the following error on the test page
" Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /mounted-storage/home8/sub001/sc14959-TCLB/LN/cpmfetch/cpmfetch_dao.php on line 710"

I searched the forum for this problem and I found the post I quoted where there was the same problem. So I did as instructed from that post and read the release notes. The release notes said to comment out line 54 and un comment line 59. I commented line 54 and there insn't even a line 59. I am lost and I would really like to use this script please help.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: tgelston on February 28, 2006, 01:21:36 am
I have been having some other problems so tonight I updated my fetch to see if that would help.  I got the same error you did.  I got it to work by commenting out

Code: [Select]
// This is for CPG versions prior to 1.4
/*var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
*/

And uncommenting

Code: [Select]
// This is for CPG v 1.4.1 beta 1

var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';

So that was line 57 you comment out and 62 you un-comment.

Hope that helps :)

I was hoping it would solve my problem. .  it has not.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: n3n on March 02, 2006, 02:00:49 pm
Has anyone tested this within the theme.php file ? Its very weird but cant get itw work there.
Also would it be possible to change the output of a thumb. I would like it to have rounded corners. This could be done
by adding a transparant gif/png on the corners of the thumb.

When are you planning on releasing the 1.7 version.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: soldstatic on March 21, 2006, 05:43:15 pm
I was getting the unknown column error, so I did the fix where you uncomment the one line and comment the other. now i dont get images but also no errors.

sorry about asking this same question i know there's TONS of people having this problem...

my problem is that on the cftest.php it says
 
Code: [Select]
DOCUMENT_ROOT is not a good match is bad
and when i look at the info line i see
Code: [Select]
55 DOCUMENT_ROOT: /home/soldstatic/emdscene.com

where the doc root SHOULD be
Code: [Select]
55 DOCUMENT_ROOT: /home/.asta/soldstatic/emdscene.com

how do i fix this?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: maxout on March 23, 2006, 03:16:45 am
i think it would be much easier to make addon/module/plugin for each most famous. portals/fourms

this is too much work. and hard for even middle level php/database user.

coppermine has installed and embed the SMF properly so there should be some clean UPTODATE instruction to do this hard work.

i have installed fresh SMF and Coppermine

and i think i got the bridge thing going well.. but i just need to wrap the gallery around the forum.

and here i am strugling. any professional help.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Miyagi on May 01, 2006, 05:18:44 pm
I have been having some other problems so tonight I updated my fetch to see if that would help.  I got the same error you did.  I got it to work by commenting out

Code: [Select]
// This is for CPG versions prior to 1.4
/*var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
*/

And uncommenting

Code: [Select]
// This is for CPG v 1.4.1 beta 1

var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';

So that was line 57 you comment out and 62 you un-comment.

Hope that helps :)

I was hoping it would solve my problem. .  it has not.

I've spent a few hours trying to resolve this issue myself and i'm left scratching my head.

Vuud any recommendations?

Thanks,
Miyagi
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: n3n on May 02, 2006, 12:27:48 am
Could anyone tell me how to get it working within theme.php. Doesnt seem to work for me.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: shamrox on May 13, 2006, 09:42:47 pm
I'm using SMF with Tinyportal and would like to have the Coppermine Random images show up using this CpmFetch, but I have no clue what i need to do to make this happen.

I tried to mess with making a center block and using the test file. but that didn't work. Can anyone lay out exactly what I need to do??

Thanks in advance.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: tareone on May 22, 2006, 05:06:26 pm
I got this error when running testpage:

Quote
Fatal error: Call to undefined function: setphotoprefix() in /home/int2000/XXXXX/html/cpmfetch/cpmfetch.php on line 90

All tests are ok and i have commented and uncommented cpmfetch_dao.php lines which caused errors earlier. Any fix for this?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: n3n on May 25, 2006, 06:02:13 pm
Has anyone been able to use cpmfetch within theme.php/template.html. Want to create an imageblock with users last uploads.

Tnx !
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: trvlnman on May 25, 2006, 08:49:56 pm
I'm using SMF with Tinyportal and would like to have the Coppermine Random images show up using this CpmFetch, but I have no clue what i need to do to make this happen.

I tried to mess with making a center block and using the test file. but that didn't work. Can anyone lay out exactly what I need to do??

Thanks in advance.

I am trying to do the same thing.  I have found a few links with folks doing that.  I think that a PHP article needs to be created using an IFrame ( I think) and CPMFetch.  If I find out anything else I'll let you know.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: trvlnman on May 25, 2006, 09:01:22 pm

I have been trying to get CPMFetch installed with no luck (I think)  Here is the page I get from cftest.php.

I am using:

SMF 1.1 RC2 w/ Helios Multicolor
TinyPortal 0.86
Coppermine 1.4.5
CPMFetch 1.6.2

I have a user gallery created with the ID that I used to login with using TinyPortal.

Code: [Select]
Tests:
5 You set your partial URL to /coppermine 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 situ.dh2.net 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 INFO
40 WebServer = Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /home/tristen/public_html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: /home/tristen/public_html/ INFO
70 SCRIPT_FILENAME: /home/tristen/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
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tristen/public_html/cpmfetch/cpmfetch_dao.php on line 710

I can access the gallery fine through the portal on the site.  I only have a few pics in some user galleries at this point.  I do not have any graphics in the main gallery.  I took a look and I am usig the standard naming conventions.

Any ideas??

Thanks in advance for your help.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: trvlnman on May 27, 2006, 08:27:15 am
I have been trying to get CPMFetch installed with no luck (I think)  Here is the page I get from cftest.php.

I am using:

SMF 1.1 RC2 w/ Helios Multicolor
TinyPortal 0.86
Coppermine 1.4.5
CPMFetch 1.6.2

I have a user gallery created with the ID that I used to login with using TinyPortal.

Code: [Select]
Tests:
5 You set your partial URL to /coppermine 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 situ.dh2.net 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 INFO
40 WebServer = Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /home/tristen/public_html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: /home/tristen/public_html/ INFO
70 SCRIPT_FILENAME: /home/tristen/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
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tristen/public_html/cpmfetch/cpmfetch_dao.php on line 710

I can access the gallery fine through the portal on the site.  I only have a few pics in some user galleries at this point.  I do not have any graphics in the main gallery.  I took a look and I am usig the standard naming conventions.

Any ideas??

Thanks in advance for your help.

Sorry, I didnt see the previous posts...sorry to waste your time...i found and got the problem fixed...this might be something that needs to go into the release notes.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: noworyz on May 30, 2006, 01:02:55 am
Has anyone tried integrating this mod into the coppermine theme?

I woulld like to have a php coded section in my actual coppermine theme to display a picture.  I have it working in phpbb and on my website, but I can't quite figure out how to get it to work in the coppermine theme.

Any suggestions?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: nickfzx on May 30, 2006, 03:23:22 am
I can't get cpmfetch to pass the test.

So here are the results from the cftest.php page.

5   You set your partial URL to /copper   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 vhost1-2.iomart.com 2.4.21-40.ELsmp #1 SMP Fri Mar 24 12:43:41 EST 2006 i686   INFO
40   WebServer = Apache/2.0.46 (CentOS)   INFO
45   PHP Version = 4.3.2   INFO
55   DOCUMENT_ROOT: /etc/httpd/htdocs   INFO
60   C_DOCUMENT_ROOT: Not found   INFO
65   doc_root: Not found (IIS Servers only)   INFO
70   SCRIPT_FILENAME: /vhost/vhost1/t/h/e/mysite.co.uk/www/cpmfetch/cftest.php   INFO
75   DOCUMENT_ROOT is not a good match   BAD
80   CPG Config file not found: /etc/httpd/htdocs/copper/include/config.inc.php


So I think the issue is that that the variable DOCUMENT_ROOT is returning /etc/httpd/htdocs instead of something like mysite.co.uk/www/

This is probably an issue with my provider Easyspace returning the wrong value. But I think others have this problem as this must be a common occurrence.

Any help would be great.

Cheers

Nick
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: n3n on May 31, 2006, 12:34:29 am
noworyz,

Ive also been trying this, but without a good result, keep getting errors in theme.php.

When i ifind out ill let you know, could you do the same ?

Tnx !
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: guyadam on June 03, 2006, 07:00:53 pm
Hi I appreciate all your  hard (free) work with cpmFetch, it's a great product.  ;D

I need some help and I would also like to offer some help, if I may?

First I would like to offer some help to users of Joomla. I noticed a couple of people on the board where haveing trouble executing php in the content of Joomla (actuall posts where a while ago). Which is because Joomla won't let you do this, alas there is a couple differn't solutions for this. kl_php for the execution of php in content and mod_kl_evalphp for the execution of php in a module. Here is a link to the mod_kl_evalphp thread where you can get the zip file. http://forum.mamboserver.com/showthread.php?t=39045 (http://forum.mamboserver.com/showthread.php?t=39045) For the kl_php you are going to have to search for this, it's out there somewhere, all I found was a bunch of broken links. I don't need the kl_php for now, so I did not search that hard. There are also a couple of bots out there that might work {mosphp} and {mosaddphp} again you are going to have to search for these. I can't do all the work for you, it just would not be fair on you, make you feel like you earned it. ;) Anyhow, hope this helps you Joomla folks.

Now to my problem. I am using CpmFetch in a module. It actually half works. It is showing up my thumbnails from my gallery in my module o.k but with that I am also getting an error message down the left column of my template.

Quote
Warning: mysql_select_db(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/content/g/u/y/guyrobo/html/modules/mod_smf_login.php on line 55

As you can see I am using SMF.

 Here is my set up

Joomla 1.0.8 satable ver
Coppermine 1.4.5
SMF 1.1RC2
CpmFetch

Everything is briged and I am using Joomla SMF login mod

Any help would be appreciated Thanx in advance.

Guy
Title: Setup error?
Post by: grv on June 15, 2006, 11:19:18 am
Hello..... I am having a similar problem to the one posted earlier. I have used bridging on Coppermine Photo Gallery and phpBB, and tried using CPMFetch for displaying random images. The test script from CPMFetch works perfectly.

My problem is that the code for displaying the random image is not working. I have copied the exact script snippet as was provided in the documentations, but all it shows is a blank page, no errors, nothing! i am afraid I might have missed some tweaking and setting up along the way.

If anyone has any solutions/hints, I would be more than happy to get a (quick) reply.


Thank you.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: jasa on June 25, 2006, 07:09:53 pm
Recently I installed CFGfetch and everything works fine, but it shows only pictures from user galleries and if I choose public categories it shows no pictures!? why?

My CPGfetch code on the main page is:

Code:

Code: [Select]
<?php
include "scripts/cpgfetch/cpmfetch.php";
$objCpm = new cpm('/galerija');
$options = array( 'imagestyle' => 'slika');
$source "";

$objCpm->cpm_viewLastAddedMediaFrom(31,$source,$options); 
$objCpm->cpm_viewRandomMediaFrom(1,1,$source,$options);

$objCpm->cpm_close(); ?>


Thanks for help...

Greetz
Jasa

PS. Does anybody know how to make CPGfetch to show random pictures from last added album?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: tandiono on July 09, 2006, 03:36:34 pm
Hello,

How can i display photo from "cpg1.4.8" to "smf 1.0.7" ,

which something look like this site : http://www.snork13.net/forum/


anyone please advice me. Thanks
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: tandiono on July 09, 2006, 10:34:03 pm
when i do a test, i got 1 error :

http://www.friendsterforum.com/gallery/cpmfetch/cftest.php

is this allrite?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Angelotus on July 11, 2006, 06:15:32 pm
I have installed the script at:

http://www.klifix.nl/cpmfetch

My Coppermine gallery script is at:

http://www.klifix.nl/gallery

I have included this code into http://frontpage.klifix.nl/:

Code: [Select]
<?php
include "http://www.klifix.nl/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>


The result must be shown at http://frontpage.klifix.nl/, but instead of that this is the result:

Fatal error: Class 'cpm' not found in /home/klifixnl/frontpage.klifix.nl/HTML/wp-content/themes/Dark site/rightbar.php on line 39.

What seems to be the problem?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Nibbler on July 11, 2006, 09:10:24 pm
Use a path for your include, not an url.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Angelotus on July 12, 2006, 08:15:25 am
What should be the path in this case?
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Joachim Müller on July 12, 2006, 08:28:58 am
Probably /home/klifixnl/frontpage.klifix.nl/HTML/cpmfetch/cpmfetch.php
Read up "path" vs. "URL" (google for it) - this is basic webmaster stuff.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: Angelotus on July 12, 2006, 09:36:54 am
Probably /home/klifixnl/frontpage.klifix.nl/HTML/cpmfetch/cpmfetch.php
Read up "path" vs. "URL" (google for it) - this is basic webmaster stuff.

Thanks! But when I use the correct path to cpmfetch.php I receive continues errors.
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: tandiono on August 13, 2006, 10:29:11 pm
Im having problem after with cpmfetch bridge with smf 1.1 RC2,

I replace the cpmfetch_dao.php with Goosemoose code(http://www.simplemachines.org/community/index.php?topic=73366.0)

and the test result is :
http://www.friendsterforum.com/gallery/cpmfetch/cftest.php


Anyone please kindly help me. Thanks
Title: Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
Post by: vuud on August 14, 2006, 01:46:25 am
Im having problem after with cpmfetch bridge with smf 1.1 RC2,

I replace the cpmfetch_dao.php with Goosemoose code(http://www.simplemachines.org/community/index.php?topic=73366.0)

and the test result is :
http://www.friendsterforum.com/gallery/cpmfetch/cftest.php


Anyone please kindly help me. Thanks

Try the new cpmfetch 1.6.3 code...  It handles the bridging better. 

I have no idea on 3rd party code.