forum.coppermine-gallery.net
No Support => Modifications/Add-Ons/Hacks => Mods: content syndication (cpmFetch) => Topic started by: kousik 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:
<?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, -1, 1);
$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
-
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.
-
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.
-
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
-
I tried and I ended up with a red cross ???
-
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
-
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.
-
i don have hotlinking disabled.
http://elijah.netg.se/header.php
under "projects" sidebar, left side, middle/top
-
oho?
-
If that's not the problem, post a link to the page showing the red cross.
-
I did post a link.
-
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?
-
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.
-
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
-
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 (http://forum.coppermine-gallery.net/index.php?board=87.0). Post your question there. Locking this thread.