in reply to Make posts in Newest Nodes show longer?

I've provided a patch in Newest Nodes - (patch) to try setting the default to 3 days.
Rational

While it's easy for a regular user to find workarounds, it's not good from marketing point of view to show an empty list to newcomers.

Only showing 1 day of discussions might have been a good approach 20 years ago, where we had over 300 posts per day (I checked using RAT's "time machine")

Implementation

It took me an hour to decipher how the default is set, it's done in an obscure CGI.pm method called popup_menu of an old version of CGI.

It creates the

select-box, with values from 1..14.

The third optional argument defines the default and as a side effect the parameter $q->param('numdays') is accordingly set if missing. If no default is given, the first option=1 is chosen.

I introduced a lexical variable my $default_numdays = 3; to make it self-documenting for future maintainers.

I wouldn't mind setting it even higher, since we have the [Checked all of this] option.

The code to produce NN has a hard max limit of 60 days, AFAICS.

Let's wait if the gods hear our prayers ... ehm ... patches ;-)

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: Make posts in Newest Nodes show longer? (more options)
by LanX (Saint) on Feb 26, 2026 at 15:46 UTC
    > select-box, with values from 1..14.

    > I wouldn't mind setting it even higher, since we have the [Checked all of this] option.

    > The code to produce NN has a hard max limit of 60 days, AFAICS.°

    We could extend the options by some weeks, like

    12:   my @array = ( 1..14, 21, 28, 35, 42, 49, 56 );

    or to keep it concise

    12:   my @array = ( 1..7, 14, 21, 28, 35, 42, 49, 56 );

    the default could be adjusted according to our traffic. :-)

    update

    °) see nodesWithinDays line 2: my $maxdays= 60;

    setting $maxdays = 70 i.e. 10 weeks might help rounding up the math. (NB only thread-roots are listed if there are too many single notes.)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery