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.
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.
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?
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");`
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.
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.
Comments
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 "
<img src='". $randomImage->getSizedImage(getOption('image_size')) . "'
alt=\"random image\"\n" . $randomImage->getTitle() . '" />';
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
`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
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
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
Here is the code to call out 3 recent images.
1. Place this code above the header
<?php define('ZENFOLDER', 'zp-core');
define('WEBPATH', 'zenphoto');
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");
require_once(WEBPATH . "/" . ZENFOLDER . "/plugins/image_album_statistics.php");
?>
2. Place this code in the body where you want images to appear
<?php
printLatestImages(3, '', false, false, false, 40, '', 200, 100, true, true);
?>
Help?