Skip to content

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

Some bugfixes, new layout/style for image search results: * removed divide by zero bug when 20_dhtdistribution_busysleep is 0 * replaced German comment with wrong charset in source/de/anomic/plasma/plasmaCrawlBalancer.java by an English one * replaced the table-fix for floating behind snipped images by a br with clear * removed unnecessary old xhtml-files (were not in use, they were created when we weren't having xhtml for testing) * new layout for image-search results: replaced the old one with spans and tables inside (not valid) with new divs, now each image snippet container has the same size TODO: * the ids of the snippetLoading-divs aren't valid because ids must start with an alphabetic letter or an underscore, they have to be prefixed * in the returned snippet-xml is an unresolved pattern for status (the status is only set for text snippets)

michitux4990909178b1
diff --git a/htroot/env/base.css b/htroot/env/base.css
index 60557d662..561ee346c 100644
--- a/htroot/env/base.css
+++ b/htroot/env/base.css
@@ -194,14 +194,27 @@ tt, *.tt {
.diff .added { font-family: monospace; }
.diff .deleted { font-family: monospace; text-decoration: line-through; }
-.imgtable {
- margin: 1px;
- padding: 1px;
+.thumbcontainer {
+ margin: 2px;
width: 100px;
- border: 0px solid #aaaaaa;
+ height: 160px; /* 96px thumbnail + some lines of text */
float: left;
}
+.thumblink {
+ display:block;
+ width: 96px;
+ height: 96px;
+ margin: 2px;
+ line-height: 96px;
+ text-align: center;
+ overflow: hidden;
+}
+
+.thumblink img {
+ vertical-align: bottom;
+}
+
.hides .hoverShow {
display: none;
}
diff --git a/htroot/env/templates/xhtml-footer.template b/htroot/env/templates/xhtml-footer.template
deleted file mode 100644
index 0c2eddc2b..000000000
--- a/htroot/env/templates/xhtml-footer.template
+++ /dev/null
@@ -1 +0,0 @@
-</div>
diff --git a/htroot/env/templates/xhtml-header.template b/htroot/env/templates/xhtml-header.template
deleted file mode 100644
index 09bd18fa3..000000000
--- a/htroot/env/templates/xhtml-header.template
+++ /dev/null
@@ -1,68 +0,0 @@
-<div class="head">
- <h1 class="head">YaCy - Distributed Web Indexing - Administration</h1>
-</div>
-<div class="menu">
- <div class="menugroup">
- <h3>Global Index</h3>
- <ul class="menu">
- <li><a href="/index.html" accesskey="s" class="MenuItemLink">Search Page</a></li>
- <li><a href="/DetailedSearch.html" class="MenuItemLink">Detailed Search</a></li>
- <li><a href="/Bookmarks.html" class="MenuItemLink">Bookmarks</a></li>
- <li><a href="/Help.html" class="MenuItemLink">Help</a></li>
- </ul>
- </div>
- <div class="menugroup">
- <h3>Distributed Crawler</h3>
- <ul class="menu">
- <li><a href="/IndexCreate_p.html" class="MenuItemLink lock">Index Create</a></li>
- <li><a href="/IndexControl_p.html" class="MenuItemLink lock">Index Control</a></li>
- <li><a href="/IndexMonitor.html" class="MenuItemLink">Index Monitor</a></li>
- </ul>
- </div>
- <div class="menugroup">
- <h3>Local Proxy</h3>
- <ul class="menu">
- <li><a href="/Blacklist_p.html" class="MenuItemLink lock">Blacklist</a></li>
- <li><a href="/ProxyIndexingMonitor_p.html" class="MenuItemLink lock">Proxy Indexing</a></li>
- <li><a href="/CacheAdmin_p.html" class="MenuItemLink lock">Cache Monitor</a></li>
- <li><a href="/CookieMonitorIncoming_p.html" class="MenuItemLink lock">Cookie Monitor</a></li>
- </ul>
- </div>
- <div class="menugroup">
- <h3>Communication / Publication</h3>
- <ul class="menu">
- <li><a href="/www/" class="MenuItemLink">Home Page</a></li>
- <li><a href="/share/" class="MenuItemLink">File Share</a></li>
- <li><a href="/Wiki.html" class="MenuItemLink">Wiki</a></li>
- <li><a href="/Messages_p.html" class="MenuItemLink lock">Messages <img src="/env/grafics/notifier.gif" alt="New Messages" /></a></li>
- <li><a href="/EditProfile_p.html" class="MenuItemLink lock">Personal Profile</a></li>
- </ul>
- </div>
- <div class="menugroup">
- <h3>Peer Control</h3>
- <ul class="menu">
- <li><a href="/Status.html" accesskey="t" class="MenuItemLink">Status</a></li>
- <li><a href="/Network.html" accesskey="w" class="MenuItemLink">Network</a></li>
- <li><a href="/News.html" accesskey="n" class="MenuItemLink">News</a></li>
- <li><a href="/ViewLog_p.html" class="MenuItemLink lock">Log</a></li>
- <li><a href="/Settings_p.html" class="MenuItemLink lock">Settings</a></li>
- <li><a href="/PerformanceQueues_p.html" class="MenuItemLink lock">Performance</a></li>
- <li><a href="/Connections_p.html" class="MenuItemLink lock">Connections</a></li>
- <li><a href="/Language_p.html" class="MenuItemLink lock">Language</a></li>
- <li><a href="/Skins_p.html" class="MenuItemLink lock">Skins</a></li>
- </ul>
- </div>
- <div class="menugroup">
- <h3>The Project</h3>
- <ul class="menu">
- <li><a href="http://www.yacy.net/yacy/" class="MenuItemLink">Project Home</a></li>
- <li><a href="http://www.yacy.net/yacy/News.html" class="MenuItemLink">Project News</a></li>
- <li><a href="http://sourceforge.net/forum/?group_id=116142" class="MenuItemLink">English Forum</a></li>
- <li><a href="http://www.yacy-forum.de" class="MenuItemLink">Deutsches Forum</a></li>
- <li><a href="http://www.yacy.net/yacy/Download.html" class="MenuItemLink">Download YaCy</a></li>
- <li><a href="http://yacy-websuche.de/wiki/index.php" class="MenuItemLink">YaCy Wiki</a></li>
- <li><a href="http://www.yacy.net/yacy/Contact.html" class="MenuItemLink">Contact</a></li>
- </ul>
- </div>
-</div>
-<div class="content">
diff --git a/htroot/env/templates/xhtml-metas.template b/htroot/env/templates/xhtml-metas.template
deleted file mode 100644
index 98b7c2624..000000000
--- a/htroot/env/templates/xhtml-metas.template
+++ /dev/null
@@ -1,8 +0,0 @@
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="shortcut icon" href="favicon.ico" />
- <meta name="Content-Language" content="English, Englisch" />
- <meta name="keywords" content="Anomic HTTP Proxy search engine spider indexer java network open free download Mac Windows Linux Software development" />
- <meta name="description" content="Anomic Software HTTP Proxy Freeware Home Page" />
- <meta name="copyright" content="Michael Christen" />
- <link rel="stylesheet" type="text/css" media="all" href="/env/style.css" />
-<!-- (C), Architecture and Realisation: Michael Peter Christen; Contact: mc <at> anomic.de -->
\ No newline at end of file
diff --git a/htroot/env/xhtml-style.css b/htroot/env/xhtml-style.css
deleted file mode 100644
index 153f4e220..000000000
--- a/htroot/env/xhtml-style.css
+++ /dev/null
@@ -1,337 +0,0 @@
-body {
-background-color:#FFFFFF;
-margin:0;
-}
-* {
-font-family:Helvetica, Arial, sans-serif;
-}
-img {
-border:0;
-}
-h1 {
-font-size:2em;
-font-style:normal;
-margin-top:0pt;
-margin-bottom:0pt;
-}
-h2 {
-font-size:1.6em;
-font-style:normal;
-margin-top:0pt;
-margin-bottom:0pt;
-}
-h3 {
-font-size:1.4em;
-font-style:normal;
-margin-top:0pt;
-margin-bottom:0pt;
-}
-h4 {
-font-size:1.2em;
-font-style:normal;
-margin-top:0pt;
-margin-bottom:0pt;
-}
-a, body, div, li, ol, span, table, td, tr, ul {
-color:#000000;
-font-style:normal;
-margin-top:0px;
-margin-bottom:0px;
-}
-
-*.small {
-font-size:1em;
-font-style:normal;
-margin-top:0px;
-margin-bottom:0px;
-}
-body, div, li, ol, span, table, td, tr, ul {
-
-text-decoration:none;
-}
-a:hover {
-color:#0000FF;
-}
-a.unknown {
-color:#990000;
-}
-a.known {
-color:#009900;
-}
-a, a.extern {
-color:#000099;
-}
-*.xxxyellow {
-color:#0000FF;
-font-weight:bold;
-text-decoration:none;
-font-size:1.2em;
-}
-*.xxxblue {
-color:#556699;
-font-weight:bold;
-text-decoration:none;
-font-size:1.2em;
-}
-*.tt {
-font-family:Courier,Terminal,sans-serif;
-font-size:1em;
-}
-
-div.menugroup h3, .MenuHeader {
-background-color: #4070a0;
-color:white;
-font-size:1em;
-font-weight:bold;
-margin-top:10px;
-padding:1px 10px;
-}
-ul.menu li a {
-display:block;
-background-color: #bdcdd4;
-text-decoration:none;
-margin-top:1px;
-margin-bottom:1px;
-padding:2px 10px;
-font-size:1em;
-}
-ul.menu li a:hover {
-color:#0088BB;
-}
-ul.menu li a.lock {
-background:#bdcdd4 url(/env/grafics/lock.gif) 2px center no-repeat;
-padding-left:15px;
-}
-.MenuTopItem {
-background-color: #bdcdd4;
-font-weight:bold;
-text-decoration:none;
-padding-top: 3;
-font-size:1em;
-padding-bottom: 3;
-}
-.MenuSubItem {
-background-color: #bdcdd4;
-font-weight:bold;
-text-decoration:none;
-font-size:1em;
-padding-top: 3;
-padding-bottom: 3;
-}
-a.MenuItemLink {
-color: black;
-font-weight:bold;
-font-size:1em;
-text-decoration:none;
-}
-a.MenuItemLink:hover {
-color:#0088BB;
-font-weight:bold;
-text-decoration:none;
-}
-.MenuSubSpacer {
-padding-left: 2;
-padding-right: 2;
-background-color: #ffffff;
-}
-div.head h1 {
-padding:4px;
-background:#4070a0 url(/env/grafics/yacy.gif) 10px center no-repeat;
-color: white;
-font-weight: bold;
-font-size: 1.6em;
-text-align: center;
-margin:0;
-}
-.TableHeader {
-background-color: #88aaaa;
-}
-.TableCellDark {
-background-color: #bbcccc;
-}
-.TableCellLight {
-background-color: #ddeeee;
-}
-.TableCellSummary {
-background-color: #ffbbaa;
-}
-.TableCellPassive {
-background-color: lightgrey;
-}
-.WikiBackground, .MessageBackground {
-background-color: #eeeeee;
-}
-.WikiTOCBox {
-border: 1px solid #aaa;
-background-color: #F8F8FF;
-padding: 8px;
-}
-.WikiTOC {
-color:#0000FF;
-font-size: 10px;
-text-decoration:underline;
-}
-form.search {
-width:35em;
-text-align:center;
-margin:0 auto;
-}
-.bookmarkTags{
-color: #007050;
-font-weight:bold;
-text-decoration:none;
-white-space:nowrap;
-}
-.bookmarkTitle{
-line-height: 120%;
-color: #4070a0;
-font-size:17px;
-font-weight:bold;
-text-decoration:none;
-}
-.bookmarkDescription{
-font-style:normal;
-}
-.bookmarkAction{
-color: #999999;
-text-decoration:none;
-}
-img.bookmarkIcon, img.deleteIcon, img.recommendIcon {
-height: 16px;
-width: 16px;
-}
-form.search fieldset {
-border:0;
-padding:0;
-margin:2px;
-}
-
-form.search table {
-margin:0 auto;
-text-align:left;
-}
-
-div.menu {
-padding:0;
-margin:0;
-position:absolute;
-top:3em;
-left:0;
-width:11em;
-}
-
-ul.menu {
-padding:0;
-margin:0;
-}
-
-ul.menu li {
-list-style:none;
-margin:0;
-padding:0;
-background-color: #bdcdd4;
-border:1px solid white;
-}
-
-div.content {
-position:absolute;
-top:3em;
-left:12em;
-right:10px;
-margin:0;
-}
-
-h2.yacy {
-margin:10px auto;
-text-align:center;
-padding-top:130px;
-width:256px;
-min-width:256px;
-background:url(/env/grafics/kaskelix.png) top center no-repeat;
-}
-
-div.urlactions {
-float:left;
-}
-
-div.urlactions a {
-display:block;
-}
-
-a.deletelink:hover {
-background:url(/env/grafics/minus.gif) center center no-repeat;
-}
-
-a.bookmarklink:hover {
-background:url(/env/grafics/plus.gif) center center no-repeat;
-}
-
-p.info {
-margin-top:5em;
-border-top:1px solid gray;
-padding-top:5px;
-text-align:center;
-}
-
-div.searchresults p.url a {
-color:#008000;
-}
-
-div.searchresults p, div.searchresults h4 {
-margin:2px 2px 2px 22px;
-}
-
-.snippetLoading {
-color:#999999;
-}
-
-.snippetLoaded {
-color:black;
-font-style:italic;
-}
-
-.snippetError {
-color:red;
-font-style:italic;
-}
-
-.settingsValue {
-color:#556699;
-font-weight:bold;
-}
-
-div.searchresults {
-padding-top:1em;
-margin-bottom:1em;
-border-top:1px #000 dashed;
-}
-
-div.searchresults a {
-color:#000099;
-text-decoration:none;
-}
-
-div.searchresults a:hover {
-color:#0000FF;
-text-decoration:underline;
-}
-div.menugroup {
-margin-left:5px;
-margin-bottom:10px;
-clear:left;
-}
-
-.Headline {
-color: white;
-font-weight: bold;
-font-size: 160%;
-text-align: center;
-background-color: #4070a0;
-height: 36px;
-width:100%;
-}
-
-.Heading {
-background-color: #4070a0;
-height: 36px;
-}
\ No newline at end of file
diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.js
index ef5487a5f..ce20a6403 100644
--- a/htroot/js/yacysearch.js
+++ b/htroot/js/yacysearch.js
@@ -25,10 +25,10 @@ function AllMediaSnippets(mediatype) {
function AllImageSnippets() {
var query = document.getElementsByName("former")[0].value;
- var span = document.getElementsByTagName("span");
- for(var x=0;x<span.length;x++) {
- if (span[x].className == 'snippetLoading') {
- var url = document.getElementById("url" + span[x].id);
+ var div = document.getElementsByTagName("div");
+ for(var x=0;x<div.length;x++) {
+ if (div[x].className == 'snippetLoading') {
+ var url = document.getElementById("url" + div[x].id);
requestImageSnippet(url,query);
}
}
@@ -159,11 +159,11 @@ function handleImageState(req) {
var response = req.responseXML;
var urlHash = response.getElementsByTagName("urlHash")[0].firstChild.data;
var links = response.getElementsByTagName("links")[0].firstChild.data;
- var span = document.getElementById(urlHash)
- removeAllChildren(span);
+ var div = document.getElementById(urlHash)
+ removeAllChildren(div);
if (links > 0) {
- span.className = "snippetLoaded";
+ div.className = "snippetLoaded";
for (i = 0; i < links; i++) {
var type = response.getElementsByTagName("type")[i].firstChild.data;
var href = response.getElementsByTagName("href")[i].firstChild.data;
@@ -177,38 +177,28 @@ function handleImageState(req) {
var imganchor = document.createElement("a");
imganchor.setAttribute("href", href);
+ imganchor.setAttribute("class", "thumblink")
imganchor.appendChild(img);
var nameanchor = document.createElement("a");
nameanchor.setAttribute("href", href);
nameanchor.appendChild(document.createTextNode(name));
- var col1 = document.createElement("td");
- col1.setAttribute("width", "100");
- col1.appendChild(imganchor);
- var row1 = document.createElement("tr");
- //row1.setAttribute("class", "TableCellLight");
- row1.appendChild(col1);
+ var textcontainer = document.createElement("div");
+ textcontainer.setAttribute("class", "TableCellDark");
+ textcontainer.appendChild(nameanchor);
- var col2 = document.createElement("td");
- col2.setAttribute("width", "100");
- col2.appendChild(nameanchor);
-
- var row2 = document.createElement("tr");
- row2.setAttribute("class", "TableCellDark");
- row2.appendChild(col2);
-
- var table = document.createElement("table");
- table.setAttribute("class", "imgtable");
- table.appendChild(row1);
- table.appendChild(row2);
- span.appendChild(table);
+ var thumbcontainer = document.createElement("div");
+ thumbcontainer.setAttribute("class", "thumbcontainer");
+ thumbcontainer.appendChild(imganchor);
+ thumbcontainer.appendChild(textcontainer);
+ div.appendChild(thumbcontainer);
//span.appendChild(imganchor);
}
} else {
- span.className = "snippetError";
- span.appendChild(document.createTextNode(""));
+ div.className = "snippetError";
+ div.appendChild(document.createTextNode(""));
}
}
diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html
index 386a2ad5d..4d3dd4dd6 100644
--- a/htroot/yacysearch.html
+++ b/htroot/yacysearch.html
@@ -195,11 +195,10 @@ document.getElementById("Enter").value = "search again - catch up more links";
<!-- linklist end -->
::<!-- type 2: image search: presents image thumbnails -->
- <table border="0"><tr><td><!-- table to prevent flow behind last snippet image -->
<!-- linklist begin -->
#{results}#
<!-- link begin -->
- <span class="snippetLoading" id="#[urlhash]#">loading snippet from <a href="#[url]#" id="url#[urlhash]#">#[urlname]#</a></span>
+ <div class="snippetLoading" id="#[urlhash]#">loading snippet from <a href="#[url]#" id="url#[urlhash]#">#[urlname]#</a></div>
<!-- link end -->
#{/results}#
<script type="text/javascript">
@@ -207,7 +206,7 @@ document.getElementById("Enter").value = "search again - catch up more links";
addHover();
</script>
<!-- linklist end -->
- </td></tr></table>
+ <br style="clear:left;" />
::<!-- type 3: image thumbnail list for one single url -->
<table border="0" cellspacing="16" cellpadding="0">
#{results}#
diff --git a/source/de/anomic/plasma/plasmaCrawlBalancer.java b/source/de/anomic/plasma/plasmaCrawlBalancer.java
index f4a256ff5..b70f34995 100644
--- a/source/de/anomic/plasma/plasmaCrawlBalancer.java
+++ b/source/de/anomic/plasma/plasmaCrawlBalancer.java
@@ -189,7 +189,7 @@ public class plasmaCrawlBalancer {
int componentsize = urlFileStack.size() + urlRAMStack.size() + sizeDomainStacks();
try {
if (componentsize != urlFileIndex.size()) {
- // hier ist urlIndexFile.size() immer gr��er. warum?
+ // here is urlIndexFile.size() always bigger. why?
if (kelondroRecords.debugmode) {
serverLog.logWarning("PLASMA BALANCER", "size operation wrong in " + stackname + " - componentsize = " + componentsize + ", urlFileIndex.size() = " + urlFileIndex.size());
}
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 2b6144cf3..c32c8a95b 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -1647,7 +1647,10 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
return false;
}
- if ((sbQueue.size() == 0) && ((getThread(CRAWLJOB_LOCAL_CRAWL).getJobCount() == 0))) setPerformance((int) Math.max(120, 60000 / getConfigLong(INDEX_DIST_BUSYSLEEP, 6000))); // if there is no activity, set low performance
+ if ((sbQueue.size() == 0) && ((getThread(CRAWLJOB_LOCAL_CRAWL).getJobCount() == 0))) {
+ long sleep = getConfigLong(INDEX_DIST_BUSYSLEEP, 6000);
+ setPerformance((int) Math.max(120, 60000 / (sleep==0?1:sleep))); // if there is no activity, set low performance
+ }
// flush some entries from the RAM cache
if (sbQueue.size() == 0) wordIndex.flushCacheSome(); // permanent flushing only if we are not busy