Web: Add News to homepage
This commit is contained in:
parent
8142b5b46e
commit
fab5be4472
|
@ -64,6 +64,22 @@ Cppcheck as an external tool.</p>
|
||||||
<li>Check for uninitialized variables and unused functions</li>
|
<li>Check for uninitialized variables and unused functions</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2>News</h2>
|
||||||
|
<?php
|
||||||
|
require './site/simplepie/simplepie.inc';
|
||||||
|
|
||||||
|
$feed = new SimplePie();
|
||||||
|
$feed->set_feed_url('http://sourceforge.net/export/rss2_projnews.php?group_id=195752');
|
||||||
|
$feed->set_cache_location('./site/simplepie/cache');
|
||||||
|
$feed->init();
|
||||||
|
print("<ul class=\"rssfeeditems\">\n");
|
||||||
|
foreach ($feed->get_items(0, 3) as $item) { //for the last 3 news items...
|
||||||
|
print(" <li><a href=\"".$item->get_link()."\">".$item->get_title()."</a> <em>".$item->get_date('Y-m-d')."</em></li>\n");
|
||||||
|
}
|
||||||
|
print("</ul>\n");
|
||||||
|
?>
|
||||||
|
<p><a href="http://sourceforge.net/news/?group_id=195752">View all news…</a></p>
|
||||||
|
|
||||||
<h2>Support</h2>
|
<h2>Support</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Use <a href="http://sourceforge.net/apps/trac/cppcheck/">Trac</a> to report
|
<li>Use <a href="http://sourceforge.net/apps/trac/cppcheck/">Trac</a> to report
|
||||||
|
|
|
@ -66,6 +66,13 @@ a:active { color:#369; text-decoration:none; }
|
||||||
padding: .5em;
|
padding: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* RSS feed items */
|
||||||
|
.rssfeeditems em {
|
||||||
|
margin-left: .5em;
|
||||||
|
color: #888;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
/* Printing */
|
/* Printing */
|
||||||
@media print {
|
@media print {
|
||||||
#header { color: black; border-bottom: 1px solid black; }
|
#header { color: black; border-bottom: 1px solid black; }
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
Copyright (c) 2004-2007, Ryan Parman and Geoffrey Sneddon.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the SimplePie Team nor the names of its contributors may be used
|
||||||
|
to endorse or promote products derived from this software without specific prior
|
||||||
|
written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
|
||||||
|
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
|
||||||
|
AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,30 @@
|
||||||
|
SIMPLEPIE
|
||||||
|
http://simplepie.org
|
||||||
|
By Ryan Parman and Geoffrey Sneddon
|
||||||
|
|
||||||
|
BSD-LICENSED
|
||||||
|
http://www.opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
WHAT COMES IN THE PACKAGE?
|
||||||
|
1) simplepie.inc - The SimplePie library. This is all that's required for your pages.
|
||||||
|
2) README.txt - This document.
|
||||||
|
3) LICENSE.txt - A copy of the BSD license.
|
||||||
|
4) compatibility_test - The SimplePie compatibility test that checks your server for required settings.
|
||||||
|
5) demo - A basic feed reader demo that shows off some of SimplePie's more noticable features.
|
||||||
|
6) idn - A third-party library that SimplePie can optionally use to understand Internationalized Domain Names (IDNs).
|
||||||
|
7) test - SimplePie's unit test suite. This is only available in SVN builds.
|
||||||
|
|
||||||
|
TO START THE DEMO:
|
||||||
|
1) Upload this package to your webserver.
|
||||||
|
2) Make sure that the cache folder inside of the demo folder is server-writable.
|
||||||
|
3) Navigate your browser to the demo folder.
|
||||||
|
|
||||||
|
SUPPORT:
|
||||||
|
For further setup and install documentation, function references, etc., visit:
|
||||||
|
http://simplepie.org/wiki/
|
||||||
|
|
||||||
|
For bug reports, feature requests and other support, visit:
|
||||||
|
http://simplepie.org/support/
|
||||||
|
|
||||||
|
For more insight on SimplePie development, visit:
|
||||||
|
http://simplepie.org/development/
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue