added a forwarder for the default page. The forwarder forwards a browser to a different page if the root file index.html is accessed. This can be done by setting the name of the forwarder page to the field

"Default index.html Page (by forwarder)" in /ConfigPortal.html
The purpose is to forward to /yacyinteractive.html for the 27C3 FTP search plattform

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7365 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent db99db4be9
commit fc2e41e691

@ -197,7 +197,7 @@ repositoryPath=DATA/HTDOCS/repository
# The complete path to this file is created by combination with the rootPath
# you can set a list of defaults, separated by comma
# the first one is preferred
defaultFiles = ConfigBasic.html,index.html,index.htm,default.html,search.html,console.html,control.html,welcome.html,wiki.html,forum.html,blog.html,email.html,content.html,monitor.html,share.html,dir.html,readme.txt
defaultFiles = index.html,index.htm,default.html,search.html,console.html,control.html,welcome.html,wiki.html,forum.html,blog.html,email.html,content.html,monitor.html,share.html,dir.html,readme.txt
# locale-options: YaCy supports localization.
# Web pages for special languages are located in the htLocalePath
@ -450,6 +450,11 @@ browserPopUpTrigger=true
browserPopUpPage=ConfigBasic.html
browserPopUpApplication=firefox
# a forward page can be given for the index.html page
# when a user accesses the index.html page, he/she is forwarded to the page
# as given by indexForward. This is by default not defined which means 'no forward'
indexForward =
# defines if the YaCy icon appears in the system tray on supported platforms
trayIcon=true
trayIcon.force=false

@ -38,6 +38,9 @@
<input type="radio" name="popup" value="interactive" #(popupInteractive)#::checked="checked"#(/popupInteractive)# />Interactive Search Page&nbsp;
</dd>
<dt>Default index.html Page (by forwarder)</dt>
<dd><input type="text" name="indexForward" value="#[indexForward]#" size="60" /></dd>
<dt>Target for Click on Search Results</dt>
<dd>
<select name="target">

@ -67,6 +67,7 @@ public class ConfigPortal {
sb.setConfig(SwitchboardConstants.GREETING_LARGE_IMAGE, post.get(SwitchboardConstants.GREETING_LARGE_IMAGE, ""));
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, ""));
}
if (post.containsKey("searchpage_default")) {
sb.setConfig(SwitchboardConstants.GREETING, "P2P Web Search");
@ -74,6 +75,8 @@ public class ConfigPortal {
sb.setConfig(SwitchboardConstants.GREETING_LARGE_IMAGE, "/env/grafics/YaCyLogo_120ppi.png");
sb.setConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, "/env/grafics/YaCyLogo_60ppi.png");
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "Status.html");
sb.setConfig(SwitchboardConstants.INDEX_FORWARD, "");
sb.setConfig("indexForward", "Status.html");
sb.setConfig(SwitchboardConstants.SEARCH_TARGET, "_self");
}
}
@ -82,6 +85,7 @@ public class ConfigPortal {
prop.putHTML(SwitchboardConstants.GREETING_HOMEPAGE, sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
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, ""));
final String browserPopUpPage = sb.getConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "ConfigBasic.html");
prop.put("popupFront", 0);

@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
#(forward)#::<meta http-equiv="REFRESH" content="0; url=#[target]#" />#(/forward)#
<title>YaCy '#[clientname]#': Search Page</title>
#%env/templates/metas.template%#
<link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="yacysearch.rss?query=#[former]#" />

@ -42,6 +42,14 @@ public class index {
final Switchboard sb = (Switchboard) env;
final serverObjects prop = new serverObjects();
String forwardTarget = sb.getConfig(SwitchboardConstants.INDEX_FORWARD, "");
if (forwardTarget.length() > 0) {
// forward the page
prop.put("forward", 1);
prop.put("forward_target", forwardTarget);
return prop;
}
// access control
boolean publicPage = sb.getConfigBool("publicSearchpage", true);
final boolean authorizedAccess = sb.verifyAuthentication(header, false);

@ -405,6 +405,11 @@ public final class SwitchboardConstants {
public static final String BROWSER_POP_UP_APPLICATION = "browserPopUpApplication";
public static final String BROWSER_POP_UP_PAGE = "browserPopUpPage";
/**
* forwarder of the index page
*/
public static final String INDEX_FORWARD = "indexForward";
public static final String UPNP_ENABLED = "upnp.enabled";
public static final String UPNP_REMOTEHOST = "upnp.remoteHost";

Loading…
Cancel
Save