Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) Blog RSS: Image added *) RSS Feed for YaCy Bookmarks added
theliceed0364e20f
diff --git a/htroot/Blog.rss b/htroot/Blog.rssindex a1e07a9ab..d5444747a 100644--- a/htroot/Blog.rss+++ b/htroot/Blog.rss@@ -1,11 +1,17 @@<?xml version="1.0"?><rss version="2.0"><channel>- <title>YaCy-Blog of Peer #[peername]#</title>+ <title><![CDATA[YaCy '#[clientname]#': Bookmarks]]></title><link>http://#[address]#/Blog.html</link>+ <image>+ <url>http://#[address]#/env/grafics/yacy.png</url>+ <title>YaCy</title>+ <link>http://#[address]#/</link>+ </image>+#(mode)# #{entries}#<item>- <author>#[author]#</author>- <title>#[subject]#</title>+ <author><![CDATA[#[author]#]]></author>+ <title><![CDATA[#[subject]#]]></title><link>http://#[address]#/Blog.html?page=#[pageid]#</link><pubDate>#[date]#</pubDate><guid>#[pageid]#</guid>diff --git a/htroot/Bookmarks.html b/htroot/Bookmarks.htmlindex b23ca42b6..fd4f9ed41 100644--- a/htroot/Bookmarks.html+++ b/htroot/Bookmarks.html@@ -5,6 +5,7 @@#%env/templates/metas.template%#<script src="/js/ajax.js" type="text/javascript"></script><script src="/js/Bookmarks.js" type="text/javascript"></script>+ <link rel="alternate" type="application/rss+xml" title="RSS" href="Bookmarks.rss" /></head><body id="Bookmarks">#%env/templates/header.template%#diff --git a/htroot/Bookmarks.java b/htroot/Bookmarks.javaindex 03f0263e5..5fb3df837 100644--- a/htroot/Bookmarks.java+++ b/htroot/Bookmarks.java@@ -47,6 +47,7 @@import java.io.File;import java.net.MalformedURLException;+import java.util.Date;import java.util.HashMap;import java.util.HashSet;import java.util.Iterator;@@ -75,14 +76,17 @@ public class Bookmarks {userDB.Entry user=switchboard.userDB.getUser(header);boolean isAdmin=(switchboard.verifyAuthentication(header, true) || user!= null && user.hasBookmarkRight());String username="";- if(user != null)- username=user.getUserName();- else if(isAdmin)- username="admin";+ if(user != null) username=user.getUserName();+ else if(isAdmin) username="admin";//redirect to userpageif(username!="" &&(post == null || !post.containsKey("user") && !post.containsKey("mode")))prop.put("LOCATION", "/Bookmarks.html?user="+username);+ prop.put("user",username);++ // set peer address+ final String address = yacyCore.seedDB.mySeed.getAddress();+ prop.put("address", address);//defaultvaluesprop.put("mode", 0);@@ -252,6 +256,7 @@ public class Bookmarks {prop.put("bookmarks_"+count+"_link", de.anomic.data.wikiCode.replaceXMLEntities(bookmark.getUrl()));prop.put("bookmarks_"+count+"_title", bookmark.getTitle());prop.put("bookmarks_"+count+"_description", bookmark.getDescription());+ prop.put("bookmarks_"+count+"_date", bookmarksDB.dateToiso8601(new Date(bookmark.getTimeStamp())));prop.put("bookmarks_"+count+"_public", (bookmark.getPublic()? 1:0));//List Tags.diff --git a/htroot/Bookmarks.rss b/htroot/Bookmarks.rssnew file mode 100644index 000000000..5e8311f1c--- /dev/null+++ b/htroot/Bookmarks.rss@@ -0,0 +1,16 @@+<?xml version="1.0"?>+<rss version="2.0">+ <channel>+ <title>YaCy-Blog of Peer #[clientname]#</title>+ <link>http://#[address]#/Bookmarks.html</link>+ <description><![CDATA[#[user]#'s Bookmark-Feed]]></description>+ </channel>+ #{bookmarks}#<item>+ <title><![CDATA[#[title]#]]></title>+ <link>#[link]#</link>+ <pubDate>#[date]#</pubDate>+ <guid>#[hash]#</guid>+ <description><![CDATA[<p>#[description]#</p><p>Tagged with | #{tags}#<a href="Bookmarks.html?tag=#[tag]#" class="bookmarkTags">#[tag]#</a> | #{/tags}#</p>]]></description>+ #{tags}#<category><![CDATA[#[tag]#]]></category>#{/tags}#+ </item>#{/bookmarks}#+</rss>\ No newline at end of file