diff --git a/build.xml b/build.xml index 0aab9826b..4ed386362 100644 --- a/build.xml +++ b/build.xml @@ -58,7 +58,13 @@ - + + + + + + + @@ -270,7 +276,7 @@ - + + + + + + + + + + + + + + + + + diff --git a/htroot/ConfigLiveSearch.html b/htroot/ConfigLiveSearch.html index a833e2b81..d7277cb52 100644 --- a/htroot/ConfigLiveSearch.html +++ b/htroot/ConfigLiveSearch.html @@ -8,37 +8,74 @@ #%env/templates/header.template%# #%env/templates/submenuPortalIntegration.template%# -

Integration of a Search Field for Live Search

+

Integration of Live Search with YaCy Search Widget

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.

+

+ There are basically two methods for integrating the YaCy Search Widget with your web site. +

    +
  1. Static hosting of widget on own HTTP server
  2. +
  3. Remote access through selected YaCy Peer
  4. +
+

+ +

Static hosting of widget on own HTTP server

+Advantages: +
    +
  • faster connection speed
  • +
  • possibility for local adaptions
  • +
+Disadvantages: +
    +
  • No automatic update to future releases of YaCy Search Widget
  • +
  • Ajax/JSONP cross domain requests needed to query remote YaCy Peer
  • +
+Installing: +
    +
  • download yacy-portalsearch.tar.gz from http://yacy.net
  • +
  • unpack within your HTTP servers path
  • +
  • use ./yacy/portalsearch/yacy-portalsearch.html as reference for integration with your own portal page
  • +
+

Remote access through selected YaCy Peer

+Advantages: +
    +
  • Always latest version of YaCy Search Widget
  • +
  • No Ajax/JSONP cross domain requests, as Search Widget and YaCy Peer are hosted on the same domain.
  • +
+Disadvantages: +
    +
  • Under certain cirumstances slower than static hosting
  • +
+Installing: +
    +
  • Just use the code snippet below and paste it any place in your own portal page
  • +
  • Please check if '#[ip]#:#[port]#' is appropriate or replace it with address of the YaCy Peer holding your index
  • +
-

Code Snippet:

-<script src="http://#[ip]#:#[port]#/yacy/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
+<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]#',
-			logo   : '/yacy/ui/img/yacy-logo.png',
-			link   : 'http://www.yacy.net',
-			global : false,
-			width  : 500,
-			height : 620,
+			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',
-			title  : 'YaCy Portal Search'
+			theme    : 'start'
 		};
-		$.getScript(yconf.url+'/yacy/ui/js/yacyui-portalsearch.js', function(){});
+		$.getScript(yconf.url+'/portalsearch/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="verify" value="iffresh" />
 		<input type="hidden" name="maximumRecords" value="20" />
 		<input type="hidden" name="resource" value="local" />
 		<input type="hidden" name="urlmaskfilter" value=".*" />
@@ -52,15 +89,15 @@
 

Configuration options and defaults for 'yconf':

Defaults
-
url
is a mandatory property - no default
+
url
http://localhost:8090
global
false
theme
'start'
-
title
'YaCy P2P Web Search'
+
title
'YaCy Search Widget'
logo
'/yacy/ui/img/yacy-logo.png'
link
'http://www.yacy.net'
-
width
420
-
height
500
-
position
['top',50]
+
width
640
+
height
640
+
position
[150,50]
modal
false
resizable
true
show
''
@@ -79,30 +116,19 @@ If resizable is set to true, the dialog will be resizeable.

Load JavaScript load_js (true | false)

-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. -

-
-<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>
-
+This parameter is used for static hosting only. +

Load Stylesheets load_css (true | false)

-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. -

-
-<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" />
-
+This parameter is used for static hosting only. +

Themes
-

You can -download ready made themes or create -your own custom theme.
Themes are installed into: DATA/HTDOCS/yacy/ui/css/themes/

- +

You can download standard jquery-ui themes or create your own custom themes on + +http://jqueryui.com/ +
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.

+ #%env/templates/footer.template%# diff --git a/htroot/YMarks.html b/htroot/YMarks.html index ee7946aa9..776151e10 100644 --- a/htroot/YMarks.html +++ b/htroot/YMarks.html @@ -1,12 +1,14 @@ - YaCy '#[user]#''s Bookmarks + YaCy Bookmarks #%env/templates/metas.template%# - + + - + + #%env/templates/header.template%# @@ -14,6 +16,7 @@ + \ No newline at end of file diff --git a/htroot/jquery/css/yacy-ymarks.css b/htroot/env/yacy-ymarks.css similarity index 100% rename from htroot/jquery/css/yacy-ymarks.css rename to htroot/env/yacy-ymarks.css diff --git a/htroot/jquery/css/yacy-portalsearch.css b/htroot/portalsearch/yacy-portalsearch.css similarity index 95% rename from htroot/jquery/css/yacy-portalsearch.css rename to htroot/portalsearch/yacy-portalsearch.css index 59a880b5e..38ccb72ca 100644 --- a/htroot/jquery/css/yacy-portalsearch.css +++ b/htroot/portalsearch/yacy-portalsearch.css @@ -1,15 +1,14 @@ +body, table, textarea { + font-size: 12px; +} + .ui-dialog .ui-dialog-title { font-size: 14px; } .ui-dialog .ui-dialog-buttonpane button { font-size: 14px; } -.ui-autocomplete { - max-height: 350px; - overflow-y: auto; - overflow-x: hidden; - font-size: 1.0em; -} + .ynav-cancel { vertical-align: middle; margin-left: 5px; diff --git a/htroot/portalsearch/yacy-portalsearch.html b/htroot/portalsearch/yacy-portalsearch.html new file mode 100644 index 000000000..bc7862f96 --- /dev/null +++ b/htroot/portalsearch/yacy-portalsearch.html @@ -0,0 +1,53 @@ + + + + YaCy Bookmarks + + + + + + + + + + + + + + + + +

YaCy Portalsearch:

+
+

+ + + + + + + +

+ +
+ + \ No newline at end of file diff --git a/htroot/jquery/js/yacy-portalsearch.js b/htroot/portalsearch/yacy-portalsearch.js similarity index 98% rename from htroot/jquery/js/yacy-portalsearch.js rename to htroot/portalsearch/yacy-portalsearch.js index cd2a0e7f7..f970c41f9 100644 --- a/htroot/jquery/js/yacy-portalsearch.js +++ b/htroot/portalsearch/yacy-portalsearch.js @@ -39,10 +39,10 @@ $(document).ready(function() { maximumRecords = 10; submit = false; yconf = $.extend({ - url : 'is a mandatory property - no default', + url : '', 'global' : false, theme : 'start', - title : 'YaCy P2P Web Search', + title : 'YaCy Search Widget', logo : yconf.url + '/yacy/ui/img/yacy-logo.png', link : 'http://yacy.net', width : 640, @@ -59,7 +59,7 @@ $(document).ready(function() { $('
').appendTo("#yacylivesearch"); if(yconf.load_css) { - var style1 = yconf.url + '/jquery/css/yacy-portalsearch.css'; + var style1 = yconf.url + '/portalsearch/yacy-portalsearch.css'; var style2 = yconf.url + '/jquery/themes/'+yconf.theme+'/ui.all.css'; var style3 = yconf.url + '/jquery/css/jquery-ui-combobox.css';