WikipediaSnippet Plugin

Compatible with DokuWiki

  • 2012-01-25 "Angua" yes
  • 2011-05-25 "Rincewind" yes
  • 2010-11-07 "Anteater" yes

plugin Includes a snippet from a Wikipedia article.

Last updated on
2011-05-29
Provides
Syntax
Repository
Source

Tagged with include, wikipedia

Download and Installation

Download and install the plugin using the Plugin Manager using the URL given above. Refer to Plugins on how to install plugins manually.

Syntax and Usage

The syntax is very simple:

{{wp>Article_Name}}

It's intentional that it's similar to the interwiki link:

[[wp>Article_Name]]

The difference is that

  • it includes the first paragraphs of the according Wikipedia page and
  • it uses automatically the language of the wiki (lang)
{{wp>DokuWiki}}

will look like this (in the default template with default configuration):

Configuration

  • includeTables (default: 0) will include tables, e.g. the usual infobox. This can make the snippet more interesting, but some infoboxes can also get unproportionately big and will look strange.
  • includeImages (default: 0) will include all images that appear within the first few paragraphs and tables. If you enable this, please set your fetchsize config option, so that external images will automatically be cached by DokuWiki. (The HTML will get cached anyway.)

Credits

For easier parsing of the HTML the plugin uses the PHP Simple HTML DOM Parser (MIT licensed).

Changelog

Feedback

Remove disambiguation notice

I realize this is the wrong place but Github is throwing a server error @ the above link:

Many topics have disambiguation pages:
i.e. http://en.wikipedia.org/wiki/Avatar_(computing)
includes before 1st paragraph:

This article is about virtual user representations. For other uses, see avatar (disambiguation).

in the source as:

<div class="dablink">This article is about virtual user representations.  For other uses, see <a href="/wiki/Avatar_(disambiguation)" title="Avatar (disambiguation)">avatar (disambiguation)</a>.</div>

It would be really nice to have these eliminated, as with this plugin we already know that we want this particular page.

–Jeff 2010-04-25

Yes, that makes sense. I just removed the disambiguation link as you suggested in the latest version. — Anika Henke 2010/06/12 17:48

Problems

I've installed the wikipediasnipped plugin, but instead of a text snippet from the WP article, I see only something like:

Object id #94 

The link from the snippet title still forwards to the correct WP article, however.

–Andrew 2010-10-25

It's difficult to help without further information. I just released a new version which includes some (hopefully helpful) error message which will help you to debug the problem. — Anika HenkeAnika Henke
ach

London, UK
2011/05/29 16:24

Usefulness

Is this plugin useful ?

Interwiki

chtilandchtiland

Lille France
2011-04-24

I guess, as with any other plugin: To some people it is useful, to others it isn't. This plugin doesn't do the same as interwiki links. It doesn't just display the link, but also fetches the first paragraph of the article. — Anika HenkeAnika Henke
ach

London, UK
2011/05/29 16:24

Problem, Language: de-informal

… doesn't work with dokuwiki's custom lang-ids: This http://de-informal.wikipedia.org/ does not exist.

I think this plugin should work according to the interwiki entries: “wp” looks up Englisch entries, “wpde” looks up German entries etc. But it does not. Why?

plugin/wikipediasnippet.txt · Last modified: 2012/02/17 12:29 by 88.152.204.237
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate