Name |
Wikipedia Block |
Module Type |
Block |
Author |
David Horat |
Released |
2006 |
Maintained |
Actively |
Languages |
Chinese, Dutch, English, Finnish, French, German, Greek, Italian, Japanese, Norwegian, Polish, Portuguese, Russian, Spanish, Swedish (for logo image by-line) |
Compliance |
Good |
Documentation |
|
Errors |
None |
This is a simple block that collects a query for Wikipedia and directs the user to a Wikipedia entry in the appropriate language. Languages are determined automatically from the user's language settings.
Install the Wikipedia Block directory into the /moodle/blocks/
directory and visit the Notifications page. As there are no settings, you won't see the normal message stating tables have been established for the block.
Turn editing on and add the block from the Blocks list.
The block should show a logo with a by-line in the user's chosen language, and the language below the search query text box should also default to that language. The preceding screenshot of the block shows what appears when Dutch is the user's preferred language. The language drop-down list below the search block can be changed to see Wikipedia entries in different languages. The default for unknown languages is English.
When the button labeled with a ">" is clicked, the query is passed to Wikipedia and the resulting entry should be in the selected language.
By default, Wikipedia entries appear in the current tab or browser window, displacing the Moodle page. You might want to change this so entries appear in a new tab or browser window. Unfortunately there is no setting for this (or anything else about the block) so in order to make this change, you have to delve into the block's code.
Open the file block_wikipedia.php
and look for the following line.
$form = '<form action="http://www.wikipedia.org/search-redirect.php" id="searchform">';
Add a target
attribute to the tag to direct searches to a new tab or browser window.
$form = '<form action="http://www.wikipedia.org/search-redirect.php" id="searchform" target="_blank">';