Thumbnail of the last uploaded image Thumbnail of the last uploaded image
 

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

Thumbnail of the last uploaded image

Started by kousik, November 10, 2005, 12:17:36 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

kousik

Hi. I was trying to fetch the thumbnail of the last uploaded image from some other webpage. I ended up writing a few lines:

<?php
Header
('Content-Type: image/jpeg');
define('IN_COPPERMINE'true);
require(
'include/init.inc.php');
$pic_data get_pic_data('lastup'$thumb_count$album_name, -11);
$pic_url =  get_pic_url($pic_data[0], 'thumb');
readfile($pic_url);
?>


Saved it as "lastimage.php", and in the original page, all we need to do <img src="http://my.photo.gallery/cpg/lastimage.php">
Any correction/heads up would be most welcome.

regards
Kousik.
http://kousik.blogspot.com/2005/10/last-image-in-coppermine.html

johnner

Is there anyway to just get the date that the last image was uploaded?  I would like to include a link on my main page that says Images last uploaded x/xx/xxxx, and then a link to the latest uploads.  Any info would be greatly appreciated.

vuud

Quote from: johnner on January 04, 2006, 06:31:36 PM
Is there anyway to just get the date that the last image was uploaded?  I would like to include a link on my main page that says Images last uploaded x/xx/xxxx, and then a link to the latest uploads.  Any info would be greatly appreciated.


You can extend cpmfetch to get stuff like the last dates and stuff...
http://www.fistfullofcode.com/projects/copperminefetch/tests/test6.php

http://www.fistfullofcode.com/projects/copperminefetch is the actual site.

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

johnner

Awesome!  Thanks, however I am getting an error despite having the config.inc.php in the correct location.  I did find some issues like this on the forum, but they are all in French :(  Here is the error I get.

80   CPG Config file not found: /www/.../gallery/include/config.inc.php

bajs

I tried and I ended up with a red cross  ???

bajs

im not even sure if THIS is the code I am lookin for.

I simply want something exactly like
http://jessicaalba.org
http://bynesonline.com/
http://brendonurie.net/

In the sidebar, you can see "latest photos added" and thena  link to the gallery with the photos.

I want that. I tried your code but it wouldn't work out for me. Instead, I got a "red cross"

Worth mentioning is that I have my gallery and main site hosted on two different servers

Tranz

If you are using hotlink protection, make sure to whitelist the second domain in your gallery's list. If that's not the problem, post a link to the page showing the red cross.

bajs

i don have hotlinking disabled.

http://elijah.netg.se/header.php
under "projects" sidebar, left side, middle/top

bajs


Joachim Müller

Quote from: TranzNDance on May 24, 2006, 03:53:20 PM
If that's not the problem, post a link to the page showing the red cross.


David McKim

I don't know if this is possible, but if it is please give me the code.

I was hoping to be able to show the latest image from a specific user, can this be done?

Joachim Müller

Quote from: bajs on June 17, 2006, 01:34:11 PM
I did post a link.
but not one that leads to the page you're having issues with. Are you trying to be confrontational? Just do as suggested.

appelmoes2008

I would like to display just one picture on the frontpage of my website. So far, so good.

Works fine like this:

<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/departementen/archief/fotoalbum');
$objCpm->cpm_viewLastAddedMedia(1,1, array( 'imagewidth' => '282' , 'imagesize' => 'int' ));
$objCpm->cpm_close();
?>

But I would actually like this to be a random picture picked only from the last album added.

Anyone know's if this is possible?

Thanks

Joachim Müller

This thread doesn't deal with cpmFetch, but with another unrelated hack that deals with content syndication. Don't try to hijack this thread. In fact, there's a whole sub-board dedicated to cpmFetch-support. Post your question there. Locking this thread.