Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- added bookmarks to main menu - added '+' to search results; this can be used to add search results to bookmarks
orbiteraa01c78722a8
diff --git a/htroot/Bookmarks_p.java b/htroot/Bookmarks_p.javaindex efed2c9af..5fef108fb 100644--- a/htroot/Bookmarks_p.java+++ b/htroot/Bookmarks_p.java@@ -98,16 +98,25 @@ public class Bookmarks_p {}if(post.containsKey("edit")){String urlHash=(String) post.get("edit");- bookmarksDB.Bookmark bookmark = switchboard.bookmarksDB.getBookmark(urlHash);- prop.put("edit", 1); //edit mode- prop.put("title", bookmark.getTitle());- prop.put("description", bookmark.getDescription());- prop.put("url", bookmark.getUrl());- prop.put("tags", bookmark.getTags());- if(bookmark.getPublic()){- prop.put("public", 1);- }else{+ if (urlHash.length() == 0) {+ prop.put("edit", 0); // create mode+ prop.put("title", (String) post.get("title"));+ prop.put("description", (String) post.get("description"));+ prop.put("url", (String) post.get("url"));+ prop.put("tags", (String) post.get("tags"));prop.put("public", 0);+ } else {+ bookmarksDB.Bookmark bookmark = switchboard.bookmarksDB.getBookmark(urlHash);+ prop.put("edit", 1); // edit mode+ prop.put("title", bookmark.getTitle());+ prop.put("description", bookmark.getDescription());+ prop.put("url", bookmark.getUrl());+ prop.put("tags", bookmark.getTags());+ if (bookmark.getPublic()) {+ prop.put("public", 1);+ } else {+ prop.put("public", 0);+ }}}if(post.containsKey("delete")){diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.templateindex e439255e4..195f5ce24 100644--- a/htroot/env/templates/header.template+++ b/htroot/env/templates/header.template@@ -28,6 +28,7 @@<tr><td class="MenuHeader"> Global Index</td></tr><tr><td class="MenuItem"> <a href="/index.html" accesskey="s" class="MenuItemLink">Search Page</a></td></tr><tr><td class="MenuItem"> <a href="/DetailedSearch.html" class="MenuItemLink">Detailed Search</a></td></tr>+ <tr><td class="MenuItem"> <img border="0" src="/env/grafics/lock.gif" align="top"> <a href="/Bookmarks_p.html" class="MenuItemLink">Bookmarks</a></td></tr><tr><td class="MenuItem"> <a href="/Help.html" class="MenuItemLink">Help</a></td></tr><!--<tr><td class="MenuItem"> <a href="/Statistics.html" class="MenuItemLink">Statistics</a></td></tr>--><tr><td class="MenuSpacer"></td></tr>diff --git a/htroot/index.html b/htroot/index.htmlindex 0a517975e..d0007435e 100644--- a/htroot/index.html+++ b/htroot/index.html@@ -13,6 +13,8 @@ picEmpty = new Image(11, 11);picEmpty.src = "/env/grafics/empty.gif";picMinus = new Image(11, 11);picMinus.src = "/env/grafics/minus.gif";+picPlus = new Image(11, 11);+picPlus.src = "/env/grafics/plus.gif";</SCRIPT><br>@@ -150,11 +152,13 @@ from 'late' peers.#{results}#<!-- link begin --><p style="border-bottom:1px #000 dashed; padding-bottom: 1em;">+<a href="/Bookmarks_p.html?edit=&title=#[description]#&description=&url=#[url]#&tags=" onMouseover="document.plus_#[urlhexhash]#.src=picPlus.src" onMouseout="document.plus_#[urlhexhash]#.src=picEmpty.src">+<img src="/env/grafics/empty.gif" title="bookmark" alt="bookmark" name="plus_#[urlhexhash]#" border="0"></a> +<b><font color="#4070a0">#[description]#</font></b><br><a href="#[delete]#" onMouseover="document.minus_#[urlhexhash]#.src=picMinus.src" onMouseout="document.minus_#[urlhexhash]#.src=picEmpty.src">-<img src="/env/grafics/empty.gif" title="delete" alt="delete" name="minus_#[urlhexhash]#" border="0"></a> <b><font color="#4070a0">#[description]#</font></b><br>-#(snippet)#::<img src="/env/grafics/empty.gif"> <i>#[text]#</i><br>#(/snippet)#-<img src="/env/grafics/empty.gif"> <a href="#[url]#">#[urlname]#</a><br>-<img src="/env/grafics/empty.gif"><font color="#007050"> #[date]#</font> | <font color="#007050">YBR-#[ybr]#</font> | <a href="ViewFile.html?urlHash=#[urlhash]#&words=#[words]#">Info</a><br>+<img src="/env/grafics/empty.gif" title="delete" alt="delete" name="minus_#[urlhexhash]#" border="0"></a> +#(snippet)#::<i>#[text]#</i><br>#(/snippet)#<a href="#[url]#">#[urlname]#</a><br>+<img src="/env/grafics/empty.gif"> <font color="#007050"> #[date]#</font> | <font color="#007050">YBR-#[ybr]#</font> | <a href="ViewFile.html?urlHash=#[urlhash]#&words=#[words]#">Info</a><br></p><!-- link end -->#{/results}#