CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...) - Page 2 CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...) - Page 2
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)

Started by vuud, May 07, 2005, 07:27:38 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

marian

Quote from: vuud on July 21, 2005, 06:44:32 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!

marian

Quote from: marian on July 21, 2005, 07:09:18 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.

vuud

Quote from: marian on July 21, 2005, 07:31:00 PM
Quote from: marian on July 21, 2005, 07:09:18 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";



Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

marian

Quote from: vuud on July 21, 2005, 08:07:49 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

vuud

Quote from: marian on July 22, 2005, 11:40:15 AM
Quote from: vuud on July 21, 2005, 08:07:49 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





Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

marian

Quote from: vuud on July 22, 2005, 05:15:56 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!!

chupa2k


vuud

Quote from: chupa2k on July 23, 2005, 10:53:02 PM
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




Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

TrickyBuddha

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!

vuud

Quote from: TrickyBuddha on July 30, 2005, 01:38:27 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...
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

TrickyBuddha

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.

:)

vuud

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
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

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



Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

jerx

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.


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?

vuud


Sure we can help...

Quote from: jerx on August 29, 2005, 04:38:18 PM
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.

Quote from: jerx on August 29, 2005, 04:38:18 PM
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.

Quote from: jerx on August 29, 2005, 04:38:18 PM
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
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

jerx

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.

vuud

Quote from: jerx on August 29, 2005, 06:53:30 PM
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
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

jerx

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!!!

Klementz

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.

vuud


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

Vuud

Quote from: 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.
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco