My *nix world

Wikipedify

This page describes what is the WordPress plugin Wikipedia links - Wikipedify - and how to install it within WordPress.

DescriptionInstallationScreenshostsChangelogFaqDownload

This plugin parses your web page content to find those words that start in upper-case, are at least three characters long and are not so common¹. If such words are found then the plugin linkify them by surrounding them with a anchor that points to their respective Wikipedia web page (if any, otherwise they are just ignored).

By eliminating the most common words from the possible set of words we end up with those words that have either a technical means, are acronyms or are just names of something important which, your visitor, might not be fully aware of their meaning. Here comes in rescue Wikipedia.

So this plugin creates a transparent link between your web visitor, the content of your website and Wikipedia, thus Wikipedify.

Of course, there are situations when the wikipedified words are not something that we actually want to linkify, to point to Wikipedia encyclopedia. What can we do about it? Well, the plugin recognize the current visitor and the author of the page. If you are just a simple visitor then you cannot do too much about it, just take it or leave it (will you allow the visitor to customize/change the way that your website looks like? I don't think so!). On the other hand if you are the page author and, of course, are logged in the website, then the plugin will recognize you and in addition to the wikipedified word will provide an option (just above the wikipedified word) that allows you to add that particular word to the list of the most common words. By doing this the all occurrences of that word will not be wikipedified anymore in any page of your website, although you can edit later that list and undo this action if you want that.

The plugin will also cache locally the keyword - Wikipedia URL pair so that once it knows the adequate URL for a keyword then it never ask Wikipedia about it, thus everything works fast and smooth.

Note: you are not restricted to English language, you actually can implement this feature for any language you want. It’s only that the plugin installs by default an English file called common-words.en. If you want to implement this features for pages written in Spanish then provide a file called common-words.es. If you want for German language then provide a file called common-words.de. And so on.
 

¹ they are not part of the most common words; for English language see www.wordfrequency.info and www.newgeneralservicelist.org

Thanks to WordPress the installation process is straightforward:

  1. Download the plugin .zip archive and save it to a temporary location (like temp folder).
  2. Select the menu Plugins > Add new in WordPress then choose the Upload command (in the upper-left of the "Add new" page)
  3. Press Browse button and then select the plugin's .zip file that you have previously placed it at that temporary location
  4. Now press the "Install now" button which lyes at the right of the Browse button. In about 2 seconds or so the plugin is installed 🙂
  5. If installed successfully then all that remains is to active it. WordPress provides an Activate link right in the installation page or in the Installed Plugins page.

How looks the link on your web page? It is just a thin dotted-line under that word, using your current paragraph style:

wikipedify-how-it-looks

How can you (as the blog/post author) remove certain words from being highlighted/linked to Wikipedia? Mouse-over then click "remove this link".

wikipedify-exclude-word

0.2.3-2

2014-03-31

  • Several improvments.

2014-02-23

  • enqueue .js script only when is_admin user.
  • excluded words within shortcodes
  • added matches of words with diacritics.
  • added matches of compound words

2014-02-16

  • fixed word exclusion on other languages (than "en")
  • fixed a bug that hinder the functioning on mobile devices

2014-02-12

  • various deployment improvments.
  • updated docs
  • work around install update

2014-02-11

  • renamed the .css file.
  • major improvments in Ant build script (local/remote repo build)
  • fixed a bug in .js file (related to plugin-dir location)
  • fixed a bug in remove-bookmarks
  • code refactoring in plugin main file
  • fixed some bugs in plugin auto update code (damn space char!)
  • added documentation

2014-02-08

  • maintain automatically the local/remote repo by Ant build script.
  • added plugin auto updater.
  • added Ant deployment script
  • added readme.txt

2014-02-07

  • Git keyword expanssion.
  • Initial snapshot.

I removed by mistake a key. How to undo this?

Just go where the plugin is installed (ie. /wp-content/plugins/wikipedify) and edit the file common-words.<lang>, where <lang> is the language code (see ISO_639_1) of your file. Add, remove, do whatever you like.

Can a visitor see the "remove this link" button?

No, he/she can't. Do you want them to change your web page style? Make them the author/administrator of your posts/blog!

How to change the underline style?

Just edit the /wp-content/plugins/wikipedify/css/wikipedify-style.css file and change it how you like it.

There is no Settings page. What to do?

In this version it doesn't have a Settings page, not that it needs. Perhaps it would be a nice-to-have feature just to edit the common-words file within the WP interface. It's on my priority list, though.

Leave a Reply

Your email address will not be published. Required fields are marked *