Widget:YacyLiveSearch

From PKC
Jump to navigation Jump to search

This very simple widget allows you to add a YaCy live search form to your wiki page. "YaCy is a free search engine that anyone can use to build a search portal for their intranet or to help search the public internet" (self description). This widget is usefull if you want to include the YaCy live search form of a YaCy peer (self hosted or another) in a MediaWiki page.

To insert this widget, use the following code:

{{#widget:YacyLiveSearch}}

Important: Adapt the Code

You must change the IP or URL of your prefered Yacy peer in widget code for your needs. Default is "127.0.0.1:8090" which works only if you host your YaCy engine on your Desktop computer!

The default widget code works only if you use a MediaWiki version which uses JQuery per default (this should be MW >=1.17)! If you host a MW version without JQuery you should add before the first "<script>" tag:

<script src="//127.0.0.1:8090/jquery/js/jquery-1.7.min.js" type="text/javascript"></script>

You must the also change the IP to your needs.

Hint: To avoid security risks you should prefer embedding IP or URL of your self hosted YaCy peer!

Code-Authors and license: Code is from YaCy engine programmed by YaCy developer community and has been released under GPL version 2.

Sample result

Because of security reasons and it could not be ensured that the example YaCy peer exists yet, there isn't a live example available.

For example you can see YaCy live search in action on [1] (can not ensure that this example exists for a longer time).

Using this widget

For information on how to use this widget, see widget description page on MediaWikiWidgets.org.

Copy to your site

To use this widget on your site, just install MediaWiki Widgets extension and copy the full source code of this page to your wiki as page Widget:YacyLiveSearch.