Fandom

Sage Community Wiki

CreateHTML replaceFeedKeywords

78pages on
this wiki
Add New Page
Talk0 Share

The function saje.jar/CreateHTML:replaceFeedKeywords uses information from the rss feed, and the Feed Style Sheets to replace the keywords in template item with HTML.


The code is given as follows:

replaceFeedKeyword:    function (feed, s) {
        var footer;

        switch (s) {
            case "**TITLE**":
                return this.entityEncode(feed.getTitle());

            case "**LINK**":
                return feed.getLink();
                break;

            case "**AUTHOR**":
                if (feed.hasAuthor()) {
                    return "<div class=\"feed-author\">" + this.entityEncode(feed.getAuthor()) + "</div>";
                }
                return "";

            case "**DESCRIPTION**":
                if (feed.hasDescription()) {
                    return feed.getDescription();
                }
                return "";

/*
            case "**LOGOLINK**":
                return feed.getLogo().link;

            case "**LOGOALT**":
                return feed.getLogo().alt;

            case "**COPYRIGHT**":
                return feed.getFooter().copyright;

            case "**GENERATOR**":
                return feed.getFooter().generator;

            case "**EDITOR**":
                var editor = "";
                footer = feed.getFooter();
                if (footer.editor) {
                    editor = "<a href=\"mailto:" + footer.editor + "\">Editor</a>";
                    if (footer.webmaster) {
                        editor += ", ";
                    }
                }
                return editor;

            case "**WEBMASTER**":
                footer = feed.getFooter();
                if (footer.webmaster) {
                    return "<a href=\"mailto:" + footer.webmaster + "\">" +
                        strRes.GetStringFromName("feed_summary_webmaster") +
                        "</a>";
                }
                return "";
*/
            case "**ITEMS**":
                return this.getItemsHtml(feed);
        }

        return s;
    },

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.