From 9d282d2c1626b1e060576b1e03ae410f6e58eac0 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 3 Feb 2009 13:04:02 +0000 Subject: [PATCH] - renamed interactivesearch to yacyinteractive - added a configuration option to set the pop up page in Config Appearance - added a minimized header option to yacyinteractive - fixed a bug in yacysearch: default values when no query is done git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5569 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/ConfigAppearance_p.html | 62 +++++++++++++++++-- htroot/ConfigAppearance_p.java | 29 +++++++++ htroot/env/templates/header.template | 3 +- htroot/index.java | 6 ++ ...activesearch.html => yacyinteractive.html} | 32 +++++++--- ...activesearch.java => yacyinteractive.java} | 22 ++++++- htroot/yacysearch.html | 2 +- htroot/yacysearch.java | 9 +++ .../plasma/plasmaSwitchboardConstants.java | 6 ++ source/yacy.java | 6 +- 10 files changed, 154 insertions(+), 23 deletions(-) rename htroot/{interactivesearch.html => yacyinteractive.html} (72%) rename htroot/{interactivesearch.java => yacyinteractive.java} (51%) diff --git a/htroot/ConfigAppearance_p.html b/htroot/ConfigAppearance_p.html index ecaf05ba9..da658fafa 100644 --- a/htroot/ConfigAppearance_p.html +++ b/htroot/ConfigAppearance_p.html @@ -75,6 +75,14 @@
URL of a Large Corporate Image
+
Default Pop-Up Page
+
+ Status Page  + Search Front Page  + Search Page (small header)  + Interactive Search Page  +
+
   @@ -83,10 +91,10 @@ -

+

The search page can be integrated in your own web pages with an iframe. Simply use the following code: -

-

+    

+
       <iframe name="target"
        src="http://#[myaddress]#/index.html?display=2&resource=local"
        width="100%"
@@ -95,14 +103,60 @@
        scrolling="auto"
        id="target"> 
       </iframe>  
-    
+
This would look like: + +

+ For a search page with a small header, use this code: +

+
+      <iframe name="target"
+       src="http://#[myaddress]#/yacysearch.html?display=2&resource=local"
+       width="100%"
        height="560"
        frameborder="0"
        scrolling="auto"
+       id="target"> 
+      </iframe>  
+    
+ This would look like: + + +

+ A third option is the interactive search. Use this code: +

+
+      <iframe name="target"
+       src="http://#[myaddress]#/yacyinteractive.html?display=2"
+       width="100%"
+       height="560"
+       frameborder="0"
+       scrolling="auto"
+       id="target"> 
+      </iframe>  
+    
+ This would look like: + diff --git a/htroot/ConfigAppearance_p.java b/htroot/ConfigAppearance_p.java index b82245c3a..56be66f25 100644 --- a/htroot/ConfigAppearance_p.java +++ b/htroot/ConfigAppearance_p.java @@ -128,6 +128,19 @@ public class ConfigAppearance_p { sb.setConfig(plasmaSwitchboardConstants.GREETING_SMALL_IMAGE, "/env/grafics/YaCyLogo_60ppi.png"); } + if (post.containsKey("popup")) { + String popup = post.get("popup", "status"); + if (popup.equals("front")) { + sb.setConfig(plasmaSwitchboardConstants.BROWSER_POP_UP_PAGE, "index.html?display=2"); + } else if (popup.equals("search")) { + sb.setConfig(plasmaSwitchboardConstants.BROWSER_POP_UP_PAGE, "yacysearch.html?display=2"); + } else if (popup.equals("interactive")) { + sb.setConfig(plasmaSwitchboardConstants.BROWSER_POP_UP_PAGE, "yacyinteractive.html?display=2"); + } else { + sb.setConfig(plasmaSwitchboardConstants.BROWSER_POP_UP_PAGE, "Status.html"); + } + } + } // reread skins @@ -148,6 +161,22 @@ public class ConfigAppearance_p { prop.putHTML(plasmaSwitchboardConstants.GREETING_HOMEPAGE, sb.getConfig(plasmaSwitchboardConstants.GREETING_HOMEPAGE, "")); prop.putHTML(plasmaSwitchboardConstants.GREETING_LARGE_IMAGE, sb.getConfig(plasmaSwitchboardConstants.GREETING_LARGE_IMAGE, "")); prop.putHTML(plasmaSwitchboardConstants.GREETING_SMALL_IMAGE, sb.getConfig(plasmaSwitchboardConstants.GREETING_SMALL_IMAGE, "")); + + final String browserPopUpPage = sb.getConfig(plasmaSwitchboardConstants.BROWSER_POP_UP_PAGE, "ConfigBasic.html"); + prop.put("popupFront", 0); + prop.put("popupSearch", 0); + prop.put("popupInteractive", 0); + prop.put("popupStatus", 0); + if (browserPopUpPage.startsWith("index")) { + prop.put("popupFront", 1); + } else if (browserPopUpPage.startsWith("yacysearch")) { + prop.put("popupSearch", 1); + } else if (browserPopUpPage.startsWith("yacyinteractive")) { + prop.put("popupInteractive", 1); + } else { + prop.put("popupStatus", 1); + } + String myaddress = sb.webIndex.seedDB.mySeed().getPublicAddress(); if (myaddress == null) myaddress = "localhost:" + sb.getConfig("port", "8080"); prop.put("myaddress", myaddress); diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.template index d81f029c4..74784671b 100644 --- a/htroot/env/templates/header.template +++ b/htroot/env/templates/header.template @@ -7,8 +7,7 @@