Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

voting of surftipps can now be done with comments

orbiter6a73d858dee1
diff --git a/htroot/Surftips.html b/htroot/Surftips.html
index 1eee6730d..82198693c 100644
--- a/htroot/Surftips.html
+++ b/htroot/Surftips.html
@@ -5,6 +5,12 @@
<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">
#%env/templates/metas.template%#
+ <script type="text/javascript">
+ function pcomment(link) {
+ var c = window.prompt("Please enter a comment to your link recommendation. (Your Vote is also considered without a comment.)", "");
+ return link + "&comment=" + c;
+ }
+ </script>
</head>
<body>
#(display)#
@@ -28,7 +34,7 @@
<img src="/env/grafics/empty.gif" title="" alt="" class="recommendIcon" />
<img src="/env/grafics/empty.gif" title="" alt="" class="deleteIcon" />
::
- <a href="#[positiveVoteLink]#" title="positive vote" class="recommendlink"><img src="/env/grafics/empty.gif" title="positive vote" alt="Give positive vote" class="recommendIcon" /></a>
+ <a href="#[positiveVoteLink]#" title="positive vote" class="recommendlink" onClick="this.href=pcomment('#[positiveVoteLink]#')"><img src="/env/grafics/empty.gif" title="positive vote" alt="Give positive vote" class="recommendIcon" /></a>
<a href="#[negativeVoteLink]#" title="negative vote" class="deletelink" ><img src="/env/grafics/empty.gif" title="negative vote" alt="Give negative vote" class="deleteIcon" /></a>
#(/recommend)#
</div>
diff --git a/htroot/Surftips.java b/htroot/Surftips.java
index dfc8a2fd5..5da6be93d 100644
--- a/htroot/Surftips.java
+++ b/htroot/Surftips.java
@@ -95,6 +95,7 @@ public class Surftips {
map.put("description", crypt.simpleDecode(post.get("description", ""), null));
map.put("vote", "positive");
map.put("refid", post.get("refid", ""));
+ map.put("comment", post.get("comment", ""));
yacyCore.newsPool.publishMyNews(new yacyNewsRecord("stippavt", map));
}