Mark recent galleries Mark recent galleries
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Mark recent galleries

Started by RedSniper, October 12, 2006, 01:16:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RedSniper

Hello,

I'd like to put an image or text along the gallery name if a certain gallery is new or updated in the last month or so.
Has anyone done this before? I did a forum search, but the search terms I tried didn't really deliver anything on this subject.
Any help would be greatly appreciated!

Thanks!

RedSniper

Please, is there anyone that can help me with this? I'm puzzled on how to tackle this :(

Joachim Müller


RedSniper

Thank you for your reply, but this is a manual action that I have to do when I add new galleries?
I'd like to automate it. Check the album's last update date/time and if it is within for example 1 month of the current date/time,
then put *New* behind the album title or something like that.

Is this possible at all?

Joachim Müller


RedSniper

Ok I finally managed this myself. Thanks for the tips with the bbcode and stuff.
I know this change is not ideal (change to index.php, so might cause problems when upgrading), but it works fine for me now.

I changed

$alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']);


to


if (time()-$alb_stat['last_upload'] < 2592000) //if the album is created or updated in the last month, put a "NEW icon" in the description
            {
            $alb_list[$alb_idx]['album_desc'] = bb_decode('[IMG]http://front242.digitality.be/gallery/themes/f242/images/new.gif[/IMG]'.$alb_thumb['description']);
            }
            else
            {
            $alb_list[$alb_idx]['album_desc'] = bb_decode('[IMG]http://front242.digitality.be/gallery/themes/f242/images/blank.gif[/IMG]'.$alb_thumb['description']);
            }