Skip to content

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

added option to display the network name as page greeting instead the page greeting string

orbiter9d539ec621c7
diff --git a/htroot/index.java b/htroot/index.java
index 026ce9b07..3d58de9ba 100644
--- a/htroot/index.java
+++ b/htroot/index.java
@@ -112,6 +112,7 @@ public class index {
// we create empty entries for template strings
String promoteSearchPageGreeting = env.getConfig("promoteSearchPageGreeting", "");
+ if (env.getConfigBool("promoteSearchPageGreeting.useNetworkName", false)) promoteSearchPageGreeting = env.getConfig("network.unit.description", "");
if (promoteSearchPageGreeting.length() == 0) promoteSearchPageGreeting = "P2P WEB SEARCH";
prop.putASIS("promoteSearchPageGreeting", promoteSearchPageGreeting);
prop.put("former", former);
diff --git a/htroot/opensearchdescription.java b/htroot/opensearchdescription.java
index 895417338..df4112231 100644
--- a/htroot/opensearchdescription.java
+++ b/htroot/opensearchdescription.java
@@ -36,6 +36,7 @@ public class opensearchdescription {
// generate message content for open search description
String promoteSearchPageGreeting = env.getConfig("promoteSearchPageGreeting", "");
+ if (env.getConfigBool("promoteSearchPageGreeting.useNetworkName", false)) promoteSearchPageGreeting = env.getConfig("network.unit.description", "");
if (promoteSearchPageGreeting.length() == 0) promoteSearchPageGreeting = "P2P WEB SEARCH";
String thisaddress = (String) header.get("Host", "localhost");
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index c454a1251..745517e18 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -87,6 +87,7 @@ public class yacysearch {
if ((display == 1) && (!authenticated)) display = 0;
int input = (post == null) ? 2 : post.getInt("input", 2);
String promoteSearchPageGreeting = env.getConfig("promoteSearchPageGreeting", "");
+ if (env.getConfigBool("promoteSearchPageGreeting.useNetworkName", false)) promoteSearchPageGreeting = env.getConfig("network.unit.description", "");
if (promoteSearchPageGreeting.length() == 0) promoteSearchPageGreeting = "P2P WEB SEARCH";
// case if no values are requested
diff --git a/yacy.init b/yacy.init
index 92a7a76fe..232320192 100644
--- a/yacy.init
+++ b/yacy.init
@@ -250,6 +250,8 @@ parseableExt=html,htm,txt,php,shtml,asp,aspx,jsp
# Set these Strings to cusomize your peer and give any message to
# other peer users
promoteSearchPageGreeting =
+# if the following property is set to true, the network name is used as greeting
+promoteSearchPageGreeting.useNetworkName = false
# the path to the PLASMA database of the web spider
dbPath=DATA/PLASMADB