15 October 2015

RSS Feeds - Change to IRT scripts

What's New Column - RSS Feeds


RSS feeds on the home page:
  • What's New Blog latest entry and the 
  • Spotlight on ... latest two entries
We have been using an external script from FeedRoll to bring these into the right column on the Library Home Page.  Although this has been working just fine, there is often a lag time before the items display.

Upon consulting Maria Youngman and Robert Ferguson from IRT, I learned that Maria had developed some scripts from earlier ones by Robert to do news feeds on the Copyright site.  Using these as a base, I was able to change and modify these to suit our needs.
  1. Two separate javascripts were needed.
    1. app.js
      1. Modifications:  ** After much experimentation...**
        1. comment out the for statement and closing bracket
        2. change the variable entry from [ i ] to [ 0 ]
        3. Note: This enabled the display of only the latest blog entry.
    2. appSpot.js 
      1. Modification:   ** After much more experimentation and help from EVC IRT folks.**
        1. change the for statement to delete the indeterminate variable increment
        2. insert a direct counter in the for statement  -- i < 2; i++
        3. Note: This enabled the display of the 2 latest blog entry.
  2. Links to the scripts had to be added to the bottom of the footer-LS.php includes file.
  3. Changes were needed for the whatsnewcol.txt includes file.
    1. Remove the feedroll scipts. Note: change related page in wiki.
    2. Replace with new javascripts.
    3. Organize and style to fit script output.  Do a little cleanup for that column.


No comments: