From a425fbd8d64364eca9fcda8d761fa12096e73cf4 Mon Sep 17 00:00:00 2001
From: apfelmaennchen
Date: Wed, 9 Nov 2011 21:01:38 +0000
Subject: [PATCH] - created new target 'portalsearch' in build.xml to generate
yacy-portalsearch.tar.gz for static hosting - some refactoring for search
widget and jquery - update for ConfigLiveSearch.html to refelct latest
changes
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@8023 6c8d7289-2bf4-0310-a012-ef5d649a1542
---
build.xml | 26 ++++-
htroot/ConfigLiveSearch.html | 108 +++++++++++-------
htroot/YMarks.html | 9 +-
htroot/env/templates/portalheader.template | 10 +-
htroot/{jquery/css => env}/yacy-ymarks.css | 0
.../yacy-portalsearch.css | 11 +-
htroot/portalsearch/yacy-portalsearch.html | 53 +++++++++
.../js => portalsearch}/yacy-portalsearch.js | 6 +-
8 files changed, 164 insertions(+), 59 deletions(-)
rename htroot/{jquery/css => env}/yacy-ymarks.css (100%)
rename htroot/{jquery/css => portalsearch}/yacy-portalsearch.css (95%)
create mode 100644 htroot/portalsearch/yacy-portalsearch.html
rename htroot/{jquery/js => portalsearch}/yacy-portalsearch.js (98%)
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.
+
+ - Static hosting of widget on own HTTP server
+ - Remote access through selected YaCy Peer
+
+
+
+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