Set Config Portal as a private administration page.

Consistently with its required action from submission credentials, and
because external unauthenticated users do not need to access these
settings.
pull/60/head^2
luccioman 8 years ago
parent c19d60f06b
commit 09e72eb0a4

@ -1169,7 +1169,7 @@ content.phpbb3.dumpfile =
# search engine teaser: an about box in search results
# this is only shown, if the about.body is filled
about.headline=Please support YaCy!
about.body=<iframe src="env/donate.html" width="100%" height="90" border="0" frameborder="0" scrolling="no" hspace="0" vspace="0" name="donate"></iframe><br/><div style="padding:8px;">If you run a YaCy server, feel free to replace our donation plea with your own support message, use the <a href="ConfigPortal.html">Portal Configuration</a> servlet.</div>
about.body=<iframe src="env/donate.html" width="100%" height="90" border="0" frameborder="0" scrolling="no" hspace="0" vspace="0" name="donate"></iframe><br/><div style="padding:8px;">If you run a YaCy server, feel free to replace our donation plea with your own support message, use the <a href="ConfigPortal_p.html">Portal Configuration</a> servlet.</div>
donation.iframesource=http://yacy.net/include/donate.html
donation.iframetarget=env/donate.html

@ -31,7 +31,7 @@
<p>
You can change the appearance of the YaCy interface with skins.
The selected skin and language also affects the appearance of the search page.
If you <a href="ConfigPortal.html">create a search portal with YaCy</a> then you can
If you <a href="ConfigPortal_p.html">create a search portal with YaCy</a> then you can
change the appearance of the search page here.
</p>

@ -25,210 +25,22 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Properties;
import net.yacy.cora.document.id.DigestURL;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.cora.util.ConcurrentLog;
import net.yacy.data.WorkTables;
import net.yacy.http.servlets.YaCyDefaultServlet;
import net.yacy.search.Switchboard;
import net.yacy.search.SwitchboardConstants;
import net.yacy.server.serverObjects;
import net.yacy.server.serverSwitch;
import net.yacy.server.http.HTTPDFileHandler;
/**
* @deprecated use now {@link ConfigPortal_p}
*/
@Deprecated
public class ConfigPortal {
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
@SuppressWarnings("unused")
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final Switchboard sb = (Switchboard) env;
if (post != null) {
// AUTHENTICATE
if (!sb.verifyAuthentication(header)) {
// force log-in
prop.authenticationRequired();
return prop;
}
if (post.containsKey("popup")) {
final String popup = post.get("popup", "status");
if ("front".equals(popup)) {
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "index.html");
} else if ("search".equals(popup)) {
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "yacysearch.html");
} else if ("interactive".equals(popup)) {
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "yacyinteractive.html");
} else {
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "Status.html");
}
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, sb.getConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "index.html"));
HTTPDFileHandler.initDefaultPath();
}
if (post.containsKey("searchpage_set")) {
final String newGreeting = post.get(SwitchboardConstants.GREETING, "");
// store this call as api call
sb.tables.recordAPICall(post, "ConfigPortal.html", WorkTables.TABLE_API_TYPE_CONFIGURATION, "new portal design. greeting: " + newGreeting);
sb.setConfig(SwitchboardConstants.GREETING, newGreeting);
sb.setConfig(SwitchboardConstants.GREETING_HOMEPAGE, post.get(SwitchboardConstants.GREETING_HOMEPAGE, ""));
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.GREETING_IMAGE_ALT, post.get(SwitchboardConstants.GREETING_IMAGE_ALT, ""));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_DEFAULT, post.get("target", "_self"));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL, post.get("target_special", "_self"));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL_PATTERN, post.get("target_special_pattern", "_self"));
sb.setConfig(SwitchboardConstants.SEARCH_ITEMS, post.getInt("maximumRecords", 10));
sb.setConfig(SwitchboardConstants.INDEX_FORWARD, post.get(SwitchboardConstants.INDEX_FORWARD, ""));
HTTPDFileHandler.indexForward = post.get(SwitchboardConstants.INDEX_FORWARD, "");
sb.setConfig("publicTopmenu", !post.containsKey("publicTopmenu") || post.getBoolean("publicTopmenu"));
sb.setConfig(SwitchboardConstants.PUBLIC_SEARCHPAGE, !post.containsKey(SwitchboardConstants.PUBLIC_SEARCHPAGE) || post.getBoolean(SwitchboardConstants.PUBLIC_SEARCHPAGE));
sb.setConfig("search.options", post.getBoolean("search.options"));
sb.setConfig(SwitchboardConstants.GREEDYLEARNING_ACTIVE, post.getBoolean(SwitchboardConstants.GREEDYLEARNING_ACTIVE));
final boolean storeresult = post.getBoolean(SwitchboardConstants.REMOTESEARCH_RESULT_STORE);
sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, storeresult);
sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, post.getLong(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, -1));
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY, post.get("search.verify", "ifexist"));
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY_DELETE, post.getBoolean("search.verify.delete"));
sb.setConfig("about.headline", post.get("about.headline", ""));
sb.setConfig("about.body", post.get("about.body", ""));
String excludehosts = post.get("search.excludehosts", "");
sb.setConfig("search.excludehosts", excludehosts);
try {
sb.setConfig("search.excludehosth", DigestURL.hosthashes(excludehosts));
} catch (MalformedURLException e) {
ConcurrentLog.logException(e);
sb.setConfig("search.excludehosth", "");
}
}
if (post.containsKey("searchpage_default")) {
// load defaults from defaults/yacy.init file
final Properties config = new Properties();
final String mes = "ConfigPortal";
FileInputStream fis = null;
try {
fis = new FileInputStream(new File(sb.appPath, "defaults/yacy.init"));
config.load(fis);
} catch (final FileNotFoundException e) {
ConcurrentLog.severe(mes, "could not find configuration file.");
return prop;
} catch (final IOException e) {
ConcurrentLog.severe(mes, "could not read configuration file.");
return prop;
} finally {
if (fis != null) {
try {
fis.close();
} catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
}
sb.setConfig(SwitchboardConstants.GREETING, config.getProperty(SwitchboardConstants.GREETING,"P2P Web Search"));
sb.setConfig(SwitchboardConstants.GREETING_HOMEPAGE, config.getProperty(SwitchboardConstants.GREETING_HOMEPAGE,"http://yacy.net"));
sb.setConfig(SwitchboardConstants.GREETING_LARGE_IMAGE, config.getProperty(SwitchboardConstants.GREETING_LARGE_IMAGE,"env/grafics/YaCyLogo_120ppi.png"));
sb.setConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, config.getProperty(SwitchboardConstants.GREETING_SMALL_IMAGE,"env/grafics/YaCyLogo_60ppi.png"));
sb.setConfig(SwitchboardConstants.GREETING_IMAGE_ALT, config.getProperty(SwitchboardConstants.GREETING_IMAGE_ALT,"YaCy project web site"));
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, config.getProperty(SwitchboardConstants.BROWSER_POP_UP_PAGE,"Status.html"));
sb.setConfig(SwitchboardConstants.INDEX_FORWARD, config.getProperty(SwitchboardConstants.INDEX_FORWARD,""));
HTTPDFileHandler.indexForward = "";
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_DEFAULT, config.getProperty(SwitchboardConstants.SEARCH_TARGET_DEFAULT,"_self"));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL, config.getProperty(SwitchboardConstants.SEARCH_TARGET_SPECIAL,"_self"));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL_PATTERN, config.getProperty(SwitchboardConstants.SEARCH_TARGET_SPECIAL_PATTERN,""));
sb.setConfig("publicTopmenu", config.getProperty("publicTopmenu","true"));
sb.setConfig(SwitchboardConstants.PUBLIC_SEARCHPAGE, config.getProperty(SwitchboardConstants.PUBLIC_SEARCHPAGE,"true"));
sb.setConfig("search.navigation", config.getProperty("search.navigation","hosts,authors,namespace,topics"));
sb.setConfig("search.options", config.getProperty("search.options","true"));
sb.setConfig(SwitchboardConstants.GREEDYLEARNING_ACTIVE, config.getProperty(SwitchboardConstants.GREEDYLEARNING_ACTIVE));
sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, config.getProperty(SwitchboardConstants.REMOTESEARCH_RESULT_STORE));
sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, config.getProperty(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE));
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY, config.getProperty(SwitchboardConstants.SEARCH_VERIFY,"iffresh"));
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY_DELETE, config.getProperty(SwitchboardConstants.SEARCH_VERIFY_DELETE,"true"));
sb.setConfig("about.headline", config.getProperty("about.headline",""));
sb.setConfig("about.body", config.getProperty("about.body",""));
sb.setConfig("search.excludehosts", config.getProperty("search.excludehosts",""));
sb.setConfig("search.excludehosth", config.getProperty("search.excludehosth",""));
}
}
prop.putHTML(SwitchboardConstants.GREETING, sb.getConfig(SwitchboardConstants.GREETING, ""));
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.GREETING_IMAGE_ALT, sb.getConfig(SwitchboardConstants.GREETING_IMAGE_ALT, ""));
prop.putHTML(SwitchboardConstants.INDEX_FORWARD, sb.getConfig(SwitchboardConstants.INDEX_FORWARD, ""));
prop.put("publicTopmenu", sb.getConfigBool("publicTopmenu", false) ? 1 : 0);
prop.put(SwitchboardConstants.PUBLIC_SEARCHPAGE, sb.getConfigBool(SwitchboardConstants.PUBLIC_SEARCHPAGE, false) ? 1 : 0);
prop.put("search.options", sb.getConfigBool("search.options", false) ? 1 : 0);
prop.put(SwitchboardConstants.GREEDYLEARNING_ACTIVE, sb.getConfigBool(SwitchboardConstants.GREEDYLEARNING_ACTIVE, false) ? 1 : 0);
prop.put(SwitchboardConstants.GREEDYLEARNING_LIMIT_DOCCOUNT, sb.getConfig(SwitchboardConstants.GREEDYLEARNING_LIMIT_DOCCOUNT, "0"));
prop.put(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, sb.getConfigBool(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, true) ? 1 : 0);
long resultStoredMaxSize = sb.getConfigLong(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, -1);
if(resultStoredMaxSize > 0) {
prop.put(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, resultStoredMaxSize);
} else {
prop.put(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, "");
}
prop.put("search.verify.nocache", sb.getConfig("search.verify", "").equals("nocache") ? 1 : 0);
prop.put("search.verify.iffresh", sb.getConfig("search.verify", "").equals("iffresh") ? 1 : 0);
prop.put("search.verify.ifexist", sb.getConfig("search.verify", "").equals("ifexist") ? 1 : 0);
prop.put("search.verify.cacheonly", sb.getConfig("search.verify", "").equals("cacheonly") ? 1 : 0);
prop.put("search.verify.false", sb.getConfig("search.verify", "").equals("false") ? 1 : 0);
prop.put("search.verify.delete", sb.getConfigBool(SwitchboardConstants.SEARCH_VERIFY_DELETE, true) ? 1 : 0);
prop.put("about.headline", sb.getConfig("about.headline", ""));
prop.put("about.body", sb.getConfig("about.body", ""));
prop.put("search.excludehosts", sb.getConfig("search.excludehosts", ""));
prop.put("search.excludehosth", sb.getConfig("search.excludehosth", ""));
final String browserPopUpPage = sb.getConfig(SwitchboardConstants.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);
}
prop.put("maximumRecords", sb.getConfigInt(SwitchboardConstants.SEARCH_ITEMS, 10));
final String target = sb.getConfig(SwitchboardConstants.SEARCH_TARGET_DEFAULT, "_self");
prop.put("target_selected_blank", "_blank".equals(target) ? 1 : 0);
prop.put("target_selected_self", "_self".equals(target) ? 1 : 0);
prop.put("target_selected_parent", "_parent".equals(target) ? 1 : 0);
prop.put("target_selected_top", "_top".equals(target) ? 1 : 0);
prop.put("target_selected_searchresult", "searchresult".equals(target) ? 1 : 0);
final String target_special = sb.getConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL, "_self");
prop.put("target_selected_special_blank", "_blank".equals(target_special) ? 1 : 0);
prop.put("target_selected_special_self", "_self".equals(target_special) ? 1 : 0);
prop.put("target_selected_special_parent", "_parent".equals(target_special) ? 1 : 0);
prop.put("target_selected_special_top", "_top".equals(target_special) ? 1 : 0);
prop.put("target_selected_special_searchresult", "searchresult".equals(target_special) ? 1 : 0);
prop.put("target_special_pattern", sb.getConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL_PATTERN, ""));
prop.put("myContext", YaCyDefaultServlet.getContext(header, sb));
/* Redirect to ConfigPortal_p */
prop.put(serverObjects.ACTION_LOCATION, "ConfigPortal_p.html");
return prop;
}

@ -15,7 +15,7 @@
and a link to a home page that is reached when the 'corporate identity'-images are clicked.
To change also colours and styles use the <a href="ConfigAppearance_p.html">Appearance Servlet</a> for different skins and languages.
</p>
<form action="ConfigPortal.html" method="post" enctype="multipart/form-data" id="ConfigPortal" accept-charset="UTF-8">
<form action="ConfigPortal_p.html" method="post" enctype="multipart/form-data" id="ConfigPortal" accept-charset="UTF-8">
<fieldset>
<dl>
<dt>Greeting Line</dt>

@ -0,0 +1,228 @@
// ConfigPortal_p.java
// -----------------------
// part of YaCy
// (C) by Michael Peter Christen; mc@yacy.net
// first published on http://yacy.net
// Frankfurt, Germany, 4.7.2008
//
//$LastChangedDate$
//$LastChangedRevision$
//$LastChangedBy$
//
// LICENSE
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Properties;
import net.yacy.cora.document.id.DigestURL;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.cora.util.ConcurrentLog;
import net.yacy.data.WorkTables;
import net.yacy.http.servlets.YaCyDefaultServlet;
import net.yacy.search.Switchboard;
import net.yacy.search.SwitchboardConstants;
import net.yacy.server.serverObjects;
import net.yacy.server.serverSwitch;
import net.yacy.server.http.HTTPDFileHandler;
public class ConfigPortal_p {
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final Switchboard sb = (Switchboard) env;
if (post != null) {
if (post.containsKey("popup")) {
final String popup = post.get("popup", "status");
if ("front".equals(popup)) {
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "index.html");
} else if ("search".equals(popup)) {
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "yacysearch.html");
} else if ("interactive".equals(popup)) {
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "yacyinteractive.html");
} else {
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "Status.html");
}
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, sb.getConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "index.html"));
HTTPDFileHandler.initDefaultPath();
}
if (post.containsKey("searchpage_set")) {
final String newGreeting = post.get(SwitchboardConstants.GREETING, "");
// store this call as api call
sb.tables.recordAPICall(post, "ConfigPortal_p.html", WorkTables.TABLE_API_TYPE_CONFIGURATION, "new portal design. greeting: " + newGreeting);
sb.setConfig(SwitchboardConstants.GREETING, newGreeting);
sb.setConfig(SwitchboardConstants.GREETING_HOMEPAGE, post.get(SwitchboardConstants.GREETING_HOMEPAGE, ""));
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.GREETING_IMAGE_ALT, post.get(SwitchboardConstants.GREETING_IMAGE_ALT, ""));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_DEFAULT, post.get("target", "_self"));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL, post.get("target_special", "_self"));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL_PATTERN, post.get("target_special_pattern", "_self"));
sb.setConfig(SwitchboardConstants.SEARCH_ITEMS, post.getInt("maximumRecords", 10));
sb.setConfig(SwitchboardConstants.INDEX_FORWARD, post.get(SwitchboardConstants.INDEX_FORWARD, ""));
HTTPDFileHandler.indexForward = post.get(SwitchboardConstants.INDEX_FORWARD, "");
sb.setConfig("publicTopmenu", !post.containsKey("publicTopmenu") || post.getBoolean("publicTopmenu"));
sb.setConfig(SwitchboardConstants.PUBLIC_SEARCHPAGE, !post.containsKey(SwitchboardConstants.PUBLIC_SEARCHPAGE) || post.getBoolean(SwitchboardConstants.PUBLIC_SEARCHPAGE));
sb.setConfig("search.options", post.getBoolean("search.options"));
sb.setConfig(SwitchboardConstants.GREEDYLEARNING_ACTIVE, post.getBoolean(SwitchboardConstants.GREEDYLEARNING_ACTIVE));
final boolean storeresult = post.getBoolean(SwitchboardConstants.REMOTESEARCH_RESULT_STORE);
sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, storeresult);
sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, post.getLong(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, -1));
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY, post.get("search.verify", "ifexist"));
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY_DELETE, post.getBoolean("search.verify.delete"));
sb.setConfig("about.headline", post.get("about.headline", ""));
sb.setConfig("about.body", post.get("about.body", ""));
String excludehosts = post.get("search.excludehosts", "");
sb.setConfig("search.excludehosts", excludehosts);
try {
sb.setConfig("search.excludehosth", DigestURL.hosthashes(excludehosts));
} catch (MalformedURLException e) {
ConcurrentLog.logException(e);
sb.setConfig("search.excludehosth", "");
}
}
if (post.containsKey("searchpage_default")) {
// load defaults from defaults/yacy.init file
final Properties config = new Properties();
final String mes = "ConfigPortal";
FileInputStream fis = null;
try {
fis = new FileInputStream(new File(sb.appPath, "defaults/yacy.init"));
config.load(fis);
} catch (final FileNotFoundException e) {
ConcurrentLog.severe(mes, "could not find configuration file.");
return prop;
} catch (final IOException e) {
ConcurrentLog.severe(mes, "could not read configuration file.");
return prop;
} finally {
if (fis != null) {
try {
fis.close();
} catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
}
sb.setConfig(SwitchboardConstants.GREETING, config.getProperty(SwitchboardConstants.GREETING,"P2P Web Search"));
sb.setConfig(SwitchboardConstants.GREETING_HOMEPAGE, config.getProperty(SwitchboardConstants.GREETING_HOMEPAGE,"http://yacy.net"));
sb.setConfig(SwitchboardConstants.GREETING_LARGE_IMAGE, config.getProperty(SwitchboardConstants.GREETING_LARGE_IMAGE,"env/grafics/YaCyLogo_120ppi.png"));
sb.setConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, config.getProperty(SwitchboardConstants.GREETING_SMALL_IMAGE,"env/grafics/YaCyLogo_60ppi.png"));
sb.setConfig(SwitchboardConstants.GREETING_IMAGE_ALT, config.getProperty(SwitchboardConstants.GREETING_IMAGE_ALT,"YaCy project web site"));
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, config.getProperty(SwitchboardConstants.BROWSER_POP_UP_PAGE,"Status.html"));
sb.setConfig(SwitchboardConstants.INDEX_FORWARD, config.getProperty(SwitchboardConstants.INDEX_FORWARD,""));
HTTPDFileHandler.indexForward = "";
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_DEFAULT, config.getProperty(SwitchboardConstants.SEARCH_TARGET_DEFAULT,"_self"));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL, config.getProperty(SwitchboardConstants.SEARCH_TARGET_SPECIAL,"_self"));
sb.setConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL_PATTERN, config.getProperty(SwitchboardConstants.SEARCH_TARGET_SPECIAL_PATTERN,""));
sb.setConfig("publicTopmenu", config.getProperty("publicTopmenu","true"));
sb.setConfig(SwitchboardConstants.PUBLIC_SEARCHPAGE, config.getProperty(SwitchboardConstants.PUBLIC_SEARCHPAGE,"true"));
sb.setConfig("search.navigation", config.getProperty("search.navigation","hosts,authors,namespace,topics"));
sb.setConfig("search.options", config.getProperty("search.options","true"));
sb.setConfig(SwitchboardConstants.GREEDYLEARNING_ACTIVE, config.getProperty(SwitchboardConstants.GREEDYLEARNING_ACTIVE));
sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, config.getProperty(SwitchboardConstants.REMOTESEARCH_RESULT_STORE));
sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, config.getProperty(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE));
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY, config.getProperty(SwitchboardConstants.SEARCH_VERIFY,"iffresh"));
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY_DELETE, config.getProperty(SwitchboardConstants.SEARCH_VERIFY_DELETE,"true"));
sb.setConfig("about.headline", config.getProperty("about.headline",""));
sb.setConfig("about.body", config.getProperty("about.body",""));
sb.setConfig("search.excludehosts", config.getProperty("search.excludehosts",""));
sb.setConfig("search.excludehosth", config.getProperty("search.excludehosth",""));
}
}
prop.putHTML(SwitchboardConstants.GREETING, sb.getConfig(SwitchboardConstants.GREETING, ""));
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.GREETING_IMAGE_ALT, sb.getConfig(SwitchboardConstants.GREETING_IMAGE_ALT, ""));
prop.putHTML(SwitchboardConstants.INDEX_FORWARD, sb.getConfig(SwitchboardConstants.INDEX_FORWARD, ""));
prop.put("publicTopmenu", sb.getConfigBool("publicTopmenu", false) ? 1 : 0);
prop.put(SwitchboardConstants.PUBLIC_SEARCHPAGE, sb.getConfigBool(SwitchboardConstants.PUBLIC_SEARCHPAGE, false) ? 1 : 0);
prop.put("search.options", sb.getConfigBool("search.options", false) ? 1 : 0);
prop.put(SwitchboardConstants.GREEDYLEARNING_ACTIVE, sb.getConfigBool(SwitchboardConstants.GREEDYLEARNING_ACTIVE, false) ? 1 : 0);
prop.put(SwitchboardConstants.GREEDYLEARNING_LIMIT_DOCCOUNT, sb.getConfig(SwitchboardConstants.GREEDYLEARNING_LIMIT_DOCCOUNT, "0"));
prop.put(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, sb.getConfigBool(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, true) ? 1 : 0);
long resultStoredMaxSize = sb.getConfigLong(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, -1);
if(resultStoredMaxSize > 0) {
prop.put(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, resultStoredMaxSize);
} else {
prop.put(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, "");
}
prop.put("search.verify.nocache", sb.getConfig("search.verify", "").equals("nocache") ? 1 : 0);
prop.put("search.verify.iffresh", sb.getConfig("search.verify", "").equals("iffresh") ? 1 : 0);
prop.put("search.verify.ifexist", sb.getConfig("search.verify", "").equals("ifexist") ? 1 : 0);
prop.put("search.verify.cacheonly", sb.getConfig("search.verify", "").equals("cacheonly") ? 1 : 0);
prop.put("search.verify.false", sb.getConfig("search.verify", "").equals("false") ? 1 : 0);
prop.put("search.verify.delete", sb.getConfigBool(SwitchboardConstants.SEARCH_VERIFY_DELETE, true) ? 1 : 0);
prop.put("about.headline", sb.getConfig("about.headline", ""));
prop.put("about.body", sb.getConfig("about.body", ""));
prop.put("search.excludehosts", sb.getConfig("search.excludehosts", ""));
prop.put("search.excludehosth", sb.getConfig("search.excludehosth", ""));
final String browserPopUpPage = sb.getConfig(SwitchboardConstants.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);
}
prop.put("maximumRecords", sb.getConfigInt(SwitchboardConstants.SEARCH_ITEMS, 10));
final String target = sb.getConfig(SwitchboardConstants.SEARCH_TARGET_DEFAULT, "_self");
prop.put("target_selected_blank", "_blank".equals(target) ? 1 : 0);
prop.put("target_selected_self", "_self".equals(target) ? 1 : 0);
prop.put("target_selected_parent", "_parent".equals(target) ? 1 : 0);
prop.put("target_selected_top", "_top".equals(target) ? 1 : 0);
prop.put("target_selected_searchresult", "searchresult".equals(target) ? 1 : 0);
final String target_special = sb.getConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL, "_self");
prop.put("target_selected_special_blank", "_blank".equals(target_special) ? 1 : 0);
prop.put("target_selected_special_self", "_self".equals(target_special) ? 1 : 0);
prop.put("target_selected_special_parent", "_parent".equals(target_special) ? 1 : 0);
prop.put("target_selected_special_top", "_top".equals(target_special) ? 1 : 0);
prop.put("target_selected_special_searchresult", "searchresult".equals(target_special) ? 1 : 0);
prop.put("target_special_pattern", sb.getConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL_PATTERN, ""));
prop.put("myContext", YaCyDefaultServlet.getContext(header, sb));
return prop;
}
}

@ -17,7 +17,7 @@
<p>
Below is a generic template of the search result page. Mark the check boxes for features you would like to be displayed.
To change colors and styles use the <a href="ConfigAppearance_p.html">Appearance</a> menu for different skins.
Other portal settings can be adjusted in <a href="ConfigPortal.html">Generic Search Portal</a> menu.
Other portal settings can be adjusted in <a href="ConfigPortal_p.html">Generic Search Portal</a> menu.
</p>
<h4>Page Template</h4>

@ -32,7 +32,6 @@ import java.io.IOException;
import java.sql.Date;
import java.util.Map;
import java.util.Properties;
import java.util.TreeMap;
import net.yacy.cora.date.GenericFormatter;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.cora.util.ConcurrentLog;
@ -62,7 +61,7 @@ public class ConfigSearchPage_p {
if (post.containsKey("searchpage_set")) {
final String newGreeting = post.get(SwitchboardConstants.GREETING, "");
// store this call as api call
sb.tables.recordAPICall(post, "ConfigPortal.html", WorkTables.TABLE_API_TYPE_CONFIGURATION, "new portal design. greeting: " + newGreeting);
sb.tables.recordAPICall(post, "ConfigPortal_p.html", WorkTables.TABLE_API_TYPE_CONFIGURATION, "new portal design. greeting: " + newGreeting);
sb.setConfig("publicTopmenu", post.getBoolean("publicTopmenu"));
sb.setConfig("search.options", post.getBoolean("search.options"));

@ -176,7 +176,7 @@
</ul>
<ul class="nav nav-sidebar menugroup">
<li><h3>Search Portal Integration</h3></li>
<li><a href="ConfigPortal.html" class="MenuItemLink">Portal Configuration</a></li>
<li><a href="ConfigPortal_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">Portal Configuration</a></li>
<li><a href="ConfigAppearance_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">Portal Design</a></li>
<li><a href="RankingSolr_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">Ranking and Heuristics</a></li>
</ul>

@ -1,7 +1,7 @@
<div class="SubMenu">
<h3>Portal Configuration</h3>
<ul class="SubMenu">
<li><a href="ConfigPortal.html" class="MenuItemLink">Generic Search Portal</a></li>
<li><a href="ConfigPortal_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">Generic Search Portal</a></li>
<li><a href="ConfigSearchBox.html" class="MenuItemLink">Search Box Anywhere</a></li>
<li><a href="ConfigProfile_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">User Profile</a></li>
<li><a href="ConfigRobotsTxt_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">Local robots.txt</a></li>

@ -342,8 +342,8 @@ Appearance and Integration==外观界面
You can change the appearance of the YaCy interface with skins.==您可以在这里修改YaCy的外观界面.
#You can change the appearance of YaCy with skins==Sie können hier das Erscheinungsbild von YaCy mit Skins ändern
The selected skin and language also affects the appearance of the search page.==选择的皮肤和语言也会影响到搜索页面的外观.
If you <a href="ConfigPortal.html">create a search portal with YaCy</a> then you can==如果您<a href="ConfigPortal.html">创建YaCy门户</a>,
change the appearance of the search page here.==那么您能在<a href="ConfigPortal.html">这里</a> 改变搜索页面的外观.
If you <a href="ConfigPortal_p.html">create a search portal with YaCy</a> then you can==如果您<a href="ConfigPortal_p.html">创建YaCy门户</a>,
change the appearance of the search page here.==那么您能在<a href="ConfigPortal_p.html">这里</a> 改变搜索页面的外观.
#and the default icons and links on the search page can be replaced with you own.==und die standard Grafiken und Links auf der Suchseite durch Ihre eigenen ersetzen.
Skin Selection==选择皮肤
Select one of the default skins, download new skins, or create your own skin.==选择一个默认皮肤, 下载新皮肤或者创建属于您自己的皮肤.
@ -619,7 +619,7 @@ enable/disable Parser==Parser 开启 / 关闭
"Submit"=="提交"
#-----------------------------
#File: ConfigPortal.html
#File: ConfigPortal_p.html
#---------------------------
Integration of a Search Portal==搜索门户设置
If you like to integrate YaCy as portal for your web pages, you may want to change icons and messages on the search page.==如果您想将YaCy作为您的网站搜索门户, 您可能需要在这改变搜索页面的图标和信息.

@ -383,8 +383,8 @@ Save User==Benutzer speichern
Appearance and Integration==Erscheinungsbild und Integration
You can change the appearance of the YaCy interface with skins.==Sie können hier das Aussehen der YaCy Oberfläche mit Skins verändern,
The selected skin and language also affects the appearance of the search page.==das ausgewählte Design und die gewählte Sprache wirken sich auch auf das Erscheinungsbild der Suchseite aus.
If you <a href="ConfigPortal.html">create a search portal with YaCy</a> then you can==Wenn Sie <a href="ConfigPortal.html">ein Such-Portal mit Yacy erstellen möchten</a> können Sie
change the appearance of the search page here.==das Erscheinungsbild der Suchseite <a href="ConfigPortal.html">hier</a> weitgehend ändern und die standard Grafiken und Links auf der Suchseite durch Ihre eigenen ersetzen.
If you <a href="ConfigPortal_p.html">create a search portal with YaCy</a> then you can==Wenn Sie <a href="ConfigPortal_p.html">ein Such-Portal mit Yacy erstellen möchten</a> können Sie
change the appearance of the search page here.==das Erscheinungsbild der Suchseite <a href="ConfigPortal_p.html">hier</a> weitgehend ändern und die standard Grafiken und Links auf der Suchseite durch Ihre eigenen ersetzen.
#and the default icons and links on the search page can be replaced with you own.==und die standard Grafiken und Links auf der Suchseite durch Ihre eigenen ersetzen.
Skin Selection==Skinauswahl
Select one of the default skins, download new skins, or create your own skin.==Wählen Sie einen der mitgelieferten Skins, laden Sie einen neuen herunter oder erstellen Sie selbst einen neuen Skin.
@ -708,7 +708,7 @@ If you want to test a specific parser you can do so using the==Wenn Sie einen be
"Submit"=="Speichern"
#-----------------------------
#File: ConfigPortal.html
#File: ConfigPortal_p.html
#---------------------------
Integration of a Search Portal==Integration eines Suchportals
If you like to integrate YaCy as portal for your web pages, you may want to change icons and messages on the search page.==Wenn Sie YaCy als Suchportal für Ihre Webseiten integrieren wollen, können Sie auch die Icons und Nachrichten auf den Suchseiten verändern.

@ -334,7 +334,7 @@ Set Access Rules==Définir les règles d'accès
Appearance and Integration==Apparence et intégration
You can change the appearance of the YaCy interface with skins.==Vous pouvez personnaliser l'interface YaCy avec des thèmes.
The selected skin and language also affects the appearance of the search page.==Le thème et la langue sélectionnés affectent aussi l'aspect de la page de recherche.
If you <a href="ConfigPortal.html">create a search portal with YaCy</a> then you can==Si vous utilisez YaCy pour créer un <a href="ConfigPortal.html">portail de recherche</a> vous pouvez alors
If you <a href="ConfigPortal_p.html">create a search portal with YaCy</a> then you can==Si vous utilisez YaCy pour créer un <a href="ConfigPortal_p.html">portail de recherche</a> vous pouvez alors
change the appearance of the search page here.==modifier l'aspect de la page de recherche ici.
Skin Selection==Sélection du thème
Select one of the default skins, download new skins, or create your own skin.==Sélectionnez l'un des thèmes par défaut, téléchargez de nouveaux thèmes ou créez le vôtre.

@ -328,7 +328,7 @@ Appearance and Integration==अप्पेअरेञ्चे और इं
You can change the appearance of the YaCy interface with skins.==Yacy के इंटरफ़ेस और स्किन्स को आप बदल सकते हैं,
#You can change the appearance of YaCy with skins==Yacy के इंटरफ़ेस और स्किन्स को आप बदल सकते हैं,
The selected skin and language also affects the appearance of the search page.==चयनित स्किन्स और भाषा भी सर्च पेज की अपीयरेंस को प्रभावित करता है.
If you <a href="ConfigPortal.html">create a search portal with YaCy</a> then you can==अगर आप YaCy साथ <a href="ConfigPortal.html">एक सर्च पोर्टल बनाते हैं</a> तो आप
If you <a href="ConfigPortal_p.html">create a search portal with YaCy</a> then you can==अगर आप YaCy साथ <a href="ConfigPortal_p.html">एक सर्च पोर्टल बनाते हैं</a> तो आप
change the appearance of the search page here.==यहाँ सर्च पेज के स्वरूप को बदल सकते हैं.
#and the default icons and links on the search page can be replaced with you own.==और सर्च पेज पर डिफ़ॉल्ट चिह्न और लिंक आप के अनुसार बदला जा सकता है
Skin Selection==स्किन चयन
@ -613,7 +613,7 @@ BMP Image Parser==बीएमपी छवि पार्सर
"Submit"==" सबमिट "
#-----------------------------
#File: ConfigPortal.html
#File: ConfigPortal_p.html
#---------------------------
Integration of a Search Portal== एक खोज पोर्टल की इंटीग्रेशन
If you like to integrate YaCy as portal for your web pages, you may want to change icons and messages on the search page.== यदि आप अपने वेब पृष्ठों के लिए पोर्टल के रूप में याची एकीकृत करना चाहते हैं, तो आप खोज पृष्ठ पर माउस और संदेशों को बदलने के लिए चाह सकते हैं.

@ -403,7 +403,7 @@ Appearance and Integration==外観と統合
You can change the appearance of the YaCy interface with skins.==あなたはスキンによってYaCyのインターフェースの外観を変更する事ができます.
#You can change the appearance of YaCy with skins==あなたはスキンによってYaCyのインターフェースの外観を変更する事ができます
The selected skin and language also affects the appearance of the search page.==選択されたスキンと言語は検索ページの外観にも影響を与えます.
If you <a href="ConfigPortal.html">create a search portal with YaCy</a> then you can==もしあなたが<a href="ConfigPortal.html">YaCyで検索ポータルを作成</a>するならば
If you <a href="ConfigPortal_p.html">create a search portal with YaCy</a> then you can==もしあなたが<a href="ConfigPortal_p.html">YaCyで検索ポータルを作成</a>するならば
change the appearance of the search page here.==ここで検索ページの外観を変更できます.
#and the default icons and links on the search page can be replaced with you own.==そして検索ページの既定のアイコンとリンクを自分のもので置き換える事ができます.
Skin Selection==スキンの選択
@ -554,7 +554,7 @@ Content Parser Settings==コンテントの構文解析器の構成
"Submit"=="確定"
#-----------------------------
#File: ConfigPortal.html
#File: ConfigPortal_p.html
#---------------------------
Integration of a Search Portal==検索ポータルの統合
#-----------------------------
@ -619,7 +619,7 @@ Search Page<==検索ページ<
>Search Result Page Layout Configuration<==>検索結果のページのレイアウトの構成<
>Appearance<==>外観<
menu for different skins.== 別のスキンの為のメニュー.
Other portal settings can be adjusted in <a href="ConfigPortal.html">Generic Search Portal</a> menu.==他のポータルの設定は<a href="ConfigPortal.html">一般的な検索ポータル</a> メニューで調整できます
Other portal settings can be adjusted in <a href="ConfigPortal_p.html">Generic Search Portal</a> menu.==他のポータルの設定は<a href="ConfigPortal_p.html">一般的な検索ポータル</a> メニューで調整できます
>Page Template<==>ページのテンプレート<
#>Administration<==>管理<
>Web Search<==>ウェブ検索<

@ -948,7 +948,7 @@
<source>The selected skin and language also affects the appearance of the search page.</source>
</trans-unit>
<trans-unit id="234b8c23" xml:space="preserve" approved="no" translate="yes">
<source>If you &lt;a href="ConfigPortal.html"&gt;create a search portal with YaCy&lt;/a&gt; then you can</source>
<source>If you &lt;a href="ConfigPortal_p.html"&gt;create a search portal with YaCy&lt;/a&gt; then you can</source>
</trans-unit>
<trans-unit id="619edb0a" xml:space="preserve" approved="no" translate="yes">
<source>change the appearance of the search page here.</source>
@ -1685,7 +1685,7 @@
</body>
</file>
<file original="ConfigPortal.html" source-language="en" datatype="html">
<file original="ConfigPortal_p.html" source-language="en" datatype="html">
<body>
<trans-unit id="63cce208" xml:space="preserve" approved="no" translate="yes">
<source>Integration of a Search Portal</source>

@ -420,7 +420,7 @@ Appearance and Integration==Внешний вид
You can change the appearance of the YaCy interface with skins.==Вы можете изменить внешний вид YaCy используя скины.
#You can change the appearance of YaCy with skins==Вы можете изменить внешний вид YaCy со скинами
The selected skin and language also affects the appearance of the search page.==Выбранный скин и язык, также влияют на внешний вид страницы поиска.
If you <a href="ConfigPortal.html">create a search portal with YaCy</a> then you can==Если вы <a href="ConfigPortal.html">создадите поиск с Yacy, </a>
If you <a href="ConfigPortal_p.html">create a search portal with YaCy</a> then you can==Если вы <a href="ConfigPortal_p.html">создадите поиск с Yacy, </a>
change the appearance of the search page here.==то изменить внешний вид страницы поиска вы можете здесь.
#and the default icons and links on the search page can be replaced with you own.==и стандартные иконки и ссылки на странице поиска будут заменены на ваши.
Skin Selection==Выбор скина
@ -806,7 +806,7 @@ If you want to test a specific parser you can do so using the==Если вы ж
"Submit"=="Установить"
#-----------------------------
#File: ConfigPortal.html
#File: ConfigPortal_p.html
#---------------------------
Integration of a Search Portal==Интеграция поиска
If you like to integrate YaCy as portal for your web pages, you may want to change icons and messages on the search page.==Если вы хотите интегрировать YaCy как поиск для веб-страниц, то вы можете менять иконки и сообщения на странице поиска.

@ -341,8 +341,8 @@ Appearance and Integration==Зовнішній вигляд та інтегра
You can change the appearance of the YaCy interface with skins.==Ви можете змінити зовнішній вигляд інтерфейсу YaCy з допомогою шкури.
#You can change the appearance of YaCy with skins==Ви можете змінити зовнішній вигляд YaCy зі шкурами
The selected skin and language also affects the appearance of the search page.==Вибрані дизайн і мова також впливають на зовнішній вигляд сторінки пошуку.
If you <a href="ConfigPortal.html">create a search portal with YaCy</a> then you can==Якщо ви <a href="ConfigPortal.html">створюєте пошуковий портал з Yacy</a>, то можете
change the appearance of the search page here.==змінити появу пошукової сторінки <a href="ConfigPortal.html">тут</a>, а також змінити графіку та стиль посилань пошукової сторінки на власні.
If you <a href="ConfigPortal_p.html">create a search portal with YaCy</a> then you can==Якщо ви <a href="ConfigPortal_p.html">створюєте пошуковий портал з Yacy</a>, то можете
change the appearance of the search page here.==змінити появу пошукової сторінки <a href="ConfigPortal_p.html">тут</a>, а також змінити графіку та стиль посилань пошукової сторінки на власні.
#and the default icons and links on the search page can be replaced with you own.==і стандартні іконки та посилання на сторінці пошуку можуть бути замінені на власні.
Skin Selection==Вибір шкурки
Select one of the default skins, download new skins, or create your own skin.==Виберіть один з існуючих скінів, завантажте новий або створіть для себе новий.
@ -655,7 +655,7 @@ enable/disable==ввімкнути/вимкнути
>Extension==>Розширення
#-----------------------------
#File: ConfigPortal.html
#File: ConfigPortal_p.html
#---------------------------
Integration of a Search Portal==Інтегрування пошукового порталу
If you like to integrate YaCy as portal for your web pages, you may want to change icons and messages on the search page.==Якщо ви хочете вбудувати YaCy в якості пошукового порталу у веб-сайт, ви також можете змінити значки та повідомлення на сторінках пошуку.

@ -109,7 +109,7 @@ public class GSAsearchServlet extends HttpServlet {
sb.peers.peerActions.setUserAgent(clientip, userAgent);
// --- handled by Servlet securityHandler
// check if user is allowed to search (can be switched in /ConfigPortal.html)
// check if user is allowed to search (can be switched in /ConfigPortal_p.html)
boolean authenticated = header.isUserInRole(UserDB.AccessRight.ADMIN_RIGHT.toString()); //sb.adminAuthenticated(header) >= 2;
// final boolean searchAllowed = authenticated || sb.getConfigBool(SwitchboardConstants.PUBLIC_SEARCHPAGE, true);
// if (!searchAllowed) return null;

Loading…
Cancel
Save