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

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4174 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2007-10-22 08:01:44 +00:00
parent b856e377a9
commit 9d539ec621
4 changed files with 5 additions and 0 deletions

View File

@ -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);

View File

@ -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");

View File

@ -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

View File

@ -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