The News Headline Service enables enables the Pluralism Project to share the rich resources of Religious Diversity News (RDN) with a wider audience. On the front page of our web site, we feature four current news headlines related to religious diversity, drawn from a range of news outlets and portals, as well as from ethnic media and religious advocacy groups. These headlines are updated twice a week, and include active links to news articles as well as to the larger RDN interface. We invite you to incorporate RDN headlines into your own web site or blog.
An example of RDN headlines in use may be found on the home page of the Duchess County Interfaith Council.
If space is a concern, you could offer a one line link to: Religious Diversity News (http://www.pluralism.org/news) and/or International RDN (http://www.pluralism.org/news/intl).
You will find below the specifications for your webmaster to use to set up this feature. Please contact the Pluralism Project Webmaster (webmaster@pluralism.org) for more details, or if you have any questions about implementing our Religious Diversity News Headline Service on your website.
|
Religious Diversity News Headlines Read more at the Pluralism Project's Religious Diversity News |
To put the Pluralism Project's Religious Diversity News Headlines on your website, put the following snippet of code into your HTML:
<script language="javascript" type="text/javascript" src="http://www.pluralism.org/news/headlines/newscontent.php"></script>
This line of code will generate the four headlines seen above; we ask that it be preceded by the text "Religious Diversity News Headlines from the Pluralism Project" and followed by a link to the Pluralism Project's Religious Diversity News (Use: http://www.pluralism.org/news?source=newsbox).
These news headlines can be placed anywhere on your page; they can go in a table (as above) or a <div> if desired. The links to the four stories will each open in a new window.
Formatting Options for Webmasters
The JavaScript loaded in by the line of code above produces four paragraphs, wrapped in <p></p> tags, of the following form:
<p class="ppnews" id="ppnews#">
<a href="http://www.pluralism.org/news/headlines/newslink.php?story=#" class="ppnewslink" id="ppnewslink#" target="ppnewslink#">
<span class="ppnewstitle" id="ppnewstitle#">HYPERLINKED HEADLINE</span></a><br />
<span class="ppnewssource" id="ppnewssource#">SOURCE</span>
</p>
with each # sign replaced by the number (1, 2, 3, 4) of that story:
<p class="ppnews" id="ppnews1"> and so on.
These paragraphs will inherit any CSS formatting applied to containing elements; the line of code above can be wrapped in <span> or <div> tags to apply formatting to the output paragraphs; or the classes (ppnews, ppnewslink, ppnewstitle, etc.) or ids (ppnews1, ppnewslink2, ppnewstitle3, etc.) can be given explicit style declarations in your stylesheet.
The classes and ids can also be used to attach event handlers to the elements in the output paragraphs with JavaScript or CSS (as with the rollover on the links above). However, given the many ways of scripting events, you may wish to consult with our Webmaster (webmaster@pluralism.org) to find the solution that integrates best into the DHTML on your site -- or see Advanced Formatting Options for Webmasters below.
Advanced Formatting Options for Webmasters
If the model above does not offer enough flexibility -- whether you want just to show the headlines, or put both the headine and source on the same line, enclose the source in parentheses, include also the date of the article, etc.; or if the output code doesn't integrate into your page layout or your dynamic HTML -- you can use your own HTML/scripting and load in only the desired text (headline, source, date) for each story.
To do this, use the stable URL for each story in your hyperlink:
http://www.pluralism.org/news/headlines/newslink.php?story=1 (story=2, 3, 4)
and drop in <script> tags like the following for each piece of text you want to display:
For the Headline:
<my HTML and scripting>
<script language="javascript" type="text/javascript" src="http://www.pluralism.org/news/headlines/newstitle.php?story=1"></script>
</my HTML and scripting>
For the Source:
<my HTML and scripting>
<script language="javascript" type="text/javascript" src="http://www.pluralism.org/news/headlines/newssource.php?story=1"></script>
</my HTML and scripting>
For the Date:
<my HTML and scripting>
<script language="javascript" type="text/javascript" src="http://www.pluralism.org/news/headlines/newsdate.php?story=1"></script>
</my HTML and scripting>
The default date format is, e.g., January 14, 2004; but you can also specify any date formatting you like. Add format to the query string of newsdate.php, with its value a string that codes the date using PHP's date format protocol. See the line below and the full coding after it:
<a href="http://www.pluralism.org/news/headlines/newslink.php?story=3"><script language="javascript" type="text/javascript" src="http://www.pluralism.org/news/headlines/newstitle.php?story=3"></script></a> (<i><script language="javascript" type="text/javascript" src="http://www.pluralism.org/news/headlines/newssource.php?story=3"></script></i>, <script language="javascript" type="text/javascript" src="http://www.pluralism.org/news/headlines/newsdate.php?story=3&format=M.+j"></script>)
Note that this method may involve loading in as many as 12 pieces of JavaScript code from the Pluralism Project server. If this slows down your page loading too much, it may also be possible to create a custom script that loads in the news content along with your coding with a single <script> tag. Please feel free to contact the Pluralism Project Webmaster (webmaster@pluralism.org) for more details, or if you have any questions about implementing our Religious Diversity News Headlines on your website.