Get Wikipedia article summary for a keyword in any language, inline with your posts and pages, with a simple shortcode.
WP-WikiBox is a simple yet very useful plugin. It uses Wikipedia API to retrieve the beginning summary section of a Wikipedia article based on the keyword title provided. You can simply insert Wikipedia information inline with your posts or provide wiki explanation on your tags and boost your ranks with rich content.
Features
New from v0.1.2
- Added file caching method as an option, as requested
- Enabled cURL to retrieve data for better performance
- Added option to strip links from content, as requested
and
- Supports shortcodes anywhere in your posts, pages and sidebar
- Template function to automate inserting articles
- Long list of supported Wikipedia languages
- Customizable cache control to reduce server load
- Multilingual interface
- Customizable features
- Plugin uninstall support
Installation
Installation is the same routine as most WP plugins:
- Upload
wp-wikiboxfolder to the/wp-content/plugins/directory - Activate the plugin through the
Pluginsmenu in WordPress - Find the WP-WikiBox submenu under
Optionsmenu in your WordPress to change plugin settings.
Notice: Please enable gzip compression in plugin options page if you have the support on your server. Wikipedia servers have heavy bandwidth usage and they appreciate less packet data very much. This is during data request on your page from Wikipedia servers and has nothing to do with how you provide your page content to visitors.
Using WP-WikiBox
- Place
[wikibox lang="{Wiki Language}"]{Your Keyword}[/wikibox]in your posts, pages, and/or as text widget in your sidebar. Thelangattribute is optional and if not set, the default language from plugin settings will be used.
Example:[wikibox lang="en"]Pink Floyd[/wikibox] - You can add
wikibox_summary( $keyword, $lang = 'en', $echo = true );
inside your template to add article box anywhere. Optional arguments
$langand$echocan be provided for customization.
Examples:<?php if ( function_exists( 'wikibox_summary' ) ) wikibox_summary( 'Pink Floyd' ); ?>
<?php if ( function_exists( 'wikibox_summary' ) ) wikibox_summary( single_tag_title('', false) ); ?><?php if ( function_exists( 'wikibox_summary' ) ) wikibox_summary( single_cat_title('', false) ); ?>
You can see a working version of the plugin on this website, just click on any tags or category links. Or here is what Wikipedia says about WordPress:
WordPress
From Wikipedia, the free encyclopedia [+] [edit]
WordPress is a free and open source blogging tool and content management system (CMS) powered by PHP and MySQL. It has many features including a plug-in architecture and a template system. WordPress is used by over 14.7% of Alexa Internet's "top 1 million" websites and as of August 2011 powers 22% of all new websites. WordPress is currently the most popular CMS in use on the Internet.
It was first released on May 27, 2003, by Matt Mullenweg as a fork of b2/cafelog. As of December 2011, version 3.0 had been downloaded over 65 million times. [...]
Requirements
- PHP Version > 5.0 required
- PHP cURL recommended
- WordPress > 3.0 recommended
- PHP zLib support recommended
WP-WikiBox Plugin @ WordPress Repository | Download (v0.1.3)
Come back here soon for updates, feature requests and information on future releases.

Aminus3 Photoblog Community

Excellent plugin!! Great work and thanks alot for this.
Comment by Tunereader — September 4, 2010 @ 6:49 pm
[...] – Behrooz Sangani – BSurprised Official Website » WP-WikiBox WordPress Plugin WP-WikiBox is a simple yet very useful plugin. It uses Wikipedia API to retrieve the beginning [...]
Pingback by Lo mejor de la web ayer, 3 artículos del Domingo 05 de Sep publicados en otros blogs | noticias | hombrelobo, viajero y disperso — September 6, 2010 @ 8:31 am
Hi,
Is it possible to strip the incontent links to wikipedia pages?
I would like to give credit to Wikipedia by giving a link back to the original content page. But I don’t want to have too many links to other internal pages of wikipedia in one sentence.
Is it possible to get rid off those links?
-Neo
Comment by Neo — September 9, 2010 @ 6:07 am
Neo,
Yes it can be done with the help of the
strip_tagsphp function. It’s a good recommendation and I will include this option is the settings page of the next version.Comment by Behrooz — September 9, 2010 @ 11:39 am
Tried this on IIS/PHP5/WP3
Get this error:
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in D:\html\content\wp-content\plugins\wp-wikibox\includes\functions.php on line 201
Warning: file_get_contents(http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=xml&redirects&titles=) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in D:\html\content\wp-content\plugins\wp-wikibox\includes\functions.php on line 201
Apparently this is because of a PHP ‘include’ somewhere in the code.
http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration
I checked and you do seem to be using file_get_contents, so can’t figure this one out without spending more time on the code.
Any guesses?
Comment by Pranay — September 14, 2010 @ 1:10 am
You need to have
allow_url_fopenset totrueon your server to be able to open remote URLs. You can ask your administrator why this is set to false. In many hostings, the default configuration is true.Comment by Behrooz — September 14, 2010 @ 5:01 pm
Great Plugin!
One question thou, i have excerpts from each post on my home page and when I add the code to my template, it add the wiki box in the excerpt and box doubles in size..
It works flawlessly when i add the code manually per post.
Please advise.
Comment by PostandSend — September 16, 2010 @ 8:57 am
I think that your excerpts are not actually excerpts, they could be the first n words of your post or the before < -more-> part. WP generates code for shortcodes wherever he finds it, and Wikibox does not have an option now not to be included in the home page. My advice would be adding the wiki function to your single pages where you want it and send the keywords to it by custom fields.
Comment by Behrooz — September 16, 2010 @ 10:34 am
[...] WP-WikiBox allows you to get a Wikipedia article summary for a keyword in any language, inline with your posts and pages, with a simple shortcode. [...]
Pingback by WordPress Plugin Releases for 09/05 : UK Asian — September 27, 2010 @ 1:51 am
Hi,
Amazing plugin, however it is caching all entries into the wp_options table and hence bloating the database.
I am using it on http://www.infodugout.com. Is there a way to cache into some folder instread of the WP_OPTIONS table?
Comment by Dheeraj Singh — October 1, 2010 @ 1:11 pm
Thanks. Yes, I have also developed a version that uses file caching. But I believe the data in transient cache is not that much as it expires as you set it, and the good part is that it uses WP’s way of dealing with data, so there’s no need for worrying about having spacial caching classes or write permissions on server folders, etc.
Comment by Behrooz — October 1, 2010 @ 3:43 pm
I have posts running into several thousands, so database caching is an issue. Infact, i had to disable the plugin as it had added around 4000 rows to the wp_options table.
Could you please share the file caching version.
Comment by Dheeraj Singh — October 2, 2010 @ 11:55 am
Actually i need the plugin badly
Where would I be able to download a copy of the version that uses file caching?
Comment by Dheeraj Singh — October 3, 2010 @ 11:52 am
Sorry for the late reply.
I normally do not give priority support for my open source scripts. The code needs a bit of adaptation to WP because I wrote it for the stand-alone version of the plugin. It may take a few days as I am very busy right now.
Comment by Behrooz — October 3, 2010 @ 12:29 pm
Hi,
That is fine, I could help you in that as well.
If you share the stand alone version i could use it as it is.
Comment by Dheeraj Singh — October 4, 2010 @ 4:00 pm
@Neo: Included your requested feature to strip links in the new version.
@Pranay: Check the new version, I included cURL to retrieve data, it’s faster and more reliable.
@Dheeraj: Update your plugin, new version includes the file caching.
Comment by Behrooz — October 5, 2010 @ 12:48 pm
Thanks a ton Behrooz. The plugin is live on infonary.com as well. To see it in action just search for some common thing.
Comment by Dheeraj Singh — October 6, 2010 @ 5:01 pm