22
Integrating Content from External Sources with RSS, PHP, and JavaScript Chris Gilligan University of Tennessee at Chattanooga

Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

Integrating Content from External Sources

with RSS, PHP, and JavaScript

Chris Gilligan University of Tennessee at Chattanooga

Page 2: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

Companion Blog Post •  Code Samples •  Explanations •  utc.edu/outc16

Page 3: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

Content from WordPress via RSS

•  WordPress RSS – Categories, Tags and Search strings –  Images, Media attachments

•  Media attachments and customized template require some additional tweaks

Page 4: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 5: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

PHP files and OU Assets

•  Parse feed and display HTML –  “heavy lifting” “dev side”

•  Variables set to defaults for testing – verify feed access and XML structure

•  Files for various types of display html •  Files for various sources of RSS

Page 6: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 7: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

PHP files and OU Assets •  Simple structure, “user friendly” •  Specify RSS source •  Limit number of posts to display

Page 8: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 9: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

More Speed •  cache RSS feeds via WordPress plugin,

e.g. W3 Total Cache – cron job to fetch feeds to local server

•  minimize external requests –  faster page load

Page 10: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 11: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

Event Calendar RSS feeds from Master Calendar via RSS

Somewhat limited in terms of data, unless you build landing page

Page 12: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 13: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 14: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 15: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 16: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

Content from WordPress via RSS

•  WordPress provides some RSS •  RSS from categories, tags and search

strings •  media attachments and a customized

template require some additonal tweaks

Page 17: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 18: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 19: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

Social Media Streams •  jQuery plugin and PHP to pull in social

media posts for the university account, as well as for individual departments and colleges.

•  $8 jQuery Social Stream (Code Canyon) –  “What you pay for vs. what you work for”

Page 20: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 21: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS
Page 22: Integrating Content from External Sources · 2016-02-29 · • Files for various sources of RSS . PHP files and OU Assets • Simple structure, “user friendly” • Specify RSS

Blog Post Links, Examples, Code Samples

utc.edu/outc16

Chris Gilligan University of Tennessee at Chattanooga