parent
656e2ce62a
commit
6b66bb7109
@ -1,134 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
||||
<!-- This page is only XHTML 1.0 Transitional and not Strict because the target attribute for a links are being used -->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>YaCy '#[clientname]#': Integration of a Search Field for Live Search</title>
|
||||
#%env/templates/metas.template%#
|
||||
</head>
|
||||
<body id="ConfigSkins">
|
||||
#%env/templates/header.template%#
|
||||
#%env/templates/submenuSearchIntegration.template%#
|
||||
<h2>Integration of Live Search with YaCy Search Widget</h2>
|
||||
<p>
|
||||
A 'Live-Search' input field that reacts as search-as-you-type in a pop-up window can easily be integrated in any web page.
|
||||
This is the same function as can be seen on all pages of the YaCy online-interface (look at the window in the upper right corner).
|
||||
</p>
|
||||
<p>
|
||||
There are basically two methods for integrating the YaCy Search Widget with your web site.
|
||||
<ol>
|
||||
<li>Static hosting of widget on own HTTP server</li>
|
||||
<li>Remote access through selected YaCy Peer</li>
|
||||
</ol>
|
||||
</p>
|
||||
|
||||
<h4>Static hosting of widget on own HTTP server</h4>
|
||||
Advantages:
|
||||
<ul>
|
||||
<li>faster connection speed</li>
|
||||
<li>possibility for local adaptions</li>
|
||||
</ul>
|
||||
Disadvantages:
|
||||
<ul>
|
||||
<li>No automatic update to future releases of YaCy Search Widget</li>
|
||||
<li>Ajax/JSONP cross domain requests needed to query remote YaCy Peer</li>
|
||||
</ul>
|
||||
Installing:
|
||||
<ul>
|
||||
<li>download yacy-portalsearch.tar.gz from <a href="http://yacy.net/" target="_blank">http://yacy.net</a> </li>
|
||||
<li>unpack within your HTTP servers path</li>
|
||||
<li>use ./yacy/portalsearch/yacy-portalsearch.html as reference for integration with your own portal page</li>
|
||||
</ul>
|
||||
<h4>Remote access through selected YaCy Peer</h4>
|
||||
Advantages:
|
||||
<ul>
|
||||
<li>Always latest version of YaCy Search Widget</li>
|
||||
<li>No Ajax/JSONP cross domain requests, as Search Widget and YaCy Peer are hosted on the same domain.</li>
|
||||
</ul>
|
||||
Disadvantages:
|
||||
<ul>
|
||||
<li>Under certain cirumstances slower than static hosting</li>
|
||||
</ul>
|
||||
Installing:
|
||||
<ul>
|
||||
<li>Just use the code snippet below and paste it any place in your own portal page</li>
|
||||
<li>Please check if '#[ip]#:#[port]#' is appropriate or replace it with address of the YaCy Peer holding your index</li>
|
||||
</ul>
|
||||
|
||||
<pre>
|
||||
<script src="http://#[ip]#:#[port]#/jquery/js/jquery-1.7.min.js" type="text/javascript" type="text/javascript"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
yconf = {
|
||||
url : 'http://#[ip]#:#[port]#',
|
||||
title : 'YaCy Search Widget',
|
||||
logo : '/yacy/ui/img/yacy-logo.png',
|
||||
link : 'http://www.yacy.net',
|
||||
global : false,
|
||||
width : 500,
|
||||
height : 600,
|
||||
position : ['top',30],
|
||||
theme : 'start'
|
||||
};
|
||||
$.getScript(yconf.url+'/portalsearch/yacy-portalsearch.js', function(){});
|
||||
});
|
||||
</script>
|
||||
<div id="yacylivesearch">
|
||||
<form id="ysearch" method="get" accept-charset="UTF-8" action="http://#[ip]#:#[port]#/yacysearch.html">
|
||||
Live Search <input name="query" id="yquery" class="fancy" type="text" size="15" maxlength="80" value=""/>
|
||||
<input type="hidden" name="verify" value="cacheonly" />
|
||||
<input type="hidden" name="maximumRecords" value="20" />
|
||||
<input type="hidden" name="resource" value="local" />
|
||||
<input type="hidden" name="urlmaskfilter" value=".*" />
|
||||
<input type="hidden" name="prefermaskfilter" value="" />
|
||||
<input type="hidden" name="display" value="2" />
|
||||
<input type="hidden" name="nav" value="all" />
|
||||
<input type="submit" name="Enter" value="Search" />
|
||||
</form>
|
||||
</div>
|
||||
</pre>
|
||||
<h4>Configuration options and defaults for 'yconf':</h4>
|
||||
<h5>Defaults</h5>
|
||||
<form action=""><dl>
|
||||
<dt>url</dt><dd>http://localhost:8090</dd>
|
||||
<dt>global</dt><dd>false</dd>
|
||||
<dt>theme</dt><dd>'start'</dd>
|
||||
<dt>title</dt><dd>'YaCy Search Widget'</dd>
|
||||
<dt>logo</dt><dd>'/yacy/ui/img/yacy-logo.png'</dd>
|
||||
<dt>link</dt><dd>'http://www.yacy.net'</dd>
|
||||
<dt>width</dt><dd>640</dd>
|
||||
<dt>height</dt><dd>640</dd>
|
||||
<dt>position</dt><dd>[150,50]</dd>
|
||||
<dt>modal</dt><dd>false</dd>
|
||||
<dt>resizable</dt><dd>true</dd>
|
||||
<dt>show</dt><dd>''</dd>
|
||||
<dt>hide</dt><dd>''</dd>
|
||||
<dt>load_js</dt><dd>true</dd>
|
||||
<dt>load_css</dt><dd>true</dd>
|
||||
</dl></form>
|
||||
<h5>Size and position (width | height | position)</h5>
|
||||
Specifies where the dialog should be displayed. Possible values for position: 'center', 'left', 'right', 'top', 'bottom', or an array containing a coordinate pair (in pixel offset from top left of viewport) or the possible string values (e.g. ['right','top'] for top right corner).
|
||||
<h5>Animation effects (show | hide)</h5>
|
||||
The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.
|
||||
<h5>Interaction (modal | resizable)</h5>
|
||||
If modal is set to true, the dialog will have modal behavior; other items on the page will be disabled (i.e. cannot be interacted with). Modal dialogs create an overlay below the dialog but above other page elements.
|
||||
<p>
|
||||
If resizable is set to true, the dialog will be resizeable.
|
||||
</p>
|
||||
<h5>Load JavaScript load_js (true | false)</h5>
|
||||
<p>
|
||||
This parameter is used for static hosting only.
|
||||
</p>
|
||||
<h5>Load Stylesheets load_css (true | false)</h5>
|
||||
<p>
|
||||
This parameter is used for static hosting only.
|
||||
</p>
|
||||
<h5>Themes</h5>
|
||||
<p>You can download standard jquery-ui themes or create your own custom themes on
|
||||
<a href="http://jqueryui.com/" target="_blank">
|
||||
http://jqueryui.com/</a>
|
||||
<br/>Themes are installed in ./yacy/jquery/themes/ (static hosting) or in DATA/HTDOCS/jquery/themes/ on remote YaCy Peer.
|
||||
YaCy ships with 'start' and 'smoothness' themes pre-installed.</p>
|
||||
|
||||
#%env/templates/footer.template%#
|
||||
</body>
|
||||
</html>
|
@ -1,44 +0,0 @@
|
||||
// ConfigLiveSearch.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@yacy.net
|
||||
// first published on http://yacy.net
|
||||
// Frankfurt, Germany, 29.5.2009
|
||||
//
|
||||
//$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 net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.search.Switchboard;
|
||||
import net.yacy.server.serverObjects;
|
||||
import net.yacy.server.serverSwitch;
|
||||
|
||||
public class ConfigLiveSearch {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
prop.putHTML("ip", sb.peers.mySeed().getIP());
|
||||
prop.putHTML("port", sb.getConfig("port", "8090"));
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
<div class="SubMenu">
|
||||
<h3>Design</h3>
|
||||
<ul class="SubMenu">
|
||||
<li><a href="ConfigAppearance_p.html" class="MenuItemLink lock">Appearance</a></li>
|
||||
<li><a href="ConfigLanguage_p.html" class="MenuItemLink lock">Language</a></li>
|
||||
<li><a href="ConfigSearchPage_p.html" class="MenuItemLink lock">Search Page Layout</a></li>
|
||||
</ul>
|
||||
</div>
|
@ -0,0 +1,8 @@
|
||||
<div class="SubMenu">
|
||||
<h3>Portal Configuration</h3>
|
||||
<ul class="SubMenu">
|
||||
<li><a href="ConfigSearchBox.html" class="MenuItemLink">Search Box Anywhere</a></li>
|
||||
<li><a href="ConfigPortal.html" class="MenuItemLink">Generic Search Portal</a></li>
|
||||
<li><a href="ConfigProfile_p.html" class="MenuItemLink lock">User Profile</a></li>
|
||||
</ul>
|
||||
</div>
|
@ -0,0 +1,8 @@
|
||||
<div class="SubMenu">
|
||||
<h3>Ranking and Heuristics</h3>
|
||||
<ul class="SubMenu">
|
||||
<li><a href="RankingSolr_p.html" class="MenuItemLink lock">Solr Ranking Config</a></li>
|
||||
<li><a href="RankingRWI_p.html" class="MenuItemLink lock">RWI Ranking Config</a></li>
|
||||
<li><a href="ConfigHeuristics_p.html" class="MenuItemLink lock">Heuristics</a></li>
|
||||
</ul>
|
||||
</div>
|
@ -1,13 +0,0 @@
|
||||
<div class="SubMenu">
|
||||
<h3>Integrated Search Configuration</h3>
|
||||
<ul class="SubMenu">
|
||||
<li><a href="ConfigPortal.html" class="MenuItemLink">Generic Search Portal</a></li>
|
||||
<li><a href="ConfigSearchPage_p.html" class="MenuItemLink lock">Search Page Layout</a></li>
|
||||
<li><a href="ConfigAppearance_p.html" class="MenuItemLink lock">Appearance</a></li>
|
||||
<li><a href="ConfigLanguage_p.html" class="MenuItemLink lock">Language</a></li>
|
||||
<li><a href="ConfigProfile_p.html" class="MenuItemLink lock">User Profile</a></li>
|
||||
<li><a href="ConfigHeuristics_p.html" class="MenuItemLink lock">Heuristics</a></li>
|
||||
<li><a href="RankingSolr_p.html" class="MenuItemLink lock">Solr Ranking Config</a></li>
|
||||
<li><a href="RankingRWI_p.html" class="MenuItemLink lock">RWI Ranking Config</a></li>
|
||||
</ul>
|
||||
</div>
|
@ -1,7 +0,0 @@
|
||||
<div class="SubMenu">
|
||||
<h3>Search Integration into External Sites</h3>
|
||||
<ul class="SubMenu">
|
||||
<li><a href="ConfigLiveSearch.html" class="MenuItemLink">Live Search Anywhere</a></li>
|
||||
<li><a href="ConfigSearchBox.html" class="MenuItemLink">Search Box Anywhere</a></li>
|
||||
</ul>
|
||||
</div>
|
Loading…
Reference in new issue