From dcfbb9d8f7f900079d40fd06d6015fbc9b57f36a Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Sat, 19 Aug 2006 01:36:11 +0000
Subject: [PATCH] The maximum item description length (default: 500) can now be
 over-ridden with the "maxdesclength" value in the ctrl/rss.ini file.

---
 web/root/rss.ssjs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/web/root/rss.ssjs b/web/root/rss.ssjs
index a46601287d..ccb2aec221 100644
--- a/web/root/rss.ssjs
+++ b/web/root/rss.ssjs
@@ -2,7 +2,7 @@
 
 // $Id$
 
-// Tested successfully with SharpRead v0.9.5.1
+// Tested successfully with SharpReader v0.9.5.1
 
 load("sbbsdefs.js");
 
@@ -32,6 +32,9 @@ http://my.netscape.com/publish/formats/rss-spec-0.91.html#item */
 if(defaults.maxmessages==undefined)
 	defaults.maxmessages=15;
 
+if(defaults.maxdesclength==undefined)
+	defaults.maxdesclength=500;
+
 var channel;
 for(c in channel_list)
     if(channel_list[c].name == http_request.query["channel"]) {
@@ -132,6 +135,7 @@ if(channel.image_url==undefined)	channel.image_url		='/images/default/sync_pbgj1
 if(channel.image_title==undefined)	channel.image_title		=channel.title;
 if(channel.image_link==undefined)	channel.image_link		=channel.link;
 if(channel.maxmessages==undefined)	channel.maxmessages		=defaults.maxmessages;
+if(channel.maxdesclength==undefined)	channel.maxdesclength		=defaults.maxdesclength;
 
 http_reply.header["Content-Type"]='application/rss+xml';
 writeln('<?xml version="1.0" ?>');
@@ -181,7 +185,7 @@ if(msgbase.open()) {
 		writeln('\t\t\t\t<title>' + encode(hdr.subject) + '</title>');
 		writeln('\t\t\t\t<author>' + encode(hdr.from) + '</author>');
 		writeln('\t\t\t\t<guid>' + encode(hdr.id) + '</guid>');
-		writeln('\t\t\t\t<description>' + encode(body.slice(0,500)) + '</description>');
+		writeln('\t\t\t\t<description>' + encode(body.slice(0,channel.maxdesclength)) + '</description>');
 
         if(this.login==undefined)  // v3.12a 
             writeln('\t\t\t\t<link>' + link_root + '&amp;item=' + hdr.number + '</link>');
-- 
GitLab