-
deuce authored
Threaded view uses JavaScript and visibility to make dynamic collapsing threads. http://nix.synchro.net/blogs/DOVE-GEN/ for an example "blog" highlighting the thread linking issues on my system... For a good thread view, see: http://nix.synchro.net/blogs/DOVE-DEB/Angus%20McLeod/2007/01/10/6872/Quiet___
deuce authoredThreaded view uses JavaScript and visibility to make dynamic collapsing threads. http://nix.synchro.net/blogs/DOVE-GEN/ for an example "blog" highlighting the thread linking issues on my system... For a good thread view, see: http://nix.synchro.net/blogs/DOVE-DEB/Angus%20McLeod/2007/01/10/6872/Quiet___
index.xjs 1.78 KiB
<?xjs
load("sbbsdefs.js");
load(cwd+"/blog_config.js");
if(!isNaN(msgid)) {
xjs_load("blog_item.xjs");
exit(0);
}
?>
<html>
<head>
<title>The Blogifier!</title>
</head>
<body>
<p>
Welcome to the <?xjs write(msgbase.cfg.name); ?> Blogifier <?xjs if(poster != '') write("for "+poster); ?>
</p>
<?xjs
for(i=msgbase.last_msg; i>=msgbase.first_msg; i--) {
var hdr=msgbase.get_msg_header(i);
if(hdr==null)
continue;
if(hdr.attr & (MSG_PRIVATE|MSG_DELETE))
continue;
if(poster!=undefined && poster!='') {
if(hdr.from.toUpperCase() != poster.toUpperCase())
continue;
}
// if(hdr.from_ext != pnum)
// continue;
if(hdr.thread_back)
continue;
var date=new Date(hdr.date);
this_year=date.getFullYear();
this_month=date.getMonth()+1;
this_day=date.getDate();
if(!isNaN(year)) {
if(year != this_year)
continue;
if(!isNaN(month)) {
if(month != this_month)
continue;
if(!isNaN(day)) {
if(day != this_day)
continue;
}
}
}
var body=msgbase.get_msg_body(i, true);
j=min_chars;
while(j<body.length && body.substr(j, 1)!=" ")
j++;
if(j<body.length)
var read_more=true;
exerpt=body.substr(0,j);
exerpt=html_encode(exerpt,true,true,false,false);
// exerpt=exerpt.split(" ").join("</p><p>");
// exerpt=exerpt.split(" ").join(" ");
exerpt=exerpt.split(" ").join("<br>");
?>
<b><?xjs write(hdr.subject); ?></b> (<?xjs write(date); ?>) - <i><?xjs write(hdr.from) ?></i><br>
<p><?xjs write(exerpt); if(read_more) write("<b>...</b>"); ?></p>
<p><a href="<?xjs
write("http://"+http_request.host+http_request.virtual_path+msg_code+"/"+hdr.from+"/"+format("%04d",this_year)+"/"+format("%02d",this_month)+"/"+format("%02d",this_day)+"/"+i+"/"+clean_subject(hdr.subject));
?>">Comments...</a></p>
<?xjs
?>
<hr>
<?xjs
}
?>
</body>
</html>