I was thinking again... (everyone duck)

Why don't we move the msg's out of the chatterbox and into a msg's nodelet. This would let those of use who don't really use the chatterbox to know when we have new msg's, w/o having to use the overhead of the chatterbox. (i use #catbox/slashnet). I don't know what would be involved in implementing that...so i have another idea that might cut cpu cycles.

Why not make a user setting like NumMsgs, which lets use set the number of new msg's to display in the chatterbox 0, 5, 10. If it is 0, it jsut says you have X more messages waiting for you in your inbox.

Warning: I don't know perl
in Chatterbox (nodelet):
tranform 4: my $str = htmlcode('showmessages','10');
into 4: my $str = htmlcode('showmessages','$$VARS{NumMsgs}');
Or whatever you would do there,

then in the htmlcode for showmessages, which i only vaguely grok, i can't tell if just letting the 0 filter down through the system would dump it out to the bottom 5 lines faster than an actual if statement (or whatever you would do) after the SQL statement (& filters?) at line 29 which just sees if you have 0 messages displayed in $maxmsgs. (bear in mind again, this will probably turn into C-style code...)

29: my ($nummsgs) = $DB->sqlSelect('count(*)', 'message', $limits);
30: $nummsgs ||= 0;
31: return unless $nummsgs;
31a: if ($maxmsgs == 0) {
31b: $str.='<br />you have <strong><a href='.urlGen({node => 'message inbox', type=> 'superdoc'}).'>'.($nummsgs - $maxmsgs).'</a></strong> more messages';
31c: $str .= ' from ' .linkNode($filterUser) if $filterUser;
31d: } else {
59: }

That seems like it might save some cpu time if you never read your messages in the chatterbox anyways, and could be applied to the msg's nodelet. If you set the MaxMsgs to 0 in preferences, it just displayed that you have more messages, or maybe slaps it into your epicenter? You have 4C!'s, 2000 votes left, and 1928 msgs. with the msgs's being a link to the message inbox?

Comments? Questions?

Log in or register to write something here or to contact authors.