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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

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

Started by vuud, July 08, 2005, 06:43:10 AM

Previous topic - Next topic

0 Members and 7 Guests are viewing this topic.

RoarinRow

I tried this code and got the following message:

A random selection:
ERROR: Path to Coppermine incorrect. (//cpg143//include/config.inc.php)

With this code:

print "A random selection:<CENTER>";
include "../forum/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg143");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
print "</center>";

Any suggestions?  My Coppermine Gallery is bridged and my directory is at wwwmysite/forum/cpg143. 

Thanks!  I tried a search and read through most of these 40 pages, but none of the fixes I tried worked.
SMF 2.0 RC4
TP 1.0 RC1
Wordpress 3.0.4

cgc0202

Hi,

I really want a photo randomizer to work, and if possible one that is compatible with Coppermine.  Before I present the errors I encountered, I did some preliminary reading and search and here are some details.  I downloaded, used and observed  the  following:

(1) CPMFetch1.6.2
(2) CPG v1.4.4 with the stramm mod to create "square thumbnails", as well as separate galleries using the latest CPG v1.4.5 with the stramm mod
(3) All the thumbnails and the normal and original photos are showing properly in the different galleries
(4) The uploaded CPMFetch1.6.2 when tested using the cftest.php passed the initial diagnostic test.

The initial issue was that I got error messages that turned out to be a perennial and common problem.  I saw the post of  "doctor k" and others regarding error messages when installing the CPMFetch: 

http://forum.coppermine-gallery.net/index.php?topic=19564.msg138106#msg138106

I am very thankful with the tip of gmc:

http://forum.coppermine-gallery.net/index.php?topic=19564.msg138163#msg138163

as well as the observation of MDkai

http://forum.coppermine-gallery.net/index.php?topic=19564.msg138207#msg138207

that seemed to have solved the error problems of  -- based on what appeared on "doctor k's"  cftest.php URL:

http://www.mypreciouspaws.net/cpmfetch/cpmfetch/cftest.php

the crucial test,  the photos were showing properly.

I encountered the same errors as the previous posters have gone through.   I did the correction that another poster was kind enough to provide (see above links).  The error that the others encountered disappeared.  However, a new set of errors appeared (and after searching) the new errors I encountered have been reported much earlier by Niels:

http://forum.coppermine-gallery.net/index.php?topic=19564.msg95029#msg95029

-- it turned out to be an old problem in CPMFetch v1.6.1 that should have been solved by the CPMFetch v1.6.2 version according to vuud's reply:

http://forum.coppermine-gallery.net/index.php?topic=19564.msg95033#msg95033

I am using CPMFetch v1.6.2 so I should not have encountered the aforementioned errors encountered by Niels.   I am trying to find out what may be causing this problem in my case, but it seems the the second set of errors. were not encountered by "dcktor k"

First:  Is it possible that the version of Coppermine PhotoGallery may be critical?

I looked at the cpmfetch_dao.php, based on the reported solutions in response to the errors.  The versions addressed in cpmfetch_dao.php were for CPGv1.4.1 beta or the earlier CPGv1.4.

As stated above, I am using CPGv1.4.4 (and tested this).  I have newer albums using CPGv1.4.5 with the mods by stramm to create square thumbnails. 

I encountered the second set of errors as indicated by Niels (that should not have been an issue since I am using the cpmfetchv1.6.2 as suggested by vuud (see above for links regarding the reported errors and solutions).

I have also taken precautions to ensure that the prefixes for the thumbnail and normal photos were consistent.

Second:  Is there anything else that others did to resolve the problem?

I appreciate any feedback.  Thanks.

cgc0202

vuud

Quote from: cgc0202 on May 13, 2006, 01:10:25 AM

First:  Is it possible that the version of Coppermine PhotoGallery may be critical?

I looked at the cpmfetch_dao.php, based on the reported solutions in response to the errors.  The versions addressed in cpmfetch_dao.php were for CPGv1.4.1 beta or the earlier CPGv1.4.

As stated above, I am using CPGv1.4.4 (and tested this).  I have newer albums using CPGv1.4.5 with the mods by stramm to create square thumbnails. 

I encountered the second set of errors as indicated by Niels (that should not have been an issue since I am using the cpmfetchv1.6.2 as suggested by vuud (see above for links regarding the reported errors and solutions).

I have also taken precautions to ensure that the prefixes for the thumbnail and normal photos were consistent.

Second:  Is there anything else that others did to resolve the problem?

I appreciate any feedback.  Thanks.

cgc0202



What are the errors you are getting?

I've not upgraded to the newer cpg, so I am not sure (although I doubt) something would have changed that much.

Bridging with something that messes with thumbnails could I guess.
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

Quote from: RoarinRow on May 13, 2006, 12:42:01 AM
I tried this code and got the following message:

A random selection:
ERROR: Path to Coppermine incorrect. (//cpg143//include/config.inc.php)

With this code:

print "A random selection:<CENTER>";
include "../forum/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg143");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
print "</center>";

Any suggestions?  My Coppermine Gallery is bridged and my directory is at wwwmysite/forum/cpg143. 

Thanks!  I tried a search and read through most of these 40 pages, but none of the fixes I tried worked.


Is the path to cpg correct?

or is it /forum/cpg143

I cant tell from here

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

cgc0202

#804
Quote from: vuud on May 13, 2006, 01:33:59 AM

What are the errors you are getting?

I've not upgraded to the newer cpg, so I am not sure (although I doubt) something would have changed that much.

Bridging with something that messes with thumbnails could I guess.


Wow, thanks for the very prompt response vuud.  The original errors were exactly as reported by "doctor k", that disappeared after I removed the "/* */"; but after that disappeared, I got the second set of errors (please see note below).

Here is the link to one of my tests (showing the second set of errors, after the first set of errors disappeared):

[Link removed.  The solution proposed by Vuud below worked.]

The errors indicated in the above link are exactly the same errors that Niels reported in 2005 (please refer to the link in my  previous post). Note, the one I showed in the link deals with the ones where I used the latest CPG v1.4.5 with the stramm mod  and the CPMFetch v1.6.2.  Also,  I already corrected the issue about "prefix", in case that might become the cause of the problem.

I did a similar test before the one shown above, on another photogallery using CPG v1.4.4 with the stramm mod  and the CPMFetch v1.6.2, where the prefix of the "thumb-" and the "normal-" versions of the original photo used the default prefix.  This was where I encountered, and corrected the first set of errors, then encountered the second set of errors that should have been corrected in the CPMFetch v1.6.2.

I posted a short post in the mod of stramm, linking my original response above, to inquire whether his mod might contribute to the problem. 

Thanks.

cgc0202

N.B.

Aside from dealing with variations of the "/* */", I also removed the paragraph after "// This is for CPG versions prior to 1.4"  but retained the paragraph after "// This is for CPG v 1.4.1 beta 1" but the second set of errors observed by Niels, whether both sets of paragraphs are in "cpmfetch_dao.php"

vuud

Quote from: cgc0202 on May 13, 2006, 01:56:46 AM

The errors indicated in the above link are exactly the same errors that Niels reported in 2005 (please refer to the link in my  previous post). Note, the one I showed in the link deals with the ones where I used the latest CPG v1.4.5 with the stramm mod  and the CPMFetch v1.6.2.  Also,  I already corrected the issue about "prefix", in case that might become the cause of the problem.


Well, the message may be the same, but its sort of a generic fall through when something goes wrong in a particularly touchy part of the code.

I am not sure how this is working, but let me tell you what I am seeing and maybe it will key off some memory in you.

Okay, your link that cftest is giving you is correct to the gallery.

However, your photos are not stored in the photo gallery at all.  At least that I can tell.

Here is the actual location on the server (I removed the domain name intentionally)

/pics/people/s/smith/brad/n_113984151_bh.jpg

But CPM fetch is looking for the images in something like:

/ecos201/albums/people/h/hansen/donna/t_94969959_oh.jpg

In other words, I am looking where they should be but are not for some reason... hence the missing thumbnails.





You modifying cftest.php code:

Look for this line around line 310 * i think *
$objCpm = new cpm($PartialUrlToCPG);

and then add in something like this:

$objCpm->cpm_OverridePathToAlbums("/pics");

I think that will fix what you are having issues with.

If it does not work, leave the cftest.php with the changes and let me know...

Vuud



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

cgc0202

#806
Thanks Vuud,

Your observations were correct, the example I gave is a case where the photos are outside of the Coppermine software itself.  There is a reason for that decision.  However, I did not make myself clear enough in my previous posts. 

The other example, I tried to allude to in my previous posts, tested what would happen if the photos are inside the "albums" within the Copermine Photo Gallery.  [Note that this other example was an earlier photogallery before I decided to place pics in a common folder, as you correctly observed in the first example, presented in previous posts.]  However, I will address this second example later.   I wish to share first what happened after I did the changes you suggested in your previous post. 

First example (shared in previous posts -> "/ecos201"):

I changed

$objCpm = new cpm($PartialUrlToCPG);

to

$objCpm->cpm_OverridePathToAlbums("/pics");

And, I got a fatal error message:

Fatal error: Call to a member function on a non-object in /home/mmedia/public_html/cpmfetch/cftest.php on line 310

If I undo the change, I get  back the previous errors I stated in my previous posts (more on what I observed later regarding this example).

Second example ("/usa001") :

Here is the other example, where the photos are inside the "albums" within the Coppermine Photo Gallery -- the standard format.  To demonstrate this second example, I loaded another CPMFetch (but renamed it as "cpmfetch-1" so that it would not overwrite the first example)

[Link removed by cgc0202. The proposed solution of Vuud below worked.]

Note that even if the photos are inside " albums" within the Coppermine, as well as the default prefix "thumb-" was used, I got similar errors as in the first example (please see aforementioned link for details).  I copied one set of the error messages, because there is a similarity I found when I was able to compare both

Second Example ("/usa001")

Error in getImageTouse: Extension (strtolower): .jpg
File:/home/mmedia/public_html/usa001//albums/userpics/10003/thumb_97058174_2748313e51_o.jpg

If you examine the errors in the First Example ("/ecos201") -- prior to the replacement of the code (as you suggested) that led to the "Fatal error" (see above) -- the actual set of errors were something like this:

Error in getImageTouse: Extension (strtolower): .jpg
File:/home/mmedia/public_html/ecos201//albums/people/g/goldfarb/jack/t_28113439_o.jpg

Please note the "double forward slashes" before the "albums" in both

/usa001//albums/userpics/

/ecos201//albums/people/

respectively.  I did not see that "double forward slashes" in the error posted by Niels:

http://forum.coppermine-gallery.net/index.php?topic=19564.msg95029#msg95029

I hope the above clarify some of the ambiguity in my previous postings.

Thanks.

cgc0202

vuud

Quote from: cgc0202 on May 13, 2006, 05:48:20 AM
First example (shared in previous posts -> "/ecos201"):

I changed

$objCpm = new cpm($PartialUrlToCPG);

to

$objCpm->cpm_OverridePathToAlbums("/pics");

And, I got a fatal error message:

Fatal error: Call to a member function on a non-object in /home/mmedia/public_html/cpmfetch/cftest.php on line 310

This will be quick, I have a presentation to make tomorrow morning and have to bone up one the mind consiousness before then.  The abbot from a local monastary will be there so I'd like to get it right.

Anyway, the change should not have replaced the first one, but ADDed to it. 


$objCpm = new cpm($PartialUrlToCPG);
$objCpm->cpm_OverridePathToAlbums("/pics");

Without the new cpm, you do not have an object to set the override on.

Try that and report back


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

cgc0202

WOW!!!

Thanks very much Vuud.  That did the trick. 

I was a bit sleepy I guess. I apologize for not having read your previous post very carefully. [My only alibi was that I was reading the plugins on moderators and the other plugin removing the "delete" function in another thread. That might have affected my frame of mind, also.  But not a good excuse for my own carelessness.]

I decided to have multiple photogalleries that would require photos from different people to be in multiple galleries.  Having all the  photos outside of the individual photogalleries would be useful. You might even be the one who suggested that this was possible.  I have to check the thread where I asked of this possibility.

The observation you made for the "/ecos201" where the photos are outside of the standard 'albums" withing the Coppermine.  This was not the case with "/usa001" -- but got similar errors.  Please see previous post.

Thanks again.

cgc0202

N.B. 

I know the cpmfetch will work with my standard php and html based websites.  I hope it will work also as a "plugin"  for the "wiki" in the "Tikiwiki". 

vuud

Quote from: cgc0202 on May 13, 2006, 06:34:04 AM
WOW!!!

Thanks very much Vuud.  That did the trick. 
The observation you made for the "/ecos201" where the photos are outside of the standard 'albums" withing the Coppermine.  This was not the case with "/usa001" -- but got similar errors.  Please see previous post.

In that one your thumbnails are called t_ and your normal are called n_

That is why it is not finding thumbnails I think. 

You need to override the naming for thumb_ and normal_

Add in

$objCpm->cpm_setMediaPrefixes("t_", "n_");

after the new statement (that creates the object)







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

hasemann

#810
My first problem is that all new albums (#101 and #102) I added in may don't show up in CPMFetch.
I tried to add a new album #103 too, but it doesn't show up? All albums from #1-#100 are shown up.
I'm using the last 45 days, when I use the last 14 days CPMFetch shows only the number of new pictures added during the last 14 days without displaying these albums.

Second problem is that I need the links to be displayed in an iframe because I'm using the CMS of joomla.
CPMFetch displays all my new added albums on the startpage, but my gallery needs to be displayed in an iframe :/
Is there a solution for this?

vuud

Quote from: hasemann on May 13, 2006, 08:05:11 PM
My first problem is that all new albums (#101 and #102) I added in may don't show up in CPMFetch.
I tried to add a new album #103 too, but it doesn't show up? All albums from #1-#100 are shown up.
I'm using the last 45 days, when I use the last 14 days CPMFetch shows only the number of new pictures added during the last 14 days without displaying these albums.

Second problem is that I need the links to be displayed in an iframe because I'm using the CMS of joomla.
CPMFetch displays all my new added albums on the startpage, but my gallery needs to be displayed in an iframe :/
Is there a solution for this?


There have been a few reports of higher numbered albums not being displayed, but I have not had time to verify it, but I really should.

I have no idea what iframes really do so I cannot say if they can or can't be used with cpmfetch.   What is the actual issue with using cpmfetch with iframes? 



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

cgc0202

Quote from: vuud on May 13, 2006, 07:07:07 AM
In that one your thumbnails are called t_ and your normal are called n_
Add in
$objCpm->cpm_setMediaPrefixes("t_", "n_");
after the new statement (that creates the object)

That solved the errors too.  I anticipate to have multiple photogalleries and kept the photos in  a centralized folder (outside of the photogalleries) in in the same subdomain.  This will allow me to access the same set of photos and place them in multiple galleries.   I included the CPMFetch also in the same subdomain.   In this regard, I was reading the FAQ, and found this: 

***********
13.2.   I have my pages and gallery on different subdomains... will CpmFetch work?   
I have gotten a few of these working, but not enough to have all the answers. To use CpmFetch in its normal usage, the subdomain has to have access to the files on the CPG domain. If you have that, then I am confident it can be made to work.
*************

This may become an issue because the websites where I want to "place the photos" resulting from applying the CPMFetch  are found in other subdomains.  [My current webhosting service has the subdomains designed so that they are like separate domains altogether.]  Is there a possible or known solution to the issue raised in the FAQ?

In "Example 4.2. Example of using CpmFetch"
<?php   
include "cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>

Can the issue raised above be resolved by specifying the full path in 'include "cpmfetch.php";'

e.g.,

include "http://mysite.org/cpmfetch/cpmfetch.php";

cgc0202

vuud

Quote from: cgc0202 on May 14, 2006, 12:37:20 AM
That solved the errors too.  I anticipate to have multiple photogalleries and kept the photos in  a centralized folder (outside of the photogalleries) in in the same subdomain.  This will allow me to access the same set of photos and place them in multiple galleries.   I included the CPMFetch also in the same subdomain.   In this regard, I was reading the FAQ, and found this: 

***********
13.2.   I have my pages and gallery on different subdomains... will CpmFetch work?   
I have gotten a few of these working, but not enough to have all the answers. To use CpmFetch in its normal usage, the subdomain has to have access to the files on the CPG domain. If you have that, then I am confident it can be made to work.
*************

This may become an issue because the websites where I want to "place the photos" resulting from applying the CPMFetch  are found in other subdomains.  [My current webhosting service has the subdomains designed so that they are like separate domains altogether.]  Is there a possible or known solution to the issue raised in the FAQ?

In "Example 4.2. Example of using CpmFetch"
<?php   
include "cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>

Can the issue raised above be resolved by specifying the full path in 'include "cpmfetch.php";'

e.g.,

include "http://mysite.org/cpmfetch/cpmfetch.php";

cgc0202

You can do it as an include also... create a php file with the cpmfetch code on the main server and do a php include from the other server.  That could work.

Otherwise, as the faq said, I don't have much experience with getting that sort of thing running - so YMMV
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

cgc0202

Quote from: vuud on May 14, 2006, 01:12:10 AM
You can do it as an include also... create a php file with the cpmfetch code on the main server and do a php include from the other server.  That could work.

Otherwise, as the faq said, I don't have much experience with getting that sort of thing running - so YMMV


Hi Vuud,

I tried this approach of using the entire URL in the php "include"but I got an error, whenever I use the complete URL in the "include" statement.  This error maybe on account that I did not use it properly  [I know I cannot full URL in the usual SSI for html scripts, but I thought I can do that with php "include" -- at least I thought  I used full URL  in the php "include.]

Being able to include photos the way CPMFetch works in remote (i.e., in another subdomain  or domain) non-gallery  sites would be a powerful feature of  CPMFetch.

Until there is a method to be able to export the result of CPMFetch into "remote" sites outside of the domain where the photogallery and  CPMFetch are located, I have to rearrange the entire architecture of the way the photos are stored in my website -- it has to be decentralized rather than in one single subdomain as I originally planned. 

The integrated single site location of photos -- outside of any of the photogallery program directory has very important uses.  One of them is the ability to use the some photos in multiple (independent) photogalleries.  It is also a much simpler way of administering the photos.

cgc0202

N.B.

Maybe I did not understand the suggestion in your previous response correctly.  I did create a "test.php" page in the subdomain where the photogallery and the CPMFetch are located.  The CPMFetch result displayed properly in the  "test.php" page. [Thanks again for the help.]

To illustrate your suggestion, did you mean this?  Let us say "test.php" is in "mysite.org/test-files" so that the full URL for  "test.php" would be:

http://mysite.org/test-files/test.php

When you stated: "...do a php include from the other server", did you mean a script like this:

First Approach

<? php
include 'http://mysite.org/test-files/test.php';
?>

I tried that and got this error:
Parse error: parse error, unexpected T_INCLUDE in /home/treasure/public_html/test-fetch.php on line 2

Even if this might work there is one catch: It will require the creation of php files similar to "test.php'".   Creation of such files would be no problem if there are only a few; but becomes an issue if there are thousands or more of such files to be created.

Second Approach

I tried another approach where I use the complete URL in the "include" statement itself, for a test file (placed in the other subdomain) that included the Fetch statements, i.e.,

<?php   
include "http://mmedia.treasuresoftheinternet.org/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");
....
etc. etc.
?>

I got this error:
Fatal error: Cannot instantiate non-existent class: cpm in /home/treasure/public_html/toti-test.php on line 9

whether or not I added "http://mmedia.treasuresoftheinternet.org" (where the CPMFetch and the gallery are located) also in the

$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");

although I got more errors without the "http://mmedia.treasuresoftheinternet.org".  So, maybe I am just doing something incorrectly.

Note that the second approach works if placed in the same subdomain (where there would be no need to add the  "http://mmedia.treasuresoftheinternet.org", so that it would be simply:

<?php   
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");
....
etc. etc.
?>

If only the Second Approach works in another subdomain, then I can have a centralized subdomain for the multiple photogalleries, as well as an integrated location for all pics.

cgc0202

vuud

Quote from: cgc0202 on May 16, 2006, 11:04:33 PM

Maybe I did not understand the suggestion in your previous response correctly.  I did create a "test.php" page in the subdomain where the photogallery and the CPMFetch are located.  The CPMFetch result displayed properly in the  "test.php" page. [Thanks again for the help.]

To illustrate your suggestion, did you mean this?  Let us say "test.php" is in "mysite.org/test-files" so that the full URL for  "test.php" would be:

http://mysite.org/test-files/test.php

When you stated: "...do a php include from the other server", did you mean a script like this:

First Approach

<? php
include 'http://mysite.org/test-files/test.php';
?>

I tried that and got this error:
Parse error: parse error, unexpected T_INCLUDE in /home/treasure/public_html/test-fetch.php on line 2

Even if this might work there is one catch: It will require the creation of php files similar to "test.php'".   Creation of such files would be no problem if there are only a few; but becomes an issue if there are thousands or more of such files to be created.


The T_Include error means you botched up your php code somehow and has nothing to do with cpmfetch. 

Hint: there is no space between <? and php

Why would there be thousands of files? 




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

cgc0202

#816
Quote from: vuud on May 17, 2006, 07:51:41 AM
The T_Include error means you botched up your php code somehow and has nothing to do with cpmfetch.

Hint: there is no space between <? and php

Why would there be thousands of files? 


Thanks Vuud for the hint.  I had it correct in all the other php statements in the other test page.  I did not know why I had that mistake in the other page.

Here is the test page (i.e., "toti-test.php") URL   


http://mmedia.treasuresoftheinternet.org/toti-test.php

placed in the same subdomain as the gallery and the CPMFetch. The photos (with the accompanying text and layout structure) showed as expected (although I have to read the instructions more to make some features work).

Then, I created another test  php page  in another subdomain  (i.e., "test-fetch.php")  -- where I attempted  to "include" the entire "toti-test.php" -- text and photos -- into the "test-fetch.php" page found in the other subdomain. 

http://treasuresoftheinternet.org/test-fetch.php

The latter page contained the simple php statement:

<?php
include "http://mmedia.treasuresoftheinternet.org/toti-test.php";
?>

As you can see the "include" instructions itself works.  The entire page showed up in the other subdomain with the proper structure and text; the only issue is that the photos are not showing. 


I had an idea why this happened, and I tested it by revising the original text page.  At the bottom of the right  column, I included two photos in the original test page (i.e., "toti-test.php"):

http://mmedia.treasuresoftheinternet.org/toti-test.php

These two photos are static photos -- not generated by CPMFetch.  Both photos show up properly in the original subdomain.  Now if you compare what happens to these two photos in the other subdomain -- the upper photo does not show up while the lower photo shows up  -- it reveals the reason why all of the photos (generated through CPMFetch) do not appear when the test page was "fetched" in another subdomain:

http://treasuresoftheinternet.org/test-fetch.php

The CPMFetch itself worked in the original page, but because the presentation is partial URL, the exported photos attached the main URL of the new page (in this case  http://treasuresoftheinternet.org) rather than the original URL of  the original page  (i.e., http://mmedia.treasuresoftheinternet.org)  where it was generated.  This was just like what happened with the two photos on the right column, not generated with CPMFetch.

From the above diagnosis, it is a matter of incorporating a script that the photos must integrate the original page URL rather that the new page URL, to make this mode  work.

cgc0202

P.S. 

As outlined in my previous response, it would be nice if the method above would work because I would be able to find uses for them.  However, the ideal approach, if doable would be how to make the script:

<?php   
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");
...
....etc.
?>

work in another subdomain.  [It works if the above script is placed in the same subdomain as the Gallery and the CPMFetch.]

PPS:
You asked: Why would there be thousands of files? 
I will discuss this later since this is already a very long response.

vuud

Quote from: cgc0202 on May 18, 2006, 07:16:10 PM
Thanks Vuud for the hint.  I had it correct in all the other php statements in the other test page.  I did not know why I had that mistake in the other page.

Here is the test page (i.e., "toti-test.php") URL   


http://mmedia.treasuresoftheinternet.org/toti-test.php

placed in the same subdomain as the gallery and the CPMFetch. The photos (with the accompanying text and layout structure) showed as expected (although I have to read the instructions more to make some features work).

Then, I created another test  php page  in another subdomain  (i.e., "test-fetch.php")  -- where I attempted  to "include" the entire "toti-test.php" -- text and photos -- into the "test-fetch.php" page found in the other subdomain. 

http://treasuresoftheinternet.org/test-fetch.php

The latter page contained the simple php statement:

<?php
include "http://mmedia.treasuresoftheinternet.org/toti-test.php";
?>

As you can see the "include" instructions itself works.  The entire page showed up in the other subdomain with the proper structure and text; the only issue is that the photos are not showing. 


I had an idea why this happened, and I tested it by revising the original text page.  At the bottom of the right  column, I included two photos in the original test page (i.e., "toti-test.php"):

http://mmedia.treasuresoftheinternet.org/toti-test.php

These two photos are static photos -- not generated by CPMFetch.  Both photos show up properly in the original subdomain.  Now if you compare what happens to these two photos in the other subdomain -- the upper photo does not show up while the lower photo shows up  -- it reveals the reason why all of the photos (generated through CPMFetch) do not appear when the test page was "fetched" in another subdomain:

http://treasuresoftheinternet.org/test-fetch.php

The CPMFetch itself worked in the original page, but because the presentation is partial URL, the exported photos attached the main URL of the new page (in this case  http://treasuresoftheinternet.org) rather than the original URL of  the original page  (i.e., http://mmedia.treasuresoftheinternet.org)  where it was generated.  This was just like what happened with the two photos on the right column, not generated with CPMFetch.

From the above diagnosis, it is a matter of incorporating a script that the photos must integrate the original page URL rather that the new page URL, to make this mode  work.

cgc0202

P.S. 

As outlined in my previous response, it would be nice if the method above would work because I would be able to find uses for them.  However, the ideal approach, if doable would be how to make the script:

<?php   
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");
...
....etc.
?>

work in another subdomain.  [It works if the above script is placed in the same subdomain as the Gallery and the CPMFetch.]

PPS:
You asked: Why would there be thousands of files? 
I will discuss this later since this is already a very long response.

I am gonna give you your own thread... I have to say you put forth a great deal of effort to troubleshooting this on your test pages.  Keep at PHP and you will be a formidable programmer someday.

On this page:  http://mmedia.treasuresoftheinternet.org/toti-test.php

I think this will fix your remote problem.  This tells cpmfetch to add a full url instead of the relative one.  Then when the other site gets it, it can find the photos. 

$objCpm->cpm_OverrideUrlToCoppermine("http://mmedia.treasuresoftheinternet.org/ecos201/");

You certainly have put in a lot of effort on your own to get this working... I don't mind helping

Lemme know about the 1000's of scripts, I suspect there is a away around it (whatever it is)

Take care


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

cgc0202

Quote from: vuud on May 19, 2006, 01:55:52 AM
I am gonna give you your own thread... I have to say you put forth a great deal of effort to troubleshooting this on your test pages.  Keep at PHP and you will be a formidable programmer someday.

On this page:  http://mmedia.treasuresoftheinternet.org/toti-test.php

I think this will fix your remote problem.  This tells cpmfetch to add a full url instead of the relative one.  Then when the other site gets it, it can find the photos. 

$objCpm->cpm_OverrideUrlToCoppermine("http://mmedia.treasuresoftheinternet.org/ecos201/");

You certainly have put in a lot of effort on your own to get this working... I don't mind helping

Lemme know about the 1000's of scripts, I suspect there is a away around it (whatever it is)

Take care

Thanks Vuud.  I am very grateful for your patience and taking the time to help.  Here are my observations:

http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test3b.php

when I integrated your suggestion (I hope I got your message correctly -- I simply "added" the code).  There was something I observed also when I was  varying the sizes of the photos, quite more evident for the large sizes:

http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test2.php

I also answered the issue about "thousands of files".

Thanks again.

cgc0202

Daworm

Hey Vudd -- long shot.

You haven't be chance updated and found a work-around for the bridging issue have you?