Member
Member
dustinblack   2009-02-12, 17:42
#1

Are there existing functions that would allow me to add a graphic indicator for albums that are newly-added or recently-updated?

Administrator
Administrator
acrylian   2009-02-12, 18:14
#2

There are only functions availabe to show them separate with the image_album_statistics plugin but none to indicate them within the normal albums loop. Maybe that will do the trick?

Depending on your knowledge you could write something yourself by checking the id or the date for newly added ones. You may be able to adapt parts of the code for the latestupdated albums around 159-174 of that plugin to write a custom function to indicate them.

Member
Member
dustinblack   2009-02-12, 23:40
#3

This actually turned out to be pretty straight forward, though I am no programmer and I am POSITIVE that there is a better way to do this.

That being said, I simply did some math against the current date and the return from the getAlbumDate() function, using the Unix epoch format to make it simple. I chose to display a "NEW!" tag for any album updated in the last week, which comes to 604800 seconds. So, I inserted the php below into the album.php file.

Member
Member
wumpus   2009-02-16, 18:55
#4

Thanks, I was just starting to search for this solution when I spotted it. I think showing a "New!" button or text communicates much better to users than a long date string.

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