Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^5: Listing Best Replies First: destroys threads and annoys readers

by LanX (Saint)
on May 06, 2019 at 14:37 UTC ( [id://1233401]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Listing Best Replies First: destroys threads and annoys readers
in thread Listing Best Replies First: destroys threads and annoys readers

> I still haven’t broken in my commit bit

In case you are interested ... ;-P

The replies are generated in list replies

my $orderby= $VARS->{notesortorder} || $settings->{orderby} || "createtime";

The sort order is labeled in shownote

24: my $orderby= $VARS->{notesortorder} 25: || $settings->{orderby} 26: || "createtime"; 27: 28: my %orderby_labels = ( 29: 'createtime' => 'Oldest First', 30: 'createtime desc' => 'Newest First', 31: 'reputation desc' => 'Best First' 32: ); 33: 34: my $replies_info; 35: if ( $orderby_labels{$orderby} ) { 36: my $fmt_replies_info = htmlcode( 'formatRepliesInfo','', $NO +DE ); 37: if ( $fmt_replies_info =~ /^[^0]/ ) { # something other than + zero 38: $replies_info = qq(<span class="note-ordering">Replies a +re listed '$orderby_labels{$orderby}'.</span>); 39: } 40: } 41:

List replies is called later.

47: htmlcode('list replies')

So I think you can change line 38 to show a select box changing $VARS->{notesortorder} and performing a reload.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1233401]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-18 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found