Skip to content

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

fixed visibility of custom icon

Michael Peter Christenfda591695c1a
diff --git a/htroot/HostBrowser.html b/htroot/HostBrowser.html
index 41aee5290..74b4df93a 100644
--- a/htroot/HostBrowser.html
+++ b/htroot/HostBrowser.html
@@ -69,9 +69,6 @@ function updatepage(str) {
#%env/templates/simpleheader.template%#
<script type="text/javascript">
document.getElementById("header_hostbrowser").className += " active";
- //document.getElementById("greeting").innerHTML="#[promoteSearchPageGreeting]#";
- document.getElementById("greeting-icon").src="#[promoteSearchPageGreeting.smallImage]#";
- document.getElementById("navbar-brand").href="#[promoteSearchPageGreeting.homepage]#";
</script>
#(/topmenu)#
<h2>Host Browser</h2>
diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.java
index c0d7f587b..0ad46fddd 100644
--- a/htroot/HostBrowser.java
+++ b/htroot/HostBrowser.java
@@ -102,8 +102,6 @@ public class HostBrowser {
env.getConfig("network.unit.description", "") :
env.getConfig(SwitchboardConstants.GREETING, "");
prop.put("topmenu_promoteSearchPageGreeting", promoteSearchPageGreeting);
- prop.put("topmenu_promoteSearchPageGreeting.homepage", sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
- prop.put("topmenu_promoteSearchPageGreeting.smallImage", sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));
if (!searchAllowed) {
prop.put("result", "You are not allowed to use this page. Please ask an administrator for permission.");
diff --git a/htroot/ViewFile.html b/htroot/ViewFile.html
index 0853c3153..b6481b409 100644
--- a/htroot/ViewFile.html
+++ b/htroot/ViewFile.html
@@ -68,9 +68,6 @@ function updatepage(str) {
#(/topmenu)#
<script type="text/javascript">
document.getElementById("header_urlviewer").className += " active";
- //document.getElementById("greeting").innerHTML="#[promoteSearchPageGreeting]#";
- //document.getElementById("greeting-icon").src="#[promoteSearchPageGreeting.smallImage]#";
- //document.getElementById("navbar-brand").href="#[promoteSearchPageGreeting.homepage]#";
</script>
<div id="api">
diff --git a/htroot/ViewProfile.html b/htroot/ViewProfile.html
index e49918f83..f195457d1 100644
--- a/htroot/ViewProfile.html
+++ b/htroot/ViewProfile.html
@@ -11,9 +11,6 @@
#%env/templates/simpleheader.template%#
<script type="text/javascript">
document.getElementById("header_profile").className += " active";
- //document.getElementById("greeting").innerHTML="#[promoteSearchPageGreeting]#";
- document.getElementById("greeting-icon").src="#[promoteSearchPageGreeting.smallImage]#";
- document.getElementById("navbar-brand").href="#[promoteSearchPageGreeting.homepage]#";
</script>
::
#%env/templates/header.template%#
diff --git a/htroot/ViewProfile.java b/htroot/ViewProfile.java
index 817cdd4fe..ad96150f4 100644
--- a/htroot/ViewProfile.java
+++ b/htroot/ViewProfile.java
@@ -67,9 +67,6 @@ public class ViewProfile {
env.getConfig("network.unit.description", "") :
env.getConfig(SwitchboardConstants.GREETING, "");
prop.put("display_promoteSearchPageGreeting", promoteSearchPageGreeting);
- prop.put("display_promoteSearchPageGreeting.homepage", sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
- prop.put("display_promoteSearchPageGreeting.smallImage", sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));
-
prop.put("edit", authenticated ? 1 : 0);
final String hash = (post == null) ? null : post.get("hash");
diff --git a/htroot/compare_yacy.html b/htroot/compare_yacy.html
index 209aef475..4cd62a09b 100644
--- a/htroot/compare_yacy.html
+++ b/htroot/compare_yacy.html
@@ -15,9 +15,6 @@
#(/display)#
<script type="text/javascript">
document.getElementById("header_comparesearch").className += " active";
- //document.getElementById("greeting").innerHTML="#[promoteSearchPageGreeting]#";
- //document.getElementById("greeting-icon").src="#[promoteSearchPageGreeting.smallImage]#";
- //document.getElementById("navbar-brand").href="#[promoteSearchPageGreeting.homepage]#";
</script>
<fieldset>
<legend>Websearch Comparison</legend>
diff --git a/htroot/env/templates/embeddedheader.template b/htroot/env/templates/embeddedheader.template
index 899dfc49f..d845bb9cf 100644
--- a/htroot/env/templates/embeddedheader.template
+++ b/htroot/env/templates/embeddedheader.template
@@ -2,8 +2,8 @@
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand" id="navbar-brand" href="/" style="position:absolute;top:-6px;display:inline;white-space:nowrap;">
- <img id="greeting-icon" class="yacylogo" src="/env/grafics/yacy.png" style="height:auto; width:auto; max-width:200px; max-height:32px;vertical-align:middle">&nbsp;<span id="greeting"></span>
+ <a class="navbar-brand" id="navbar-brand" href="#[promoteSearchPageGreeting.homepage]#" style="position:absolute;top:-6px;display:inline;white-space:nowrap;">
+ <img id="greeting-icon" class="yacylogo" src="#[promoteSearchPageGreeting.smallImage]#" style="height:auto; width:auto; max-width:200px; max-height:32px;vertical-align:middle">&nbsp;<span id="greeting"></span>
</a>
</div>
</div>
diff --git a/htroot/env/templates/portalheader.template b/htroot/env/templates/portalheader.template
deleted file mode 100644
index 8c9d3777a..000000000
--- a/htroot/env/templates/portalheader.template
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- YaCy Portalseach by apfelmaennchen <[email protected]> -->
- <!-- /env/portalheader.template -->
- <link media="screen" type="text/css" href="portalsearch/yacy-portalsearch.css" rel="stylesheet" />
- <script src="jquery/js/jquery.query-2.1.7.js" type="text/javascript"></script>
- <script src="jquery/js/jquery.form-2.73.js" type="text/javascript"></script>
- <script src="jquery/js/jquery.field-0.9.2.min.js" type="text/javascript"></script>
- <script type="text/javascript">
- //<![CDATA[
- $(document).ready(function() {
- if ($("#yacylivesearch").length ) {
- yconf = {
- url : ' ',
- global : false,
- width : 500,
- height : 600,
- theme : 'start',
- title : 'YaCy Search Widget',
- load_js : false,
- load_css : false
- };
- $.getScript(yconf.url+'portalsearch/yacy-portalsearch.js', function(){});
- }
- });
- //]]>
- </script>
- <!-- END YaCy Portalsearch -->
\ No newline at end of file
diff --git a/htroot/env/templates/portalinput.template b/htroot/env/templates/portalinput.template
deleted file mode 100644
index 1ca84633d..000000000
--- a/htroot/env/templates/portalinput.template
+++ /dev/null
@@ -1,14 +0,0 @@
-<!-- YaCy Portalseach by apfelmaennchen <[email protected]> -->
-<!-- /env/portalinput.template -->
-<div id="yacylivesearch">
-<form id="ysearch" method="get" accept-charset="UTF-8" action="yacysearch.html"><p>
- <input name="query" id="yquery" placeholder="Search..." class="form-control" type="text" size="20" maxlength="80" value=""/>
- <input type="hidden" name="verify" value="cacheonly" />
- <input type="hidden" name="maximumRecords" value="10" />
- <input type="hidden" name="resource" value="local" />
- <input type="hidden" name="urlmaskfilter" value=".*" />
- <input type="hidden" name="prefermaskfilter" value="" />
- <input type="hidden" name="nav" value="all" /></p>
-</form>
-</div>
-<!-- END YaCy Portalsearch -->
\ No newline at end of file
diff --git a/htroot/env/templates/simpleheader.template b/htroot/env/templates/simpleheader.template
index 00fb1122a..97ec788c2 100644
--- a/htroot/env/templates/simpleheader.template
+++ b/htroot/env/templates/simpleheader.template
@@ -8,8 +8,8 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" id="navbar-brand" href="/" style="position:absolute;top:-6px;display:inline;white-space:nowrap;">
- <img id="greeting-icon" class="yacylogo" src="/env/grafics/yacy.png" style="height:auto; width:auto; max-width:200px; max-height:32px;vertical-align:middle">&nbsp;<span id="greeting"></span>
+ <a class="navbar-brand" id="navbar-brand" href="#[promoteSearchPageGreeting.homepage]#" style="position:absolute;top:-6px;display:inline;white-space:nowrap;">
+ <img id="greeting-icon" class="yacylogo" src="#[promoteSearchPageGreeting.smallImage]#" style="height:auto; width:auto; max-width:200px; max-height:32px;vertical-align:middle">&nbsp;<span id="greeting"></span>
</a>
</div>
<div class="navbar-collapse collapse">
diff --git a/htroot/index.html b/htroot/index.html
index 9480f8db7..bc7eb9c55 100644
--- a/htroot/index.html
+++ b/htroot/index.html
@@ -44,8 +44,6 @@
#%env/templates/simpleheader.template%#
<script type="text/javascript">
document.getElementById("header_websearch").className += " active";
- document.getElementById("greeting-icon").src="#[promoteSearchPageGreeting.smallImage]#";
- document.getElementById("navbar-brand").href="#[promoteSearchPageGreeting.homepage]#";
</script>
#(/topmenu)#
diff --git a/htroot/yacyinteractive.html b/htroot/yacyinteractive.html
index 6ab4026cf..c120d2174 100644
--- a/htroot/yacyinteractive.html
+++ b/htroot/yacyinteractive.html
@@ -13,9 +13,6 @@
#%env/templates/simpleheader.template%#
<script type="text/javascript">
document.getElementById("header_filesearch").className += " active";
- //document.getElementById("greeting").innerHTML="#[promoteSearchPageGreeting]#";
- document.getElementById("greeting-icon").src="#[promoteSearchPageGreeting.smallImage]#";
- document.getElementById("navbar-brand").href="#[promoteSearchPageGreeting.homepage]#";
</script>
#(/topmenu)#
diff --git a/htroot/yacyinteractive.java b/htroot/yacyinteractive.java
index 584e26bc0..c5d840654 100644
--- a/htroot/yacyinteractive.java
+++ b/htroot/yacyinteractive.java
@@ -47,8 +47,6 @@ public class yacyinteractive {
env.getConfig("network.unit.description", "") :
env.getConfig(SwitchboardConstants.GREETING, "");
prop.put("topmenu_promoteSearchPageGreeting", promoteSearchPageGreeting);
- prop.put("topmenu_promoteSearchPageGreeting.homepage", sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
- prop.put("topmenu_promoteSearchPageGreeting.smallImage", sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));
final String query = (post == null) ? "" : post.get("query", "");
final String startRecord = (post == null) ? "0" : post.get("startRecord", "");
diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html
index 7ac9b123d..4a8f60274 100644
--- a/htroot/yacysearch.html
+++ b/htroot/yacysearch.html
@@ -68,9 +68,6 @@
#%env/templates/simpleheader.template%#
<script type="text/javascript">
document.getElementById("header_websearch").className += " active";
- //document.getElementById("greeting").innerHTML="#[promoteSearchPageGreeting]#";
- document.getElementById("greeting-icon").src="#[promoteSearchPageGreeting.smallImage]#";
- document.getElementById("navbar-brand").href="#[promoteSearchPageGreeting.homepage]#";
</script>
#(/topmenu)#
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index 1e826f9f0..6487188cb 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -143,8 +143,6 @@ public class yacysearch {
final boolean rss = EXT.equals("rss");
final boolean json = EXT.equals("json");
prop.put("topmenu_promoteSearchPageGreeting", promoteSearchPageGreeting);
- prop.put("topmenu_promoteSearchPageGreeting.homepage", sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
- prop.put("topmenu_promoteSearchPageGreeting.smallImage", sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));
// adding some additional properties needed for the rss feed
String hostName = header.get("Host", Domains.LOCALHOST);
diff --git a/htroot/yacysearch_location.java b/htroot/yacysearch_location.java
index 2d12d32c3..40a2893c8 100644
--- a/htroot/yacysearch_location.java
+++ b/htroot/yacysearch_location.java
@@ -139,8 +139,6 @@ public class yacysearch_location {
if (header.get(HeaderFramework.CONNECTION_PROP_EXT, "").equals("html")) {
prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0);
prop.put("promoteSearchPageGreeting", sb.getConfig(SwitchboardConstants.GREETING, ""));
- prop.put("promoteSearchPageGreeting.homepage", sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
- prop.put("promoteSearchPageGreeting.smallImage", sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));
if (post == null || post.get("query") == null) {
prop.put("initsearch", 0);
} else {
diff --git a/source/net/yacy/http/servlets/YaCyDefaultServlet.java b/source/net/yacy/http/servlets/YaCyDefaultServlet.java
index 63c0ddd24..467ddbe94 100644
--- a/source/net/yacy/http/servlets/YaCyDefaultServlet.java
+++ b/source/net/yacy/http/servlets/YaCyDefaultServlet.java
@@ -887,7 +887,9 @@ public class YaCyDefaultServlet extends HttpServlet {
templatePatterns.put("newpeer", myPeer.getAge() >= 1 ? 0 : 1);
templatePatterns.putHTML("newpeer_peerhash", myPeer.hash);
templatePatterns.put("p2p", sb.getConfigBool(SwitchboardConstants.DHT_ENABLED, true) || !sb.isRobinsonMode() ? 1 : 0);
-
+ templatePatterns.put(SwitchboardConstants.GREETING_HOMEPAGE, sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
+ templatePatterns.put(SwitchboardConstants.GREETING_SMALL_IMAGE, sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));
+
if (targetFile.exists() && targetFile.isFile() && targetFile.canRead()) {
String mimeType = Classification.ext2mime(targetExt, MimeTypes.TEXT_HTML);
@@ -944,6 +946,7 @@ public class YaCyDefaultServlet extends HttpServlet {
p = buffer.indexOf(inctxt, offset);
}
out.write(in, offset, in.length - offset);
+ out.close();
buffer.close();
}