forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: vuud on April 10, 2005, 10:52:43 pm

Title: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on April 10, 2005, 10:52:43 pm

CFIMAGEGET is an accessory program that comes with CPMFETCH.  It allows you to access random images from an <IMG> tag anywhere on the internet.  There are some limitations - so this is best used only when you cannot use CpmFetch on PHP pages.


Ignore the cfimageget_classic.php - This is the old version that will be removed in the next stable release. 

Since there is a good amount of confusion with this... here are some good examples of when and when not to use cfimageget.php

GOOD USES

BAD USES







Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: cassie396 on May 20, 2005, 12:11:25 am
I do not understand how to use this.

I tried this:
<img src="http://www.guidinglightmultimedia.com/cpmfetch/cfimageget.php">

and it came up with a broken image. I can't seem to find an example or anything to help me.

Thanks,
Cassie
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: cassie396 on May 20, 2005, 12:27:09 am
I setup the variables in this: http://www.guidinglightmultimedia.com/cpmfetch/cfimageget_classic.php
and when I went to that url I got:

Quote
Error in getImageTouse: Extension (strtolower): .jpg File:/gallery//albums/2003Screenshots/June/thumb_2003-0610_(203).jpg

Warning: Cannot modify header information - headers already sent by (output started at F:\home\Default\guidinglightmultimedia.com\htdocs\cpmfetch\coppermine_dao.php:593) in F:\home\Default\guidinglightmultimedia.com\htdocs\cpmfetch\cfimageget_classic.php on line 145

Warning: Cannot modify header information - headers already sent by (output started at F:\home\Default\guidinglightmultimedia.com\htdocs\cpmfetch\coppermine_dao.php:593) in F:\home\Default\guidinglightmultimedia.com\htdocs\cpmfetch\cfimageget_classic.php on line 146


I also tried setting the variables in the other imageget file. I tested it like in the readme....
http://www.guidinglightmultimedia.com/cpmfetch/cfimageget.php

And I get absolutely nothing. No errors, so output, nothing. I turned it on to true for access, and changed 'photos' to gallery. I even tried using the ../gallery that works in the other files, but still nothing.

Any help would be GREATLY appreciated.
Cassie
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on May 20, 2005, 02:10:06 am

Heya,

First off... ignore the _classic version, its old and I don't support it anymore.  Probably will delete it sometime soon anyway

What version of cpmfetch are you using?  The latest dev or the latest stable?  Its a trick question because all my code is stable - lol

If you are getting nothing back for that one, it really really looks like the $ALLOW_DIRECT_ACCESS is not set to true. 

It should look like this:

Code: [Select]

$ALLOW_DIRECT_ACCESS = true;

... and ...

$urltocpm = "/gallery/"


If you have that, then it *should* work, or you should get an error, or something...

I also tried setting the variables in the other imageget file. I tested it like in the readme....
http://www.guidinglightmultimedia.com/cpmfetch/cfimageget.php

And I get absolutely nothing. No errors, so output, nothing. I turned it on to true for access, and changed 'photos' to gallery. I even tried using the ../gallery that works in the other files, but still nothing.
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: cassie396 on May 20, 2005, 06:26:09 am
I swear to you that I set it to true and still nothing happens. I double-checked and re-uploaded the file. It is set to true and "/gallery/".

Any other suggestions? Is there a way to turn on errors because NOTHING comes up at all.

I am using 1.2.2 if that helps.

~ Cassie
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on May 20, 2005, 07:24:33 am

Okay, if you swear :)

Try getting the newest dev version from my web site http://cpmfetch.fistfullofcode.com - not sure if anything changed, but its always better for me to work with the newest stuff.  Don't worry, its stable

As for turning on errors, you can add something like this:

<?php
error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on
?>

to the top of the cfimageget.php file (ommit the <?php and ?> if you are putting it inside an existing php marker tag. 

In either case, jump to the newest dev version 1.3.4 I think... 

Typically problems end up being something easy... we just have to figure out what it is.  With the two above suggestions we should have some idea right?  Lol...

Sleep time... mmmmmm sleep
 :P






I swear to you that I set it to true and still nothing happens. I double-checked and re-uploaded the file. It is set to true and "/gallery/".

Any other suggestions? Is there a way to turn on errors because NOTHING comes up at all.

I am using 1.2.2 if that helps.

~ Cassie
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: cassie396 on May 20, 2005, 08:16:49 am
I downloaded and uploaded 1.3.4.

cftest.php -- changed to ../gallery
http://www.guidinglightmultimedia.com/cpmfetch/cftest.php
Works perfect. Pulls the images up, everything.

cfimageget.php -- changed to true and /gallery/
http://www.guidinglightmultimedia.com/cpmfetch/cfimageget.php
Still get nothing. Absolutely nothing. Now this isn't installed in the root, though. It is installed at the same level as /gallery, which is why I think for cftest.php the ../gallery worked. Although I tried this, and it didn't work. Maybe I should try the full script path?

Thanks!
Cassie
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on May 21, 2005, 01:18:14 am

I hate windows.

That being said, aparently IIS behaves differently across different web servers.  Basically it looks for DOCUMENT_ROOT and if that is not there it looks for doc_root (which the last IIS we got this working on had).  From there it builds the path based on that gallery entry you have there.

Do you have control over this box?  The easiest thing to do in that case is to make an environmental variable named DOCUMENT_ROOT and have it point at:  F:\\home\\Default\\guidinglightmultimedia.com\\htdocs\

If not let me know and I will work out some different instructions... but thats the problem.  Cursed IIS



I downloaded and uploaded 1.3.4.

cftest.php -- changed to ../gallery
http://www.guidinglightmultimedia.com/cpmfetch/cftest.php
Works perfect. Pulls the images up, everything.

cfimageget.php -- changed to true and /gallery/
http://www.guidinglightmultimedia.com/cpmfetch/cfimageget.php
Still get nothing. Absolutely nothing. Now this isn't installed in the root, though. It is installed at the same level as /gallery, which is why I think for cftest.php the ../gallery worked. Although I tried this, and it didn't work. Maybe I should try the full script path?

Thanks!
Cassie
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: betan on May 28, 2005, 07:03:08 pm
just want to say;

 thank you Sir, you are the man. It works great!!!!

can you code menalto too!! just kidding!! :lol:

Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on May 28, 2005, 07:10:09 pm

Thank you, thank you very much


just want to say;

 thank you Sir, you are the man. It works great!!!!

can you code menalto too!! just kidding!! :lol:
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: cassie396 on May 30, 2005, 07:11:31 am
I don't have access to what you are talking about. I don't have shell access or anything....... I'm not really sure what you mean about about the varialbe thing. I know, Windows sucks. I've moved over most of my sites to a Unix based server, but this is budget, and unlimited memory and bandwidth.... you know how it goes.

Anyway, if you could find another way to work this out, that would be great.

Is there somewhere in the script where I could input the entire root path for the script?

Thanks!
Cassie
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on May 30, 2005, 08:20:04 am

Yeah, when I get back to that computer I will post some instructions on that...  Check back tomorrow

I've known at least three people that had grandfathered unlimited bandwidth clauses... till thier sites got popular... then suddenly they would get cancelled for one reason or another...  usually suspicious...

Anyway, check back tomorrow

I don't have access to what you are talking about. I don't have shell access or anything....... I'm not really sure what you mean about about the varialbe thing. I know, Windows sucks. I've moved over most of my sites to a Unix based server, but this is budget, and unlimited memory and bandwidth.... you know how it goes.

Anyway, if you could find another way to work this out, that would be great.

Is there somewhere in the script where I could input the entire root path for the script?

Thanks!
Cassie
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: sudden on June 03, 2005, 01:40:25 am
is it possible to link the displayed thumbnail image to the actual location of the image!

im using this code..
Code: [Select]
<img src="http://domainname.com/cpmfetch/cfimageget.php" />
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on June 03, 2005, 02:39:38 am
is it possible to link the displayed thumbnail image to the actual location of the image!

im using this code..
Code: [Select]
<img src="http://domainname.com/cpmfetch/cfimageget.php" />

In short, no.

You can wrap it with a link to the album, and then limit cfimageget to draw only from that album, same with categories.

If you are on the same site and can do PHP, just use the normal way.

If you are HTML, check back in a few weeks when I will have an SSI variation you can use - or roll your own using the code.

Hope that answers your question... cfimageget is really just to grab pictures when you are on a different server than the coppermine gallery.

Vuud





Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: sudden on June 04, 2005, 03:04:41 am
i have problems with php in blocks.

i will surely check back in a week

thanks
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on June 04, 2005, 05:08:28 am
i have problems with php in blocks.

i will surely check back in a week

thanks

Today I posted some solutions that use the SSI method in a thread in the cpmfetch board (parallel to this one)

Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: sudden on June 04, 2005, 09:05:37 pm
nice..

i didnt see that one

thanks.
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: isajade on June 06, 2005, 06:02:30 pm
Can you please post the link please, thank you.
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on June 07, 2005, 12:19:20 am
Can you please post the link please, thank you.

You mean this?

http://forum.coppermine-gallery.net/index.php?topic=18547.0
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: marcelk on January 02, 2006, 01:14:07 pm
Is it possible te use cfimageget.php to always get the same image. I assume it would be something like  \cfimageget.php?Pic=1 instead of \cfimageget.php?album=1 to get a random image from album 1.

Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on January 02, 2006, 04:11:20 pm
Is it possible te use cfimageget.php to always get the same image. I assume it would be something like  \cfimageget.php?Pic=1 instead of \cfimageget.php?album=1 to get a random image from album 1.



Why would you want to?  Why not just link to the picture with an IMG tag?

Otherwise, regrettably... no it does not.

If there is a decent reason for it, I will add it to the list of things to add to it though

Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: marcelk on January 05, 2006, 11:33:29 am
the reason I ask if this is possible is that I want my users to be able to hotlink to there pictures and provide them with a ease to use url instead of the full url to the image.

In a for me ideal situation it would show de image if available and a default image or error text if the requested image does not exist.
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on January 08, 2006, 05:48:16 pm
the reason I ask if this is possible is that I want my users to be able to hotlink to there pictures and provide them with a ease to use url instead of the full url to the image.

In a for me ideal situation it would show de image if available and a default image or error text if the requested image does not exist.



Okay, seems reasonable enough.  I added it to the list of things to do...  Either the next release, or more likely the one after that i will try to hae it added in.

Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: marcelk on January 18, 2006, 01:00:44 pm
Sounds great

thanxs
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: radmofo on February 06, 2006, 01:35:05 am
Hello I am looking for anyone who has had trouble fetching photos from any album number 26 or above. I can get them from any other album (1-25) but not 26 and above. I really don't know where the problem might lay but if anyone can help...please do. My link is here (http://www.robbinsfamilysite.com) if your interested in looking.
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: Sasse on February 24, 2006, 09:39:28 am
Hi!
The cpimaget.php basically works, for me. But I can't use any restrictions.
When I add e.g. ?category=1 no image shows up at all.
What am I doing wrong?
Thx for any help!

PS: Is it possible to point to a specific album within the cpimageget.php file? I could create an extra file for every album, if the universal method won't work.


Problem solved:

I just figgured out that I don't have catagory or album 1 and 2. It starts with 3  ???  ::)   Well but now it works perfectly fine!   ;D
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: Sasse on February 24, 2006, 10:23:33 am
Well, I have another one now.

I want to post three Random images out of the same album, so I use the same link three times.
Now it displays the same image three times. What do I have to do in order to get 3 different random images?
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: howie10 on February 28, 2006, 09:45:31 pm
Hi.
I am using cfimageget succesfully. However, I would really like to show the last three uploaded images in my gallery. I can only show one by setting my cfimageget.php "$default_command" to 'last' and calling "cfimageget.php?album=lastup" from my img tag.
I have tried "cfimageget.php?album=lastup&pos=1" (then pos=1 etc), but it doesn't work.

Is it possible to display the last three images uploaded to my gallery?
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: SamuRon on March 17, 2006, 06:07:54 am
hi - I am having an odd issue when using CFIMAGEGET.  I'm using Coppermine 1.4.4 and CoppermineFetch 1.6.2.

I'm simply trying to use this to display the latest image in a gallery with:
Code: [Select]
<img src="http://www.fwooshnet.com/cpmfetch/cfimageget.php?size=int&album=49&cmd=last">
for some reason, this only seems to work with batch uploaded files.  when the files in the gallery have been uploaded manually, they won't display using cfimageget.  the album I'm trying to pull from is here: http://www.fwooshnet.com/pics/thumbnails.php?album=75

all the album properties are the same as in the working example with album 49- it just happens that the images in album 75 were uploaded using the Upload Files interface instead of Batch Upload.

thanks in advance for your help.
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: SamuRon on March 18, 2006, 02:28:25 am
hi - I am having an odd issue when using CFIMAGEGET.  I'm using Coppermine 1.4.4 and CoppermineFetch 1.6.2.

I'm simply trying to use this to display the latest image in a gallery with:
Code: [Select]
<img src="http://www.fwooshnet.com/cpmfetch/cfimageget.php?size=int&album=49&cmd=last">
for some reason, this only seems to work with batch uploaded files.  when the files in the gallery have been uploaded manually, they won't display using cfimageget.  the album I'm trying to pull from is here: http://www.fwooshnet.com/pics/thumbnails.php?album=75

all the album properties are the same as in the working example with album 49- it just happens that the images in album 75 were uploaded using the Upload Files interface instead of Batch Upload.

thanks in advance for your help.


I tried a standard php file and it looks like I get the same result using cpmfetch.php.  not sure where to go from here.
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: slayer on March 22, 2006, 08:08:10 pm
I am having trouble getting this CFIMAGEGET to work properly, when i run it i get a broken image...

however when i turn the errors on i get the following error

Code: [Select]
Notice: Undefined variable: row in /home/idolcrea/public_html/gallery/cpmfetch/cfimageget.php on line 255

Notice: Undefined variable: row in /home/idolcrea/public_html/gallery/cpmfetch/cfimageget.php on line 255

Warning: Cannot modify header information - headers already sent by (output started at /home/idolcrea/public_html/gallery/cpmfetch/cfimageget.php:255) in /home/idolcrea/public_html/gallery/cpmfetch/cfimageget.php on line 278

Warning: Cannot modify header information - headers already sent by (output started at /home/idolcrea/public_html/gallery/cpmfetch/cfimageget.php:255) in /home/idolcrea/public_html/gallery/cpmfetch/cfimageget.php on line 279
GIF89a????!?,D;


any ideas? as it stands none of CPMFETCH works, cftest?? doesnt show anything, but i only want this to work right now


P.S. CFIMAGEGET
* RELEASE VERSION 1.6.2
Coppermind 1.3.3

are they even compatable? the docs said they were
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: BleeZeR on May 20, 2006, 05:54:56 pm
Is it possible te use cfimageget.php to always get the same image. I assume it would be something like  \cfimageget.php?Pic=1 instead of \cfimageget.php?album=1 to get a random image from album 1.



yes! i really would like it to for my fan site about Anne Hathaway!
But on an other fan site they use cpmfetch to i believe not sure though how come they can show one image thats doenst randomize?

My site http://www.annie-hathaway.com (http://www.annie-hathaway.com)
other fan site http://annehathawayfan.com (http://annehathawayfan.com)
Title: Re: CpmFetch - using CFIMAGEGET to get remote images
Post by: vuud on August 22, 2006, 04:01:13 am
yes! i really would like it to for my fan site about Anne Hathaway!
But on an other fan site they use cpmfetch to i believe not sure though how come they can show one image thats doenst randomize?

My site http://www.annie-hathaway.com (http://www.annie-hathaway.com)
other fan site http://annehathawayfan.com (http://annehathawayfan.com)

Sure, if you are still interested please repost...