You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
135 lines
5.7 KiB
135 lines
5.7 KiB
<!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>
|