TIP: Click on subject to list as thread! ANSI
echo: doorgames
to: All
from: RUBEN FIGUEROA
date: 2019-01-31 19:12:48
subject: RE: Nav

Date: Mon, 13 Sep 1999 16:41:40 -0400
From: RUBEN FIGUEROA
To: EARL BORAH
Subject: RE: Nav 
Newsgroups: win.navigator
Message-ID: 
X-Mailer: Wildcat! Interactive Net Server v7.0.454.5
Lines: 38

-> Here's the code I use in the custom htmlutil-msg I made for WMP:


->    // MY ADDITION - check for unread messages

->   if SearchMessageById(c, GetLastRead(c), msg) then
->     if msg.id > GetLastRead(c) then
->       // Last read was deleted, but there's a newer message
->       TemplateSetVariable("confnew", str(TRUE))
->     else  // Last read found, look for next
->       TemplateSetVariable("confnew", str(GetNextMessage(msg)))
->     end if
->   else  // Last read was deleted, can't find newer message
->     TemplateSetVariable("confnew", str(FALSE))
->   end if

->   // END ADDITION


Just a clarification.

The theory is that this code wouldn't slow down things too much more
than they are now. There are a maximum of 3 server calls (GetLastRead,
SearchMessageById, and GetNextMessage) in the code. The GetNextMessage
isn't called under all circumstances, so often there are only 2 server
calls.

From the way wcNav behaves I assume you're already doing two calls
(GetLastRead and GetHighMessageNumber), so it's really a maximum of one
extra call to the server. I'm not sure how much load SearchMessageById
and GetNextMessage generate compared to just GetHighMessageNumber, so
all things may not be equal, but it's still a pretty compact piece of
code.


I intentionally made this as compact as possible, with as few server
calls as possible. What do you think?   
--- Platinum Xpress/Win/WINServer v3.1
* Origin: Prison Board BBS Mesquite Tx //telnet.RDFIG.NET www. (1:124/5013)
SEEN-BY: 15/0 19/36 34/999 90/1 104/57 116/18 120/331 123/140 153/7715 218/700
SEEN-BY: 220/60 222/2 230/150 152 250/1 261/38 100 266/404 512 267/155 275/100
SEEN-BY: 282/1031 1056 291/1 320/119 219 340/400 342/13 396/45 633/267 280
SEEN-BY: 640/1384 712/132 620 848 770/1 801/161 189 2320/105 3634/12 5020/1042
@PATH: 124/5013 5014 396/45 261/38 712/848 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.