diff --git a/htroot/yacy/user/default.css b/htroot/yacy/user/default.css deleted file mode 100755 index 98792ea45..000000000 --- a/htroot/yacy/user/default.css +++ /dev/null @@ -1,551 +0,0 @@ -/* -Design by Free CSS Templates -http://www.freecsstemplates.org -Released for free under a Creative Commons Attribution 2.5 License - -extended with material from YaCy developers (was: base.css) -*/ - -* { - margin: 0; - padding: 0; -} - -body { - background: #FFFFFF url(images/background.gif) repeat-x; - font: normal small Arial, Helvetica, sans-serif; - color: #808080; -} - -form { -} - -fieldset { - border: none; -} - -legend { - display: none; -} - -h1, h2, h3 { - margin-top: 0em; - margin: 0; - color: #239AFF; -} - -h2 { - margin-bottom: .6em; - font-size: 1.8em; -} - -h3 { - margin-bottom: 0em; - font-size: 1em; - line-height: 1.2em; -} - -p, blockquote, ul, ol { - margin-bottom: 1.5em; - line-height: 1.2em; -} - -p { -} - -blockquote { -} - -ul { - margin-left: 2em; - list-style: square; -} - -ul li { -} - -ol { - margin-left: 2em; - list-style: lower-roman; -} - -ol li { -} - -a { - color: #FFA020; -} - -a:hover { - text-decoration: none; - color: #20A020; -} - -img { - border: none; -} - -/* Boxed Style */ - -.boxed { - margin-bottom: 1em; - background: #F7F7F7; - border: 1px solid #F0F0F0; -} - -.boxed .title { - height: 29px; - padding: 10px 0 0 27px; - background: #239AFF url(images/arrow2.gif) no-repeat 10px 50%; - text-transform: uppercase; - font-size: 1.2em; - color: #FFFFFF; -} - -.boxed .content { - padding: 9px; -} - -/* Header */ - -#header { - width: 92%; - height: 60px; - margin: 0 auto; - background: #239AFF; -} - -/* Header > Logo */ - -#logo { - float: left; - padding: 5px 0 0 0; -} - -#logo h1 { - text-transform: uppercase; - font-size: 2em; -} - -#logo h2 { - margin: 0; - text-transform: uppercase; - font-size: 1.2em; -} - -#logo a { - text-decoration: none; - color: #FFFFFF; -} - -/* Header > Top Menu */ - -#topmenu { - float: right; -} - -#topmenu ul { - margin: 0; - padding: 40px 0 0 0; - list-style: none; - line-height: normal; -} - -#topmenu li { - display: inline -} - -#topmenu a { - display: block; - float: left; - margin: 0 0 0 16px; - padding: 0 0 0 12px; - text-transform: uppercase; - text-decoration: none; - font-size: x-small; - font-weight: bold; - color: #FFFFFF; -} - -#topmenu a:hover { - text-decoration: underline -} - -#topmenuhome { - background: url(images/house.gif) no-repeat left center; -} - -#topmenutree { - background: url(images/tree.gif) no-repeat left center; -} - -#topmenucontact { - background: url(images/letter.gif) no-repeat left center; -} - -/* Menu */ - -#menu { - width: 92%; - height: 40px; - margin: 0 auto; -} - -#menu ul { - margin: 0; - list-style: none; - line-height: normal; -} - -#menu li { - display: inline; -} - -#menu a { - display: block; - float: left; - height: 26px; - padding: 14px 18px 0 20px; - text-transform: uppercase; - text-decoration: none; - font-weight: bold; - color: #20A020; -} - -#menu a:hover { - text-decoration: underline; -} - -#menu .first a { - padding-left: 0; - background: none; -} - -/* Content */ - -#content { - width: 92%; - padding-left: 10px; - margin: 0 auto; - padding: 20px 0; -} - -/* Content > Main */ - -#main { - float: left; - width: 70%; -} - -/* Content > Main > Example */ - -#example { -} - -/* Content > Main > Welcome */ - -#welcome { - margin: 0 0 1em 0; - padding: 10px 0 1.5em 0; - /* border-bottom: 1px solid #CCCCCC; */ -} - -#searchtext { - width: 400px; - margin-bottom: .5em; - padding: 2px 5px; - border: 1px solid #CCCCCC; - font: normal small Arial, Helvetica, sans-serif; - color: #999999; -} - -#searchbutton { - width: 100px; - margin-bottom: .5em; - padding: 2px 5px; - border: 1px solid #CCCCCC; - font: normal small Arial, Helvetica, sans-serif; - color: #999999; -} - - -/* Content > Sidebar */ - -#sidebar { - float: right; - width: 220px; -} - -/* Content > Sidebar > Login */ - -#login { -} - -#login label { - display: block; -} - -#login #inputtext1, #login #inputtext2 { - width: 180px; - margin-bottom: .5em; - padding: 2px 5px; - border: 1px solid #CCCCCC; - font: normal small Arial, Helvetica, sans-serif; - color: #999999; -} - -#login #inputsubmit1 { - float: right; - width: 60px; - margin-right: 7px; - border: 1px solid #CCCCCC; - border-top-color: #FFFFFF; - border-left-color: #FFFFFF; - font: normal small Arial, Helvetica, sans-serif; -} - -#login p { - margin: 0; - padding-top: .2em; - font-size: x-small; -} - -/* Content > Sidebar > Updates*/ - -#updates { -} - -#updates ul { - margin: 0; - list-style: none; -} - -#updates li { - margin-bottom: 1em; -} - -#updates h3 { - margin: 0; - padding: 0 0 0 10px; - background: url(images/arrow1.gif) no-repeat left center; - font-size: x-small; -} - -#updates p { - margin: 0; - padding: 0 0 0 10px; - line-height: normal; - font-size: .85em; -} - -#updates a { - text-decoration: none; -} - -/* Content > Sidebar > Partners*/ - -#partners { -} - -/* Footer */ - -#footer { - clear: both; - width: 92%; - margin: 0 auto 2em auto; - background: #F7F7F7; - border: 1px solid #F0F0F0; -} - -/* Footer > Legal */ - -#legal { - margin: 0; - padding: 8px; - text-align: center; - color: #808080; -} - -#legal a { - font-weight: bold; - color: #808080; -} - -/* Footer > Links */ - -#links { - margin: 0; - padding: 10px; - text-align: center; -} - - -/* YaCy additions */ - -div.searchresults { - padding-top:0.4em; - margin-bottom:0.4em; -} - -div.searchresults.hidden { - display:none; -} - -h3.linktitle { - margin:2px; - padding-left: 20px; -} - -img.favicon{ - margin: 0px 4px 0px -20px; - width: 16px; - height: 16px; - float: left; -} - -div.urlactions { - float:left; - clear:left; - margin: 0px 6px 0px 2px; -} - -div.urlactions a { - display:block; - width: 12px; - height: 12px; - margin: 2px 0px; -} - -a.bookmarkTags { - font-weight:bold; - white-space:nowrap; -} - -a.bookmarkTitle { - font-size:17px; - font-weight:bold; -} - -a.BookmarkLink { - background:url(/env/grafics/addlink.png) left center no-repeat; - padding-left:15px; -} - -a.bookmarklink:hover, div.searchresults:hover a.bookmarklink, div.searchresults.hover a.bookmarklink { - background:url(/env/grafics/bookmark.gif) center center no-repeat; -} - -a.recommendlink:hover, div.searchresults:hover a.recommendlink, div.searchresults.hover a.recommendlink { - background:url(/env/grafics/plus.gif) center center no-repeat; -} - -a.deletelink:hover, div.searchresults:hover a.deletelink, div.searchresults.hover a.deletelink { - background:url(/env/grafics/minus.gif) center center no-repeat; -} - -img.deleteIcon, img.recommendIcon { - height: 11px; - width: 11px; -} - -img.bookmarkIcon { - height: 18px; - width: 18px; -} - -.snippet { - font-style:italic; - color: #808080; - line-height: 1.2em; - margin-bottom:0em; - margin-left:22px; -} - -.snippet b { - color: black; -} - -.searchresults .linktitle a { - color:#239AFF; - text-decoration:none; -} - -.searchresults .url { - line-height: 1.2em; - margin-bottom:0.6em; - margin-left:22px; -} - -.searchresults .url a { - color:#20A020; - text-decoration:none; -} - -div.ProgressBarCaption { - float:left; - width:70px; -} - -div.ProgressBar { - float:left; - width:100px; - height:10px; -} - -div.ProgressBarFill { - margin:0px; - padding:0px; - height:100%; /*not valid value for Netscape 8*/ -} - -#resCounter { - /* left part of the progress bar */ - position: absolute; - left: 1em; -} - -#resProgBar { - height: 1.5em; - margin: 1em auto; - position: relative; /* for "relative" absolute pos of children */ - text-align: left; - width: 100%; - float: none; -} - -#resNav { - /* right part of the progress bar */ - position: absolute; - right: 1em; -} - -#resNav a { - color:#239AFF; -} - -#resProgFill { - position: absolute; - left: 0px; - top: 0px; -} - -.thumbcontainer { - margin: 2px; - width: 100px; - height: 160px; /* 96px thumbnail + some lines of text */ - float: left; -} - -a.thumblink { - display:block; - width: 96px; - height: 96px; - margin: 2px; - line-height: 96px; - text-align: center; - overflow: hidden; -} - -.thumblink img { - vertical-align: bottom; -} diff --git a/htroot/yacy/user/images/arrow1.gif b/htroot/yacy/user/images/arrow1.gif deleted file mode 100755 index a3709d0ad..000000000 Binary files a/htroot/yacy/user/images/arrow1.gif and /dev/null differ diff --git a/htroot/yacy/user/images/arrow2.gif b/htroot/yacy/user/images/arrow2.gif deleted file mode 100755 index 7bc205745..000000000 Binary files a/htroot/yacy/user/images/arrow2.gif and /dev/null differ diff --git a/htroot/yacy/user/images/background.gif b/htroot/yacy/user/images/background.gif deleted file mode 100755 index 69f05846e..000000000 Binary files a/htroot/yacy/user/images/background.gif and /dev/null differ diff --git a/htroot/yacy/user/images/basket_raw.png b/htroot/yacy/user/images/basket_raw.png deleted file mode 100644 index a17c1318b..000000000 Binary files a/htroot/yacy/user/images/basket_raw.png and /dev/null differ diff --git a/htroot/yacy/user/images/basket_selected.png b/htroot/yacy/user/images/basket_selected.png deleted file mode 100644 index 13394f502..000000000 Binary files a/htroot/yacy/user/images/basket_selected.png and /dev/null differ diff --git a/htroot/yacy/user/images/house.gif b/htroot/yacy/user/images/house.gif deleted file mode 100755 index 8f0371531..000000000 Binary files a/htroot/yacy/user/images/house.gif and /dev/null differ diff --git a/htroot/yacy/user/images/img01.gif b/htroot/yacy/user/images/img01.gif deleted file mode 100755 index 69f05846e..000000000 Binary files a/htroot/yacy/user/images/img01.gif and /dev/null differ diff --git a/htroot/yacy/user/images/img03.gif b/htroot/yacy/user/images/img03.gif deleted file mode 100755 index 8f0371531..000000000 Binary files a/htroot/yacy/user/images/img03.gif and /dev/null differ diff --git a/htroot/yacy/user/images/img04.gif b/htroot/yacy/user/images/img04.gif deleted file mode 100755 index 85377af26..000000000 Binary files a/htroot/yacy/user/images/img04.gif and /dev/null differ diff --git a/htroot/yacy/user/images/img05.gif b/htroot/yacy/user/images/img05.gif deleted file mode 100755 index dcb8ed56b..000000000 Binary files a/htroot/yacy/user/images/img05.gif and /dev/null differ diff --git a/htroot/yacy/user/images/img08.gif b/htroot/yacy/user/images/img08.gif deleted file mode 100755 index 7bc205745..000000000 Binary files a/htroot/yacy/user/images/img08.gif and /dev/null differ diff --git a/htroot/yacy/user/images/img09.gif b/htroot/yacy/user/images/img09.gif deleted file mode 100755 index a3709d0ad..000000000 Binary files a/htroot/yacy/user/images/img09.gif and /dev/null differ diff --git a/htroot/yacy/user/images/letter.gif b/htroot/yacy/user/images/letter.gif deleted file mode 100755 index dcb8ed56b..000000000 Binary files a/htroot/yacy/user/images/letter.gif and /dev/null differ diff --git a/htroot/yacy/user/images/spacer.gif b/htroot/yacy/user/images/spacer.gif deleted file mode 100755 index 5bfd67a2d..000000000 Binary files a/htroot/yacy/user/images/spacer.gif and /dev/null differ diff --git a/htroot/yacy/user/images/tree.gif b/htroot/yacy/user/images/tree.gif deleted file mode 100755 index 85377af26..000000000 Binary files a/htroot/yacy/user/images/tree.gif and /dev/null differ diff --git a/htroot/yacy/user/license.txt b/htroot/yacy/user/license.txt deleted file mode 100755 index 7f9442eca..000000000 --- a/htroot/yacy/user/license.txt +++ /dev/null @@ -1,243 +0,0 @@ -Creative Commons - -Creative Commons Legal Code - -*Attribution 2.5* - -CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE -LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN -ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION -ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE -INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM -ITS USE. - -/License/ - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE -COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY -COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS -AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE -TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE -RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS -AND CONDITIONS. - -*1. Definitions* - - 1. *"Collective Work"* means a work, such as a periodical issue, - anthology or encyclopedia, in which the Work in its entirety in - unmodified form, along with a number of other contributions, - constituting separate and independent works in themselves, are - assembled into a collective whole. A work that constitutes a - Collective Work will not be considered a Derivative Work (as - defined below) for the purposes of this License. - 2. *"Derivative Work"* means a work based upon the Work or upon the - Work and other pre-existing works, such as a translation, musical - arrangement, dramatization, fictionalization, motion picture - version, sound recording, art reproduction, abridgment, - condensation, or any other form in which the Work may be recast, - transformed, or adapted, except that a work that constitutes a - Collective Work will not be considered a Derivative Work for the - purpose of this License. For the avoidance of doubt, where the - Work is a musical composition or sound recording, the - synchronization of the Work in timed-relation with a moving image - ("synching") will be considered a Derivative Work for the purpose - of this License. - 3. *"Licensor"* means the individual or entity that offers the Work - under the terms of this License. - 4. *"Original Author"* means the individual or entity who created the - Work. - 5. *"Work"* means the copyrightable work of authorship offered under - the terms of this License. - 6. *"You"* means an individual or entity exercising rights under this - License who has not previously violated the terms of this License - with respect to the Work, or who has received express permission - from the Licensor to exercise rights under this License despite a - previous violation. - -*2. Fair Use Rights.* Nothing in this license is intended to reduce, -limit, or restrict any rights arising from fair use, first sale or other -limitations on the exclusive rights of the copyright owner under -copyright law or other applicable laws. - -*3. License Grant.* Subject to the terms and conditions of this License, -Licensor hereby grants You a worldwide, royalty-free, non-exclusive, -perpetual (for the duration of the applicable copyright) license to -exercise the rights in the Work as stated below: - - 1. to reproduce the Work, to incorporate the Work into one or more - Collective Works, and to reproduce the Work as incorporated in the - Collective Works; - 2. to create and reproduce Derivative Works; - 3. to distribute copies or phonorecords of, display publicly, perform - publicly, and perform publicly by means of a digital audio - transmission the Work including as incorporated in Collective Works; - 4. to distribute copies or phonorecords of, display publicly, perform - publicly, and perform publicly by means of a digital audio - transmission Derivative Works. - 5. - - For the avoidance of doubt, where the work is a musical composition: - - 1. *Performance Royalties Under Blanket Licenses*. Licensor - waives the exclusive right to collect, whether individually - or via a performance rights society (e.g. ASCAP, BMI, - SESAC), royalties for the public performance or public - digital performance (e.g. webcast) of the Work. - 2. *Mechanical Rights and Statutory Royalties*. Licensor waives - the exclusive right to collect, whether individually or via - a music rights agency or designated agent (e.g. Harry Fox - Agency), royalties for any phonorecord You create from the - Work ("cover version") and distribute, subject to the - compulsory license created by 17 USC Section 115 of the US - Copyright Act (or the equivalent in other jurisdictions). - 6. *Webcasting Rights and Statutory Royalties*. For the avoidance of - doubt, where the Work is a sound recording, Licensor waives the - exclusive right to collect, whether individually or via a - performance-rights society (e.g. SoundExchange), royalties for the - public digital performance (e.g. webcast) of the Work, subject to - the compulsory license created by 17 USC Section 114 of the US - Copyright Act (or the equivalent in other jurisdictions). - -The above rights may be exercised in all media and formats whether now -known or hereafter devised. The above rights include the right to make -such modifications as are technically necessary to exercise the rights -in other media and formats. All rights not expressly granted by Licensor -are hereby reserved. - -*4. Restrictions.*The license granted in Section 3 above is expressly -made subject to and limited by the following restrictions: - - 1. You may distribute, publicly display, publicly perform, or - publicly digitally perform the Work only under the terms of this - License, and You must include a copy of, or the Uniform Resource - Identifier for, this License with every copy or phonorecord of the - Work You distribute, publicly display, publicly perform, or - publicly digitally perform. You may not offer or impose any terms - on the Work that alter or restrict the terms of this License or - the recipients' exercise of the rights granted hereunder. You may - not sublicense the Work. You must keep intact all notices that - refer to this License and to the disclaimer of warranties. You may - not distribute, publicly display, publicly perform, or publicly - digitally perform the Work with any technological measures that - control access or use of the Work in a manner inconsistent with - the terms of this License Agreement. The above applies to the Work - as incorporated in a Collective Work, but this does not require - the Collective Work apart from the Work itself to be made subject - to the terms of this License. If You create a Collective Work, - upon notice from any Licensor You must, to the extent practicable, - remove from the Collective Work any credit as required by clause - 4(b), as requested. If You create a Derivative Work, upon notice - from any Licensor You must, to the extent practicable, remove from - the Derivative Work any credit as required by clause 4(b), as - requested. - 2. If you distribute, publicly display, publicly perform, or publicly - digitally perform the Work or any Derivative Works or Collective - Works, You must keep intact all copyright notices for the Work and - provide, reasonable to the medium or means You are utilizing: (i) - the name of the Original Author (or pseudonym, if applicable) if - supplied, and/or (ii) if the Original Author and/or Licensor - designate another party or parties (e.g. a sponsor institute, - publishing entity, journal) for attribution in Licensor's - copyright notice, terms of service or by other reasonable means, - the name of such party or parties; the title of the Work if - supplied; to the extent reasonably practicable, the Uniform - Resource Identifier, if any, that Licensor specifies to be - associated with the Work, unless such URI does not refer to the - copyright notice or licensing information for the Work; and in the - case of a Derivative Work, a credit identifying the use of the - Work in the Derivative Work (e.g., "French translation of the Work - by Original Author," or "Screenplay based on original Work by - Original Author"). Such credit may be implemented in any - reasonable manner; provided, however, that in the case of a - Derivative Work or Collective Work, at a minimum such credit will - appear where any other comparable authorship credit appears and in - a manner at least as prominent as such other comparable authorship - credit. - -*5. Representations, Warranties and Disclaimer* - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR -OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY -KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, -INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, -FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF -LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, -WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -*6. Limitation on Liability.* EXCEPT TO THE EXTENT REQUIRED BY -APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL -THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY -DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF -LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -*7. Termination* - - 1. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this License. - Individuals or entities who have received Derivative Works or - Collective Works from You under this License, however, will not - have their licenses terminated provided such individuals or - entities remain in full compliance with those licenses. Sections - 1, 2, 5, 6, 7, and 8 will survive any termination of this License. - 2. Subject to the above terms and conditions, the license granted - here is perpetual (for the duration of the applicable copyright in - the Work). Notwithstanding the above, Licensor reserves the right - to release the Work under different license terms or to stop - distributing the Work at any time; provided, however that any such - election will not serve to withdraw this License (or any other - license that has been, or is required to be, granted under the - terms of this License), and this License will continue in full - force and effect unless terminated as stated above. - -*8. Miscellaneous* - - 1. Each time You distribute or publicly digitally perform the Work or - a Collective Work, the Licensor offers to the recipient a license - to the Work on the same terms and conditions as the license - granted to You under this License. - 2. Each time You distribute or publicly digitally perform a - Derivative Work, Licensor offers to the recipient a license to the - original Work on the same terms and conditions as the license - granted to You under this License. - 3. If any provision of this License is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability - of the remainder of the terms of this License, and without further - action by the parties to this agreement, such provision shall be - reformed to the minimum extent necessary to make such provision - valid and enforceable. - 4. No term or provision of this License shall be deemed waived and no - breach consented to unless such waiver or consent shall be in - writing and signed by the party to be charged with such waiver or - consent. - 5. This License constitutes the entire agreement between the parties - with respect to the Work licensed here. There are no - understandings, agreements or representations with respect to the - Work not specified here. Licensor shall not be bound by any - additional provisions that may appear in any communication from - You. This License may not be modified without the mutual written - agreement of the Licensor and You. - -Creative Commons is not a party to this License, and makes no warranty -whatsoever in connection with the Work. Creative Commons will not be -liable to You or any party on any legal theory for any damages -whatsoever, including without limitation any general, special, -incidental or consequential damages arising in connection to this -license. Notwithstanding the foregoing two (2) sentences, if Creative -Commons has expressly identified itself as the Licensor hereunder, it -shall have all rights and obligations of Licensor. - -Except for the limited purpose of indicating to the public that the Work -is licensed under the CCPL, neither party will use the trademark -"Creative Commons" or any related trademark or logo of Creative Commons -without the prior written consent of Creative Commons. Any permitted use -will be in compliance with Creative Commons' then-current trademark -usage guidelines, as may be published on its website or otherwise made -available upon request from time to time. - -Creative Commons may be contacted at http://creativecommons.org/ -. - -« Back to Commons Deed <./> diff --git a/htroot/yacy/user/sidebar_history.html b/htroot/yacy/user/sidebar_history.html deleted file mode 100644 index 27f31cf66..000000000 --- a/htroot/yacy/user/sidebar_history.html +++ /dev/null @@ -1,14 +0,0 @@ -#(history)#:: -
-

Recent Searches

-
- -

The search history is only visible for users from host #[host]#

-
-
-#(/history)# - diff --git a/htroot/yacy/user/sidebar_history.java b/htroot/yacy/user/sidebar_history.java deleted file mode 100644 index b733abec5..000000000 --- a/htroot/yacy/user/sidebar_history.java +++ /dev/null @@ -1,68 +0,0 @@ -// sidebar_history.java -// (C) 2008 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany -// first published 03.03.2008 on http://yacy.net -// -// This is a part of YaCy, a peer-to-peer based web search engine -// -// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $ -// $LastChangedRevision: 1986 $ -// $LastChangedBy: orbiter $ -// -// LICENSE -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -import java.util.HashSet; -import java.util.Iterator; - -import de.anomic.http.httpRequestHeader; -import de.anomic.plasma.plasmaSearchQuery; -import de.anomic.plasma.plasmaSwitchboard; -import de.anomic.server.serverObjects; -import de.anomic.server.serverSwitch; - -public class sidebar_history { - - public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) { - final plasmaSwitchboard sb = (plasmaSwitchboard) env; - final serverObjects prop = new serverObjects(); - - // list search history - final Iterator i = sb.localSearches.iterator(); - final String client = header.get(httpRequestHeader.CONNECTION_PROP_CLIENTIP); - plasmaSearchQuery query; - int c = 0; - final HashSet visibleQueries = new HashSet(); - while (i.hasNext()) { - query = i.next(); - if (query.resultcount == 0) continue; - if (query.offset != 0) continue; - if (!query.host.equals(client)) continue; // the search history should only be visible from the user who initiated the search - if (visibleQueries.contains(query.queryString)) continue; // avoid doubles - visibleQueries.add(query.queryString); - prop.put("history_list_" + c + "_querystring", query.queryString); - prop.put("history_list_" + c + "_searchdom", ((query.isLocal()) ? "local" : "global")); - prop.put("history_list_" + c + "_contentdom", query.contentdom()); - c++; - if (c >= 10) break; - } - prop.put("history_list", c); - prop.put("history_host", client); - if (c == 0) prop.put("history", 0); else prop.put("history", 1); // switch on if there is anything to see - - return prop; - } - -} diff --git a/htroot/yacy/user/sidebar_navigation.html b/htroot/yacy/user/sidebar_navigation.html deleted file mode 100644 index e787d2305..000000000 --- a/htroot/yacy/user/sidebar_navigation.html +++ /dev/null @@ -1,58 +0,0 @@ -#(rssreferences)#:: - -#{words}# -#[word]# -#{/words}# - -#(/rssreferences)# -#(navigation)#:: - -#(/navigation)# diff --git a/htroot/yacy/user/sidebar_navigation.java b/htroot/yacy/user/sidebar_navigation.java deleted file mode 100644 index 3fdc43ee9..000000000 --- a/htroot/yacy/user/sidebar_navigation.java +++ /dev/null @@ -1,202 +0,0 @@ -// sidebar_navigation.java -// (C) 2008 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany -// first published 03.03.2008 on http://yacy.net -// -// This is a part of YaCy, a peer-to-peer based web search engine -// -// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $ -// $LastChangedRevision: 1986 $ -// $LastChangedBy: orbiter $ -// -// LICENSE -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -import java.util.Iterator; -import java.util.Set; -import java.util.TreeSet; - -import de.anomic.http.httpRequestHeader; -import de.anomic.kelondro.kelondroMSetTools; -import de.anomic.kelondro.kelondroNaturalOrder; -import de.anomic.plasma.plasmaSearchEvent; -import de.anomic.plasma.plasmaSearchQuery; -import de.anomic.plasma.plasmaSwitchboard; -import de.anomic.server.serverDomains; -import de.anomic.server.serverObjects; -import de.anomic.server.serverSwitch; - -public class sidebar_navigation { - - private static final int MAX_TOPWORDS = 24; - - public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) { - final serverObjects prop = new serverObjects(); - - final String eventID = post.get("eventID", ""); - final boolean rss = post.get("rss", "false").equals("true"); - - // default settings for blank item - prop.put("navigation", "0"); - prop.put("rssreferences", "0"); - - // find search event - final plasmaSearchEvent theSearch = plasmaSearchEvent.getEvent(eventID); - if (theSearch == null) { - // the event does not exist, show empty page - return prop; - } - final plasmaSearchQuery theQuery = theSearch.getQuery(); - final int offset = theQuery.neededResults() - theQuery.displayResults(); - final int totalcount = theSearch.getRankingResult().getLocalResourceSize() + theSearch.getRankingResult().getRemoteResourceSize(); - - // attach the bottom line with search references (topwords) - final Set references = theSearch.references(20); - if (references.size() > 0) { - // get the topwords - final TreeSet topwords = new TreeSet(kelondroNaturalOrder.naturalComparator); - String tmp = ""; - final Iterator i = references.iterator(); - while (i.hasNext()) { - tmp = i.next(); - if (tmp.matches("[a-z]+")) { - topwords.add(tmp); - } - } - - // filter out the badwords - final TreeSet filteredtopwords = kelondroMSetTools.joinConstructive(topwords, plasmaSwitchboard.badwords); - if (filteredtopwords.size() > 0) { - kelondroMSetTools.excludeDestructive(topwords, plasmaSwitchboard.badwords); - } - - // avoid stopwords being topwords - if (env.getConfig("filterOutStopwordsFromTopwords", "true").equals("true")) { - if ((plasmaSwitchboard.stopwords != null) && (plasmaSwitchboard.stopwords.size() > 0)) { - kelondroMSetTools.excludeDestructive(topwords, plasmaSwitchboard.stopwords); - } - } - - if (rss) { - String word; - int hintcount = 0; - final Iterator iter = topwords.iterator(); - while (iter.hasNext()) { - word = iter.next(); - if (word != null) { - prop.putHTML("rssreferences_words_" + hintcount + "_word", word); - } - prop.put("rssreferences_words", hintcount); - if (hintcount++ > MAX_TOPWORDS) { - break; - } - } - prop.put("rssreferences", "1"); - } else { - String word; - int hintcount = 0; - final Iterator iter = topwords.iterator(); - while (iter.hasNext()) { - word = iter.next(); - if (/*(theQuery == null) ||*/ (theQuery.queryString == null)) break; - if (word != null) { - prop.putHTML("navigation_topwords_words_" + hintcount + "_word", word); - prop.putHTML("navigation_topwords_words_" + hintcount + "_newsearch", theQuery.queryString.replace(' ', '+') + "+" + word); - prop.put("navigation_topwords_words_" + hintcount + "_count", theQuery.displayResults()); - prop.put("navigation_topwords_words_" + hintcount + "_offset", "0"); - prop.put("navigation_topwords_words_" + hintcount + "_contentdom", theQuery.contentdom()); - prop.put("navigation_topwords_words_" + hintcount + "_resource", ((theQuery.isLocal()) ? "local" : "global")); - prop.put("navigation_topwords_words_" + hintcount + "_zonecode", theQuery.zonecode); - } - hintcount++; - if (hintcount >= MAX_TOPWORDS) break; - } - prop.put("navigation_topwords_words", hintcount); - prop.put("navigation_topwords", "1"); - } - } - - // compose language zone drill-down - final int[] zones = theSearch.getRankingResult().zones(); - boolean z = false; - domzone(prop, "All", theSearch.getRankingResult().size(), theQuery); - if (zones[serverDomains.TLD_EuropeRussia_ID] > 0) - { z = true; domzone(prop, "EuropeRussia", zones[serverDomains.TLD_EuropeRussia_ID], theQuery);} - if (zones[serverDomains.TLD_MiddleSouthAmerica_ID] > 0) - { z = true; domzone(prop, "MiddleSouthAmerica", zones[serverDomains.TLD_MiddleSouthAmerica_ID], theQuery);} - if (zones[serverDomains.TLD_SouthEastAsia_ID] > 0) - { z = true; domzone(prop, "SouthEastAsia", zones[serverDomains.TLD_SouthEastAsia_ID], theQuery);} - if (zones[serverDomains.TLD_MiddleEastWestAsia_ID] > 0) - { z = true; domzone(prop, "MiddleEastWestAsia_", zones[serverDomains.TLD_MiddleEastWestAsia_ID], theQuery);} - if (zones[serverDomains.TLD_NorthAmericaOceania_ID] + zones[serverDomains.TLD_Generic_ID] > 0) - { z = true; domzone(prop, "NorthAmericaOceania", zones[serverDomains.TLD_NorthAmericaOceania_ID] + zones[serverDomains.TLD_Generic_ID], theQuery);} - if (zones[serverDomains.TLD_Africa_ID] > 0) - { z = true; domzone(prop, "Africa", zones[serverDomains.TLD_Africa_ID], theQuery);} - if (zones[7] > 0) - { z = true; domzone(prop, "Intranet", zones[7], theQuery);} - prop.put("navigation_languagezone", (z) ? "1" : "0"); - - // compose page navigation - final StringBuilder resnav = new StringBuilder(); - final int thispage = offset / theQuery.displayResults(); - if (thispage == 0) resnav.append("< "); else { - resnav.append(navurla(thispage - 1, theQuery)); - resnav.append("< "); - } - final int numberofpages = Math.min(10, Math.max(thispage + 2, totalcount / theQuery.displayResults())); - for (int j = 0; j < numberofpages; j++) { - if (j == thispage) { - resnav.append(""); - resnav.append(j + 1); - resnav.append(" "); - } else { - resnav.append(navurla(j, theQuery)); - resnav.append(j + 1); - resnav.append(" "); - } - } - if (thispage >= numberofpages) resnav.append(">"); else { - resnav.append(navurla(thispage + 1, theQuery)); - resnav.append(">"); - } - prop.put("navigation_resnav", resnav.toString()); - prop.put("navigation", "1"); - - return prop; - } - - private static String navurla(final int page, final plasmaSearchQuery theQuery) { - return - ""; - } - - private static void domzone(final serverObjects prop, final String zonename, final int zonecount, final plasmaSearchQuery theQuery) { - prop.put("navigation_languagezone_" + zonename + "_count", zonecount); - prop.putHTML("navigation_languagezone_" + zonename + "_search", theQuery.queryString.replace(' ', '+')); - prop.put("navigation_languagezone_" + zonename + "_offset", "0"); - prop.put("navigation_languagezone_" + zonename + "_contentdom", theQuery.contentdom()); - prop.put("navigation_languagezone_" + zonename + "_resource", ((theQuery.isLocal()) ? "local" : "global")); - prop.put("navigation_languagezone_" + zonename, 1); - } - -} diff --git a/htroot/yacy/user/ysearch.html b/htroot/yacy/user/ysearch.html deleted file mode 100755 index d9ef2383e..000000000 --- a/htroot/yacy/user/ysearch.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - -YaCy '#[clientname]#': Search Page - - - - - - - - - - - - - - -
-
-
- - #(input)# - :: - - :: - - #(/input)# -
- -#(searchagain)# -:: - -#(/searchagain)# - - -#(excluded)# - :: -

The following words are stop-words and had been excluded from the search: #[stopwords]#.

-#(/excluded)# - - -#(num-results)# - :: -

No Results.

- :: -

No Results. (length of search words must be at least 3 characters)

- :: -
- Results #[offset]#-#[itemscount]# from #[totalcount]# total#(globalresults)#.:: (#[localResourceSize]# local, #[remoteResourceSize]# remote), #[remoteIndexCount]# links from #[remotePeerCount]# other YaCy peers.#(/globalresults)# - - :: -

Searching the web with this peer is disabled for unauthorized users. Please log in as administrator to use the search function

-#(/num-results)# - - - - - -#(resultTable)#::#(/resultTable)# -#{results}# - -#{/results}# -#(resultTable)#::
MediaURL
#(/resultTable)# - -
- - -
- - - - diff --git a/htroot/yacy/user/ysearch.java b/htroot/yacy/user/ysearch.java deleted file mode 100644 index 294757981..000000000 --- a/htroot/yacy/user/ysearch.java +++ /dev/null @@ -1,351 +0,0 @@ -// ysearchitem.java -// (C) 2004-2008 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany -// first published 2004 on http://yacy.net -// -// This is a part of YaCy, a peer-to-peer based web search engine -// -// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $ -// $LastChangedRevision: 1986 $ -// $LastChangedBy: orbiter $ -// -// LICENSE -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -import java.util.TreeSet; - -import de.anomic.http.httpRequestHeader; -import de.anomic.index.indexWord; -import de.anomic.kelondro.kelondroBitfield; -import de.anomic.kelondro.kelondroMSetTools; -import de.anomic.plasma.plasmaCondenser; -import de.anomic.plasma.plasmaSearchEvent; -import de.anomic.plasma.plasmaSearchQuery; -import de.anomic.plasma.plasmaSearchRankingProfile; -import de.anomic.plasma.plasmaSwitchboard; -import de.anomic.plasma.plasmaSwitchboardConstants; -import de.anomic.server.serverCore; -import de.anomic.server.serverObjects; -import de.anomic.server.serverSwitch; -import de.anomic.server.logging.serverLog; -import de.anomic.tools.iso639; -import de.anomic.tools.yFormatter; -import de.anomic.xml.RSSFeed; -import de.anomic.xml.RSSMessage; -import de.anomic.yacy.yacyURL; - -/** - * FIXME this is a duplicate of yacysearch.java! - */ -public class ysearch { - - public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) { - final plasmaSwitchboard sb = (plasmaSwitchboard) env; - sb.localSearchLastAccess = System.currentTimeMillis(); - - final boolean searchAllowed = sb.getConfigBool("publicSearchpage", true) || sb.verifyAuthentication(header, false); - final boolean authenticated = sb.adminAuthenticated(header) >= 2; - int display = (post == null) ? 0 : post.getInt("display", 0); - if ((display == 1) && (!authenticated)) display = 0; - final int input = (post == null) ? 2 : post.getInt("input", 2); - String promoteSearchPageGreeting = env.getConfig("promoteSearchPageGreeting", ""); - if (env.getConfigBool("promoteSearchPageGreeting.useNetworkName", false)) promoteSearchPageGreeting = env.getConfig("network.unit.description", ""); - if (promoteSearchPageGreeting.length() == 0) promoteSearchPageGreeting = "P2P WEB SEARCH"; - final String client = header.get(httpRequestHeader.CONNECTION_PROP_CLIENTIP); // the search client who initiated the search - - // get query - String querystring = (post == null) ? "" : post.get("search", "").trim(); - boolean fetchSnippets = (post != null && post.get("verify", "false").equals("true")); - final serverObjects prop = new serverObjects(); - - final boolean rss = (post == null) ? false : post.get("rss", "false").equals("true"); - if ((post == null) || (env == null) || (querystring.length() == 0) || (!searchAllowed)) { - // we create empty entries for template strings - prop.put("searchagain", "0"); - prop.put("input", input); - prop.put("display", display); - prop.put("input_input", input); - prop.put("input_display", display); - prop.put("promoteSearchPageGreeting", promoteSearchPageGreeting); - prop.put("input_former", ""); - prop.put("former", ""); - prop.put("input_count", "10"); - prop.put("input_offset", "0"); - prop.put("input_resource", "global"); - prop.put("input_urlmaskfilter", ".*"); - prop.put("input_prefermaskfilter", ""); - prop.put("input_indexof", "off"); - prop.put("input_constraint", ""); - prop.put("input_cat", "href"); - prop.put("input_depth", "0"); - prop.put("input_contentdom", "text"); - prop.put("input_contentdomCheckText", "1"); - prop.put("input_contentdomCheckAudio", "0"); - prop.put("input_contentdomCheckVideo", "0"); - prop.put("input_contentdomCheckImage", "0"); - prop.put("input_contentdomCheckApp", "0"); - prop.put("excluded", "0"); - prop.put("results", ""); - prop.put("resultTable", "0"); - prop.put("num-results", searchAllowed ? "0" : "4"); - - return prop; - } - - // collect search attributes - int maxDistance = Integer.MAX_VALUE; - - if ((querystring.length() > 2) && (querystring.charAt(0) == '"') && (querystring.charAt(querystring.length() - 1) == '"')) { - querystring = querystring.substring(1, querystring.length() - 1).trim(); - maxDistance = 1; - } - - int itemsPerPage = Math.min((authenticated) ? 1000 : 10, post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative - int offset = (post.hasValue("query") && post.hasValue("former") && !post.get("query","").equalsIgnoreCase(post.get("former",""))) ? 0 : post.getInt("startRecord", post.getInt("offset", 0)); - - boolean global = (post == null) ? true : post.get("resource", "global").equals("global"); - final boolean indexof = (post != null && post.get("indexof","").equals("on")); - String urlmask = ""; - if (post != null && post.containsKey("urlmask") && post.get("urlmask").equals("no")) { - urlmask = ".*"; - } else { - urlmask = (post != null && post.containsKey("urlmaskfilter")) ? (String) post.get("urlmaskfilter") : ".*"; - } - String prefermask = (post == null ? "" : post.get("prefermaskfilter", "")); - if ((prefermask.length() > 0) && (prefermask.indexOf(".*") < 0)) prefermask = ".*" + prefermask + ".*"; - - kelondroBitfield constraint = (post != null && post.containsKey("constraint") && post.get("constraint", "").length() > 0) ? new kelondroBitfield(4, post.get("constraint", "______")) : null; - if (indexof) { - constraint = new kelondroBitfield(4); - constraint.set(plasmaCondenser.flag_cat_indexof, true); - } - - final int domainzone = (post == null ? yacyURL.TLD_any_zone_filter : post.getInt("zone", yacyURL.TLD_any_zone_filter)); - - // find out language of the user by reading of the user-agent string - String agent = header.get("User-Agent"); - if (agent == null) agent = System.getProperty("user.language"); - String language = (agent == null) ? "en" : iso639.userAgentLanguageDetection(agent); - if (language == null) language = "en"; - - // SEARCH - //final boolean indexDistributeGranted = sb.getConfig(plasmaSwitchboard.INDEX_DIST_ALLOW, "true").equals("true"); - //final boolean indexReceiveGranted = sb.getConfig("allowReceiveIndex", "true").equals("true"); - //final boolean offline = yacyCore.seedDB.mySeed().isVirgin(); - final boolean clustersearch = sb.isRobinsonMode() && - (sb.getConfig("cluster.mode", "").equals("privatecluster") || - sb.getConfig("cluster.mode", "").equals("publiccluster")); - //if (offline || !indexDistributeGranted || !indexReceiveGranted) { global = false; } - if (clustersearch) global = true; // switches search on, but search target is limited to cluster nodes - - // find search domain - final int contentdomCode = plasmaSearchQuery.contentdomParser((post == null ? "text" : post.get("contentdom", "text"))); - - // patch until better search profiles are available - if ((contentdomCode != plasmaSearchQuery.CONTENTDOM_TEXT) && (itemsPerPage <= 32)) itemsPerPage = 32; - - // check the search tracker - TreeSet trackerHandles = sb.localSearchTracker.get(client); - if (trackerHandles == null) trackerHandles = new TreeSet(); - boolean block = false; - if (global || fetchSnippets) { - // in case that we do a global search or we want to fetch snippets, we check for DoS cases - if (trackerHandles.tailSet(Long.valueOf(System.currentTimeMillis() - 3000)).size() > 1) { - global = false; - fetchSnippets = false; - } - if (trackerHandles.tailSet(Long.valueOf(System.currentTimeMillis() - 60000)).size() > 30) { - global = false; - fetchSnippets = false; - block = true; - } - if (trackerHandles.tailSet(Long.valueOf(System.currentTimeMillis() - 600000)).size() > 100) { - global = false; - fetchSnippets = false; - block = true; - } - } - - if ((!block) && (post == null || post.get("cat", "href").equals("href"))) { - - final plasmaSearchRankingProfile ranking = sb.getRanking(); - final TreeSet[] query = plasmaSearchQuery.cleanQuery(querystring); // converts also umlaute - if ((query[0].contains("near")) && (querystring.indexOf("NEAR") >= 0)) { - query[0].remove("near"); - ranking.coeff_worddistance = plasmaSearchRankingProfile.COEFF_MAX; - } - if ((query[0].contains("recent")) && (querystring.indexOf("RECENT") >= 0)) { - query[0].remove("recent"); - ranking.coeff_date = plasmaSearchRankingProfile.COEFF_MAX; - } - - // filter out stopwords - final TreeSet filtered = kelondroMSetTools.joinConstructive(query[0], plasmaSwitchboard.stopwords); - if (filtered.size() > 0) { - kelondroMSetTools.excludeDestructive(query[0], plasmaSwitchboard.stopwords); - } - - // prepare search properties - final boolean yacyonline = ((sb.webIndex.seedDB != null) && (sb.webIndex.seedDB.mySeed() != null) && (sb.webIndex.seedDB.mySeed().getPublicAddress() != null)); - final boolean globalsearch = (global) && (yacyonline) && (sb.getConfigBool(plasmaSwitchboardConstants.INDEX_RECEIVE_ALLOW, false)); - - // do the search - final TreeSet queryHashes = indexWord.words2hashes(query[0]); - final plasmaSearchQuery theQuery = new plasmaSearchQuery( - querystring, - queryHashes, - indexWord.words2hashes(query[1]), - indexWord.words2hashes(query[2]), - ranking, - maxDistance, - prefermask, - contentdomCode, - language, - true, - itemsPerPage, - offset, - urlmask, - (clustersearch && globalsearch) ? plasmaSearchQuery.SEARCHDOM_CLUSTERALL : - ((globalsearch) ? plasmaSearchQuery.SEARCHDOM_GLOBALDHT : plasmaSearchQuery.SEARCHDOM_LOCAL), - "", - 20, - constraint, - true, - domainzone, - client, - authenticated); - - - // tell all threads to do nothing for a specific time - sb.intermissionAllThreads(3000); - - // filter out words that appear in bluelist - theQuery.filterOut(plasmaSwitchboard.blueList); - - // log - serverLog.logInfo("LOCAL_SEARCH", "INIT WORD SEARCH: " + theQuery.queryString + ":" + theQuery.queryHashes + " - " + theQuery.neededResults() + " links to be computed, " + theQuery.displayResults() + " lines to be displayed"); - RSSFeed.channels(RSSFeed.LOCALSEARCH).addMessage(new RSSMessage("Local Search Request", theQuery.queryString, "")); - final long timestamp = System.currentTimeMillis(); - - // create a new search event - if (plasmaSearchEvent.getEvent(theQuery.id(false)) == null) { - theQuery.setOffset(0); // in case that this is a new search, always start without a offset - offset = 0; - } - final plasmaSearchEvent theSearch = plasmaSearchEvent.getEvent(theQuery, ranking, sb.webIndex, sb.crawlResults, (sb.isRobinsonMode()) ? sb.clusterhashes : null, false); - - // generate result object - //serverLog.logFine("LOCAL_SEARCH", "SEARCH TIME AFTER ORDERING OF SEARCH RESULTS: " + (System.currentTimeMillis() - timestamp) + " ms"); - //serverLog.logFine("LOCAL_SEARCH", "SEARCH TIME AFTER RESULT PREPARATION: " + (System.currentTimeMillis() - timestamp) + " ms"); - - // calc some more cross-reference - //serverLog.logFine("LOCAL_SEARCH", "SEARCH TIME AFTER XREF PREPARATION: " + (System.currentTimeMillis() - timestamp) + " ms"); - - // log - serverLog.logInfo("LOCAL_SEARCH", "EXIT WORD SEARCH: " + theQuery.queryString + " - " + - (theSearch.getRankingResult().getLocalResourceSize() + theSearch.getRankingResult().getRemoteResourceSize()) + " links found, " + - (System.currentTimeMillis() - timestamp) + " ms"); - - // prepare search statistics - theQuery.resultcount = theSearch.getRankingResult().getLocalResourceSize() + theSearch.getRankingResult().getRemoteResourceSize(); - theQuery.searchtime = System.currentTimeMillis() - timestamp; - theQuery.urlretrievaltime = theSearch.getURLRetrievalTime(); - theQuery.snippetcomputationtime = theSearch.getSnippetComputationTime(); - sb.localSearches.add(theQuery); - - // update the search tracker - trackerHandles.add(theQuery.handle); - sb.localSearchTracker.put(client, trackerHandles); - - final int totalcount = theSearch.getRankingResult().getLocalResourceSize() + theSearch.getRankingResult().getRemoteResourceSize(); - prop.put("num-results_offset", offset); - prop.put("num-results_itemscount", "0"); - prop.put("num-results_itemsPerPage", itemsPerPage); - prop.put("num-results_totalcount", yFormatter.number(totalcount, !rss)); - prop.put("num-results_globalresults", (globalsearch) ? "1" : "0"); - prop.put("num-results_globalresults_localResourceSize", yFormatter.number(theSearch.getRankingResult().getLocalResourceSize(), !rss)); - prop.put("num-results_globalresults_remoteResourceSize", yFormatter.number(theSearch.getRankingResult().getRemoteResourceSize(), !rss)); - prop.put("num-results_globalresults_remoteIndexCount", yFormatter.number(theSearch.getRankingResult().getRemoteIndexCount(), !rss)); - prop.put("num-results_globalresults_remotePeerCount", yFormatter.number(theSearch.getRankingResult().getRemotePeerCount(), !rss)); - - // generate the search result lines; they will be produced by another servlet - for (int i = 0; i < theQuery.displayResults(); i++) { - prop.put("results_" + i + "_item", offset + i); - prop.put("results_" + i + "_eventID", theQuery.id(false)); - } - prop.put("results", theQuery.displayResults()); - prop.put("resultTable", (contentdomCode <= 1) ? "0" : "1"); - prop.put("eventID", theQuery.id(false)); // for bottomline - - // process result of search - if (filtered.size() > 0) { - prop.put("excluded", "1"); - prop.putHTML("excluded_stopwords", filtered.toString()); - } else { - prop.put("excluded", "0"); - } - - if (prop == null || prop.size() == 0) { - if (post == null || post.get("search", "").length() < 3) { - prop.put("num-results", "2"); // no results - at least 3 chars - } else { - prop.put("num-results", "1"); // no results - } - } else { - prop.put("num-results", "3"); - } - - prop.put("input_cat", "href"); - prop.put("input_depth", "0"); - - // adding some additional properties needed for the rss feed - String hostName = (String) header.get("Host", "localhost"); - if (hostName.indexOf(":") == -1) hostName += ":" + serverCore.getPortNr(env.getConfig("port", "8080")); - prop.put("searchBaseURL", "http://" + hostName + "/yacysearch.html"); - prop.put("rssYacyImageURL", "http://" + hostName + "/env/grafics/yacy.gif"); - } - - prop.put("searchagain", global ? "1" : "0"); - prop.put("input", input); - prop.put("display", display); - prop.put("input_input", input); - prop.put("input_display", display); - prop.put("promoteSearchPageGreeting", promoteSearchPageGreeting); - prop.putHTML("input_former", querystring); - //prop.put("former", post.get("search", "")); - prop.put("input_count", itemsPerPage); - prop.put("input_offset", offset); - prop.put("input_resource", global ? "global" : "local"); - prop.putHTML("input_urlmaskfilter", urlmask); - prop.putHTML("input_prefermaskfilter", prefermask); - prop.put("input_indexof", (indexof) ? "on" : "off"); - prop.put("input_constraint", (constraint == null) ? "" : constraint.exportB64()); - prop.put("input_contentdom", (post == null ? "text" : post.get("contentdom", "text"))); - prop.put("input_contentdomCheckText", (contentdomCode == plasmaSearchQuery.CONTENTDOM_TEXT) ? "1" : "0"); - prop.put("input_contentdomCheckAudio", (contentdomCode == plasmaSearchQuery.CONTENTDOM_AUDIO) ? "1" : "0"); - prop.put("input_contentdomCheckVideo", (contentdomCode == plasmaSearchQuery.CONTENTDOM_VIDEO) ? "1" : "0"); - prop.put("input_contentdomCheckImage", (contentdomCode == plasmaSearchQuery.CONTENTDOM_IMAGE) ? "1" : "0"); - prop.put("input_contentdomCheckApp", (contentdomCode == plasmaSearchQuery.CONTENTDOM_APP) ? "1" : "0"); - - // for RSS: don't HTML encode some elements - prop.putXML("rss_query", querystring); - prop.put("rss_queryenc", yacyURL.escape(querystring.replace(' ', '+'))); - - sb.localSearchLastAccess = System.currentTimeMillis(); - - // return rewrite properties - return prop; - } -} diff --git a/htroot/yacy/user/ysearchitem.html b/htroot/yacy/user/ysearchitem.html deleted file mode 100644 index e4ea68e6c..000000000 --- a/htroot/yacy/user/ysearchitem.html +++ /dev/null @@ -1,46 +0,0 @@ -#(content)#:: -
-

- - #[description]#

-

#[snippet]#

-

#[urlname]#

-
- :: - #{items}# - - #{/items}# - :: - #{items}# - #[name]##[hrefshort]# - #{/items}# - :: - #{items}# - #[name]##[hrefshort]# - #{/items}# - :: - #{items}# - #[name]##[hrefshort]# - #{/items}# -#(/content)# -#(rss)#:: - -#[title]# -#[link]# -#[description]# -#[date]# -#[urlhash]# - -#(/rss)# -#(dynamic)#:: - -#(/dynamic)# diff --git a/htroot/yacy/user/ysearchitem.java b/htroot/yacy/user/ysearchitem.java deleted file mode 100644 index 3b000db7f..000000000 --- a/htroot/yacy/user/ysearchitem.java +++ /dev/null @@ -1,202 +0,0 @@ -// ysearchitem.java -// (C) 2007 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany -// first published 28.08.2007 on http://yacy.net -// -// This is a part of YaCy, a peer-to-peer based web search engine -// -// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $ -// $LastChangedRevision: 1986 $ -// $LastChangedBy: orbiter $ -// -// LICENSE -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -import java.io.UnsupportedEncodingException; -import java.net.MalformedURLException; -import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.TreeSet; - -import de.anomic.http.httpRequestHeader; -import de.anomic.plasma.plasmaSearchEvent; -import de.anomic.plasma.plasmaSearchQuery; -import de.anomic.plasma.plasmaSearchRankingProcess; -import de.anomic.plasma.plasmaSnippetCache; -import de.anomic.plasma.plasmaSwitchboard; -import de.anomic.server.serverObjects; -import de.anomic.server.serverSwitch; -import de.anomic.tools.nxTools; -import de.anomic.tools.yFormatter; -import de.anomic.yacy.yacySeed; -import de.anomic.yacy.yacyURL; - -public class ysearchitem { - - private static boolean col = true; - private static final int namelength = 60; - private static final int urllength = 120; - - public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) { - final plasmaSwitchboard sb = (plasmaSwitchboard) env; - final serverObjects prop = new serverObjects(); - - final String eventID = post.get("eventID", ""); - final boolean rss = post.get("rss", "false").equals("true"); - final int item = post.getInt("item", -1); - final boolean auth = ((String) header.get(httpRequestHeader.CONNECTION_PROP_CLIENTIP, "")).equals("localhost") || sb.verifyAuthentication(header, true); - - // default settings for blank item - prop.put("content", "0"); - prop.put("rss", "0"); - prop.put("references", "0"); - prop.put("dynamic", "0"); - - // find search event - final plasmaSearchEvent theSearch = plasmaSearchEvent.getEvent(eventID); - if (theSearch == null) { - // the event does not exist, show empty page - return prop; - } - final plasmaSearchQuery theQuery = theSearch.getQuery(); - final int offset = theQuery.neededResults() - theQuery.displayResults(); - - // dynamically update count values - if (!rss) { - prop.put("dynamic_offset", offset + 1); - prop.put("dynamic_itemscount", (item < 0) ? theQuery.neededResults() : item + 1); - prop.put("dynamic_totalcount", yFormatter.number(theSearch.getRankingResult().getLocalResourceSize() + theSearch.getRankingResult().getRemoteResourceSize(), !rss)); - prop.put("dynamic_localResourceSize", yFormatter.number(theSearch.getRankingResult().getLocalResourceSize(), !rss)); - prop.put("dynamic_remoteResourceSize", yFormatter.number(theSearch.getRankingResult().getRemoteResourceSize(), !rss)); - prop.put("dynamic_remoteIndexCount", yFormatter.number(theSearch.getRankingResult().getRemoteIndexCount(), !rss)); - prop.put("dynamic_remotePeerCount", yFormatter.number(theSearch.getRankingResult().getRemotePeerCount(), !rss)); - prop.put("dynamic_resnav", ""); - prop.put("dynamic", "1"); - } - - if (theQuery.contentdom == plasmaSearchQuery.CONTENTDOM_TEXT) { - // text search - - // generate result object - final plasmaSearchEvent.ResultEntry result = theSearch.oneResult(item); - if (result == null) return prop; // no content - - if (rss) { - // text search for rss output - prop.put("rss", "1"); // switch on specific content - prop.putXML("rss_title", result.title()); - prop.putXML("rss_description", result.textSnippet().getLineRaw()); - prop.putXML("rss_link", result.urlstring()); - prop.put("rss_urlhash", result.hash()); - prop.put("rss_date", plasmaSwitchboard.dateString822(result.modified())); - return prop; - } - - prop.put("content", theQuery.contentdom + 1); // switch on specific content - prop.putHTML("content_description", result.title()); - prop.put("content_url", result.urlstring()); - - final int port=result.url().getPort(); - yacyURL faviconURL; - try { - faviconURL = new yacyURL(result.url().getProtocol() + "://" + result.url().getHost() + ((port != -1) ? (":" + String.valueOf(port)) : "") + "/favicon.ico", null); - } catch (final MalformedURLException e1) { - faviconURL = null; - } - - prop.putHTML("content_faviconCode", sb.licensedURLs.aquireLicense(faviconURL)); // aquire license for favicon url loading - prop.put("content_urlhash", result.hash()); - prop.put("content_urlhexhash", yacySeed.b64Hash2hexHash(result.hash())); - prop.putHTML("content_urlname", nxTools.shortenURLString(result.urlname(), urllength)); - prop.put("content_date", plasmaSwitchboard.dateString(result.modified())); - prop.put("content_ybr", plasmaSearchRankingProcess.ybr(result.hash())); - prop.putNum("content_size", result.filesize()); - - final TreeSet[] query = theQuery.queryWords(); - yacyURL wordURL = null; - try { - prop.putHTML("content_words", URLEncoder.encode(query[0].toString(),"UTF-8")); - } catch (final UnsupportedEncodingException e) {} - prop.putHTML("content_former", theQuery.queryString); - prop.put("content_rankingprops", result.word().toPropertyForm() + ", domLengthEstimated=" + yacyURL.domLengthEstimation(result.hash()) + - ((yacyURL.probablyRootURL(result.hash())) ? ", probablyRootURL" : "") + - (((wordURL = yacyURL.probablyWordURL(result.hash(), query[0])) != null) ? ", probablyWordURL=" + wordURL.toNormalform(false, true) : "")); - final plasmaSnippetCache.TextSnippet snippet = result.textSnippet(); - prop.put("content_snippet", (snippet == null) ? "(snippet not found)" : snippet.getLineMarked(theQuery.fullqueryHashes)); - return prop; - } - - if (theQuery.contentdom == plasmaSearchQuery.CONTENTDOM_IMAGE) { - // image search; shows thumbnails - - prop.put("content", theQuery.contentdom + 1); // switch on specific content - final plasmaSnippetCache.MediaSnippet ms = theSearch.oneImage(item); - if (ms == null) { - prop.put("content_items", "0"); - } else { - prop.putHTML("content_items_0_hrefCache", (auth) ? "/ViewImage.png?url=" + ms.href.toNormalform(true, false) : ms.href.toNormalform(true, false)); - prop.putHTML("content_items_0_href", ms.href.toNormalform(true, false)); - prop.put("content_items_0_code", sb.licensedURLs.aquireLicense(ms.href)); - prop.putHTML("content_items_0_name", shorten(ms.name, namelength)); - prop.put("content_items_0_attr", (ms.attr.equals("-1 x -1")) ? "" : "(" + ms.attr + ")"); // attributes, here: original size of image - prop.put("content_items_0_source", ms.source.toNormalform(true, false)); - prop.put("content_items_0_sourcedom", ms.source.getHost()); - prop.put("content_items", 1); - } - return prop; - } - - if ((theQuery.contentdom == plasmaSearchQuery.CONTENTDOM_AUDIO) || - (theQuery.contentdom == plasmaSearchQuery.CONTENTDOM_VIDEO) || - (theQuery.contentdom == plasmaSearchQuery.CONTENTDOM_APP)) { - // any other media content - - // generate result object - final plasmaSearchEvent.ResultEntry result = theSearch.oneResult(item); - if (result == null) return prop; // no content - - prop.put("content", theQuery.contentdom + 1); // switch on specific content - final ArrayList media = result.mediaSnippets(); - if (item == 0) col = true; - if (media != null) { - plasmaSnippetCache.MediaSnippet ms; - int c = 0; - for (int i = 0; i < media.size(); i++) { - ms = media.get(i); - prop.putHTML("content_items_" + i + "_href", ms.href.toNormalform(true, false)); - prop.putHTML("content_items_" + i + "_hrefshort", nxTools.shortenURLString(ms.href.toNormalform(true, false), urllength)); - prop.putHTML("content_items_" + i + "_name", shorten(ms.name, namelength)); - prop.put("content_items_" + i + "_col", (col) ? "0" : "1"); - c++; - col = !col; - } - prop.put("content_items", c); - } else { - prop.put("content_items", "0"); - } - return prop; - } - - return prop; - } - - private static String shorten(final String s, final int length) { - if (s.length() <= length) return s; - final int p = s.lastIndexOf('.'); - if (p < 0) return s.substring(0, length - 3) + "..."; - return s.substring(0, length - (s.length() - p) - 3) + "..." + s.substring(p); - } - -}