Skip to content

Commit

Permalink
added option to display the network name as page greeting instead the…
Browse files Browse the repository at this point in the history
… page greeting string

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4174 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Oct 22, 2007
1 parent b856e37 commit 9d539ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions htroot/index.java
Expand Up @@ -112,6 +112,7 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve

// 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);
Expand Down
1 change: 1 addition & 0 deletions htroot/opensearchdescription.java
Expand Up @@ -36,6 +36,7 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve

// 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");
Expand Down
1 change: 1 addition & 0 deletions htroot/yacysearch.java
Expand Up @@ -87,6 +87,7 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
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
Expand Down
2 changes: 2 additions & 0 deletions yacy.init
Expand Up @@ -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
Expand Down

0 comments on commit 9d539ec

Please sign in to comment.