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

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 3 Guests are viewing this topic.

vuud

Quote from: ohfishing on October 11, 2005, 04:17:38 AM
Well I did an experiment , I made an empty folder, I put a COPY of the config in there and ran the test...it PASSED . However the thumbnails dont show up. I dont suppose it will work this way being that the cpg folder is at another path. I just wanted to try to find the config in an easy place. Moving the folders is not an option (I tried) as I have to many things depending on those paths like wordpress,phpbb,albums,galleys etc. I know this experiment probably seems pretty lame to you guys... but I feel like a rocket scientist ...only if the thumbs showed up :-(

If you did not get resolution on this... the thumbs missing are due to the bridging issue (mentioned in the other thread and just before this message in this thread)

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

Sy

Quote from: vuud on October 15, 2005, 08:26:21 AM
Quote from: Sy on October 15, 2005, 12:36:27 AM
pyimaung: -

I've just installed and had this problem myself.  After trawling through this thread I found the answer.  Simply go into your phpMyAdmin and then the cpg132_users table.  The into the user_id field.  Insert a new row and create a user with a user_id of 2.  Reload your cftest.php file and the images will appear.  :)

Now that's sorted on to my own problems.

I've just setup a quick test page with the following code.  It all works great but my images are coming up with blue borders due to them being links.  I've searched the forum and found one other person with this problem but didn't really understand how it was resolved.  As far as I can figure it's something to do with cascading style sheets...but I'm not really that up on them.  Think it maybe down to a:link but can't get it to work or even figure out how to turn borders off using a:link.  Any ideas or help for a css/php n00b?


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

<html>
<head>
</head>
<body>
</body>
</html>


Thanks for any help or ideas.

Sy


The solution for the missing users is fine... just be aware some subtitle information wont work... the stuff related to usernames and such.  So your good 99% of the way with that.

As for your problem... check this page.  There are two examples of doing nifty things with images and stuff in there.  Maybe something helpful.

http://www.fistfullofcode.com/projects/copperminefetch/tips.php


Thanks a lot vuud with your link above I've got it licked.  Also want to thank you for this awesome script.  :)

Sy

pyimaung

Thanks SY..You're a genius..It's all working now.. Just one more question.. How do I make the gallery pop up in a pop up window without the address bar.. If it cannot be done then how do I unlink the fetched photos to the gallery. Can anyone help?? Thanks!!

vuud

Quote from: pyimaung on October 15, 2005, 06:31:07 PM
Thanks SY..You're a genius..It's all working now.. Just one more question.. How do I make the gallery pop up in a pop up window without the address bar.. If it cannot be done then how do I unlink the fetched photos to the gallery. Can anyone help?? Thanks!!

Check this... there is a number of ways to accomplish it... the cfshow may be the easiest

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s04.html
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

wearentyou.com

Hi there,

Having read through this thread extensively, I have come to the point where I need to post my question as I can't seem to work it out by myself.

I basically have the same problem as ohfishing with my cftest.php file.

It all passes except for the last two:

75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL

The URL of the cftest file is http://www.wearentyou.com/Coppermine/cftest.php

I am using Coppermine 1.3.4 and CPMFetch 1.6.2.

Would it affect the running of this file having CPMFetch installed inside the coppermine folder?

I am an intermediate webmaster, and started learning about PHP/Mysql a short while ago for new projects. I am happy enough tracking down code in my installation, changing variables etc, but I can't seem to get my head around what needs to be changed in order for this to work.

Your help is much appreciated.

Thanks in advance,

Ben

wearentyou.com

pyimaung

hi vuud,
thanks for your quick reply.. I've looked at the link u gave me and i'm not a programmer so i don't know where to put these codes or which files to edit.. A little bit more detail like which file to edit and where to put the codes would be really appreciated.. And an example code would really help.. thank you..

Quoteimagelink => "none" or "album" or "large"
windowtarget => "_blank" or "_parent" or "_blank-js" or "_blank-cfshow"


imagelink - [none|album|large]
What type of image to link to when the image is clicked. None indicates no link will be provided.

windowtarget - [_blank | _parent| _blank-js | _blank-cfshow ...]
If this is present a target tag is inserted with the contents. This is simply passed through. You can add anything in there (I think) - probably even javascript.

_blank-js
Requires the file cpmfetch.js to be included in your page. That provides the javascript to display the image correctly.

_blank-cfshow
Uses the cfshow.php file to display the image. This will be expanded greatly in the future.


vuud

Quote from: wearentyou.com on October 16, 2005, 06:11:57 PM
Hi there,

Having read through this thread extensively, I have come to the point where I need to post my question as I can't seem to work it out by myself.

I basically have the same problem as ohfishing with my cftest.php file.

It all passes except for the last two:

75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL

The URL of the cftest file is http://www.wearentyou.com/Coppermine/cftest.php

I am using Coppermine 1.3.4 and CPMFetch 1.6.2.

Would it affect the running of this file having CPMFetch installed inside the coppermine folder?

I am an intermediate webmaster, and started learning about PHP/Mysql a short while ago for new projects. I am happy enough tracking down code in my installation, changing variables etc, but I can't seem to get my head around what needs to be changed in order for this to work.

Your help is much appreciated.

Thanks in advance,

Ben

wearentyou.com

Your DOCUMENT_ROOT setting is "undefined" which is a new one to me... normally that holds where the documents are...

Strange... is this hosted or your own server?


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

wearentyou.com

Quote from: vuud on October 17, 2005, 07:26:46 PM
Quote from: wearentyou.com on October 16, 2005, 06:11:57 PM
Hi there,

Having read through this thread extensively, I have come to the point where I need to post my question as I can't seem to work it out by myself.

I basically have the same problem as ohfishing with my cftest.php file.

It all passes except for the last two:

75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL

The URL of the cftest file is http://www.wearentyou.com/Coppermine/cftest.php

I am using Coppermine 1.3.4 and CPMFetch 1.6.2.

Would it affect the running of this file having CPMFetch installed inside the coppermine folder?

I am an intermediate webmaster, and started learning about PHP/Mysql a short while ago for new projects. I am happy enough tracking down code in my installation, changing variables etc, but I can't seem to get my head around what needs to be changed in order for this to work.

Your help is much appreciated.

Thanks in advance,

Ben

wearentyou.com

Your DOCUMENT_ROOT setting is "undefined" which is a new one to me... normally that holds where the documents are...

Strange... is this hosted or your own server?




It's hosted by http://www.bravenet.com - to be honest they haven't been too great so far - I have used them happily for other projects but there are silly little nuances with their hosting such as they have disable the phpinfo function meaning I had to email support just to find out what version of GD is on their server -

they don't offer support for 3rd party php-based software hence me asking on here - surely there must be some way around this problem?

Vuud if it helps I can grant you FTP access to the site... I trust you enough!  ::)

Thanks again,

Ben

wearentyou.com

julala

Firstly, thank you for a great script and also your committed support on this forum - you are a patient man. 8)

Managed to get everything installed and running painlessly.  And your docs were detailed and helpful.

Small question.

I am using the "Who's online mod" and was wondering if it is possible to fetch user data with cpmfetch.  I would like to show how many users I have in my gallery on my home page.

cpm 1.3

Thanks

Julala

Babounet

Hello,

I've some trouble with the fonction cpm_unlockPrivate($bool). Can someone help me?

My php code in my page:

<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/pics');
$objCpm->cpm_unlockPrivate(true);
$objCpm->cpm_viewLastAddedMedia (1,4);
$objCpm->cpm_close();
?>

The error:
Fatal error: Call to undefined function: cpm_unlockprivate()

I surch to have pics of the last galleries, even if it is a public or registered gallery.

Many thanks for your help!
Seb

boghsteren

Quote from: wearentyou.com on October 16, 2005, 06:11:57 PM
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL

I get exactly the same problem. Url for my cftest.php is http://bogh.orgfree.com/pics/cpmfetch/cftest.php

Been trying everything I can think of, but to no avail.

pyimaung

imagelink => "none" or "album" or "large"
windowtarget => "_blank" or "_parent" or "_blank-js" or "_blank-cfshow"


imagelink - [none|album|large]
What type of image to link to when the image is clicked. None indicates no link will be provided.

windowtarget - [_blank | _parent| _blank-js | _blank-cfshow ...]
If this is present a target tag is inserted with the contents. This is simply passed through. You can add anything in there (I think) - probably even javascript.

_blank-js
Requires the file cpmfetch.js to be included in your page. That provides the javascript to display the image correctly.

_blank-cfshow
Uses the cfshow.php file to display the image. This will be expanded greatly in the future.


Can someone help me with the above code please?? In which file do I place these codes and how? Can someone show me an example? I want to use _blank-js. Thanks

vuud

Quote from: wearentyou.com on October 17, 2005, 07:43:49 PM

It's hosted by http://www.bravenet.com - to be honest they haven't been too great so far - I have used them happily for other projects but there are silly little nuances with their hosting such as they have disable the phpinfo function meaning I had to email support just to find out what version of GD is on their server -

they don't offer support for 3rd party php-based software hence me asking on here - surely there must be some way around this problem?


As far as I can tell, the Phpinfo() call works there. 

There is a way around this, and god knows I should document it one of these days.  I have to see if I can remember it.

Sorry to ALL for delays on responding - IRL I am in the middle of starting new things and its been increadibly time consuming.  I have not abandoned the project - the next release will be 1.4 compatible, solve lots of problems like this one and will also be released under a new license (even free'r)

I will try to recall how I did it and post it back.

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: julala on October 18, 2005, 12:36:56 AM
Firstly, thank you for a great script and also your committed support on this forum - you are a patient man. 8)

Managed to get everything installed and running painlessly.  And your docs were detailed and helpful.

Small question.

I am using the "Who's online mod" and was wondering if it is possible to fetch user data with cpmfetch.  I would like to show how many users I have in my gallery on my home page.

cpm 1.3

Thanks

Julala

It can read some user information for use in titles and subtitles, but nothing specific to just get the number of users.  If you feel like trying to code it in, feel free to ask for advice and I'd love to take it as a contribution and add it in after.

I just added it to my growing list of things to do...  It will be in as part of the function formatStats ($format) as a parameter.  But I am not sure when that will be.  If you want to try to add it there - simply look in cpmfetch_dao.php and search on that function and see how it works.  Add, send me new code.

if not, I will have it eventually.

:(



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: pyimaung on October 20, 2005, 12:09:29 PM
imagelink => "none" or "album" or "large"
windowtarget => "_blank" or "_parent" or "_blank-js" or "_blank-cfshow"


imagelink - [none|album|large]
What type of image to link to when the image is clicked. None indicates no link will be provided.

windowtarget - [_blank | _parent| _blank-js | _blank-cfshow ...]
If this is present a target tag is inserted with the contents. This is simply passed through. You can add anything in there (I think) - probably even javascript.

_blank-js
Requires the file cpmfetch.js to be included in your page. That provides the javascript to display the image correctly.

_blank-cfshow
Uses the cfshow.php file to display the image. This will be expanded greatly in the future.


Can someone help me with the above code please?? In which file do I place these codes and how? Can someone show me an example? I want to use _blank-js. Thanks


Okay, first read this page... its how to include stuff like that as part of the call
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html

Did you read the above?  You must at least read it before continuing here...

Okay...

<?php
$styleguide = array();
$styleguide['imagelink'] = "large";
$styleguide['windowtarget'] = "_blank-js";
$objCpm->cpm_viewLastAddedMedia(1,1,$styleguide);
?>

See! I knew you were going to look at the example before reading the docs.  The optionsarray carries almost all the power in cpmfetch, its worth understanding.

But good luck anyway

Dont forget from above
Requires the file cpmfetch.js to be included in your page.



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: boghsteren on October 19, 2005, 12:22:14 AM
Quote from: wearentyou.com on October 16, 2005, 06:11:57 PM
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL

I get exactly the same problem. Url for my cftest.php is http://bogh.orgfree.com/pics/cpmfetch/cftest.php

Been trying everything I can think of, but to no avail.

Gah!  What is wrong with server people these days!

Damnit all!  Sorry, its not you - but this problem has been the bane of this programs existance since it was started.  Not just this, but all servers - I have like 5 ways to check in there and it always breaks on someones machine.  THERE SEEMS TO BE NO GOOD WAY TO FIND THE LOCATION OF FILE THAT IS STANDARD ON ALL SYSTEMS!   Phooey!

Anyway, its not you - its this cursed problem.  I vow that this will be resolved once and for all someday - damn I almost said next version.  I guarentee the next version will at least be easier to work around this problem.  Damn them all!!!!!

>:(




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

boghsteren

Quote from: vuud on October 21, 2005, 06:42:31 AM
Damnit all!  Sorry, its not you - but this problem has been the bane of this programs existance since it was started.  Not just this, but all servers - I have like 5 ways to check in there and it always breaks on someones machine.  THERE SEEMS TO BE NO GOOD WAY TO FIND THE LOCATION OF FILE THAT IS STANDARD ON ALL SYSTEMS!   Phooey!

Is there a simple way to manually set the ROOT manually in cpmfetch? I am pretty sure that would solve the problem.

* Note: I am still in a process of getting familiar with php...

Thanks for a great script (exactly what I need) and very dedicated support. Very cool.

vuud

Quote from: boghsteren on October 21, 2005, 09:39:37 AM
Quote from: vuud on October 21, 2005, 06:42:31 AM
Damnit all!  Sorry, its not you - but this problem has been the bane of this programs existance since it was started.  Not just this, but all servers - I have like 5 ways to check in there and it always breaks on someones machine.  THERE SEEMS TO BE NO GOOD WAY TO FIND THE LOCATION OF FILE THAT IS STANDARD ON ALL SYSTEMS!   Phooey!

Is there a simple way to manually set the ROOT manually in cpmfetch? I am pretty sure that would solve the problem.

* Note: I am still in a process of getting familiar with php...

Thanks for a great script (exactly what I need) and very dedicated support. Very cool.

If you can get it to find the config file from cpg... you can adjust how it works with

cpm_OverridePathToCoppermine($newpath_)

cpm_OverrideUrlToCoppermine($newpath_)

The path one adjusts how it looks for your cpg directory, the URL adjusts the http:// part of the images that get returned.

These are not really documented, and I think I wrote them late one night - so I can never remember how to use them.    The Path one should allow you to change what the document root would have set for you.  The initial call to cpmfetch to create the object has to pass and that works off of document root.

You could also try to put it in your scripts

$_SERVER['DOCUMENT_ROOT'] = "/path/to/your/root/of/your/web/site/here";

Someone said that worked... but I have not tested it.










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

toykilla

I have 2 sites running on the same server. I need to use CPM fetch on the site that does not have coppermine running on it. (pull from the other site).. How can i do this?

dukuduku

Howdy all,

I just want to report a finding since it took some time to debug.

I had a similar problem as described by a previous poster.  cftest.php said everything was OK but I couldn't see any images.  When I added a second user #2, it didn't fix my problem.  But then I read that you join cpg135_pictures.owner_id to cpg135_users.user_id, I looked at my pictures table and noticed that all owner_id's were set to 0.  There is no user_id 0, so I updated the pictures table and gave the pictures to user_id 1.  After this update, cftest.php worked properly.

I can guess why this happened to me, but that is another matter altogether. ::)