diff options
| -rw-r--r-- | build.xml | 26 | ||||
| -rw-r--r-- | htroot/ConfigLiveSearch.html | 108 | ||||
| -rw-r--r-- | htroot/YMarks.html | 9 | ||||
| -rw-r--r-- | htroot/env/templates/portalheader.template | 10 | ||||
| -rw-r--r-- | htroot/env/yacy-ymarks.css (renamed from htroot/jquery/css/yacy-ymarks.css) | 0 | ||||
| -rw-r--r-- | htroot/portalsearch/yacy-portalsearch.css (renamed from htroot/jquery/css/yacy-portalsearch.css) | 11 | ||||
| -rw-r--r-- | htroot/portalsearch/yacy-portalsearch.html | 53 | ||||
| -rw-r--r-- | htroot/portalsearch/yacy-portalsearch.js (renamed from htroot/jquery/js/yacy-portalsearch.js) | 6 |
8 files changed, 164 insertions, 59 deletions
@@ -58,7 +58,13 @@ <property name="release_mac" location="${release}/MAC"/> <property name="svnEntriesFile" location=".svn/entries"/> <property name="defaults" location="defaults"/> - <!-- variables for installonlinux target--> + + <!-- defining all needed directory names for packing search widget--> + <property name="jquery" location="htroot/jquery/"/> + <property name="portalsearch" location="htroot/portalsearch/"/> + <property name="img-2" location="htroot/yacy/ui/img-2"/> + + <!-- variables for installonlinux target--> <property name="DESTDIR" value="DESTDIR"/> <property name="PKGMANAGER" value="false"/> <property name="RESTARTCMD" value="/etc/init.d/yacy restart"/> @@ -270,7 +276,7 @@ <target name="all" depends="compile"> </target> - <target name="copyMain4Dist" depends="compile"> + <target name="copyMain4Dist" depends="compile"> <!-- copy all libs --> <copy todir="${release_main}/lib"> <fileset dir="${lib}" @@ -476,6 +482,22 @@ <delete dir="${release_windows}" failonerror="false" /> <delete dir="${release}/SPECS" failonerror="false" /> </target> + + <!-- packing YaCy search widget for static hosting --> + <target name="portalsearch" description="pack YaCy search widget for static hosting"> + <tar destfile="${release}/yacy-portalsearch.tar.gz" compression="gzip" defaultexcludes="yes" longfile="fail"> + <tarfileset dir="${portalsearch}" prefix="yacy/portalsearch/"> + <include name="*.*"/> + </tarfileset> + <tarfileset dir="${jquery}" prefix="yacy/jquery/"> + <include name="**/*"/> + </tarfileset> + <tarfileset dir="${img-2}" prefix="yacy/ui/img-2/"> + <include name="magnify.png"/> + <include name="cancel_round.png"/> + </tarfileset> + </tar> + </target> <!-- make clean --> <target name="clean" description="make clean"> 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 @@ <body id="ConfigSkins">
#%env/templates/header.template%#
#%env/templates/submenuPortalIntegration.template%#
- <h2>Integration of a Search Field for Live Search</h2>
+ <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).
- 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>
+ <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>
-<h4>Code Snippet:</h4>
<pre>
-<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 @@ <h4>Configuration options and defaults for 'yconf':</h4>
<h5>Defaults</h5>
<form action=""><dl>
-<dt>url</dt><dd>is a mandatory property - no default</dd>
+<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 P2P Web Search'</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>420</dd>
-<dt>height</dt><dd>500</dd>
-<dt>position</dt><dd>['top',50]</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>
@@ -79,30 +116,19 @@ If resizable is set to true, the dialog will be resizeable. </p>
<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. -</p>
-<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> +This parameter is used for static hosting only. +</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. -</p>
-<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> +This parameter is used for static hosting only. +</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>
-
+<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>
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 @@ <!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 '#[user]#''s Bookmarks</title> + <title>YaCy Bookmarks</title> #%env/templates/metas.template%# - <link media="screen" type="text/css" href="jquery/css/yacy-ymarks.css" rel="stylesheet" /> + <link media="screen" type="text/css" href="/env/yacy-ymarks.css" rel="stylesheet" /> + <link media="screen" type="text/css" href="/yacy/ui/css/jquery.flexigrid.css" rel="stylesheet" /> <link media="screen" type="text/css" href="/yacy/ui/css/jquery.treeview.css" rel="stylesheet" /> - <link media="screen" type="text/css" href="/yacy/ui/css/jquery.multiselect.css" rel="stylesheet" /> + <link media="screen" type="text/css" href="/yacy/ui/css/jquery.multiselect.css" rel="stylesheet" /> + </head> <body id="ymarks_body"> #%env/templates/header.template%# @@ -14,6 +16,7 @@ <script src="/yacy/ui/js/jquery.treeview.min.js" type="text/javascript"></script> <script src="/yacy/ui/js/jquery.treeview.async.js" type="text/javascript"></script> <script src="/yacy/ui/js/jquery.multiselect.min.js" type="text/javascript"></script> + <script type="text/javascript"> //<![CDATA[ HTMLenc = function(s) { diff --git a/htroot/env/templates/portalheader.template b/htroot/env/templates/portalheader.template index 993ced12b..fc055ea66 100644 --- a/htroot/env/templates/portalheader.template +++ b/htroot/env/templates/portalheader.template @@ -1,24 +1,26 @@ <!-- YaCy Portalseach by apfelmaennchen <sof@gmx.de> --> <!-- /env/portalheader.template --> - <link media="screen" type="text/css" href="/jquery/css/yacy-portalsearch.css" rel="stylesheet" /> + <link media="screen" type="text/css" href="/portalsearch/yacy-portalsearch.css" rel="stylesheet" /> <script src="/jquery/js/jquery.query-2.1.7.js" type="text/javascript"></script> <script src="/jquery/js/jquery.form-2.73.js" type="text/javascript"></script> <script src="/jquery/js/jquery.field-0.9.2.min.js" type="text/javascript"></script> <script type="text/javascript"> + //<![CDATA[ $(document).ready(function() { if ($("#yacylivesearch").length ) { yconf = { url : ' ', - global : true, + global : false, width : 500, height : 600, theme : 'start', - title : 'YaCy Widget', + title : 'YaCy Search Widget', load_js : false, load_css : false }; - $.getScript(yconf.url+'/jquery/js/yacy-portalsearch.js', function(){}); + $.getScript(yconf.url+'/portalsearch/yacy-portalsearch.js', function(){}); } }); + //]]> </script> <!-- END YaCy Portalsearch -->
\ No newline at end of file diff --git a/htroot/jquery/css/yacy-ymarks.css b/htroot/env/yacy-ymarks.css index 64fb95b24..64fb95b24 100644 --- a/htroot/jquery/css/yacy-ymarks.css +++ b/htroot/env/yacy-ymarks.css diff --git a/htroot/jquery/css/yacy-portalsearch.css b/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 @@ +<!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 Bookmarks</title> + + <link media="screen" type="text/css" href="../jquery/themes/start/jquery-ui-1.8.16.custom.css" rel="stylesheet" /> + <link media="screen" type="text/css" href="../jquery/css/jquery-ui-combobox.css" rel="stylesheet" /> + <link media="screen" type="text/css" href="yacy-portalsearch.css" rel="stylesheet" /> + + <script src="../jquery/js/jquery-1.7.min.js" type="text/javascript"></script> + <script src="../jquery/js/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script> + + <script src="../jquery/js/jquery-ui-combobox.js" type="text/javascript"></script> + <script src="../jquery/js/jquery.query-2.1.7.js" type="text/javascript"></script> + <script src="../jquery/js/jquery.form-2.73.js" type="text/javascript"></script> + <script src="../jquery/js/jquery.field-0.9.2.min.js" type="text/javascript"></script> + + <script type="text/javascript"> + //<![CDATA[ + $(document).ready(function() { + if ($("#yacylivesearch").length ) { + yconf = { + url : 'http://www.yacy-suche.de/', + global : true, + width : 500, + height : 600, + theme : 'start', + title : 'YaCy Search Widget: yacy-suche.de', + load_js : false, + load_css : false + }; + $.getScript('yacy-portalsearch.js', function(){}); + } + }); + //]]> + </script> + </head> + <body> + <h3>YaCy Portalsearch:</h3> + <div id="yacylivesearch"> + <form id="ysearch" method="get" accept-charset="UTF-8" action="yacysearch.html"><p> + <input name="query" id="yquery" class="fancy" type="text" size="20" maxlength="80" value=""/> + <input type="hidden" name="verify" value="iffresh" /> + <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="former" value="" /> + <input type="hidden" name="nav" value="all" /></p> + </form> + </div> + </body> +</html>
\ No newline at end of file diff --git a/htroot/jquery/js/yacy-portalsearch.js b/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() { $('<div id="ypopup" class="classic"></div>').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'; |
