Marking latest uploads as "New" Marking latest uploads as "New"
 

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

Marking latest uploads as "New"

Started by M3, October 03, 2004, 01:24:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

M3

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!

Nibbler

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.

M3

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!

Nibbler

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.

Nibbler

If you want to try that, it's quite easy.

function.inc.php

find all
$rowset[$key]['caption_text'] = $caption;

replace with

$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.

M3

That works beautifully, it's exactly what I want, thank you so much!!!!

pponting

Quote from: Nibbler on October 03, 2004, 01:58:26 AM
If you want to try that, it's quite easy.

function.inc.php

find all
$rowset[$key]['caption_text'] = $caption;

replace with

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

Philoup

Hello,

It's work very well. But... is it possible to make same thing for albums ?
Greats !
"Y'a kek'chose qui cloche là-d'dans, J'y retourne immédiat'ment !" (Reggiani)