🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #245351

Re: [slrn]Sort by number of articles in thread?

#245351
From: You
Date: Fri, 22 Apr 2011 21:12
30 lines
2141 bytes
On Wed, 9 Mar 2011 20:52:45 -0800, Rockinghorse Winner <rwinner@remove_this.hmamail.com> wrote:
> Is there a way to sort the most active threads (no. of articles) at the top
> of the list? Thanks!

Doesn't sort, but adds a score equal to the number of articles in the thread so
busier threads sort higher when sorting by score.

Below coded released to the public domain.

joe

cat ~/.slrn/thr_sz_sc.sl
variable my_numart;
define score_group_by_replies ()
{
        do
        {
                my_numart = 0;
                %retrieve the number articles in the thread
                my_numart = thread_size;
                %set the new score to the old scrore plus the threadcount
                set_header_score ( get_header_score + my_numart - 1 );
        }
        %resort the output
        while (header_down (1));
        sort_by_sorting_method (5);
        call ("header_bob");
}

() = register_hook ("article_mode_startup_hook", "score_group_by_replies");
Technical Details
Message-ID: <slrnir3rpj.5gv.usenet@plaguesplace.dyndns.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news2.glorb.com!news.astraweb.com!border5.newsrouter.astraweb.com!not-for-mail
References: <slrningm8v.p3j.rwinner@8600.edu>

Show Full Headers
Complete Article Headers
Message-ID: <slrnir3rpj.5gv.usenet@plaguesplace.dyndns.org>
Subject: Re: [slrn]Sort by number of articles in thread?
Date: Fri, 22 Apr 2011 21:12:19 +0000
From: You <usenet@plaguesplace.dyndns.org>
References: <slrningm8v.p3j.rwinner@8600.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news2.glorb.com!news.astraweb.com!border5.newsrouter.astraweb.com!not-for-mail
Newsgroups: news.software.readers
Reply-To: usenet@plaguesplace.dyndns.org
X-newsgroup: news.software.readers
X-realname: Rockinghorse Winner
User-Agent: slrn/pre1.0.0-26 (Linux)
Lines: 30
Organization: Unlimited download news at news.astraweb.com
NNTP-Posting-Host: 78ed43ca.news.astraweb.com
X-Trace: DXC=4C09Tdoh>gkMm1IZKF?@MbL?0kYOcDh@je;
 ]PZi?9DFiHb`mi<@oZXoYQf14IcFVEaKfDCkmi9O]n3ndNEIPQS\ben\B0>\RghgcJJCA?7>4ff
X-Original-Bytes: 1869