ZenphotoCMS Forum
Zenphoto functions outside of zenphoto folder - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: Zenphoto functions outside of zenphoto folder (/thread-4048.html)



Zenphoto functions outside of zenphoto folder - 3lie - 12-11-2008

How can i display recent photos on my homepage?
I was following this hacks from wiki:

`
define('ZENFOLDER', 'zp-core');
define('WEBPATH', 'zenphoto');
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");

$randomImage = getRandomImages();
$randomImageURL = getURL($randomImage);
echo "';
But i got a warning message:
Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/index.php:10) in /home/mysite/public_html/gallery/zp-core/functions.php on line 2025
`
What im doing wrong? I just want to show the most recent image from a specific album.
Any help please?

Peace




Zenphoto functions outside of zenphoto folder - 3lie - 08-02-2009

aight i fixed the warning message by getting the code from an external php file with @readfile

But, i could get any image at all.
What could be the problem?

Instead of showing a random image, is there an option to show the latest added image of any album?

Peace