Name: Wikipedia Block
Intro: Wikipedia Block is a Moodle block to search in the Wikipedia.
David Horat ( firstname.lastname@example.org )
Company: FH NordAkademie, Germany. ( www.nordakademie.de )
Based on work of Aggelos Panagiotakis( email@example.com )
* Search in several languages: German, English, Greek, Spanish, French, Italian, Dutch, Japanese, Polish, Portugal and Swedish
* Logo image in several languages: German, English and Spanish
Thanks for sharing! Quick question, I'm not getting the Wikipedia logo to show up. Right clicking and selecting its properties shows me the path. It is the correct path, and the logo is in mymoodlesite/blocks/wikipedia/wikipedia-en.png directory.
But the image does not show up. This is on an OSX Server.
SOLVED! My Moodle is not in root. It's in a "Moodle" directory. The block was looking for my "BLOCKS" directory at the root level of the server. I added my moodle directory to the path of the image and all worked out
On your concrete problem, I am not sure at all why that happens, because the "download version" works perfect with me, although I use a Linux server. I don´t have an OSX Server to test it, but if it keeps on with the same problem, maybe I can help you to fix, so contact me.
Well, nice to see it works. But you didn´t had to change any code in my block, did you?
Yes I did have to change a little of the code. I just added the directory where my Moodle install is located.
The line I had to edit was:
$this->content = new stdClass;
$wikilogo = '<img src="'.$CFG->wwwroot.'/MYMOODLEDIRECTORY/blocks/wikipedia/'.get_string('logo', 'block_wikipedia').'" border="0" alt="Wikipedia" />';
Also, I noticed that your Wikipedia logos are labled as PNG files. I think they may be GIF images though. I changed the file names to gif and also modified to Lang file to reflect a GIF image instead of a PNG.
And you are correctk, I downloaded the block from the Blocks and Pluggins page. I'm not quite sure how the CVS versions work yet.
Also note that the PNG format is different to the GIF format, so just changing the filename, doesn´t really change the format inside and could make some browsers misunderstood what is inside. Try to avoid this.
I don´t know how much time takes the internal script of Moodle to create the new zip files from CVS version. Anyone knows it? But anyway I suggest you to download it in a day or two, I hope it will be done by that days.
I like to see how fast the Moodle comunity replies to new things. It make the developers feel like that their code is really being used and very apreciated.
* Search in several languages: English, French, German, Greek, Italian, Dutch, Japanese, Polish, Portuguese, Rusish, Spanish and Swedish
- Automatic search language selection based on the current interface language
* Logo image in several languages: English, French, German, Greek, Italian, Dutch, Japanese, Polish, Portuguese, Rusish, Spanish and Swedish
- Automatic logo selection based on the current interface language
- Added search in Rusish
- Added automatic search language selection based on the current interface language
- Added logo images of French, Greek, Italian, Dutch, Japanese, Polish, Portuguese, Rusish and Swedish
- Added "global $CFG;" to support the directive "register_globals = off"
- Removed the language files. Now it calculates the wikipedia logo filename with the language. (Convention over Configuration principle)
And that's my only complaint. Otherwise, it works great. Looks great. Handy. Thanks a lot for putting it together.
I thought I had read that others might have an issue with the Wikipedia block dispappearing from sites. We have been having that happen with one of our teachers. They have to go in and put it back on their page.
The teacher is reporting that everytime they go into their site "settings" the wikipedia block disappears.
Anyone have a clue as to why this may be happening?
I've just come across this Block and it looks really good so first of all Well Done! for the work that's gone into it.
Now for my problem, I've downloaded the block and unzipped it in the blocks folder on my server, unfortunately it doesn't seem to be working , when I go to the Blocks menu on my site it is not showing up. I've checked the permissions and they are all ok, please can somebody offer some suggestions.
A great block which I have put on our school's moodle. I have messed about with the code and turned it into a separate Google search block - I hope you don't mind. I know virtually nothing about php, but managed to delete the bits I didn't need and add the bits I did.
Here is a screenshot:
I'm not sure if I have followed established convention by adapting the original wikipedia code and am not sure if the version I set on line 12 of the block_google.php is appropriate.
Let me know what you think and if it can be used. I have attached it for you all to check it out.
I haven´t done much work on the module since last year, but in a month or so I will begin to work again in Moodle. I propose making a multi search engine block. Either the student can choose a search engine when searching or the admin can configure which one to use.
It would be highly appreciated if you could make a multi-search block along the lines of the Multiple Search block by Jan Dierckx that allows the admin to add databases (i.e. Google, Webster, Wikipedia, etc.) to the block and it allows the teacher to choose which databases he wants to use in a specific instance of the block. The weakness of the block was its JAVA content that collided with the Calendar block and as far as I know the block was never updated for Moodle 1.7 or 1.8.
I use moodle 1.8.3. I upload wikipedia in block directory of my site but nothing happens. (It seems that moodle don't see the module). But I have another question: how do you make the image slideshow on the homepage of your school's site? I need the same for my homepage.
The htm file is what should be used in the site topic box on your frontpage.
The js file can be uploaded into you site files.
You will need to tweak the code to suit your needs, create the relevant images, etc.
Remember to turn of the html editor in moodle before adding the code (or editing it) as it seems to churn it up somewhat.
I just reinstalled wikipedia block (copied the extracted wikipedia folder to moodle/block
I didn't see any alert (unlike other blocks or modules) about successful table creation. However, when I checked administration/modules/block, wikipedia was there.
Now how do I use it? Have no clues. Would have expected to either have a button on the page or be given instructions upon installations on some configurations/settings to go through.
When I installed it on moodle 1.7 (and 1.6), I copied the wikipedia folder into the block directory on my moodle installation. I then went to notifications on the admin menu (took me a while to find it in 1.7, since in 1.6 you just go to admin). It was there that I received the notification of the tables having been set up successfully.
It doesn't seem to be available on the site index page but is within courses. I have included both on the index page by adding some html to the topic section. Here is the code I added, make sure you disable the the html editor in admin>edititor settings> htmleditor>do not allow. Otherwise the search boxes won't work.
<form target="_blank" method="get" action="http://www.google.com/search">
<input type="hidden" name="ie" value="iso-8859-1"/>
<input type="hidden" name="oe" value="iso-8859-1"/>
<img align="center" title="Search Google" alt="Search Google" src="http://www.yourdomain/Google_Safe.gif" border="0" height="45" width="115" />
<input type="text" name="q" size="20" maxlength="255" value="" title="Type in what you want to search for here."/>
<input type="hidden" name="safe" value="strict"/>
<input type="submit" name="sa" value="Search" title="Search the Internet with Google. Opens a new window with your search results."/>
<form target="_blank" action="http://www.wikipedia.org/search-redirect.php" method="get">
<img align="center" title="Search Wikipedia" alt="Search Wikipedia" src="http://www.yourdomain.com/wikipedia.gif" border="0" height="36" width="122" />
<input type="hidden" name="language" value="en" />
<input type="text" name="search" value="" title="Type in what you want to search for here" size="20" />
<input type="submit" name="go" value=" Go! " title="Search using Wikipedia. Clicking on the go button will open a new window."/>
Paste that into the topics section, play about with it to get the layout you want and you have both search boxes on your index page too.
Go to http://vle.khsclc.co.uk to see an example.
Hope this helps.
The description you make is the one I followed "am used to that as I started with moodle 1.7. Works that way whether it is a module or a block. The problem with the media wiki block is that I clicked on notifications and never saw the table creation which I usually do with any other working module or block.
I am not going to venture changing code as you suggest since the installation is not successful. I saw the wikipedia and google search box on the url you gave me.
Having said that, this is no big deal since I can create my own home page and insert moodle and google search links.
I am running 1.8.2
I have read through the posts but found no solutions. Any ideas what the problem is?
I have just installed this on an installation of (2007021520) and it works just fine.
Attached is the installation used, simple unzip and copy into your blocks directory, then go to notifications to install the block.
But I need to transform it in wikipedia block, as the original one downloadable by site don't work at all. I try to reconfigure the php code to the wikipedia research, but it didn't work. I wrote:
"http://www.wikipedia.org/search-redirect.php" instead of google link but probably it is not the right solution.
Thank you, Luca Navone
The URL you quote is correct according to http://cvs.moodle.org/contrib/plugins/blocks/wikipedia/block_wikipedia.php?revision=1.10&view=markup as well as earlier posts in this discussion. Have you tried downloading the latest version of the Wikipedia block from http://moodle.org/mod/data/view.php?d=13&rid=512?
Here is the code for the Wikipedia block:
<div align="center"> <form target="_blank" method="get" action="http://www.wikipedia.org/search-redirect.php">
<div><br /><img width="122" height="36" border="0" align="middle" src="/images/search_block/wikipedia.gif" alt="Search Wikipedia" title="Search Wikipedia" /> <input type="hidden" name="language" value="en" /> <br /><input name="search" title="Type in what you want to search for here" /><br /> <input type="submit" name="go" value=" Go! " title="Search using Wikipedia. Clicking on the go button will open a new window." /> </div></form></div>
This is used in a simple HTML block.
Hope this helps.
The $lang variable is not being set before logo is selected. The default logo is therefore being used regardless of language settings.
I added the following line before the logo is selected, and it gets the correct logo now.
$lang = substr(current_language(), 0, 2);
I can confirm that the form can be forced to pop-up to a new tab by adding the target="_blank" attribute to the form tag.
Thanks for contributing the block.
I get the following text above the Wikipedia block. What gives?
Notice: Undefined variable: lang in /xxxx/moodle/blocks/wikipedia/block_wikipedia.php on line 41
Grazie1000 Matteo & Michael