Extension:GoogleKnowledgeGraph

The Google Knwoedge Graph extension automatically gets short summary from GoogleKnwoledgeGraph and adds it to a tooltip.

The extension was created to learn extension development and comment code as much as possible so newcommers would understand how to create a simple extension with frontend/backend (parser+api).

Usage
Put smth like that on your page: And save the page. After that hover cursor on the word "Mario" and see:



Production usage disclamer
The extension is not well suitable for production usage:


 * 1) Google Knowledge Graph provides only 100 000 requests for free per day.
 * 2) For small wikis it is more than enough but on big ones the limit will be depleted quite soon
 * 3) Howewer, adding long-libving cache may significantly improve the situation if for some reason you still want to use it in prod.
 * 4) It is not a big issue for English but Google Knowledge Graph supports search terms in Nominative case only.

Howewer, if you find it useful, long-term caching can be added for search terms

Installation and configuration
The extension tested on MediaWiki 1.35. Probably it will work on 1.29+ (the used hooks are quite old).

To install the extension:


 * 1) clone the repository to your extensions/ subfolder:
 * 2) Load the extension in your LocalSettings.php:
 * 3) Setup API key:
 * 4) Get Google API token here
 * 5) In LocalSettings.php set your key:
 * 6) Setup language:

Done!