LaF0rge <
laf0rge@c3bbs.retronetworking.org> wrote:
I managed to make it generate a working RSS feed using the following diff, containing two changes
Sorry, forgot the diff in the previous message
--- repo/web/root/rss.ssjs 2024-12-09 12:57:20.024584412 +0000
+++ webv4/root/rss.ssjs 2024-12-19 14:12:42.310672917 +0000
@@ -10,7 +10,7 @@
//log(LOG_INFO,"Synchronet RSS " + REVISION);
-var link_root = "
http://" + http_request.header.host + http_request.request_string;
+var link_root = "
https://" + http_request.header.host + http_request.request_string;
var ini_fname = file_cfgname(system.ctrl_dir, "rss.ini");
@@ -172,7 +172,7 @@
writeln('\t\t<lastBuildDate>' + last_msg.date + '</lastBuildDate>');
}
var total_msgs = msgbase.total_msgs;
- for(i=0;i<total_msgs;i++) {
+ for(i=1;i<=total_msgs;i++) {
var hdr = msgbase.get_msg_header(true,total_msgs-i);
if(!hdr || hdr.attr&MSG_DELETE)
continue;
@@ -190,8 +190,8 @@
if(this.login==undefined) // v3.12a
writeln('\t\t\t\t<link>' + link_root + (defaults.useentities ? '&' : '&') + 'item=' + hdr.number + '</link>');
else // v3.12b
- writeln('\t\t\t\t<link>' + '
http://' + http_request.header.host + '/msgs/msg.ssjs?msg_sub=' +
- channel.sub + (defaults.useentities ? '&' : '&') + 'message=' + hdr.number + '</link>');
+ writeln('\t\t\t\t<link>' + '
https://' + http_request.header.host + '/?page=001-forum.ssjs&sub=' +
+ channel.sub + (defaults.useentities ? '&' : '&') + 'thread=' + hdr.number + '</link>');
writeln('\t\t\t</item>');
msgs++;
if(msgs>=channel.maxmessages)
--
- Harald Welte <
laforge@gnumonks.org>
https://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6) ---
þ Synchronet þ My Brand-New BBS