From 4565b2f2c075c961b354873440dd856a51b26748 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 8 Dec 2010 10:50:23 +0000 Subject: [PATCH] removed the display option from index.html, yacysearch.html and yacyinteractive.html instead, a setting at ConfigPortal.html can be made to define if the topmenu shall be shown at these pages or if there is no naviagtion at all. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7366 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- defaults/yacy.init | 5 +++ htroot/ConfigPortal.html | 6 ++++ htroot/ConfigPortal.java | 4 +++ htroot/env/templates/header.template | 4 +-- htroot/index.html | 27 ++++++---------- htroot/index.java | 11 +------ htroot/js/yacyinteractive.js | 2 ++ htroot/yacyinteractive.html | 31 ++++++++++--------- htroot/yacyinteractive.java | 10 +----- htroot/yacysearch.html | 23 ++++++-------- htroot/yacysearch.java | 26 ++++------------ htroot/yacysearchitem.html | 2 +- htroot/yacysearchitem.java | 2 -- htroot/yacysearchtrailer.java | 20 ++++++------ .../anomic/http/server/HTTPDFileHandler.java | 25 ++++++++++----- source/de/anomic/search/QueryParams.java | 9 ++---- 16 files changed, 92 insertions(+), 115 deletions(-) diff --git a/defaults/yacy.init b/defaults/yacy.init index de55cd76a..9626d591a 100644 --- a/defaults/yacy.init +++ b/defaults/yacy.init @@ -831,6 +831,11 @@ currentSkin=pdblue publicSurftips = true publicSearchpage = true +# flag to show if the top navigation bar shall be shown to all users +# if this is disabled, then the user must navigate manually from the search page +# to /Status.html to get the main memu bar back +publicTopmenu = true + # Wiki access rights # the built-in wiki system allows by default only that the administrator is allowed to make changes # this can be changed. There are three options: diff --git a/htroot/ConfigPortal.html b/htroot/ConfigPortal.html index 81699851f..65dabd883 100644 --- a/htroot/ConfigPortal.html +++ b/htroot/ConfigPortal.html @@ -30,6 +30,12 @@
URL of a Large Corporate Image
+
Show Navigation Bar on Search Page?
+
+ Show Navigation Top-Menu  + no link to YaCy Menu (admin must navigate to /Status.html manually) +
+
Default Pop-Up Page
Status Page  diff --git a/htroot/ConfigPortal.java b/htroot/ConfigPortal.java index 2cd1caa97..5531e0d26 100644 --- a/htroot/ConfigPortal.java +++ b/htroot/ConfigPortal.java @@ -27,6 +27,7 @@ import net.yacy.cora.protocol.RequestHeader; import de.anomic.data.WorkTables; +import de.anomic.http.server.HTTPDFileHandler; import de.anomic.search.Switchboard; import de.anomic.search.SwitchboardConstants; import de.anomic.server.serverObjects; @@ -68,6 +69,8 @@ public class ConfigPortal { sb.setConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, post.get(SwitchboardConstants.GREETING_SMALL_IMAGE, "")); sb.setConfig(SwitchboardConstants.SEARCH_TARGET, post.get("target", "_self")); sb.setConfig(SwitchboardConstants.INDEX_FORWARD, post.get(SwitchboardConstants.INDEX_FORWARD, "")); + HTTPDFileHandler.indexForward = post.get(SwitchboardConstants.INDEX_FORWARD, ""); + sb.setConfig("publicTopmenu", post.get("publicTopmenu", "true")); } if (post.containsKey("searchpage_default")) { sb.setConfig(SwitchboardConstants.GREETING, "P2P Web Search"); @@ -86,6 +89,7 @@ public class ConfigPortal { prop.putHTML(SwitchboardConstants.GREETING_LARGE_IMAGE, sb.getConfig(SwitchboardConstants.GREETING_LARGE_IMAGE, "")); prop.putHTML(SwitchboardConstants.GREETING_SMALL_IMAGE, sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, "")); prop.putHTML(SwitchboardConstants.INDEX_FORWARD, sb.getConfig(SwitchboardConstants.INDEX_FORWARD, "")); + prop.put("publicTopmenu", sb.getConfig("publicTopmenu", "").equals("true") ? 1 : 0); final String browserPopUpPage = sb.getConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "ConfigBasic.html"); prop.put("popupFront", 0); diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.template index aa554261c..b523e830b 100644 --- a/htroot/env/templates/header.template +++ b/htroot/env/templates/header.template @@ -44,8 +44,8 @@