Newsfeed for the surftips

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3806 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 18 years ago
parent 4934c5f4d3
commit 7226816037

@ -4,6 +4,7 @@
<title>YaCy '#[clientname]#': Surftips</title>
<meta name="keywords" content="YaCy P2P peer-to-peer Surftips Social Bookmarking Link Voting" />
<meta name="description" content="Surftips provided by the YaCy peer-to-peer network using public bookmarks, link votes and crawl start points" />
<link rel="alternate" type="application/rss+xml" title="YaCy Surftips" href="Surftips.rss" />
#%env/templates/metas.template%#
<script type="text/javascript">
//<![CDATA[

@ -312,10 +312,12 @@ public class Surftips {
// add/subtract votes and write record
if (entry != null) {
urlhash = plasmaURL.urlHash(url);
if (urlhash == null) {
System.out.println("Surftips: bad url '" + url + "' from news record " + record.toString());
continue;
}
if (urlhash == null)
urlhash=plasmaURL.urlHash("http://"+url);
if(urlhash==null){
System.out.println("Surftips: bad url '" + url + "' from news record " + record.toString());
continue;
}
if ((vote = (Integer) negativeHashes.get(urlhash)) != null) {
score = Math.max(0, score - vote.intValue()); // do not go below zero
}

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<?xml-stylesheet type='text/xsl' href='/yacysearch.xsl' version='1.0'?>
<rss version="2.0"
xmlns:yacySurftips="http://www.yacy.net/yacy/surftips"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<channel>
#(surftips)#::
<title>YaCy Surftips</title>
<description>autogenerated Surftips</description>
<image>
<url>#[rssYacyImageURL]#</url>
<title>YaCy Surftips</title>
</image>
<opensearch:totalResults>#[results]#</opensearch:totalResults>
<opensearch:startIndex>1</opensearch:startIndex>
<opensearch:itemsPerPage>#[results]#</opensearch:itemsPerPage>
<opensearch:link rel="search" href="opensearchdescription.xml" type="application/opensearchdescription+xml"/>
<opensearch:Query role="request" searchTerms="" />
#{results}#
<item>
<title><![CDATA[#[title]#]]></title>
<link>#[url]#</link>
<description><![CDATA[#[description]#]]></description>
<guid>#[urlhash]#</guid>
</item>
#{/results}#
::
#(/surftips)#
</channel>
</rss>
Loading…
Cancel
Save