Member
Member
JeffCooper   2008-09-28, 11:56
#1

Hi

Please could someone help me with adding a 'photo of the day' to the home page. I would like this to appear above the gallery thumbs.

The image could be populated from a specific gallery (ie I could create a gallery called 'photo of the day' and just keep one photo in there) or it could automatically select the image last uploaded from a gallery. I don't mind which - whichever is easiest to implement.

I have modified the default/dark template. My site so far is www.hedshot.co.uk

Thanks

Member
Member
sbillard   2008-09-28, 16:43
#2

download the nightly build and take a look at the Effervescence+ theme. Look at the file indexpage.php. It places an image of the day picture on the home page. The image is randomly choosen, but you could select a image any way you wish.

Please note that this uses functions that are not available in the base 1.2 release.

Member
Member
flu   2008-09-28, 16:44
#3

Hi.
I'm not an expert but in order to do that, I'd try this way :

  1. I would tag every strip I want to show on the index page (with "photo of the day" for example).

  2. I would create a dynamic album using this tag.
    http://www.zenphoto.org/2008/09/how-to-use-the-dynamic-albums-feature/

  3. Then, I would use the printLatestAlbums functions of the image_album_statistics plugin to display this specific album on the home page.
    http://www.zenphoto.org/documentation/plugins/_plugins---image_album_statistics.php.html

Member
Member
flu   2008-09-28, 16:45
#4

Sorry, I haven't seen the post by sbillard. Trust him !!

Member
Member
JeffCooper   2008-09-28, 19:03
#5

Thanks sbillard and flu. I have checked out the Effervescence theme and have found the code referring to the photo of the day. I have copy/pasted it into my page but I am guessing it's not as easy as that!

I get this error message...

Fatal error: Call to undefined function makeimagecurrent() in
/home/jeffncou/public_html/hedshot.co.uk/themes/default/index.php on line 24

I am a newbie to zenphoto and php - would you be able to help me with a more detailed explanation. Thanks for your help

Member
Member
sbillard   2008-09-28, 20:28
#6

I think you missed the part which says that you need to install the nightly build. That function does not exist in the 1.2 release.

Member
Member
JeffCooper   2008-09-29, 15:23
#7

Hi sbillard. I have downloaded the nightly build but want to double check my next move. After I install the update do I need to use the effervescence theme for my site to get the photo of the day function? If possible I would like to stick to the default/dark theme but with the photo of the day feature. Is this possible?

Member
Member
sbillard   2008-09-29, 16:40
#8

You do not have to use the EF+ theme. That is just for an example. But of course, you will have to add the code to any other theme you wish to use.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.