Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Mark recent galleries  (Read 2999 times)

0 Members and 1 Guest are viewing this topic.

RedSniper

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Mark recent galleries
« on: October 12, 2006, 01:16:15 pm »

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!
Logged

RedSniper

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Mark recent galleries
« Reply #1 on: October 25, 2006, 09:11:55 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Mark recent galleries
« Reply #2 on: October 25, 2006, 09:14:45 pm »

Use bbcode in the album description.
Logged

RedSniper

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Mark recent galleries
« Reply #3 on: October 26, 2006, 10:41:41 pm »

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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Mark recent galleries
« Reply #4 on: October 26, 2006, 11:11:47 pm »

Possible if you code it.
Logged

RedSniper

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Mark recent galleries
« Reply #5 on: October 28, 2006, 04:26:11 pm »

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

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

to

Code: [Select]
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']);
            }
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.