Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Thumbnail of the last uploaded image  (Read 25353 times)

0 Members and 1 Guest are viewing this topic.

kousik

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3
    • Kousik & Sumana's Photography
Thumbnail of the last uploaded image
« on: November 10, 2005, 12:17:36 pm »

Hi. I was trying to fetch the thumbnail of the last uploaded image from some other webpage. I ended up writing a few lines:
Code: [Select]
<?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
Code: [Select]
<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
« Last Edit: November 10, 2005, 06:31:11 pm by GauGau »
Logged

johnner

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Thumbnail of the last uploaded image
« Reply #1 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.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Thumbnail of the last uploaded image
« Reply #2 on: January 04, 2006, 08:45:07 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.

Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Thumbnail of the last uploaded image
« Reply #3 on: January 04, 2006, 10:50:23 pm »

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
Logged

bajs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 90
Re: Thumbnail of the last uploaded image
« Reply #4 on: May 23, 2006, 08:26:07 pm »

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

bajs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 90
Re: Thumbnail of the last uploaded image
« Reply #5 on: May 24, 2006, 11:51:09 am »

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
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Thumbnail of the last uploaded image
« Reply #6 on: May 24, 2006, 03:53:20 pm »

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.
Logged

bajs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 90
Re: Thumbnail of the last uploaded image
« Reply #7 on: May 24, 2006, 11:36:27 pm »

i don have hotlinking disabled.

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

bajs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 90
Re: Thumbnail of the last uploaded image
« Reply #8 on: June 03, 2006, 01:01:23 pm »

oho?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Thumbnail of the last uploaded image
« Reply #9 on: June 03, 2006, 01:46:34 pm »

If that's not the problem, post a link to the page showing the red cross.
Logged

bajs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 90
Re: Thumbnail of the last uploaded image
« Reply #10 on: June 17, 2006, 01:34:11 pm »

Logged

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Thumbnail of the last uploaded image
« Reply #11 on: August 19, 2006, 07:01:35 am »

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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Thumbnail of the last uploaded image
« Reply #12 on: August 19, 2006, 12:49:59 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.
Logged

appelmoes2008

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 1
Re: Thumbnail of the last uploaded image
« Reply #13 on: November 20, 2006, 10:15:49 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Thumbnail of the last uploaded image
« Reply #14 on: November 21, 2006, 05:40:51 am »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.079 seconds with 21 queries.