Posts Tagged ‘wikipedia’

Embedding Wikipedia

December 11, 2009

Wikipedia. The first time I ever heard of it was when I kept seeing it as the first result from every Google search a few years ago. Now it is one of the most-used and quick, collaborative knowledge bases. When there is something I need to research about, Wikipedia would give me the perfect starting point and introduction of what I need to find. Because there is an article on nearly every single thing that anyone can think of, it is very useful in searching. Although there are people who spam the articles (but the spam bots take care of them), most of the content is accurate.

New technology like HTML, PHP, and Javascript and their modern day improvements that make embedding possible for flash videos, or the “add this” button. However, Wikipedia has no sort of embedding features available for people to use, perhaps because there is no easy way to change articles when embedded. So I decided to write a PHP function that would handle this.

The goal was to grab the article directly from Wikipedia and strip it from its excess sidebar and leave its contents intact. It also has the feature to change articles while embedded so people wouldn’t leave the page when clicking the links. Unfortunately, editing a page is different than viewing the typical article because clicking edit would take the browser to the Wikipedia’s page, so no one can edit an embedded wiki, yet.

Although it may seem vague at first how this feature might be useful, I thought it might help if I could view more than one article at the same time. I wrote this simple page showing how I could display up to 10 articles (given that the screen is big enough to even use this many frames) at the same time. Here is an example with 3 articles:

Example 1: Researching Web 2.0 and Social Media topics

Another use for this would be to have a website that already has its own version of a wiki and link the main wiki page so the user wouldn’t have to change the page. It’s really great for comparing articles like music artists, looking up formulas and saving the hassle of having a Wikipedia page in a separate tab or window.


Example 2: Looking up how to do density functions and double integrals at the same time

Although this isn’t a completed piece of work, I do plan to make this more flexible so it can take wiki articles from custom made Wiki’s.

WikiGrabber source code
WAMP (Apache MySQL and PHP for Windows)
Multiple wiki’s in a page (The Examples) (Not always up)
Wikipedia