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.
107 lines
5.3 KiB
107 lines
5.3 KiB
<!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>
|
|
<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/submenuIntegration.template%#
|
|
<h2>Integration of a Search Field for Live Search</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).
|
|
Just use the code snippet below to integrate that in your own web pages.
|
|
Please check if the address, as given in the example '#[ip]#:#[port]#' here is correct and replace it with more appropriate values if necessary.
|
|
</p>
|
|
|
|
<h4>Code Snippet:</h4>
|
|
<pre>
|
|
<script src="http://#[ip]#:#[port]#/yacy/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
yconf = {
|
|
url : 'http://#[ip]#:#[port]#',
|
|
logo : '/yacy/ui/img/yacy-logo.png',
|
|
link : 'http://www.yacy.net',
|
|
global : false,
|
|
width : 500,
|
|
height : 620,
|
|
position : ['top',30],
|
|
theme : 'start',
|
|
title : 'YaCy Portal Search'
|
|
};
|
|
$.getScript(yconf.url+'/yacy/ui/js/yacyui-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="true" />
|
|
<input type="hidden" name="maximumRecords" value="10" />
|
|
<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><dl>
|
|
<dt>url</dt><dd>is a mandatory property - no default</dd>
|
|
<dt>global</dt><dd>false</dd>
|
|
<dt>theme</dt><dd>'start'</dd>
|
|
<dt>title</dt><dd>'YaCy P2P Web Search'</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>420</dd>
|
|
<dt>height</dt><dd>500</dd>
|
|
<dt>position</dt><dd>['top',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.
|
|
<h5>Load JavaScript load_js (true | false)</h5>
|
|
<p>
|
|
If load_js is set to false, you have to manually load the needed JavaScript on your portal page. This can help to avoid timing problems or double loading.
|
|
<pre>
|
|
<script src="/yacy/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
|
|
<script src="/yacy/ui/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
|
|
<script src="/yacy/ui/js/jquery.dimensions.min.js"></script>
|
|
<script src="/yacy/ui/js/jquery.query.js"></script>
|
|
<script src="/yacy/ui/js/jquery.form.js"></script>
|
|
<script src="/yacy/ui/js/jquery.field.min.js"></script>
|
|
</pre>
|
|
</p>
|
|
<h5>Load Stylesheets load_css (true | false)</h5>
|
|
<p>
|
|
If load_css is set to false, you have to manually load the needed CSS on your portal page. This can help to avoid timing problems or double loading.
|
|
<pre>
|
|
<link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.base.css" rel="stylesheet" />
|
|
<link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.theme.css" rel="stylesheet" />
|
|
<link media="screen" type="text/css" href="/yacy/ui/css/yacyui-portalsearch.css" rel="stylesheet" />
|
|
<pre>
|
|
</p>
|
|
<h5>Themes</h5>
|
|
<p>You can <a href="http://jquery-ui.googlecode.com/files/jquery-ui-themes-1.7.zip" target="_blank">
|
|
download</a> ready made themes or <a href="http://jqueryui.com/themeroller/" target="_blank">create</a>
|
|
your own custom theme. <br/>Themes are installed into: DATA/HTDOCS/yacy/ui/css/themes/</p>
|
|
|
|
#%env/templates/footer.template%#
|
|
</body>
|
|
</html>
|