• RSS - Theme Your RSS List

    From Mindless Automaton@VERT/ELDRITCH to DOVE-Net.Programming_(Jav on Thu Jul 6 08:45:00 2006
    The RSS list page is pretty bland, so we can make a few changes so it
    will fit our default theme at least.

    In rss.ssjs, change these lines:

    ---start code---

    if(channel==undefined) {
    writeln('<html>');
    writeln('<body>');
    writeln('<h1>' + system.name + " News (RSS) Channels" + '</h1>');
    writeln('<ul>');
    for(c in channel_list)
    writeln('<li>'
    + channel_list[c].name.link(link_root + "?channel=" + channel_list[c].name));
    writeln('</ul>');
    writeln('</body>');
    writeln('</html>');
    exit();
    }

    ---end code---

    to:

    ---start code---

    if(channel==undefined) {
    if(do_header)
    write_template("header.inc");
    if(do_topnav)
    load(topnav_html);
    if(do_leftnav)
    load(leftnav_html);

    writeln('<td class="main" valign="top"><br /><br />');

    writeln('<h1>' + system.name + " News (RSS) Channels" + '</h1>');
    writeln('<ul>');
    for(c in channel_list)
    writeln('<li>'
    + channel_list[c].name.link(link_root + "?channel=" + channel_list[c].name));
    writeln('</ul>');

    if(do_rightnav)
    write_template("rightnav.inc");
    if(do_footer)
    write_template("footer.inc");

    exit();
    }

    ---end code---

    -Mindless Automaton
    ---
    þ Synchronet þ Eldritch Clockwork BBS
  • From Finnigann@VERT/BNB to Mindless Automaton on Thu Jul 6 14:27:00 2006
    With interpidation and the MAGIC of QWK Mail Mindless Automaton wrote to
    DOVE-Net.Programming_(Jav <=-

    The RSS list page is pretty bland, so we can make a few changes so it
    will fit our default theme at least.

    In rss.ssjs, change these lines:

    ---start code---

    if(channel==undefined) {
    writeln('<html>');
    writeln('<body>');
    writeln('<h1>' + system.name + " News (RSS) Channels" +
    '</h1>');
    writeln('<ul>');
    for(c in channel_list)
    writeln('<li>'
    + channel_list[c].name.link(link_root +
    "?channel=" + channel_list[c].name));
    writeln('</ul>');
    writeln('</body>');
    writeln('</html>');
    exit();
    }

    ---end code---

    to:

    ---start code---

    if(channel==undefined) {
    if(do_header)

    I get an error after this line:

    !JavaScript c:\sbbs\web\html\rss.ssjs line 42: ReferenceError:
    do_header is not defined




    write_template("header.inc");
    if(do_topnav)
    load(topnav_html);
    if(do_leftnav)
    load(leftnav_html);

    writeln('<td class="main" valign="top"><br /><br />');

    writeln('<h1>' + system.name + " News (RSS) Channels" +
    '</h1>');
    writeln('<ul>');
    for(c in channel_list)
    writeln('<li>'
    + channel_list[c].name.link(link_root +
    "?channel=" + channel_list[c].name));
    writeln('</ul>');

    if(do_rightnav)
    write_template("rightnav.inc");
    if(do_footer)
    write_template("footer.inc");

    exit();
    }

    ---end code---

    -Mindless Automaton
    ---
    þ Synchronet þ Eldritch Clockwork BBS



    ----------------------------------------------------------------
    James King KC8UGV | Sysop - Bits-N-Bytes BBS
    Coldwater, MI 49036 | http://www.synchro.net/sbbslist.html
    ----------------------------------------------------------------
    RSS http://tinyurl.com/zswzs
    ----------------------------------------------------------------
    ... Add DEVICE=FNGRCROS.SYS to CONFIG.SYS
    --- MultiMail/Win32 v0.46
    þ Synchronet þ Bits-N-Bytes - bnb.dtdns.net / bnb.synchro.net
  • From Mindless Automaton@VERT/ELDRITCH to DOVE-Net.Programming_(Jav on Thu Jul 6 17:11:00 2006
    As Finnigan pointed out, I forgot a vital piece. :o

    In rss.ssjs, add:

    load("../web/lib/template.ssjs");

    as shown:

    // Tested successfully with SharpRead v0.9.5.1

    load("sbbsdefs.js");
    load("../web/lib/template.ssjs");

    then change these lines:

    ---start code---

    if(channel==undefined) {
    writeln('<html>');
    writeln('<body>');
    writeln('<h1>' + system.name + " News (RSS) Channels" + '</h1>');
    writeln('<ul>');
    for(c in channel_list)
    writeln('<li>'
    + channel_list[c].name.link(link_root + "?channel=" + channel_list[c].name));
    writeln('</ul>');
    writeln('</body>');
    writeln('</html>');
    exit();
    }

    ---end code---

    to:

    ---start code---

    if(channel==undefined) {
    if(do_header)
    write_template("header.inc");
    if(do_topnav)
    load(topnav_html);
    if(do_leftnav)
    load(leftnav_html);

    writeln('<td class="main" valign="top"><br /><br />');

    writeln('<h1>' + system.name + " News (RSS) Channels" + '</h1>');
    writeln('<ul>');
    for(c in channel_list)
    writeln('<li>'
    + channel_list[c].name.link(link_root + "?channel=" + channel_list[c].name));
    writeln('</ul>');

    if(do_rightnav)
    write_template("rightnav.inc");
    if(do_footer)
    write_template("footer.inc");

    exit();
    }

    ---end code---

    -Mindless Automaton
    ---
    þ Synchronet þ Eldritch Clockwork BBS