forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: M3 on October 03, 2004, 01:24:26 am

Title: Marking latest uploads as "New"
Post by: M3 on October 03, 2004, 01:24:26 am
I was wondering if anyone knows of a mod, hack or future plans to integrate the ability to flag the latest uploaded files as "new" for all visitors?

Short of adding "_" before the file name and uploading into their respective albums, I haven't figured out an easy way to point out the latest files to visitors. I'm constantly adding files in (sorted alphabetically by file name of course) so this would really come in handy.

I think I may just add a 2 or 4 pixel red border to the files, add the "_" and make an announcement on the front of the site about how to find new files. Then, before the next batch goes up, I'd have to delete those files from every gallery and upload the proper names sans border. Which seems a bit harder than it should be.

If anyone else has any advice, please let me know! And if this should be opened in the Feature Requests board, again, let me know!
Title: Re: Marking latest uploads as "New"
Post by: Nibbler on October 03, 2004, 01:31:01 am
You can have the lastest uploads on your main page by adding lastup into your contents of the main page string in config, or link to thumbnails.php?album=lastup from anywhere you like.
Title: Re: Marking latest uploads as "New"
Post by: M3 on October 03, 2004, 01:36:26 am
I did consider re-instating that but I'm talking volume uploads... anywhere from 3 to 300 pictures into existing albums across several categories.

I considered making a new album just to hold all the updates, not sorted at all. But that would also require deleting that album each week and creating it again.

I'm conflicted!
Title: Re: Marking latest uploads as "New"
Post by: Nibbler on October 03, 2004, 01:46:07 am
You could code it so you have 'new!' added automatically to the under pic caption for any pics uploaded in the last x hours I suppose.
Title: Re: Marking latest uploads as "New"
Post by: Nibbler on October 03, 2004, 01:58:26 am
If you want to try that, it's quite easy.

function.inc.php

find all
Code: [Select]
$rowset[$key]['caption_text'] = $caption;
replace with
Code: [Select]
$caption .= ($row['ctime'] > time() - 2*60*60) ? '<span class="thumb_caption">New!</span>' : '';
$rowset[$key]['caption_text'] = $caption;

where the '2' is the number of hours to display as new for.
Title: Re: Marking latest uploads as "New"
Post by: M3 on October 03, 2004, 08:25:31 pm
That works beautifully, it's exactly what I want, thank you so much!!!!
Title: Re: Marking latest uploads as "New"
Post by: pponting on October 04, 2004, 12:54:32 am
If you want to try that, it's quite easy.

function.inc.php

find all
Code: [Select]
$rowset[$key]['caption_text'] = $caption;
replace with
Code: [Select]
$caption .= ($row['ctime'] > time() - 2*60*60) ? '<span class="thumb_caption">New!</span>' : '';
$rowset[$key]['caption_text'] = $caption;

where the '2' is the number of hours to display as new for.

Is there any way of using this technique to add a default caption to the description of a new user gallery on creation?
Title: Re: Marking latest uploads as "New"
Post by: Philoup on July 20, 2005, 12:15:40 pm
Hello,

It's work very well. But... is it possible to make same thing for albums ?
Greats !