http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin and please do a forum search about that, there are quite some threads about this.
I appreciate your help acrylian.
I actually did do search and looked through every thread to page 20, and I did manage to find threads similar to mine, but with no replies.
I would like you to know that I'm a newbie in the PHP department. And I need some more help with the script.
So I put the first code above the header line
define('ZENFOLDER', 'zp-core');
define('WEBPATH', 'zenphoto');
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");
And I put this code in the body where I want image to appear. The script worked but then I noticed that this script only shows one random image in full size.
$randomImage = getRandomImages();
$randomImageURL = getURL($randomImage);
echo "
';
I want the script to show 5 latest thumbs in horizontal position on the page. Right now the script shows one random image in full size. So I don't know to what extent I can modify it, and if I can modify it, what should I be doing?
Thanks
Ben
Ok, since "printlatestimages" is a plugin function you need also to include the plugin after the template-functions:
require_once(WEBPATH . "/" . ZENFOLDER . "/plugins/image_album_statistics.php");
The available functions of that plugin are documentated here: http://www.zenphoto.org/documentation/plugins/_plugins---image_album_statistics.php.html
Ok, I included the statistics plugin. And the code that I need to use from the statistics file is [line 509]
void printLatestImages( [string $number = 5], [string $albumfolder = ''], [bool $showtitle = false], [bool $showdate = false], [bool $showdesc = false], [integer $desclength = 40], [string $showstatistic = ''], [integer $width = 85], [integer $height = 85], [bool $crop = true], [bool $collection = false] )
Now the challenge is, how do I write the php code to call out this function from the statistics file and spit it in the main page where I want thumbs to appear?
For the template function, there is that code, which I have pasted in the above reply but I dont see the code for statistics file.
Thanks
Ben
Please really take a look at our functions guide: http://www.zenphoto.org/2008/04/how-to-read-the-zenphoto-functions-guide/
Hello Acrylian
I think you assume I can code PHP. I cannot. I can edit a few little php elements here and there, but I'm not a php coder. I read the fuction guide, and I have very little clue what I'm supposed to do.
Let me know if you can help me resolve this, I know you are busy.
I appreciate your help thusfar.
Thanks
Ben
I'm getting a fatal error. It doesn't recognize the printlatestimages hook.
Help?