NewsInjector for developers
How does it work?
NewsInjector is a java application you install on a server into a servlet container, e.g. Apache Tomcat.
News announcements are delivered into your web application through generated JavaScript. You need to add following HTML snippet into your application's HTML page:
<div id="news">
<script type="text/javascript"
src="http://your.news.server/newsinjector/includeNews.js">
</script>
</div>
This JavaScript inserts following HTML block containing news announcements into your page:
<div id="news">
<div>
<div class="date">...</div>
<div class="title">...</div>
<div class="content">...</div>
</div>
...
<div>
<div class="date">...</div>
<div class="title">...</div>
<div class="content">...</div>
</div>
</div>
You may need to adjust application's CSS to layout and style news or use CSS provided by NewsInjector.
Simple configuration
You only need to configure a file system directory to store news. Every news entry is stored as a separate XML file in this directory.
XML file structure is human readable. You will have no problem converting this information to any other format if necessary.
RSS feed
NewsInjector generates RSS file which can be linked on any page of your application.
What's next?
Have a look at the demo NewsInjector installation:
You may try to integrate news into your web application directly from this demo by adding following HTML snippet to any page of your application:
<link rel="alternate" type="application/rss+xml" title="RSS"
href="http://demo.newsinjector.com/rss.xml" />
<style type="text/css">
@import "http://demo.newsinjector.com/newscss/plain.css";
</style>
<div id="news">
<script type="text/javascript"
src="http://demo.newsinjector.com/newsinjector/default.javascript">
</script>
</div>